JBuilder program work well, but in commandprompt not!
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   volkmar_wieser
Posted On:   Tuesday, August 17, 2004 03:43 AM

Hello!

I build a standalone application with JBuilder and it works verry well, but when i start the application in the commandprompt with "java MainClass" the program throws a NullPointerException. Why?? can anybody help me!
thanks volkmar!

Re: JBuilder program work well, but in commandprompt not!

Posted By:   Simon_Ablett  
Posted On:   Tuesday, August 17, 2004 09:38 AM

A NullPointerException is generated when you try to access an attribute or method of an object which has not yet been instantiated or which has been de-referenced (sic!). For example, consider a class 'A' having a method 'getVal'. The following code would generate a NullPointerException...

A myA = null;
System.out.println(myA.getVal());

I would suggest that something is not being instantiated properly. This is probably a configuration issue. Are you passing in the same command line parameters in both instances? Are you referencing the same resource / property files?

Regards.
About | Sitemap | Contact