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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T09:22:53+00:00 2026-05-18T09:22:53+00:00

I am trying to understand how a java code is executed by the JVM.

  • 0

I am trying to understand how a java code is executed by the JVM.

say, I write this java code:

public class Hello {

    public static void main(String  args[])
    {
        int i = 42;
        String hello ="World";
        System.out.println(hello + i);
    }
}

This is the bytecode generated (using eclipse plugin):

// class version 50.0 (50)
// access flags 33
public class cmpe296/Hello {

  // compiled from: Hello.java

  // access flags 1
  public <init>()V
   L0
    LINENUMBER 3 L0
    ALOAD 0
    INVOKESPECIAL java/lang/Object.<init>()V
    RETURN
   L1
    LOCALVARIABLE this Lcmpe296/Hello; L0 L1 0
    MAXSTACK = 1
    MAXLOCALS = 1

  // access flags 9
  public static main([Ljava/lang/String;)V
   L0
    LINENUMBER 7 L0
    LDC "World"
    ASTORE 1
   L1
    LINENUMBER 8 L1
    GETSTATIC java/lang/System.out : Ljava/io/PrintStream;
    ALOAD 1
    INVOKEVIRTUAL java/io/PrintStream.println(Ljava/lang/String;)V
   L2
    LINENUMBER 9 L2
    RETURN
   L3
    LOCALVARIABLE args [Ljava/lang/String; L0 L3 0
    LOCALVARIABLE hello Ljava/lang/String; L1 L3 1
    MAXSTACK = 2
    MAXLOCALS = 2
}

This is the only information I get about the java code. But I am interested in tracking the life cycle of this java code. i.e. say when I define: int i = 42, which c++ method of the JVM (open jdk) implementation is invoked.

Is there any tool available to analyze the Java code from top to bottom (till assembly language generation)?

Specifically my question is:

  1. How is bytecode interpreted by the JVM
  2. Which c++ code is invoked?

I am finding stuff here: Google code of openjdk

  • 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-18T09:22:53+00:00Added an answer on May 18, 2026 at 9:22 am

    Is there any tool available to analyze the Java code from top to bottom (till assembly language generation)?

    Not to the extent that you want, AFAIK. There is simply not sufficient need for such a tool to justify the effort of building one.

    • In theory, you could build and run a JVM using a C / C++ source level debugger. However I suspect it will take you a long time getting to the point where you can see what is going on when a Java statement gets executed.

    • The other alternative is to dig out the JVM options which tell the JIT compiler to dump the native code that it emits, and then disassemble the native code. But that only tells you a small part of the answer.

    Either way, I don’t see how you are going to learn much that is particularly relevant … unless you are planning to implement your own Java code generation tools. And anything that you do learn is likely to be ephemeral; i.e. out of date when Java 7 comes along.

    FOLLOWUP

    For what you are trying to do (researching the “evolution of HLL VM from pascal VM to JVM.”) you are probably wasting your time delving into the innards of the JVM. You will get a better picture, and quicker by locating and reading research papers, articles and developer blogs on the subject. (Check with your supervisor.) If you discover specific points that are not covered adequately by the literature … it MIGHT be worth diving into the implementation. But at that point you will have a better idea what you should be looking for.

    Trust me … I’ve done this kind of thing myself.

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

Sidebar

Related Questions

No related questions found

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.