Pro Java 9 Games Development Leveraging the JavaFX APIs

(Michael S) #1
Chapter 6 ■ Setting Up YoUr Java 9 iDe: an introDUCtion to netBeanS 9

You can also change these colors, if you like, but I suggest you use the industry-standard coding colors
implemented by Oracle NetBeans 9 and earlier versions, as these have become standardized over time.
Before you can run this bootstrap code to make sure that NetBeans 9 wrote bootstrap Java 9 code for
you that actually works, you will need to compile this code into an executable format that will be run using
system memory. NetBeans 9 also manages the compilation and run processes for you, even though these
operations actually utilize utilities provided by the Java Development Kit (JDK).
Let’s take a look at how this is done using NetBeans 9 next, using the NetBeans 9 Run menu, which
contains Run, Test, Build, Clean, Compile, Check, Validate, Generate JavaDoc, and other Run-related Java
compilation functions.


Compiling a Pro Java 9 Game Project in NetBeans 9


In the interest of showing you how to compile your Java game code before you run and test it, I am showing
you the step-by-step work process here so you are exposed to every step of the compile/build/run/test Java
code testing process. Click the Run menu and the Run Project (JavaFXGame) (first) menu item in order
to build, compile, and run your Java 9 and JavaFX code, as shown in Figure 6-8. You can also use the F6
shortcut key, as indicated on the right side of the menu item selection. Now your project is ready to test!


Figure 6-7. Examine the bootstrap JavaFX code NetBeans created for you, based on the Name and
Location dialog

Free download pdf