1753701 Members
4933 Online
108799 Solutions
New Discussion юеВ

Re: Class Path problem

 
Balajee Shunmugam
New Member

Class Path problem

Hi

I am developing java application in jdk1.3 in HP UX11.0 .

I had set the classpath for my java program to import a package from a jar file . I had set the class file to that jar file . But when i try to compile it gives me an error 'package not found' .

Can somebody help me in this , fast ...

Thanks

Balajee
4 REPLIES 4
Vic Parker
Frequent Advisor

Re: Class Path problem


I assume you are setting the class path with the enviornment variable CLASSPATH, did you export the variable after setting it?

Also, have you tried setting the class path option on the compiler command line? Does this yield the same error?

Vic
code your own, or follow the rules
Balajee Shunmugam
New Member

Re: Class Path problem

Hi Vic

Ofcourse i exported after setting the classpath . and also tried the option of giving classpath while compiling . Both did not work .

Any pointers on this will be great .

Balajee
Vic Parker
Frequent Advisor

Re: Class Path problem


The class path is typically not a problem to configure. I'm some what pressed for a decent idea here. I would say that the verbose option may reveal some info on why the compiler is not finding the class in your jar, this would at a minimum confirm that the path is being searched. Also, just to make sure that everything is what we expect in the jar, I would move it temporarily to your compile directory. This directory is searched by default before the class path. I know this is not optimal, but as a troubleshooting step I think this is apropriate. This has to be a simple problem, having the jar in the compile directory should work, if not examine class names and such.

vic
code your own, or follow the rules
Oliver Stoklossa
Frequent Advisor

Re: Class Path problem

I had a similar problem when opening javabased web pages.
Try to set the MOZILLA_HOME variable to your netscape install directory, maybe this helps.

Cheers

Oli