[All]
JBuilder 4: Compiler Error: "Error #: 2301 : internal compiler error: java.lang.NullPointerException"
By: Josh Fletcher
Abstract: How to work around this error in JBuilder 4.
Question:
|
When I compile my class in JBuilder (example, "Test.java") I get the following compiler error:
"test.java": Error #: 2301 : internal compiler error: java.lang.NullPointerException
What can I do?
|
| |
Answer:
|
This is caused by a confirmed bug in the JBuilder compiler with import statements. For example:
import javax.swing.text.AbstractDocument.*;
To work around this problem you need to use the fully qualified (canonical) class name for any class that you would like to use from this package. Note that you will not be importing the package at all, just use the name in line, e.g.:
javax.swing.text.AbstractDocument.LeafElement foo = new javax.swing.text.AbstractDocument.LeafElement();
|
| |