.jar files and Class-Path

From: Tuomo Nygård (tnygard_at_mail.suomi.net)
Date: 03/28/04


Date: Sun, 28 Mar 2004 18:39:32 +0300

I am trying to load a MySQL driver from another .jar file with the
following line:
Class.forName("org.gjt.mm.mysql.Driver");

This causes a ClassNotFoundException, even if I include the file
containing this class (mm_mysql-2_0_3-src.jar) in the program by
inserting the following line into my program's jar file's manifest:
Class-Path: ./mm_mysql-2_0_3-src.jar
or simply
Class-Path: .

Am I doing something wrong? I'm using Xcode 1.1, and the jar file I need
to use is located in the same directory as my program's jar file. Do I
need to include the jar file to be used in the project somehow?



Relevant Pages

  • Re: Binary objects in jar file
    ... > Can you put binary objects in a jar file and load them. ... Yes, you load them as a resource, just as you do with an image. ... Sun Certified Developer for the Java 2 Platform ...
    (comp.lang.java.programmer)
  • Re: programmatic way for detecting imports....
    ... >> I need to load a jar file and analyze it analyze it as follows. ... >> 1) for each class in a jar see what are the imports for that class. ...
    (comp.lang.java.programmer)
  • Re: Swappable class / jar?
    ... can rewrite B and put B in a separate jar file. ... When it's time to load ... is for B to be an interface rather than a concrete class. ... A good example I can think of is that the class B implement the sort ...
    (comp.lang.java.programmer)
  • Re: Swappable class / jar?
    ... can rewrite B and put B in a separate jar file. ... When it's time to load B, ... is for B to be an interface rather than a concrete class. ... A good example I can think of is that the class B implement the sort ...
    (comp.lang.java.programmer)
  • Re: programmatic way for detecting imports....
    ... > I need to load a jar file and analyze it analyze it as follows. ... > 1) for each class in a jar see what are the imports for that class. ...
    (comp.lang.java.programmer)