0

I have a next problem. When I'm running project from NetBeans IDE evrything is fine. But when I'm trying to build the project I have exception:

Compiling 2 source files to D:\JAVA\Projects\streamer\build\classes
An exception has occurred in the compiler (1.7.0-ea). 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 java.lang.String.startsWith(String.java:1433)
    at java.lang.String.startsWith(String.java:1462)
    at com.sun.tools.javac.file.SymbolArchive.addZipEntry(SymbolArchive.java:49)
    at com.sun.tools.javac.file.ZipArchive.<init>(ZipArchive.java:63)
    at com.sun.tools.javac.file.SymbolArchive.<init>(SymbolArchive.java:41)
............
D:\JAVA\Projects\streamer\nbproject\build-impl.xml:603: The following error occurred while executing this line:
D:\JAVA\Projects\streamer\nbproject\build-impl.xml:245: Compile failed; see the compiler error output for details.

I'm not use String.startsWith method, but I'm use String.indexOf in one place:

int lastIndex = nodeName.indexOf("date",0);
if (lastIndex != -1 || nodeName.equals("birthday")) {
    txt_val = getHash(txt_val,Boolean.TRUE);
} else {
    txt_val = getHash(txt_val,Boolean.FALSE);
}

nodeName is not null. And I couldn't understand where is an error :(

Leonid
  • 92
  • 9

2 Answers2

1

Did you use Java 7 intentionally? Try Java 6 - it should be more stable. Look here Change JRE in NetBeans project

Community
  • 1
  • 1
zacheusz
  • 8,415
  • 3
  • 32
  • 57
  • I'm not JAVA programmer initially and I thought, that I must read some books about it for further programming :) – Leonid Jul 12 '11 at 10:07
  • look here http://stackoverflow.com/questions/4128256/change-jre-in-netbeans-project – zacheusz Jul 12 '11 at 10:12
  • All done Only two notes with JRE 1.6: AppNormaliser.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. – Leonid Jul 12 '11 at 10:18
0

Error is in compiler like the exception sayes. Why are you using java 1.7?

Eduard
  • 3,018
  • 1
  • 19
  • 28
  • Because it was installed on my workstation. I would try to use java 1.6 and wrote what would be happend. – Leonid Jul 12 '11 at 09:47