This is a simple chat application written in Java, allowing multiple users to connect and communicate with each other.
-
Clone the repository:
git clone https://github.com/booringreader/butternet.git
-
Navigate to the
src
directory:cd butternet/src
-
Compile the
Client.java
andGUI.java
files in two different Terminal windows:javac Client.java GUI.java
-
Open a new terminal window & compile the
Server.java
file:javac Server.java
-
Launch the server by running the following command:
java Server
-
Open two new terminal windows & launch the GUI session of the application by running:
java -cp . src.GUI
-
You can now use the GUI to send and receive messages between the two clients.
By default, the server is configured to use port 8000. If this port is already in use on your machine, you can change it in the Server.java
& GUI.java
files before compiling.
Check for open ports on macOS using:
sudo lsof -i -P -n | grep LISTEN