Home arrow static arrow Java Programming [Archive] - Problem with classpath
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Problem with classpath
This topic has 2 replies on 1 page.

Posts:46
Registered: 4/14/04
Problem with classpath  
Jun 17, 2004 2:24 AM



 
Hi,

I've tried finding the answer to this problem everywhere but can't figure it out...

I use Fedora Core 1 with SDK 1.5beta2 - i've set the following in my $HOME/.bashrc file:

CLASSPATH=.:/home/ammullan/Programming/Java/CLASSPATH
export CLASSPATH


Now I'm trying to set a LAF in an app i'm working on but when I go to compile I get a message saying that the package doesn't exist... I know i've got the package in my CLASSPATH directory and yet it still says that it doesn't...

Does anyone know what this could be?
 

Posts:11,200
Registered: 7/22/99
Re: Problem with classpath  
Jun 17, 2004 2:29 AM (reply 1 of 2)



 
I know i've got the package in my CLASSPATH directory
and yet it still says that it doesn't...

Is this "package" in a .jar file?

You need to put the path of the .jar file itself in the class path; the path of the directory where it's located is not enough. Extracting files from the .jar file should also do but presumably you don't want to do that. See the tool docs on setting class path and finding classes for detailed info.
http://java.sun.com/j2se/1.4.2/docs/tooldocs/tools.html
 

Posts:46
Registered: 4/14/04
Re: Problem with classpath  
Jun 17, 2004 2:49 AM (reply 2 of 2)



 
That worked perfectly - thanks :-)
 
This topic has 2 replies on 1 page.