aspose file tools*
The moose likes Beginning Java and the fly likes Jar File Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Jar File " Watch "Jar File " New topic
Author

Jar File

Hrishikesh Hemade
Greenhorn

Joined: Mar 17, 2005
Posts: 9
I have a executable jar file which pop's up a GUI but while uploading GUI it should populate Data in a combo box with the help of MySql database but it doesn't it gives an error java.lang.ClassnotFoundException : com.mysql.jdbc.Driver, i no it's mysql driver i have downloaded it and added to classpath of System env but it still gives the exception. Even tried with giving classpath excplicitly java -classpath C:\mysql\mysql.jar -jar GUI.jar but while popuing up GUI it throws the exception.
So guy's can you help me with this.
Thank you.
James Clinton
Ranch Hand

Joined: Jun 23, 2003
Posts: 190
try using a manifest file:

Main-Class: SomeClass
Class-Path: lib/driver.jar.
James Clinton
Ranch Hand

Joined: Jun 23, 2003
Posts: 190
try using a manifest file:

Main-Class: SomeClass
Class-Path: lib/driver.jar.
Norm Radder
Ranch Hand

Joined: Aug 10, 2005
Posts: 687
    
    1
With java.exe the -classpath option is IGNORED(no error messsage!!) when you use the -jar option.
Change your commandline to NOT use the -jar option. IE use only the -classpath option and your starting class name.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jar File