This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: class.forName() and java.sql
- From: "Erik Poupaert" <erik dot poupaert at chello dot be>
- To: "Lars Andersen" <lars at rimfaxe dot com>
- Cc: <java at gcc dot gnu dot org>
- Date: Mon, 27 Jan 2003 17:17:46 +0100
- Subject: RE: class.forName() and java.sql
>>> Class.forName() works for me, but classes you load thru Class.forName()
>>> may not be linked with the executable. (Meaning the class has to be
>>> found in the classpath.)
>>> I solve the gnu.java.locale.Calendar issue by adding lines like
>>> private static Class c1 = gnu.java.locale.Calendar.class;
>>> private static Class c2 = gnu.java.locale.LocaleInformation.class;
>>> in my Calendar utility class. The trick is that these lines forces gcj
>>> to link the classes into the executable. Perhaps this approach will
>>> solve your JDBC issue as well.
Thanks Lars, that solves indeed the problem.