'dist' jar file doesn't work.

M

MS

Hi,

Using JDK 1.5 and Netbeans 4.0 my application's 'distribution' jar file
doesn't work properly. The app works perfectly when 'run' from the
Netbeans GUI, but when run from the 'dist' dir's jar file my app's GUI
appears but nothing works, at least the buttons to get data from a
database don't work and all the other functionality requires the data
first -- none of the error messages are displayed either so no 'can't
connect to db' or such like. And yes I am remembering to use 'clean and
build main project' to force the jar dist file to be re-created.

Any ideas?

Thanks,

MS
 
R

Roland

Hi,

Using JDK 1.5 and Netbeans 4.0 my application's 'distribution' jar file
doesn't work properly. The app works perfectly when 'run' from the
Netbeans GUI, but when run from the 'dist' dir's jar file my app's GUI
appears but nothing works, at least the buttons to get data from a
database don't work and all the other functionality requires the data
first -- none of the error messages are displayed either so no 'can't
connect to db' or such like. And yes I am remembering to use 'clean and
build main project' to force the jar dist file to be re-created.

Any ideas?

Thanks,

MS
Run your application from the commandline:
java -jar dist.jar
or
java -classpath dist.jar your.apps.Main

This should display error messages about missing classes, etc.
--
Regards,

Roland de Ruiter
___ ___
/__/ w_/ /__/
/ \ /_/ / \
 
M

MS

Roland emailed this:
Run your application from the commandline:
java -jar dist.jar
or
java -classpath dist.jar your.apps.Main

This should display error messages about missing classes, etc.

It does thanks.

I get a NullPointerException, how do you debug this when the app works
perfectly with no NullPointerException when run from Netbeans which, of
course, has the debugger in it?!

Cheers,

MS
 
M

MS

This should display error messages about missing classes, etc.
It does thanks.

I get a NullPointerException, how do you debug this when the app works
perfectly with no NullPointerException when run from Netbeans which, of
course, has the debugger in it?!

Solved -- the jar file was being run by the java.exe in the JRE not in the
JDK and the JRE did not have the DB stuff setup.

MS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top