Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Message.java:6: error: cannot find symbol

 
pravin gajbhiye
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • 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..
 
James Boswell
Bartender
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What directory are you attempting to compile the code from? And what command are you using?
 
Venkat Edala
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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..
 
Darryl Burke
Bartender
Posts: 5125
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please BeForthrightWhenCrossPostingToOtherSites
http://www.java-forums.org/new-java/62908-message-java-6-error-cannot-find-symbol.html
 
gurpeet singh
Ranch Hand
Posts: 924
1
Fedora Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • 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
Fedora Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic