How to handle a NullPointerException
Andrew Haley
aph@redhat.com
Wed Feb 20 12:52:00 GMT 2008
Dimiter Stamenov wrote:
> Hi experts,
>
> I have successfully compiled a Java project with gcj from Java source, but when start the compiled executable, a java.lang.NullPointerException is thrown without a stack trace.
>
> If I could know what is the reason it, I may eventually be able to modify the source to avoid it, but how to know that? When I run the program with the standard JVM, there is no problem.
>
> Everything I know is the class and high-level method in which it happens.
>
> The system is Windows XP with GCJ 4.2 from http://www.thisiscool.com/gcc_mingw.htm.
>
> The compile command is:
> gcj --main=Universal -o universal.exe -g -s @files.list
>
> The output when start the universal.exe is:
> java.lang.NullPointerException
> <<No stacktrace available>>
Do simple programs work?
Andrew.
More information about the Java
mailing list