Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8159681

JShell: should offer the ability to disassemble a method to bytecode

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • tbd
    • 9
    • tools
    • x86

      A DESCRIPTION OF THE REQUEST :
      Currently, it is possible to obtain the bytecode for a method/constructor by invoking the javap tool on a class-file. It would be beneficial to be able to perform such disassembly within the JShell tool (JEP222) and display the resulting bytecode in the console.

      JUSTIFICATION :
      Often, it is beneficial to the developer to see what bytecode is generated by any given piece of Java source code. Currently, this requires the creation of a valid class and method, followed by an invocation of javac and finally javap. JShell seeks to streamline the process of executing small segments of Java code in comparison to the previous method of creating a valid source file, and invoking first the compiler and then a JVM to call the main method. A similar enhancement to bytecode viewing through the JShell tool would be equally beneficial as an enhancement to JShell itself.


            rfield Robert Field (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: