permaculture playing cards
The moose likes Java in General and the fly likes an error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "an error "cannot resolve symbol"" Watch "an error "cannot resolve symbol"" New topic

an error "cannot resolve symbol"

min wang

Joined: Aug 21, 2003
Posts: 3
I download a 3D java file from a website , and try to compile it
it says:
cannot resolve sybol
symbol : class Matrix 3D
location: class model 3D
what's wrong with it ?
or some of source code is deprecated api?
Junilu Lacar

Joined: Feb 26, 2001
Posts: 6529

You're probably missing a package or class file. Did you download a jar or just the source? If you did download a jar, try adding it to your classpath. If you downloaded just the source, you'll need to get either the source or class files for all the imported classes/packages.

Junilu - [How to Ask Questions] [How to Answer Questions]
min wang

Joined: Aug 21, 2003
Posts: 3
thank you for your quick reply . I am a java beginner , i get my classpath like this classpath=.;C:\j2sdk1.4.2\lib\dt.jar;C:\j2sdk1.4.2\lib\tools.jar , is it correct or not?
well , I just downloaded the source . I think all I need is to get a source file *.java , then compile it to calsses , and then I can display applet. maybe i am wrong? and I didn't download a jar that you remarked . By the way, what is the difference between jar and java ?
rom chatterjee
Ranch Hand

Joined: Dec 11, 2001
Posts: 46
When you compile a *.java file you get a *.class file. Your classpath tells the compiler and jvm where to find your compiled classes. As long as your classes live in a directory that is in the classpath they will be found.
A .jar file is a java archive file. It is comperessed files that can include any number of files. jar files have to be explicitly named in your classpath otherwise they wont be found.
However, it sounds like you just got the source but didnt maybe get all of it. Try checking that you got everything first. Then checkout for tutorials. These should get you going.

Rom Chatterjee<BR>Sun Certified Java Programmer
min wang

Joined: Aug 21, 2003
Posts: 3
Thank you Junilu and Rom
I agree. Here's the link:
subject: an error "cannot resolve symbol"
It's not a secret anymore!