Hard to tell without seeing some code or error/exception stack traces. The most typical cause for problems of this kind are incomplete classpaths. Maybe your database driver class is missing on the classpath.
Some things you might check:
- Do you get some sort of error?
- Is the jar executable? If yes - that's the case when you start the application with something like
java -jar path/to/myjar.jar
- the classpath must be specified in the jar files Manifest, any -cp
value is simply ignored.
Looking at your last comment, I'm pretty sure, that this is a classpath problem. The database driver usually resides in a different jar file and if the classpath entry in your manifest.mf file is blank, then the driver can't be loaded. This should result in an exception but maybe this is catched somewhere.
Solution #1 - edit the manifest.mf file and add all required libraries according to this tutorial:
Class-Path: jar1-name jar2-name directory-name/jar3-name
Solution #2 - don't start the application with the -jar
option but use the standard way:
java -cp yourLib.jar;database-driver.jar your.application.Main
(all library entries have to be given with a correct relative or absolute file path)