dcsimg
Forte can not found a class in a Jar file.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Humberto_Servin
Posted On:   Monday, August 6, 2001 12:33 PM

I am using Forte for Java. In my new project I try to load a class from a Jar file (a driver for MySql). I mounted this file in the File System, and I can browse the classes with the explorer inside the Jar file, but when I try to execute, it sends a java.lang.ClassNotFoundException If I mounted the jar file, I think they are in the classpath now. Any idea? Thanks in advance. Unable to load driver. java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.C   More>>

I am using Forte for Java. In my new project I try to load a class from a Jar file (a driver for MySql). I mounted this file in the File System, and I can browse the classes with the explorer inside the Jar file, but when I try to execute, it sends a java.lang.ClassNotFoundException


If I mounted the jar file, I think
they are in the classpath now.


Any idea?
Thanks in advance.


Unable to load driver.
java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at CreateCoffees.main(CreateCoffees.java:17)
SQLException: No suitable driver

   <<Less

Re: Forte can not found a class in a Jar file.

Posted By:   Christopher_Schultz  
Posted On:   Monday, August 6, 2001 12:44 PM

I happen to know that this particular package (the 'mm' JCBD driver for MySQL) is distributed in a JAR file. However, the database drivers are in another JAR file within the one that you probably downloaded. Take a look and see if that's the case.



-chris
About | Sitemap | Contact