How to handle a NullPointerException

Dimiter Stamenov pamir@abv.bg
Wed Feb 20 15:37:00 GMT 2008


Hi Andrew, yes, all other programs I have compiled work fine, except this. It is supposed just to take the text from a MS Word file, but until that moment I have not succeed to do that with gcj compiled version...

 >Do simple programs work?
 >
 >Andrew.



 >-------- Îðèãèíàëíî ïèñìî --------
 >ГЋГІ:  Andrew Haley <aph@redhat.com>
 >Îòíîñíî: Re: How to handle a NullPointerException
 >Äî: Dimiter Stamenov <pamir@abv.bg>
 >Èçïðàòåíî íà: Ñðÿäà, 2008, Ôåâðóàðè 20 14:52:01 EET
 >----------------------------------
 >
 >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