Game Development Reference
In-Depth Information
NetBeans is accessing it from currently to run it. On my system this location was
C:\Users\user\Documents\NetBeansProjects\InvinciBagel\dist\run1331700299\InvinciBagel.jar.
Let's take a look at some of the other Output tab text to see what NetBeans did to
get to the point where it could run the
.jar
file for this project. First, the compiler de-
letes and rebuilds the
build-jar-properties
file, in the
\NetBeansPro-
jects\InvinciBagel\build
folder, based on the unique attributes of your game
application.
Next, Ant creates a
\NetBeansProjects\InvinciBagel\dist\
distribu-
tion folder to hold project
.jar
files and then, detecting JavaFX usage, launches
ant-javafx.jar
to add JavaFX capabilities to the Ant build engine, which will
create the
.jar
file. Finally, you will see a warning to change the
mani-
fest.custom.codebase
property from an asterisk value (which means
“everything”) to a specific value. I may get into the manifest and permissions area of
application development later in the topic, after you are a bit more advanced. JavaFX is
then launched, and the
.jar
file is built.
Ant
is the build engine, or
build tool
, that creates your
.jar
file. Other build en-
gines, such as
Maven
and
Gradle
, can also be used in NetBeans, because as you now
know, NetBeans is extensible!
Ant is used in the Eclipse IDE as well and is an Apache open-source project that
has been around for a very long time. To learn more about the Ant build system and
Next, you will explore the profiling capabilities in NetBeans 8.0, which can analyze
your code at runtime and let you know how efficiently (or inefficiently) your Java 8
code is running. This is important for a game, especially an arcade game or any game
that is moving
sprites
around in real-time on a user's screen. You will be learning
game concepts and design in
Chapter 6
of this topic.
Profiling Your Java 8 Game Project in
NetBeans 8.0
To launch the Java 8 code profiling utility, using the Profile menu at the top of the IDE,
select Profile Project (InvinciBagel) (the first menu item), as illustrated in
Figure 2-12
,
or use the Profile Project shortcut icon, which is visible in the collapsed screen view
given in
Figure 2-13
(you can tell that I collapsed the screenshot by the Java code line