Expand|Select|Wrap|Line Numbers
- /**
- * Makes the connection to the database.
- */
- protected static Connection makeConnection()
- {
- try
- {
- Class.forName("org.gjt.mm.mysql.Driver");
- database = DriverManager.getConnection(
- dataBaseName, dbAccessUserId, dbAccessPwd);
- }
- catch (SQLException sqle)
- {
- System.out
- .println("Error while connection attempt!");
- sqle.printStackTrace();
- }
- catch (ClassNotFoundException e)
- {
- System.out.println("Jdbc Driver not found: "
- + e.getMessage());
- e.printStackTrace();
- }
- return database;
- }
Jdbc Driver not found: org.gjt.mm.mysql.DriverSome how the code in the main .jar file is not finding the Driver class embedded in the .jar file containing the mysql library.
java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at gov.nasa.jsc.fcod.asp3.gII_simulator.user_interfac e.jdbc.GIIDatabaseM
Does anyone know how to access this library .jar file?
Thanks in advance.