• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Where to put the MySQL driver ConnectorJ WITHOUT changing CLASSPATH?

 
Peter Steiner
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Normally, when I try to connect a Java program to a MySQL database I need a MySQL driver e.g. "mysql-connector-java-5.1.40-bin.jar".

Therefore I have to add the path where this *.jar is stored to the CLASSPATH.

However assume I don't want to change the CLASSPATH and don't want to peek into the current CLASSPATH.

Instead I want to copy the *.jar to a directory which is (almost) always included in CLASSPATH (on all systems) by default.

What is the recommended folder for that?

Is there a dedicated "driver" subfolder in J2EE installation for that?

Peter
 
Knute Snortum
Bartender
Pie
Posts: 2884
62
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tell us more about how you plan to distribute your app.  For instance, are you going to package it in a jar file?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic