Missing required library: System/........./mysql-connector-java-3.1.8-bin-g.jar
Posted by: prsplayer82
Date: June 19, 2005 08:03PM

Please help! If I comment out the conn lines, then it runs ok, but when i try to make the connection, it gives the following error:

Project Hello is missing required library: 'System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext/mysql-connector-java-3.1.8-bin-g.jar'

Here is my code:

import java.sql.*;

import com.mysql.jdbc.Driver;

public class HelloMySql {
public static void main(String[] args) {
try{
Connection conn;
//Statement stmt;
//ResultSet res; //load Connector/J driver
Driver d = (Driver)
Class.forName("com.mysql.jdbc.Driver").newInstance();//Why do this?
conn = DriverManager.getConnection("jdbc:mysql://localhost", "root", "");
//res.close();
System.out.println("OK");
}
catch(Exception e){
System.out.println("Error: " + e.toString());

}
}
}

I have been using both -g file and the regular mysql-connector-java-3.1.8-bin.jar files.
Any help will be greatly appreciated!
Mac OS X 10.4 (similar to UNIX)

Options: ReplyQuote


Subject
Written By
Posted
Missing required library: System/........./mysql-connector-java-3.1.8-bin-g.jar
June 19, 2005 08:03PM


Sorry, you can't reply to this topic. It has been closed.

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.