Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Jar files and Connector/J

Options
  • 23-03-2004 2:15am
    #1
    Closed Accounts Posts: 364 ✭✭


    Hi

    Im having a small problem creating an executable jar file. I have an application which connects to a MySQL databse, and I have the MySQL-Connector/J library installed and all classpaths setup. I can compile and run my application as a java class file, but when I try to make it into an executable jar, I get an error thats thrown when the database class driver could not be loaded. I have tried including the MySQL connector/J file in my jar file, and setup the manifest,mf file.

    Anyone here have any ideas??

    Thanks


Comments

  • Closed Accounts Posts: 364 ✭✭Matfinn


    anyone ??


  • Closed Accounts Posts: 1,651 ✭✭✭Enygma


    When you run it as a jar the mysql jar has to be on the classpath also.

    Don't include it (mysql jar) in your jar at all.


  • Registered Users Posts: 1,931 ✭✭✭Zab


    You could just put the contents of the Connector/J jar into the new jar file, rather than the jar itself. I don't use executable jars at all, so other than that I don't know.


  • Registered Users Posts: 658 ✭✭✭Chunks


    We have this done tho. When we type in 'java Programname' it works, but when we try to execute it as a jar, it wont work.


Advertisement