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

  • Home
  • SEARCH
  • 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 100941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T00:40:32+00:00 2026-05-11T00:40:32+00:00

If you decompile the java.lang.Class class in java from the rt.jar library you will

  • 0

If you decompile the java.lang.Class class in java from the rt.jar library you will notice there is a native method declaration:

native ConstantPool getConstantPool(); 

I played a while ago with class decompilation using Sun’s .class file specification and I was able to obtain the constant pool record from each .class file. But that was actually decompiling classes.

It’s just that I was surprised to see this signature in the Class class. So what I did is I wrote a small piece of code in the Main() method:

ConstantPool cp = new ConstantPool(); cp.getMethodAtIfLoaded(0); 

If you decompile the sun.reflect.ConstantPool class you will notice it has a lot of method related to classes, method, parameters, fields declared, etc.

When I execute the app, I get this HotSpot exception:

# # An unexpected error has been detected by HotSpot Virtual Machine: # #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7e01d3, pid=2816, tid=5464 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_15-b04 mixed mode) # Problematic frame: # V  [jvm.dll+0xa01d3] # # An error report file with more information is saved as hs_err_pid2816.log # # If you would like to submit a bug report, please visit: #   http://java.sun.com/webapps/bugreport/crash.jsp # 

Why can’t I get the ConstantPool of any class? Considering the fact that getConstantPool() is a native/non-public method I assume Sun does not want me to call it directly.

  • 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. 2026-05-11T00:40:33+00:00Added an answer on May 11, 2026 at 12:40 am

    Classes under sun.* are not public APIs, may change without notice and do all sorts. Forutnately untrusted code cannot access them at all. javac objects to their use.

    There’s no need to decompile the code – the original source is available, although not necessarily up to date.

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

Sidebar

Ask A Question

Stats

  • Questions 60k
  • Answers 60k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer The risk of your traffic being sniffed on a node… May 11, 2026 at 9:31 am
  • added an answer We use a similar solution to the MailProxy method detailed… May 11, 2026 at 9:31 am
  • added an answer There really is only one name in XAML, the x:Name.… May 11, 2026 at 9:31 am

Related Questions

If you decompile the java.lang.Class class in java from the rt.jar library you will
If you had to provide a wizard like form entry experience in mvc how
If you create an ASP.NET web file project you have direct access to the
If you were to self-fund a software project which tools, frameworks, components would you
If you are using HAML and SASS in your Rails application, then any templates
If you are working in PHP (or I guess any programming language) and using
If you have Subversion installed on your development machine and you don't work in
If you've used Oracle, you've probably gotten the helpful message ORA-00942: Table or view
If you have round robin enabled in Vxworks and your task gets preempted by
If you have round robin scheduling enabled in VxWorks, and you use taskLock() to

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.