|Re: Compiled Java JDBC MySQL Class Not Found [message #1096764 is a reply to message #1096741]
||Wed, 28 August 2013 20:54
| David Spaar
Registered: August 2013
I got the answer. It took a while, but with some experimentation I was able to get the thing working.|
What I had to do was to edit the MANIFEST.MF file to include a Class-Path option. This was not automatically added by Eclipse, although the MANIFEST.MF itself was. The file is located in the META-INF folder in the jar I wished to execute. I opened the jar using 7-zip, then copied out the MANIFEST.MF file and did some simple text editing.
In the file I saw an entry for Main-Class, which I left alone. I tried adding the entire Windows path to the mysql connector jar but that didn't help. What did help was to add just the name of the jar, in my case mysql-connector-java-5.1.25-bin.jar. Then I included that file in the same folder as the .jar I wished to execute. Once I did that the code ran fine.
[Updated on: Wed, 28 August 2013 20:55]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02671 seconds