Classpath vs java.class.path

Steve Pribyl steve@netfuel.com
Wed Jul 16 18:52:00 GMT 2003


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


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /