FeaturesPluginsDocs & SupportCommunityPartners

Working with the Open Sourced J2SE Project

One of the open sourced JDK NetBeans projects is called "j2se". The sources of this project build the Java SE workspace, which is, basically, all of Java SE except hotspot. The latter is provided by the "World" project.

In this tutorial, we build the J2SE project.

Note: The J2SE project exists for building the entire Java SE source base, which is in the j2se directory. Rather than using this project for editing Java code, you are recommended to use one of the other projects, such as Swing, which will narrow the scope of the sources to a more manageable size. As an alternative to using the IDE, you can also build this project with Ant, from the command line, and redirect the output to a log file. Be aware that it could take quite some time to build this project, especially when compared to most of the others.

When encountering problems of any kind, please consult the Troubleshooting Guide.

Setting up

Download and install the OpenJDK sources, and then open the J2SE project, as explained in Getting Started with OpenJDK in NetBeans IDE.

Once you have opened the project, the Projects window should look as follows:

J2SE in projects window

Note: Since this is a Make-based project, follow the instructions in Setting Up an Environment for the NetBeans Make-Based OpenJDK Projects.

Building the J2SE Project

To build the J2SE sources, right-click the project in the IDE's Projects window and choose Build Project. The IDE runs the Ant script for the project and shows output in the Output window.

To view the build results, go to the Favorites window (Ctrl-3) and browse to the "j2se" folder. Once you have added the folder, you can see the newly created folders beneath the folder named after your operating system, such as build/linux-i586, as shown in the following image:

j2se build outputs


Companion
Projects:
MySQL Database Server   Open JDK: an Open SourceJDK   GlassFish Community: an Open Source Application Server    Mobile & Embedded Community    Open Solaris   java.net - The Source for Java Technology Collaboration   Virtual Box - full virtualizer  Open ESB - The Open Enterprise Service Bus Powered by