• 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
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Message.java:6: error: cannot find symbol

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI
I am doing practice in core java.
I have set java path=C:\Program Files\Java\jdk1.7.0_03\bin;
CLASSPATH=C:\Program Files\Java\jdk1.7.0_03\bin;

JAVA_HOME=C:\Program Files\Java\jdk1.7.0_03

And write tow simple classes..
When I compiled Home1.java , it is not giving any error but when i compiled Message.java its giving error...

============
when i complie message getting error..

Please help me..
 
Bartender
Posts: 1051
5
Hibernate Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What directory are you attempting to compile the code from? And what command are you using?
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
i think Home1.java is not present in example folder. check it once.
one option is import that particular class..
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please BeForthrightWhenCrossPostingToOtherSites
http://www.java-forums.org/new-java/62908-message-java-6-error-cannot-find-symbol.html
 
Ranch Hand
Posts: 924
1
Netbeans IDE Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you have set your classpath to C:\Program Files\Java\jdk1.7.0_03\bin; . javac will look in this director for any class file it needs while compiling Message. so you need to same your Home1 in bin\com\example directory.
Please repost if you need further help
 
gurpeet singh
Ranch Hand
Posts: 924
1
Netbeans IDE Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Venkat Edala wrote:Hi,
i think Home1.java is not present in example folder. check it once.
one option is import that particular class..



both classes are in the same package. so you need not import it.
 
PI day is 3.14 (march 14th) and is also einstein's birthday. And this is merely a tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic