Server-Client Chat
projects java ipc-communication server-clientServer-Client Communication
This is a JAVA based chat application, which would work to the hosts connected through LAN.
Info
- Language = Java
- GUI = JavaFx
- Build system = maven
Application features
- 1 Server Host, multiple clients
- Different ports, different hosts
- Any other, let’s discuss
Setup
- If you have already installed java and then check java version,
java --version
-
If not installed jdk, then try to install latest jdk, as it supports modular dependencies, where importing of JavaFX SDK will be taken by build system maven. You will have so many advantages during deployements differerent OS.
- If JDK <= 1.8, then there is no support for maven java fx, so you can tweak some stuff and work around, but the advantage in JDK 1.8 has inbuilt JavaFX sdk, so no need to again setup.
- In eclipse or preferred IDE try installing JavaFX plugin through
- Install new software >
- Name : e(fx)clipse
- Site : http://download.eclipse.org/efxclipse/updates-released/3.6.0/
- Or Install via Eclipse Marketplace by searching e(fx)clipse
- Install new software >
- In your IDE, File > Import > Existing Maven Projects > Root_Dir (containing pom.xml) > Next > Finish
- Since JDK <=1.8 has JavaFX preinstalled, try commenting the maven dependency “org.openjfx”, so as to prevent duplication class errors
<!-- <dependency> <groupId>org.openjfx</groupId> <artifactId>javafx-controls</artifactId> <version>12</version> </dependency> <dependency> <groupId>org.openjfx</groupId> <artifactId>javafx-fxml</artifactId> <version>12</version> </dependency> -->
- Delete the file module-info, and set up jdk/jre complaince to the preferred installed version.
- Project > Clean > Run project
- In eclipse or preferred IDE try installing JavaFX plugin through
- If JDK > 1.8, which is 9 or higher versions, please follow the below steps
- In your IDE, File > Import > Existing Maven Projects > Root_Dir (containing pom.xml) > Next > Finish
- After maven downloads the dependecies, try maven run, then a window should appear
- If you have more trouble, then try searching in StackOverflow for more support based on your OS
- Edit the Run Configuration, based on the path of your JavaFX SDK, check Main class as
com.frankie_chat.App
- If module errors occurs
Error: JavaFX runtime components are missing, and are required to run this application
then please add VM args as below, else not required, replace with your JavaFx_SDK_PATH
--module-path /Library/Java/JavaVirtualMachines/javafx-sdk-11.0.2/lib
--add-modules=javafx.controls,javafx.fxml,javafx.base,javafx.graphics,javafx.web
For more info regrading JavaFx setup, please visit JavaFX Setup Guide