Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

an error "cannot resolve symbol"

 
min wang
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
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
Bartender
Pie
Posts: 7329
45
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
min wang
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
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 ?
cycymin@yahoo.com
 
rom chatterjee
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
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 java.sun.com for tutorials. These should get you going.
 
min wang
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Junilu and Rom
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic