Results 1 to 5 of 5
  1. #1
    yma16 is offline Member
    Join Date
    Apr 2011
    Posts
    52
    Rep Power
    0

    Default How can I fix "Cannot resolve symbol" error

    Hi,

    I put a class file under the classes folder. I do not have the java file for the class. When I use the class in the java file that contains main(), it gave me the "Cannot resolve symbol" error. How can I fix the problem?

    Thanks a lot.

  2. #2
    yma16 is offline Member
    Join Date
    Apr 2011
    Posts
    52
    Rep Power
    0

    Default

    after I compiled other java files, I found the classes folder is not the one to hold the class files. The folder is inside out\production folder. But after I put the class with other classes, the error is still there. How can I let IDEA know there is a new class?

  3. #3
    yma16 is offline Member
    Join Date
    Apr 2011
    Posts
    52
    Rep Power
    0

    Default

    The Textpad4 compiled the files ok. It must be IEAD 10's problem.

  4. #4
    RichersooN is offline Senior Member
    Join Date
    Jan 2011
    Location
    Rizal Province, Philippiines
    Posts
    167
    Rep Power
    0

    Default

    you could use absolute path

  5. #5
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default

    Under the libraries bit of module settings you need to attach classes.
    Assuming this is a standalone class you'll need to stick it in a directory of its own, ensuring its location in that directory (that is the directory path) matches its package.
    Then attach that folder as a class folder.

    It is unusual to import a single class into code, which is why this may sound a long winded way of doing it.

Similar Threads

  1. Replies: 5
    Last Post: 04-24-2011, 04:21 PM
  2. Error "can not find symbol variable"
    By FullMetalHollow in forum New To Java
    Replies: 5
    Last Post: 10-04-2009, 10:51 PM
  3. genjar - "Unable to resolve:"
    By angryboy in forum New To Java
    Replies: 0
    Last Post: 06-28-2009, 07:48 AM
  4. Replies: 1
    Last Post: 10-20-2008, 08:35 AM
  5. "Cannont find symbol Constructor" error
    By Welsh in forum New To Java
    Replies: 7
    Last Post: 01-25-2008, 01:12 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
  •