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 / April 2004

Tip: Looking for answers? Try searching our database.

classpath problems

Thread view: 
R. L. - 22 Apr 2004 00:10 GMT
I have the j2sdk1.4.2 and I have a mysql server setup and I wanted
to write a program to connect to the mysql server and grab some
information.  I downloaded the jdbc drivers from the mysql site, and I
set my classpath and put both the org and com folders and their
subdirectories in the classpath as well as the jar file with the drivers
but the only way I succeed in compiling the program is if I put the com
and org directories in the same path where the program I've written
resides.  I'm using the netbeans 3.5.1 ide

Thanks for any and all help.

Ryan
R. L. - 22 Apr 2004 00:32 GMT
> I have the j2sdk1.4.2 and I have a mysql server setup and I wanted
> to write a program to connect to the mysql server and grab some
[quoted text clipped - 8 lines]
>
> Ryan

I should have included that I get an exception thrown that the class
cannot be found if the directories with the classes are not in the same
directory as the java source file.

Thanks Again
Steve W. Jackson - 22 Apr 2004 20:14 GMT
>:R. L. wrote:
>:
[quoted text clipped - 16 lines]
>:
>:Thanks Again

Don't put the org and com directories in the classpath.  Instead, put in
the directory where they can be found.

For example, if you've got org and com in (Windows) C:\mycode\org and
C:\mycode\com, then C:\mycode should be in your classpath.  That way,
when you refer to classes in the org.* and com.* package hierarchies,
they will be properly resolved.

= Steve =
Signature

Steve W. Jackson
Montgomery, Alabama



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.