Home > Archive > Java Help > March 2004 > .jar files and Class-Path
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
.jar files and Class-Path
|
|
| Tuomo Nygård 2004-03-28, 10:36 pm |
| 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?
| |
|
| Tuomo Nygård wrote:
> 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?
The best way is to use your Java Runtime Environment.
Put this jar file (which is mysql.Driver) in to ..path to your java
jre../lib/ext folder
Send me a massage if this works.
--
To reply please remove NOSPAM
|
|
|
|
|