Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC Connect problem on Linux: com.mysql.jdbc.Driver

Norman Meister
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi All,
I have a simple java application which reads data from the DB. The application works fine on windows. I have added the 'mysql-connector-java-5.1.22-bin.jar' in my windows classpath.
The problem comes when i copy the application on linux and run it. I getthe following exception:

I have read various articles on setting classpath in linux, but couldn't get through and I am still unclear as to how to set the classpath in linux?

I even copied the 'mysql-connector-java-5.1.22-bin.jar' in my project src folder where the .class file is generated but still no success.

I also tried setting the classpath at runtime by: export CLASSPATH=/opt/integra/middleware/LCPAnalyzer/src/mysql-connector-java-5.1.22-bin.jar

but then i got the follwoing exception:

I am totally lost as how to proceed now. Could someone please suggest a permanent way to set classpath in linux. I have few other java mail api related jars as well, which i would want to set in the classpath in linux but first want to resolve this mysql connector problem.

Any help woudl really be appreciated.

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic