JDBC Connect problem on Linux: com.mysql.jdbc.Driver
Joined: Jul 03, 2009
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.