This message was sent from Geocrawler.com by "markus" <markus@stripped>
Be sure to reply to that address.
Hi,
Hoping for help. I successfully installed MySQL 3.22 and JDK1.1.8 and mm.mysql.1.2b on
FreeBSD 2.2.8. I was able to create a database and using the mm.mysql driver in a java
application retrieve from the database. I did have to set my
CLASSPATH=/usr/loca/mm.mysql-1.2b/mysql_comp.jar but it did work. Now from an applet
point of view, it does not have the CLASSPATH and hence cannot properly complete the
Class.forName("org.gjt.mm.mysql.Driver").newInstance and hence fails at this point. I've
tried including the location via imports as follows:
import org.gjt.mm.mysql.*;
import org.gjt.mm.mysql.Connection;
import org.gjt.mm.mysql.Statement;
import org.gjt.mm.mysql.Driver;
import org.gjt.mm.mysql.ResultSet;
but this causes compiler errors such as:
Load2.java:40: Incompatible type for declaration. Explicit cast needed to conver
t java.sql.Connection to org.gjt.mm.mysql.Connection.
Connection con = DriverManager.getConnection(url, "webuser", "");
as the documentation states one should not directly import these, is this the reason why.
So finally, I was wondering either where I should place the jar file and/or how to get the
applet to find it. I'm still learning how Java packages and directing works so please,
specific examples are worth a hundred words. Thank you so much for any and all help.
Markus
Geocrawler.com - The Knowledge Archive