2

I need step by step instructions. I have downloaded if from the mysql website http://dev.mysql.com/usingmysql/java/

But now I am not to sure what to do from here? I'm sort of stuck..

skaffman
  • 398,947
  • 96
  • 818
  • 769
Aaron
  • 11,239
  • 18
  • 58
  • 73

2 Answers2

2

Just put the JAR file in the runtime classpath. This is not environment-dependent.

How exactly to do that depends on what kind of application it is. If it's for example a plain vanilla Java application which you execute by java.exe, then use the -cp argument to specify the classpath.

java -cp .;/path/to/mysql.jar com.example.Foo

The classpath is basically a collection of paths to JAR files and/or .class files where Java should look for class definitions.

See also:

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
0

In a more direct form... Add the jar file to

C:\Program Files\NetBeans 7.4\java\modules\ext

That being your version of netbeans and boom, good to go