Description
FULL PRODUCT VERSION :
>java -version
java version " 1.7.0_17 "
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
>javac -version
javac 1.7.0_17
ADDITIONAL OS VERSION INFORMATION :
OS name: " windows 7 " , version: " 6.1 " , arch: " amd64 " , family: " windows "
Default locale: en_AU, platform encoding: Cp1252
EXTRA RELEVANT SYSTEM CONFIGURATION :
>set path
Path=D:\Java\jdk1.7\bin;D:\Apache\Ant\1.8\bin;D:\Apache\Maven\3.0\bin;C:\Windows\system32;other windows directories
Java JRE home: D:\Java\jdk1.7\jre
Java JDK home: D:\Java\jdk1.7
A DESCRIPTION OF THE PROBLEM :
A NullPointerException in Enter.visitTopLevel (with stacktrace) is generated consistently when the -Xpkginfo:always flag is used with javac to compile a simple program in a simple package.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
>javac -Xpkginfo:always " D:\Test\test\HelloWorld.java "
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
>javac " D:\Test\test\HelloWorld.java "
>java -cp D:\Test test.HelloWorld
Hello World
ACTUAL -
An exception has occurred in the compiler (1.7.0_17). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates
. Include your program and the following diagnostic in your report. Thank you.
java.lang.NullPointerException
at com.sun.tools.javac.comp.Enter.visitTopLevel(Enter.java:291)
at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:459)
at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:258)
at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:272)
at com.sun.tools.javac.comp.Enter.complete(Enter.java:484)
at com.sun.tools.javac.comp.Enter.main(Enter.java:469)
at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:929)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:824)
at com.sun.tools.javac.main.Main.compile(Main.java:439)
at com.sun.tools.javac.main.Main.compile(Main.java:353)
at com.sun.tools.javac.main.Main.compile(Main.java:342)
at com.sun.tools.javac.main.Main.compile(Main.java:333)
at com.sun.tools.javac.Main.compile(Main.java:76)
at com.sun.tools.javac.Main.main(Main.java:61)
ERROR MESSAGES/STACK TRACES THAT OCCUR :
An exception has occurred in the compiler (1.7.0_17). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates
. Include your program and the following diagnostic in your report. Thank you.
java.lang.NullPointerException
at com.sun.tools.javac.comp.Enter.visitTopLevel(Enter.java:291)
at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:459)
at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:258)
at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:272)
at com.sun.tools.javac.comp.Enter.complete(Enter.java:484)
at com.sun.tools.javac.comp.Enter.main(Enter.java:469)
at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:929)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:824)
at com.sun.tools.javac.main.Main.compile(Main.java:439)
at com.sun.tools.javac.main.Main.compile(Main.java:353)
at com.sun.tools.javac.main.Main.compile(Main.java:342)
at com.sun.tools.javac.main.Main.compile(Main.java:333)
at com.sun.tools.javac.Main.compile(Main.java:76)
at com.sun.tools.javac.Main.main(Main.java:61)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
HelloWorld.java:
package test;
class HelloWorld {
public static void main(String[] args) {
System.out.println( " Hello World " );
}
}
---------- END SOURCE ----------
>java -version
java version " 1.7.0_17 "
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
>javac -version
javac 1.7.0_17
ADDITIONAL OS VERSION INFORMATION :
OS name: " windows 7 " , version: " 6.1 " , arch: " amd64 " , family: " windows "
Default locale: en_AU, platform encoding: Cp1252
EXTRA RELEVANT SYSTEM CONFIGURATION :
>set path
Path=D:\Java\jdk1.7\bin;D:\Apache\Ant\1.8\bin;D:\Apache\Maven\3.0\bin;C:\Windows\system32;other windows directories
Java JRE home: D:\Java\jdk1.7\jre
Java JDK home: D:\Java\jdk1.7
A DESCRIPTION OF THE PROBLEM :
A NullPointerException in Enter.visitTopLevel (with stacktrace) is generated consistently when the -Xpkginfo:always flag is used with javac to compile a simple program in a simple package.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
>javac -Xpkginfo:always " D:\Test\test\HelloWorld.java "
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
>javac " D:\Test\test\HelloWorld.java "
>java -cp D:\Test test.HelloWorld
Hello World
ACTUAL -
An exception has occurred in the compiler (1.7.0_17). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates
. Include your program and the following diagnostic in your report. Thank you.
java.lang.NullPointerException
at com.sun.tools.javac.comp.Enter.visitTopLevel(Enter.java:291)
at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:459)
at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:258)
at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:272)
at com.sun.tools.javac.comp.Enter.complete(Enter.java:484)
at com.sun.tools.javac.comp.Enter.main(Enter.java:469)
at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:929)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:824)
at com.sun.tools.javac.main.Main.compile(Main.java:439)
at com.sun.tools.javac.main.Main.compile(Main.java:353)
at com.sun.tools.javac.main.Main.compile(Main.java:342)
at com.sun.tools.javac.main.Main.compile(Main.java:333)
at com.sun.tools.javac.Main.compile(Main.java:76)
at com.sun.tools.javac.Main.main(Main.java:61)
ERROR MESSAGES/STACK TRACES THAT OCCUR :
An exception has occurred in the compiler (1.7.0_17). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates
. Include your program and the following diagnostic in your report. Thank you.
java.lang.NullPointerException
at com.sun.tools.javac.comp.Enter.visitTopLevel(Enter.java:291)
at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:459)
at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:258)
at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:272)
at com.sun.tools.javac.comp.Enter.complete(Enter.java:484)
at com.sun.tools.javac.comp.Enter.main(Enter.java:469)
at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:929)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:824)
at com.sun.tools.javac.main.Main.compile(Main.java:439)
at com.sun.tools.javac.main.Main.compile(Main.java:353)
at com.sun.tools.javac.main.Main.compile(Main.java:342)
at com.sun.tools.javac.main.Main.compile(Main.java:333)
at com.sun.tools.javac.Main.compile(Main.java:76)
at com.sun.tools.javac.Main.main(Main.java:61)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
HelloWorld.java:
package test;
class HelloWorld {
public static void main(String[] args) {
System.out.println( " Hello World " );
}
}
---------- END SOURCE ----------
Attachments
Issue Links
- relates to
-
JDK-6960424 new option -Xpkginfo for better control of when package-info.class is generated
- Closed