Troubleshooting Guide for the NetBeans OpenJDK Projects
This page lists issues known to arise when working on the JDK with
NetBeans IDE 6.0. We will try to keep it updated, and give workarounds
and/or solutions.
Tests won't run: waiting for lock
Occasionally when running tests, there will be a delay, followed by a
message like this:
Waiting to lock test result cache for
/tmp/j2se/build/linux-i586/jtreg/jconsole/JTwork for 20 seconds
The workaround is to stop the tests, recursively remove the
appropriate
jtreg/<project>
directory by hand, and re-run the tests.
Can't run nor debug a single test in some projects
In most projects, you can run a single test by opening it in the editor,
and choosing Run File from the context menu. But if you try this with
some tests, instead you'll see that
all tests from
all projects
are run. This is only known to happen when a test is run by a
.sh file.
The "workaround" is to not try to run a
.sh test (that is,
don't use Run File on the
.java file nor the corresponding
.sh file).
Debugging is similarly problematic, because both running an individual
testcase and debugging it use the same underlying infrastructure.
Can't clean/build the awt2d project.
If you clean and then build the awt2d project, you will get
compilation errors due to missing files. This is because cleaning
removes some files that are extracted from the bootstrap JDK, and the
build process has a bug. The workaround is to avoid clean builds!
When that's not possible, clean the project, then build the j2se
project. Then do incremental builds.
AWT & 2d project shows errors in files for Windows platform
If you're using Windows and have opened the AWT & 2d project and then
open the TaskList for the, you'll see some errors. Look closely, and
they're for files with "e;solaris"e; in the pathname. h2
cause them to not be displayed add a filter to the Task List (Filter
icon, Edit, New, name it "Solaris", click the Keywords tab, choose
Location, Does not Contain, enter "src/solaris/classes" in the text
field, then click OK).
AWT & 2d project navigates to wrong file
When using the IDE's navigation actions such as Go To Source, and
there are both Windows platform and Unix platform source files that
contain the identifier you're navigating from, NetBeans chooses one of
them, and not necessarily the right one for the platform you're
running on. Unfortunately there's currently no workaround for this,
except to recognize that this has happened (e.g., "hey! The method
who's source I want to see doesn't even exist in this file!") and then
manually open the corresponding file for the other platform.
Use gmake on Solaris
On Solaris, be sure to use gmake (and not plain make). If it is in
your $PATH, you're all set. If not, you can add this to your
build.properties file
make=/foo/bar/gmake
Can't debug the Swing project's demo application
This is a bug. In make/netbeans/swing/build.xml, change
arg line="${jvm.args}"
to
jvmarg line="${jvm.args}"
While that will allow you to debug, there is still a problem in that
upon reaching breakpoints, the editor will not display the line of
code at which the program has stopped, nor will single stepping work
correctly. The workaround for these is to set more breakpoints, or
use Run to Cursor.
Navigating to code outside the project loads files from src.zip
If you navigate to a source file that is not in your project's
sources, it will be extracted from $bootstrap.jdk's src.zip file and
then displayed. For example, if you're working on the Swing project
and use
Go To Source on the type
Vector, the
Vector.java which gets displayed is from
bootstrap.jdk/src.zip.