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

distribution. This will include Ant-based and Maven-based Java 9 projects, so the Ant and Maven Build Systems
will be upgraded to support Java 9 modules.
The Java 9 SE application project will initially support single-module development (all modules
included) as well as a new project type that will support multimodule development, so you can pick and
choose Java 9 modules. We will eventually be using just a few of the core JavaFX modules (base, graphics,
and media) so that our distribution data footprint will be significantly reduced, but we’ll do that at the end of
this book, as this is a more advanced topic.
Apache Ant is being updated to get support for JDK 9 covering the basic Ant tasks, and all the tools
in Java 9 SE distribution will work correctly when NetBeans 9 is running on JDK 9 or while JDK 9 is set to
be your project’s Java Platform. The NetBeans Profiler now works with JDK 9 applications, and Java shell
support and integration with the NetBeans 9 IDE has been added at every level of NetBeans 9 projects.
Multirelease JAR files are now handled properly by NetBeans 9 and its integrated Java 9 support.
Finally, the NetBeans 9 project will soon be moved over to Apache. The proposal for this can be
reviewed at https://wiki.apache.org/incubator/NetBeansProposal. The proposal covers how the change
will impact the NetBeans 9 releases. This moving of source, bugs, build jobs, and related services will happen
during the NetBeans 9.0 and 9.0.1 releases.


IDE User Experience: More Information and Intelligent Coding


NetBeans 8.1 introduced an improved Code Navigator pane, which now distinguishes the superclasses
or interfaces that your game’s Java methods are contained in, along with the method name and its
return type. Code completion, which we’ll be covering in the next major section of this chapter, has also
been significantly improved in almost all of the areas of NetBeans 8.1 (and in later versions such as 8.2
and 9), including improved preselection of the most relevant Java code insertion item, improved prefix
autocompletion, improved subword autocompletion, and improved autocompletion of Java enum values.


Java Code Profiling: Completely Redesigned Java Profiling Suite


NetBeans did a complete overhaul of its Java Code Profiling Suite in version 8.1, including a simplified
profiler setup, new single-click Java code profiling without having to set up anything in advance, and
the ability to select methods or classes for detailed profiling simply by selecting check boxes next to the
code profiling results. There is an improved ability to attach to running processes, and selected PIDs are
remembered for subsequent sessions. New features include the monitoring of CPU utilization, an ability to
dump threads from the profiled application, the ability to display merged results for selected threads in CPU
profiling views, and an improved live application profiling view.
Other new profiler features include live forward and live reverse call trees in your CPU profiling results,
live allocation trees in your System Memory profiling results, and simplified tweaking of settings during a
profiling session.
This NetBeans Profiling Engine has the most improvements of any area of the 8.1 (and later) IDEs,
including a significantly faster connection speed when connecting to an already running process, a limit
on outgoing calls from your currently profiling methods, and the ability to profile your System Memory
performance for certain preselected classes. All of these will be useful for optimizing Pro Java 9 Games
Development as games require peak performance.
The profiler User Interface (UI) is now much more polished and professional, featuring one unified
profiling window with all actions, settings, and results in one single customizable, managed view. There is a
separate Snapshots window pane, which you can use to manage persistent profiling data.
There are also a completely new, 100 percent reimplemented profiler tables and tree tables area,
which delivers a native-looking profiling appearance, allowing developers to seamlessly integrate code
development and optimization.

Free download pdf