This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Classpath vs java.class.path
- From: Steve Pribyl <steve at netfuel dot com>
- To: tromey at redhat dot com
- Cc: gcj mail list <java at gcc dot gnu dot org>
- Date: Wed, 16 Jul 2003 13:52:29 -0500
- Subject: Re: Classpath vs java.class.path
- Organization: Netfuel
- References: <3F159B8F.8090708@netfuel.com> <87ptkal3on.fsf@fleche.redhat.com>
Tom,
Here are the details.
3.4 cvs from last week.
[steve@pascal LoadJar]$ gcc -v
Reading specs from /opt/gcc-3.4/lib/gcc-lib/i686-pc-linux-gnu/3.4/specs
Configured with: ../configure --prefix /opt/gcc-3.4
Thread model: posix
gcc version 3.4 20030711 (experimental)
public class app
{
public static void main(String[] args) {
try {
System.setProperty("java.class.path","/var/netfuel/lib/mysql-connector-java-3.0.8-stable-bin.jar");
Class Klass1 =
ClassLoader.getSystemClassLoader().loadClass("com.mysql.jdbc.Driver");
} catch (Exception e) {
System.out.println("ERROR \n\t" +e);
}
}
}
[steve@pascal LoadJar]$ ./app
ERROR
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver not
found in [file:./, core:/]
[steve@pascal LoadJar]$
CLASSPATH=/var/netfuel/lib/mysql-connector-java-3.0.8-stable-bin.jar ./app
Tom Tromey wrote:
"Steve" == Steve Pribyl <steve@netfuel.com> writes:
Steve> I noted that a classes in jar files in java.class.path will not be
Steve> found but when I use the CLASSPATH variable they are found.
Steve> What gives? What other info do you need?
What version of gcj?
How are you setting java.class.path?
Tom
--
Steve Pribyl
Steve AT NetFuel dot com
Computer Infrastructure Practitioner