This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Classpath vs java.class.path


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]