Now using ant.
This commit is contained in:
parent
f5970b351b
commit
bcb4f03067
16
README.md
16
README.md
@ -3,10 +3,14 @@ ConsoleChat
|
|||||||
|
|
||||||
This program was made as a personal project to learn Java network programming. The concept of it is rather simple, all it does is send messages to a server which, in turn, sends the message to everyone else (aside from some other commands added). Although the license is MIT, please consider also disclosing the source-code under an open-source license. It helps to give back to the community and help others just like this may have helped you.
|
This program was made as a personal project to learn Java network programming. The concept of it is rather simple, all it does is send messages to a server which, in turn, sends the message to everyone else (aside from some other commands added). Although the license is MIT, please consider also disclosing the source-code under an open-source license. It helps to give back to the community and help others just like this may have helped you.
|
||||||
|
|
||||||
###Compilation
|
###Compiling
|
||||||
_Compile in the corresponding directory._
|
To compile the source code, make sure you have JDK and Apache Ant installed. Then run the following command:
|
||||||
|
```
|
||||||
|
$ ant jar
|
||||||
|
```
|
||||||
|
|
||||||
```
|
###Contributing
|
||||||
$ javac Server.java
|
To contribute to the project, simply open a pull request and I'll make sure to get back to you as soon as possible.
|
||||||
$ javac Client.java
|
|
||||||
```
|
###License
|
||||||
|
This program is licensed with an [MIT license](/LICENSE). However, please take into account that you took from the community, and you should make sure to give back.
|
||||||
|
31
build.xml
Normal file
31
build.xml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<project name="ConsoleChat" basedir="." default="main" >
|
||||||
|
<property name="src.dir" value="src" />
|
||||||
|
<property name="bin.dir" value="bin" />
|
||||||
|
<property name="classes.dir" value="${bin.dir}/classes" />
|
||||||
|
<property name="jar.dir" value="${bin.dir}/jar" />
|
||||||
|
<property name="main-class-client" value="consolechat.client.Client" />
|
||||||
|
<property name="main-class-server" value="consolechat.server.Server" />
|
||||||
|
|
||||||
|
<target name="clean" >
|
||||||
|
<delete dir="bin" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="compile" >
|
||||||
|
<mkdir dir="${classes.dir}" />
|
||||||
|
<javac srcdir="${src.dir}" destdir="${classes.dir}" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="jar" depends="compile" >
|
||||||
|
<mkdir dir="${jar.dir}" />
|
||||||
|
<jar destfile="${jar.dir}/${ant.project.name}-client.jar" basedir="${classes.dir}" >
|
||||||
|
<manifest>
|
||||||
|
<attribute name="Main-Class" value="${main-class-client}" />
|
||||||
|
</manifest>
|
||||||
|
</jar>
|
||||||
|
<jar destfile="${jar.dir}/${ant.project.name}-server.jar" basedir="${classes.dir}" >
|
||||||
|
<manifest>
|
||||||
|
<attribute name="Main-Class" value="${main-class-server}" />
|
||||||
|
</manifest>
|
||||||
|
</jar>
|
||||||
|
</target>
|
||||||
|
</project>
|
@ -1,3 +1,5 @@
|
|||||||
|
package consolechat.client;
|
||||||
|
|
||||||
import java.net.*;
|
import java.net.*;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.lang.*;
|
import java.lang.*;
|
@ -1,3 +1,5 @@
|
|||||||
|
package consolechat.client;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.net.*;
|
import java.net.*;
|
||||||
|
|
@ -1,3 +1,5 @@
|
|||||||
|
package consolechat.server;
|
||||||
|
|
||||||
import java.net.*;
|
import java.net.*;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
@ -1,3 +1,5 @@
|
|||||||
|
package consolechat.server;
|
||||||
|
|
||||||
import java.net.*;
|
import java.net.*;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user