Menu
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver on Mac OS X Leopard
Posted by: Mitch Graves
Date: February 08, 2008 04:17AM
Date: February 08, 2008 04:17AM
Download the driver. Navigate to the MySQL website. Click Archives. Click the Product Version drop-down menu and select 5.1.48. Download the appropriate archive based on your operating system. Unpack the archive file using WinZIP (for Windows files) or another utility. Locate the JDBC driver mysql-connector-java.jar inside the archive. MySQL Cluster CGE. MySQL Cluster is a real-time open source transactional database designed for fast, always-on access to data under high throughput conditions. MySQL Cluster; MySQL Cluster Manager; Plus, everything in MySQL Enterprise Edition; Learn More » Customer Download » (Select Patches & Updates Tab, Product Search) Trial Download ».
Here is my problem. You have seen the error in the subject.
First I tried to run this through NetBeans 6. A MySQL JDBC driver is already installed and the connector is defined in NetBeans Library Options. I got the above message so I downloaded the mysql-connector-java-5.1.5-bin.jar and added it to the NetBeans Library. Still no good.
Well, next I decided to go to the CLI (command line interface) and execute the java program from the command line. Vo good. I downloaded and tried all three version of the connector on my Mac and no good. I have put a CLASSPATH in my profile and I can run env and the CLASSPATH shows up. I searched the Internet and found the default CLASSPATHS for Mac and copied the driver there. I tried the 3.x, 5.0.x and 5.1.x connectors. I even placed the connector in the same directory as my java program and used the -cp as I ran the java program. I have checked and changed the permissions to 777 to make sure I have all access at every level. Nothing works.
Now with that said, I have the same program with mysql-connector-java-5.1.5-bin.jar working on Windows XP and Solaris 10 x86.
Has anyone else run into this and is there something I don't know about that is different with the Mac? Tomorrow I am going to run this on my other Mac and see if I have the same problem.
Any helpful information would be greatly appreciated.
First I tried to run this through NetBeans 6. A MySQL JDBC driver is already installed and the connector is defined in NetBeans Library Options. I got the above message so I downloaded the mysql-connector-java-5.1.5-bin.jar and added it to the NetBeans Library. Still no good.
Well, next I decided to go to the CLI (command line interface) and execute the java program from the command line. Vo good. I downloaded and tried all three version of the connector on my Mac and no good. I have put a CLASSPATH in my profile and I can run env and the CLASSPATH shows up. I searched the Internet and found the default CLASSPATHS for Mac and copied the driver there. I tried the 3.x, 5.0.x and 5.1.x connectors. I even placed the connector in the same directory as my java program and used the -cp as I ran the java program. I have checked and changed the permissions to 777 to make sure I have all access at every level. Nothing works.
Now with that said, I have the same program with mysql-connector-java-5.1.5-bin.jar working on Windows XP and Solaris 10 x86.
Has anyone else run into this and is there something I don't know about that is different with the Mac? Tomorrow I am going to run this on my other Mac and see if I have the same problem.
Any helpful information would be greatly appreciated.
Mysql-connector-java-8.0.17.jar Download Mac
Options:Reply•Quote
Written By
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver on Mac OS X Leopard
February 08, 2008 04:17AM
Re: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver on Mac OS X Leopard
February 09, 2008 01:29AM
Re: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver on Mac OS X Leopard
May 26, 2008 03:23AM
Re: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver on Mac OS X Leopard
June 17, 2008 09:26AM
Re: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver on Mac OS X Leopard
June 20, 2008 08:19AM
Re: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
May 07, 2008 07:16AM
Re: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
May 09, 2008 02:58AM
Sorry, you can't reply to this topic. It has been closed.
Mysql Connector Jar 5.1
Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.