aspose file tools*
The moose likes Beginning Java and the fly likes Message.java:6: error: cannot find symbol Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Message.java:6: error: cannot find symbol" Watch "Message.java:6: error: cannot find symbol" New topic
Author

Message.java:6: error: cannot find symbol

pravin gajbhiye
Greenhorn

Joined: Aug 20, 2012
Posts: 21
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

Joined: Nov 09, 2011
Posts: 1030
    
    5

What directory are you attempting to compile the code from? And what command are you using?
Venkat Edala
Greenhorn

Joined: Sep 10, 2012
Posts: 1
Hi,
i think Home1.java is not present in example folder. check it once.
one option is import that particular class..
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4642
    
    5

Please BeForthrightWhenCrossPostingToOtherSites
http://www.java-forums.org/new-java/62908-message-java-6-error-cannot-find-symbol.html


luck, db
There are no new questions, but there may be new answers.
gurpeet singh
Ranch Hand

Joined: Apr 04, 2012
Posts: 924
    
    1

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

Joined: Apr 04, 2012
Posts: 924
    
    1

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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Message.java:6: error: cannot find symbol