I have problem with creating jar file want to create jar file with mysql connector
i include the mysql connector in manifest file but still it five me error like:
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at serverGUI.checkDB(serverGUI.java:194)
at serverGUI.run(serverGUI.java:115)
at java.lang.Thread.run(Thread.java:595)

pls tel me how to include mysql jar into jar file

how to include mysql jar into jar file

I don't think you want another jar inside of your jar.
You want to add the other jar to your classpath.
See the manifest file's Class-Path: record to do this.

If you want all the classes in one jar file, extract the contents of the other jar and put all of those files into your jar as separate files.

Thanks!

I dont understand what u mean ...
I want to add mysql connector in my jar file (project jar file).
to connect with database.

What kind of file is the "mysql connector"?
Where is it located?
Is it in a jar or is it in a folder?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.