12.1. Getting StartedΒΆ
In this chapter, we will see how to build and run graphical applications in Java and JavaFX on the Odin server. To do so, you first need to ensure that your terminal emulator supports X-forwarding. This allows the Graphical User Interface (GUI) parts of your application to be forwarded to (and viewed on) your local computer. Since the application is running on Odin, we need to make sure the GUI shows up on our machines instead of on Odin. To check your setup, work through the rest of this section of the tutorial.
First, log in to Odin using the
sshcommand along with the-XYCoption. As always, be sure to replaceusernamewith your Odin username.ssh -XYC username@odin.cs.uga.edu
If you encounter problems in this step, then please ensure that you have followed the setup instructions for macOS users or Windows users.
Also, the
-X,-Y, and-Coptions can be used individually with or without each other. See the manual page forsshfor more information about the differences between these options.Keep this X-forwarded SSH session open for the compile and run steps in Compiling JavaFX Applications. The application runs on Odin, but its window should appear on your local computer.
Use the following command to download the starter code for this tutorial and place it into a subdirectory called
cs1302-javafx-example:bundle1302 javafx-example- downloading cs1302-javafx-example bundle... - verifying integrity of downloaded files using sha256sum... - extracting downloaded archive... - removing intermediate files... subdirectory cs1302-javafx-example successfully created
Change into the
cs1302-javafx-exampledirectory that was just created and look around. There should be multiple Java files contained within the directory structure. To see a listing of all of the files under thesrcsubdirectory, use thetreecommand as follows:tree src