Page 2 of 2 FirstFirst 12
Results 21 to 28 of 28
  1. #21
    thegluups is offline Member
    Join Date
    Jan 2010
    Posts
    10
    Rep Power
    0

    Default

    Exactly the same thing :s

    Could it be that I haven't isntalled all the required packages for Java on my computer?

    Java Code:
    thegluups@thegluups-laptop:~$ cd /
    thegluups@thegluups-laptop:/$ javac -cp . media/Hybrid/Documents/Cambridge/ComputerScience/CST1/Java/Tick1/*.java
    media/Hybrid/Documents/Cambridge/ComputerScience/CST1/Java/Tick1/TestBit.java:8: cannot find symbol
    symbol  : variable PackedLong
    location: class media.Hybrid.Documents.Cambridge.ComputerScience.CST1.Java.TestBit
        boolean value = PackedLong.get(currentValue, position);
                        ^
    1 error

  2. #22
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,386
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by thegluups View Post
    Exactly the same thing :s

    Could it be that I haven't isntalled all the required packages for Java on my computer?

    Java Code:
    thegluups@thegluups-laptop:~$ cd /
    thegluups@thegluups-laptop:/$ javac -cp . media/Hybrid/Documents/Cambridge/ComputerScience/CST1/Java/Tick1/*.java
    media/Hybrid/Documents/Cambridge/ComputerScience/CST1/Java/Tick1/TestBit.java:8: cannot find symbol
    symbol  : variable PackedLong
    location: class media.Hybrid.Documents.Cambridge.ComputerScience.CST1.Java.TestBit
        boolean value = PackedLong.get(currentValue, position);
                        ^
    1 error
    Is that PackedLong.java file also in the same directory where those other two .java files are stored? (just to make sure, also check the spelling of those three files)

    kind regards,

    Jos

  3. #23
    thegluups is offline Member
    Join Date
    Jan 2010
    Posts
    10
    Rep Power
    0

    Default

    Yes, it is in the same folder and I have doubled check that all names are correct. Oddly enough, I now have a class file for SetBit (despite the fact that I never remember compiling it sucessfully), although when I try to run it i get an error message telling me there is no main class.

    I have also reinstalled all the required java packages.

    I am surprised that someone said it worked under Eclipse... I am now using NetBeans... but am having no such luck

  4. #24
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,386
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by thegluups View Post
    Yes, it is in the same folder and I have doubled check that all names are correct. Oddly enough, I now have a class file for SetBit (despite the fact that I never remember compiling it sucessfully), although when I try to run it i get an error message telling me there is no main class.

    I have also reinstalled all the required java packages.

    I am surprised that someone said it worked under Eclipse... I am now using NetBeans... but am having no such luck
    The fact that you have a SetBit.class file implies that it (SetBit.java) compiled successfully, i.e. the compiler was able to find that PackedLong class because the SetBit class needs it. Something is telling me that there is a typo acting up somewhere.

    kind regards,

    Jos

  5. #25
    thegluups is offline Member
    Join Date
    Jan 2010
    Posts
    10
    Rep Power
    0

    Default

    I've emailed my program to someone else, and it compiles fine on his computer. THat same person (who has a working program) emailed me his program, and I still get the same error.

    I must have forgotten to install something :s or place myself in the wrong directory when I try to compile?

  6. #26
    bdtagar is offline Member
    Join Date
    Jun 2009
    Posts
    11
    Rep Power
    0

    Default

    Hey,
    Double-check your path variable;.
    Thanks
    bye.

  7. #27
    thegluups is offline Member
    Join Date
    Jan 2010
    Posts
    10
    Rep Power
    0

    Default

    I copied it on to another comptuer that already had java on it,and it worked fine. I must have installed java badly.

    Thanks for all your help.

  8. #28
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,386
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by thegluups View Post
    I copied it on to another comptuer that already had java on it,and it worked fine. I must have installed java badly.
    That's a very peculiar 'bad installation', i.e. executables don't crash in the most horrible way but you get a neat (but incorrect) error diagnostic. My feeling is that you must've done something wrong or your filing system is corrupt.

    kind regards,

    Jos

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Error "can not find symbol variable"
    By FullMetalHollow in forum New To Java
    Replies: 5
    Last Post: 10-04-2009, 09:51 PM
  2. cannot find symbol for "list.addFirst"
    By alexbryan_08 in forum New To Java
    Replies: 10
    Last Post: 08-26-2009, 08:55 AM
  3. Replies: 1
    Last Post: 06-30-2009, 02:32 PM
  4. Replies: 1
    Last Post: 10-20-2008, 07:35 AM
  5. "Cannont find symbol Constructor" error
    By Welsh in forum New To Java
    Replies: 7
    Last Post: 01-25-2008, 12: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
  •