Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Jar files and Connector/J

  • 23-03-2004 02: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, Registered Users 2 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, Registered Users 2 Posts: 659 ✭✭✭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