JavaFX UI application representing the client side of a socket connection
This application is written in Java using the Java Module System and the JavaFX API. It represents the client side of a socket connection and can:
- be configured to connect to either a localhost or remote socket at a configurable port
- attempt to connect one time, or continually attempt to connect with a specified retry interval
- send and receive text messages from a connected socket
- retrieve sent and received messages
It is typically used in conjucntion with one of two server-side JavaFX UI applications:
SocketServerFX
(https://github.com/jtconnors/SocketServerFX)
or
MultiSocketServerFX
https://github.com/jtconnors/MultiSocketServerFX
This version of the source code is tagged 1.1-JDK21-maven
. As its name suggests, it is specific to JDK 21 and can be built with the apache maven
build lifecycle system. Since JDK 16, the jpackage API has been standardized, and as such the scripts contained in this project could be modified to build with and run with JDKs from JDK 16 onwards. Subsequent releases to JDK 21 have not been tested with this version of the project.
This project works on Windows, MacOS or Linux.
Requirements:
- Your default JDK should point to a valid JDK 21 runtime in your
PATH
. - Prior to running any of the scripts in this project, either the
JAVA_HOME
or$env:JAVA_HOME
(depending upon the platform in question) environment variable must be set to a valid JDK 21 runtime. - In order to generate
EXE
orMSI
installers for Windows using the scripts in this project, the WiX toolkit version 3.0 or greater must be installed and placed on thePATH
. - For certain Linux distributions (e.g. Oracle Linux ...) additional tooling, like for example
rpmbuild
, may be required in order to fully utilize thejpackage
utility.
Of note, the following maven goals can be executed:
mvn clean
mvn dependency:copy-dependencies
- to pull down dependentjavafx
andcom.jtconnors.socket
modulesmvn compile
- to build the applicationmvn package
- to create theSocketClientFX
module as a jar filemvn exec:java
to run the application
Furthermore, additional .sh
and .ps1
files are provided in the sh/
and ps1\
directories respectively:
sh/run.sh
orps1\run.ps1
- script file to run the application from the module pathsh/run-simplified.sh
orps1\run-simplified.ps1
- alternative script file to run the application, determines main class fromSocketClientFX
modulesh/link.sh
orps1\link.ps1
- creates a runtime image using thejlink
utilitysh/create-appimage.sh
orps1\create-appimage.ps1
- creates a native package image of application using JEP-392 jpackage toolsh/create-deb-installer.sh
- creates a native Linux DEB installer of this application using JEP-392 jpackage toolsh/create-dmg-installer.sh
- creates a native MacOS DMG installer of this application using JEP-392 jpackage toolps1\create-exe-installer.ps1
- creates a native Windows EXE installer of this application using JEP-392 jpackage toolps1\create-msi-installer.ps1
- creates a native Windows MSI installer of this application using JEP-392 jpackage toolsh/create-pkg-installer.sh
- creates a native MacOS PKG installer of this application using JEP-392 jpackage toolsh/create-rpm-installer.sh
- creates a native Linux RPM installer of this application using JEP-392 jpackage toolps1\create-generic-msi.ps1
- creates a generic MSI installer of the JDK in use for this build, using the JEP-392 jpackage tool
Notes:
- These scripts have a few available command-line options. To print out
the options, add
-?
or--help
as an argument to any script. - A sample
Microsoft.PowerShell_profile.ps1
file 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_login
or.bash_profile
file.
See also:
- SocketServerFX: https://github.com/jtconnors/SocketServerFX
- MultiSocketServerFX: https://github.com/jtconnors/MultiSocketServerFX
- maven-com.jtconnors.socket: https://github.com/jtconnors/maven-com.jtconnors.socket