-
ABout Jar file (2 messages)
- Posted by: Ravindranadh Chowdary
- Posted on: January 31 2008 05:24 EST
I create a jar file for swing application.when i am trying to execute it gives error like java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver when i executing normal java file it is working properly. can you pls give me the solution for this exceptionThreaded Messages (2)
- Re: ABout Jar file by Rajarshi Bhose on February 01 2008 04:20 EST
- ...alternatively, use the jar's Manifest file by Andrew Doddington on February 05 2008 11:11 EST
-
Re: ABout Jar file[ Go to top ]
- Posted by: Rajarshi Bhose
- Posted on: February 01 2008 04:20 EST
- in response to Ravindranadh Chowdary
I create a jar file for swing application.when i am trying to execute it gives error like java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
when you are executing it as a normal application, the driver is in your class path. When you are executing the jar file, the driver is not. Run the jar file with the -cp command and provide the driver. Hope this helps!
when i executing normal java file it is working properly.
can you pls give me the solution for this exception -
...alternatively, use the jar's Manifest file[ Go to top ]
- Posted by: Andrew Doddington
- Posted on: February 05 2008 11:11 EST
- in response to Rajarshi Bhose
Or add the missing classes via the Class-Path property in your jar file's MANIFEST.MF, as described here: http://java.sun.com/docs/books/tutorial/deployment/jar/downman.html