problems with classpath for jar file on windows XP

J

Jimmy zhang

Hi, I place a jar file (containing all the necessary .class file) in a
directory, then set the classpath environment variable
(directory+filename.jar.)

But for some reason, when I try to compile a java program importing packages
from this jar file, javac simply can't pick up the right files, and
repeatedly
report failure to locate the package.

Am wondering if I need to reset my computer or something like that.

Also I try to use -classpath on command prompt, but doesn't seem to work
either.

Any suggestions welcome!
Cheers,
Jimmy
 
A

Andrew Thompson

Hi, I place a jar file (containing all the necessary .class file) in a
directory, then set the classpath environment variable
(directory+filename.jar.)

That is very vague..
How, when, where? Details please..
But for some reason,

The reason is usually quite clearly and
specifically stated in the exception or
error messages you get..
...javac simply can't pick up the right files, and
repeatedly report failure to locate the package.

Am wondering if I need to reset my computer or something like that.

Also I try to use -classpath on command prompt, but doesn't seem to work
either.

See above..
Any suggestions welcome!

I recommend you get yourself over to a
group where these type of questions are
dealt with in a friendly and polite manner.
<http://www.physci.org/codes/javafaq.jsp#cljh>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top