Help please exception when running from command line not in eclipse
Ricardo Estafan
Ranch Hand
Joined: Mar 29, 2004
Posts: 84
posted
0
Hello all,
if i run my application in eclipse all works well. If i ecport the file as a jar file runme.jar and run the application from the command line i receive the following exception :
I will show a snippet of the code :
How on earth can it be possible that it all runs in eclipse and not when i run it from the command line using the jar file...
Now i cannot debug because the problem is not occuring in eclipse environment.
What can i do best in this case? Please help me out [ January 29, 2005: Message edited by: Ricardo Estafan ]
Robert Konigsberg
Ranch Hand
Joined: Jun 23, 2004
Posts: 172
posted
0
1. Which line in your snippet is line 153? 2. Which variable is null? If you can't step through with a debugger, you can always use lots of 'if (blah == null)' everywhere, including stuff like 'if (clientGUI.getCustomerText() == null)'. 3. Finally, were you loading any additional classes or source files in your application?
That's a start.
SCJP 1.4 (91%)<br />SCJD 1.4 (376/400, 94%)
Steven Bell
Ranch Hand
Joined: Dec 29, 2004
Posts: 1071
posted
0
Usually if something runs in eclipse, but not on the command line, it is a classpath issue. The program can't find some needed file or jar. Although with a NullPointerException that may not be right unless you are getting an object from some factory.