You can either include everything from the MySQL JAR into your JAR, or you can include both JAR's in your classpath on the java command. Typically, the second choice is preferred.

Or simply place the mysql driver jarfile in the proper place (depends on how you do the next step) and configure the manifest file correctly, so you can simply execute java -jar yourfile.jar (or "double-click" as everyone seems to like to refer to it).

P.S. English only, please. And, since I seemingly don't have the font that is needed to display it, I don't even know what language it is you used. And "70000" what? As that (the first word of none title text) was the only thing that could be read, as an actual word/number, here.

There is an attribute called "Class-Path" that you can specify in the manifest of your jar. Add the mysql jar to this attribute and you should now have access to the classes contained in the mysql jar.

Any where you want to so long as it is referenced in the manifest file.

Yes, I did bother to read the tutorial. What I am asking is how to make my program distributable. I specified the classpath for mysql's .jar file, but that's not enough, is it? Because if I give my .jar file for my project to my friend and he tries to run it on his computer, then the classpath is invalid because the mysql connector jar will be non existent on his computer.

So, how do I package everything so that I can let someone download a file and the program works on his computer?

classpaths are paths to jar files on your computer, right? how then, do you make it so that the classpath is accurate on any computer. Do I need to put the mysql .jar file in the user's jre, and then somehow re-write the program's classpath for that location?

People put the jre in different locations on their computer, so how does my program know the classpath to the mysq connector .jar for the computer it is downloaded onto?

I'm sorry for not being clear on my question. thankyou for all the help so far.

Package both the mysql jar and your jar into the same directory and reference the mysql jarfile using a relative path (as shown in the tutorial). The MySQL Driver jarfile is freely redistributable. So, what's the problem.

You will have to create some sort of installer that places both your JAR and any other JAR's into a directory.

I provided a batch (cmd) file that sets the classpath and executes the java command. I also found a hack EXE on the Internet that allowed me to create a shortcut for All Users (Windows installation) on the desktop.

Bottom line, I don't know of any elegant way to do this. It may be possible to repackage the MySQL JAR into your JAR, but I think you will run into licensing issues at that point.