Course Setup
You will install Java10 or Java11 (more of a pain) on your lappy. You will then come to me and demonstrate the following. For text editing, you may use your favorite text editor (ex: Atom, vim, emacs, Notepad++)
Next, if you are a Windoze user, you need to update your
environment variables so your path can see javac and
java.
- Compile the test Java file shown below and run it at your machine's command line.
- Compile the test JavaFX file shown below and run it at your machine's command line.
Test Java File
public class Test
{
public static void main(String[] args)
{
System.out.println("FOO");
}
}
Test JavaFX File
import javafx.application.Application;
import javafx.application.Platform;
import javafx.stage.Stage;
import javafx.scene.Scene;
public class TestFX extends Application
{
@Override
public void start(Stage primary)
{
primary.setTitle("Testing JavaFX");
primary.show();
}
}