Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2012
    Posts
    1
    Rep Power
    0

    Default Message.java:6: error: cannot find symbol

    Joined: Aug 20, 2012
    Posts: 10

    [Post New]posted Today 10:56:29
    Quote Edit
    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...
    package com.example;
    public class Home1
    {
    public Home1()

    {
    System.out.println("Hi Pravin..");
    }

    }



    ============
    package com.example;
    public class Message
    {
    public static void main(String[] args)
    {
    Home1 h=new Home1();
    }
    }

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

    C:\Users\N\Desktop\src\com\example>javac Message.java
    Message.java:6: error: cannot find symbol
    Home1 h=new Home1();
    ^
    symbol: class Home1
    location: class Message
    Message.java:6: error: cannot find symbol
    Home1 h=new Home1();
    ^
    symbol: class Home1
    location: class Message
    2 errors

    Please help me..
    Last edited by pravingajbhiye; 09-10-2012 at 08:01 AM.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,305
    Rep Power
    20

    Default Re: Message.java:6: error: cannot find symbol

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Replies: 1
    Last Post: 11-18-2011, 11:55 PM
  2. Cannot find symbol error message
    By interestingdave in forum New To Java
    Replies: 1
    Last Post: 02-15-2011, 02:17 PM
  3. java:92: cannot find symbol error
    By noviceNewbie in forum AWT / Swing
    Replies: 3
    Last Post: 12-18-2010, 02:46 AM
  4. Replies: 9
    Last Post: 10-18-2008, 08:26 PM
  5. [SOLVED] Java Error: Cannot find Symbol...
    By bobleny in forum New To Java
    Replies: 8
    Last Post: 04-15-2008, 06:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •