• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Help please exception when running from command line not in eclipse

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 1071
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ricardo Estafan
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes i am getting the database from a factory...

What could i do to test this?
 
Ricardo Estafan
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yo guys i found it the listselectiomodel was null.

But how on earth it didn't fire in eclipse... i don't know???
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic