• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

an error "cannot resolve symbol"

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Sheriff
Posts: 17734
302
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
[email protected]
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Junilu and Rom
reply
    Bookmark Topic Watch Topic
  • New Topic