Hello,
I am having trouble getting Eclipse to generate an executable jar that actually works. Here is the error I am getting:
When I create the jar, I have specified all three options: Extract required libraries into the jar, Package the required libraries into the jar, and Copy the required libraries into a nearby folder. In no case does Eclipse package the JDBC classes. It includes classes that I didn't know I used--some from org.eclipse, org.hamcrest and JUnit (even though I don't particularly want to include my test class, I can't figure out how to remove it from the jar without removing it from my project).
I've also tried creating the jar directly from the command line, but I get mainClassNotFound errors.
Thoughts?
Thanks,
Travis
Ogeh Ikem
Ranch Hand
Joined: May 13, 2002
Posts: 180
posted
0
Have you tried creating the executable jar through the file menu i.e. file --> export --> java --> runnable jar file
Peter Johnson wrote:Did you include the MySQL JDBC driver as one of the JAR files in your Build Path?
This was the error. It would launch from Eclipse fine, but not externally or from the jar. Once I added the MySQL JDBC JAR to to Eclipse build path, it included it in the JAR. Thanks.