Obviously, when someone is writing any code, some debugging is required. It is no surprise that NetBeans, as a high-standard IDE, provides some tools to do that. This recipe will show how to debug the Java code using NetBeans.
You will need to install NetBeans and set up a development environment, as described previously in the chapter.
We will use NetBeans to debug our own OpenJDK Java code. We will need to rebuild OpenJDK with debug symbols, and configure NetBeans to make debugging possible:
First, let's make our OpenJDK instance with debug symbols:
bash ./configure --enable-debug make all CONF=linux-x86_64-normal-server-fastdebug
Let's ensure that a debuggable version is built:
./build/linux-x86_64-normal-server-fastdebug/jdk/bin/java -version openjdk version "1.8.0-internal-fastdebug" OpenJDK Runtime Environment (build 1.8.0-internal-fastdebug-dsmd_2014_03_27_05_34-b00) OpenJDK 64-Bit Server VM (build 25.0-b70-fastdebug, mixed...