Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Hack OpenJDK with NetBeans IDE

DZone's Guide to

Hack OpenJDK with NetBeans IDE

· Java Zone
Free Resource

Bitbucket is for the code that takes us to Mars, decodes the human genome, or drives your next car. What will your code do? Get started with Bitbucket today, it's free.

Since recently, the OpenJDK repository contains a NetBeans project for all C/C++ parts of the OpenJDK, including Hotspot.

That means that now NetBeans IDE can easily be used to review, hack, and develop OpenJDK. Simple howto is as follows:

  • Get OpenJDK, as follows:
    #hg clone http://hg.openjdk.java.net/jdk8/build jdk_trunk
    #cd jdk_trunk
    #sh get_source.sh
    #mkdir build
    #cd build
    #sh ../configure
  • After the "configure" step is complete, remember the value assigned to "Boot JDK" and then:
    #export IDE_ALT_BOOTDIR=jdk_path_found_by_configure
    #netbeans
  • Start NetBeans IDE (with C++ support) and open projects from "common/nb_native". The project already contains configurations for Solaris, Linux, and MacOS. Just switch to the appropriate configuration and enjoy hacking OpenJDK.

Screenshots

Source tree, navigator, mark occurrences, and macro expansion:

Call graph:

"Run", which runs Java, and shows the same info as in the command line:

Bitbucket is the Git solution for professional teams who code with a purpose, not just as a hobby. Get started today, it's free.

Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}