Executing a jar via batch
Posted on 2004-08-13
I have an application which generates a jar. I need to run this jar via a batch file. AFter tinkering with the classpath for god know how long, I have finally been able to execute the jar as follows:
java com.oberon.runtime.ZipFileRuntime insertDB.jar where "com.oberon.runtime.ZipFileRuntime" is the main class as indicated in the manifest.mf
I placed this line "java com.oberon.runtime.ZipFileRuntime insertDB.jar" in a file called test.bat. But when I db clik this batch file it starts to throw an exception again :
Exception in thread "main" java.lang.NoClassDefFoundError: com/oberon/runtime/ZipFileRuntime
The strange thing is if I go the command prompt and type test.bat, it runs great ! without any exceptions.
Whats going on ??any suggestions ??