JavaFX UI application representing the server side of a socket connection
This application is written in Java using the JavaFX API. It represents the server side of a socket connection and can:
- connect to a socket at a configurable port
- attempt to connect one time, or continually attempt to connect
- send and receive text messages from a connected socket
- retrieve sent and received messages
It is typically used in conjunction with a client-side JavaFX UI application called SocketClientFX.
It can be found here: https://github.com/jtconnors/SocketClientFX
This version of the source code is tagged 1.0-JDK14-maven. As its name suggests, it is specific to JDK 14 and can be built with the apache maven build lifecycle system. It uses the jdk.incubator.jpackage module autilities whose API has not been finalized and is subject to change. As such, the scripts contained in this project will insist that JDK 14 be used because subsequent jpackage releases may be incompatible.
Requirements:
- Your default JDK should point to a valid JDK 14 runtime in your
PATH. - Prior to running any of the scripts in this project, either the
JAVA_HOMEor$env:JAVA_HOME(depending upon the platform in question) environment variable must be set to a valid JDK 14 runtime. - In order to generate
EXEorMSIinstallers for Windows using the scripts in this project, the WiX toolkit version 3.0 or greater must be installed and placed on thePATH.
Of note, the following maven goals can be executed:
mvn cleanmvn dependency:copy-dependencies- to pull down dependentjavafxandcom.jtconnors.socketmodulesmvn compile- to build the applicationmvn package- to create theSocketServerFXmodule as a jar filemvn exec:javato run the application
Furthermore, additional .sh and .ps1 files are provided in the sh/
and ps1\ directories respectively:
sh/run.shorps1\run.ps1- script file to run the application from the module pathsh/run-simplified.shorps1\run-simplified.ps1- alternative script file to run the application, determines main class fromSocketClientFXmodulesh/link.shorps1\link.ps1- creates a runtime image using thejlinkutilitysh/create-appimage.shorps1\create-appimage.ps1- creates a native package image of application using JEP-343 jpackage toolsh/create-dmg-installer.sh- creates a native MacOS dmg installer of this application using JEP-343 jpackage toolps1\create-exe-installer.ps1- creates a native Windows EXE installer of this application using JEP-343 jpackage toolps1\create-msi-installer.ps1- creates a native Windows MSI installer of this application using JEP-343 jpackage tool
Notes:
- These scripts have a few available command-line options. To print out
the options, add
-?or--helpas an argument to any script. - These scripts share common properties that can be found in
env.shorenv.ps1. These may need to be slightly modified to match your specific configuration. - A sample
Microsoft.PowerShell_profile.ps1file has been included to help configure a default Powershell execution environment. A similar file can be generated specific to environments appropriate for running thebash(1)shell with a.bash_loginor.bash_profilefile.
See also:
- SocketClientFX: https://github.com/jtconnors/SocketClientFX
- MultiSocketServerFX: https://github.com/jtconnors/MultiSocketServerFX
- maven-com.jtconnors.socket: https://github.com/jtconnors/maven-com.jtconnors.socket