Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / March 2004

Tip: Looking for answers? Try searching our database.

.jar files and Class-Path

Thread view: 
Tuomo Nyg?rd - 28 Mar 2004 16:39 GMT
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?
Goran - 30 Mar 2004 11:07 GMT
Tuomo Nygård wrote:

> I am trying to load a MySQL driver from another .jar file with the
> following line:
[quoted text clipped - 10 lines]
> 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.

Signature

To reply please remove NOSPAM



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.