Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4249546
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T04:24:41+00:00 2026-05-21T04:24:41+00:00

Integer.parseInt(5) and Long.parseLong(5) are throwing an UnsupportedOperationException in the Eclipse Expressions Window. I think

  • 0

Integer.parseInt("5") and Long.parseLong("5") are throwing an UnsupportedOperationException in the Eclipse Expressions Window.

Eclipse Environment Screenshot

I think this is also the Exception I’m getting at runtime, but being new to Eclipse, I’m not sure how to find the type of e within a debug session:

public static long longTryParse(String text, long fallbackValue) {
  try {
    return Long.parseLong(text);
  } catch (Exception e) {
    return fallbackValue; // When stopping at a breakpoint here, Eclipse says that e is of type 'Exception'.  Well, that's informative.
  }
}

So …

  1. Are these valid statements?
  2. If so, why am I getting an exception?
  3. (Of lesser importance) Why won’t Eclipse say that e is of type UnsupportedOperationException rather than Exception during my debug session?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T04:24:42+00:00Added an answer on May 21, 2026 at 4:24 am

    Are these valid statements?

    Yes … taken as Java expressions in the context of a normal Java program.

    In the context of an Eclipse debugger’s expression evaluator, I’m not sure.

    If so, why am I getting an exception?

    I don’t know for sure, but I suspect that it is something to do with the debugger itself.

    • One possibility is that you are using the expression evaluation functionality incorrectly.

    • Another possibility is that this is a bug in the Eclipse debugger, or a mismatch between the Eclipse debugger and the debug agent in the JVM.

    The one thing that I do know is that the parseInt and parseLong methods themselves don’t throw UnsupportedOperationException. (In theory, they could because it is an unchecked exception. But I checked the source code for those 2 methods, and there’s no way that the code could do that … if executed in the normal way.)


    The Google query – “site:eclipse.org +UnsupportedOperationException JDI” – shows a lot of hits in the Eclipse issues database and newsgroups / mailing lists.

    In some cases, it looks like the problem is that the JDI / JNDI implementation for the target platform is incomplete. Could this be your problem? You mention you are doing Android development …

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Exception in thread Thread-2 java.lang.NumberFormatException: For input string: 3 int test = Integer.parseInt(result[0]); This
Short.parseShort(String s, int radix) exists, as does Integer.parseInt(String s, int radix) and Long.parseLong(String s,
if(str.contains(final)) { id = Integer.parseInt(str.substring(18, str.length() - 6)); } System.out.println(id); This line of code
I've been using java to parse numbers, e.g. (. Integer parseInt numberString) Is there
Integer c=0; DatabaseHelper dbh1 = new DatabaseHelper(this); Cursor ca = dbh1.getReadableDatabase().query(DatabaseHelper.TABLE_NAME, null, null, null,
try{Integer.parse(Abhishek);} catch(NumberFormatException e){} catch(Exception e){} If for the above piece of code, if NumberFormatException
I have this problem: A positive integer is called a palindrome if its representation
I have this piece of code to return all rows between Long A and
Integer i = 127; Integer j = 127; System.out.println(i == j); System.out.println(i.equals(j)); Integer i1
Dynamic integer will be any number from 0 to 150. i.e. - number returns

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.