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 6200255
In Process

The Archive Base Latest Questions

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

I need to know the type of the local variables. I am using Java

  • 0

I need to know the type of the local variables. I am using Java reflection, using which I could not get it. Can you please let me know how to know the type/name of the local variables.

Can I get information about the local variables using Java reflection?

  • 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-24T04:20:02+00:00Added an answer on May 24, 2026 at 4:20 am

    Assuming that you are talking about a method or constructor’s local variables, you cannot find out about them using reflection. You have to either

    • use a bytecode library such as BCEL or ASM, or
    • use one of the remote debugger APIs.

    The latter will allow you to access the values of the local variables, but only while the JVM is suspended by the debug agent.

    Both of these approaches rely on the classes in question being compiled with debug information. Specifically, the classes need to be compiled with “local variable debugging information”; e.g. using javac -g .... The “vars” debug information is not included by default.

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

Sidebar

Related Questions

I need to use method like: DoSomething<(T)>(); But i don't know which Type i
I am scheduling a local notification which is firing fine. I need to know
So I know this type of thing is easily achieved in Java using JSP
I need to implement single sign-on in my java web application which can achieve
I need to know how many objects of some type exist in my system
As far as I know, PHP is a dynamic type language. We don't need
Need to know this so that i could send DTMF and that is going
I need to know about Epoll On linux System. Could you recommend manual or
It's known that big local/global variables may cause to a stack overflow. I know
I need to know how the performance of different XML tools (parsers, validators, XPath

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.