I am a C# Developer, and I recently acquired a project at work that is Java.
The Project is to modify an existing Java application, which I have done and was simple. However, I can not for the life of me get it to run from the command line.
I am receiving the error
Exception in thread "main" java.lang.NullPointerException
at com.dhl.sop.label.LabelReportHandler.main(LabelReportHandler.java:63)
There is no code at line 63 in that file. I have altered the file dramatically just to see that line number change, and it hasn’t. I am really not sure what else to do, I have googled a bit and I have come up empty handed. Any information and/or suggestions are greatly appreciated.
Thank you!
– Jeffrey
EDIT: Here is the source code
http://speedy.sh/5wdBq/SOPLabel.zip
EDIT: The command I am running
generateSOPLabel.cmd
EDIT: The command the cmd script is running
java com.dhl.sop.label.LabelReportHandler
Ok, it’s working just fine for me after fixing the ant build script to build the files and pointing the startscript to the correct output files.
Your problem is probably that Netbeans are building the files to the BUILD folder and the script is looking in CLASSES.
Changes in startscript:
Added to build.xml:
Built with:
ant compileand thenenter code here./generateSOPLabel.sh outputs: