Results 1 to 8 of 8
  1. #1
    jwilley44 is offline Member
    Join Date
    Jan 2009
    Posts
    12
    Rep Power
    0

    Default [SOLVED] Debug: values not shown for variables

    I am using Eclipse Ganymede and during debugging, values for objects are not shown. For example I cannot look through a Java Collections object. Primitive types show their value but objects do not. When I click to view them I get this message:

    Method "toString" with signature "()Ljava/lang/String;" is not applicable for this object

  2. #2
    VinceGuad is offline Member
    Join Date
    Jan 2008
    Posts
    36
    Rep Power
    0

    Default

    Hrmmm ive never had that problem, I will try to look into it for you

  3. #3
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Posts
    1,046
    Rep Power
    7

    Default

    That's a very odd message.

    Are you using the Variables view to see the fields, or are you using Expressions?

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    I think OP should have clear idea about object representing in Java. Once you use toString() just see an odd message as Steve says. But even that has a bit of meaning.

    Quote Originally Posted by Steve11235
    Are you using the Variables view to see the fields, or are you using Expressions?
    Yes how about this?

  5. #5
    jwilley44 is offline Member
    Join Date
    Jan 2009
    Posts
    12
    Rep Power
    0

    Default

    Thanks for the responses. I figured out what was wrong yesterday. The problem was that I was using the gnu java libraries and compiler. Once I switched over to sun java 6 everything worked. Thanks again.

  6. #6
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  7. #7
    jwilley44 is offline Member
    Join Date
    Jan 2009
    Posts
    12
    Rep Power
    0

    Default

    Thanks I will be sure to do that from now on

  8. #8
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

Similar Threads

  1. Debug challenge: how do you debug a Java program?
    By CJSLMAN in forum New To Java
    Replies: 60
    Last Post: 07-04-2009, 10:28 AM
  2. uploaded image not shown
    By java_srinivasan in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 11-05-2008, 12:40 PM
  3. Replies: 0
    Last Post: 05-22-2008, 10:53 AM
  4. Replies: 2
    Last Post: 08-03-2007, 04:06 PM
  5. No output shown
    By ai_2007 in forum Advanced Java
    Replies: 4
    Last Post: 07-10-2007, 09:26 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
  •