Capture JVM output machine code

Does anybody know how to capture the machine code output from the JVM? I am running Windows Vista Professional.
I ask because I am creating a Computer Architecture course, and I would like to show the students the IA instructions that are generated by the JVM. The textbooks I have been investigating traditionally introduce assembly language by way of C++. The problem is that these students are taught programming using Java. I know the Java compiler output is bytecode, but this does not help me teach the actual architecture of the computer.
Thanks in advance.

Thanks all for you replies
georgemc: What you are saying is that while one can recognize a method that was written in Java in the bytecode, there is no relation between the original method (or the corresponding bytecode for that matter), and the machine code output of the JVM? For example, using Visual C++ once can view the disassembly of a method and see the IA assembly language, the values of the registers (including the flags register).
paulcw: Thanks for the suggestion. Your approach may work for future sessions, but I am afraid I do not have time to implement for this coming semseter
Captain Obvious (nice name): I had thought of taking an approach similar to your posting. However, I must cover specific topics in the class and there will not be time. For instance, I am expected to cover representing and manipulating information, machine-level representation of programs, processor architecture, optimizing program performance, memory hierarchy, exceptional control flow, and virtual memory. The difficulty some students encounter is that, up until this course, have been taught only Java programming. Then, they take this course which teaches everything from a C/C++ perspective. I was hoping I could demonstrate machine code in C++, as well as Java in an attempt to keep all levels of students engaged.

Similar Messages

  • Unable to Capture ALV output in an Internal Table, after CALL TRANSACTION

    Dear all,
    My requirement is to run multiple materials in T-code CK86_99 but as we know CK86_99 is only adequate to one material at a time.
    So, I want to capture the Output of the T-code in my Internal table with respect to all the Material Numbers I use in the Select-Options of my Z Program.
    Below is the Code I developed so far, but the Class
    cl_salv_bs_runtime_info=>get_data_ref(
            IMPORTING r_data = lf_ref ).
    is not capturing the Ouput...
    Please have a look and enlighten me how it could be solved.
    TABLES : mara.
    DATA : BEGIN OF wa_mara,
      matnr TYPE mara-matnr,
      END OF wa_mara.
    DATA: it_bdcdata TYPE TABLE OF bdcdata,
          wa_it_bdcdata LIKE LINE OF it_bdcdata,
          it_mara LIKE TABLE OF wa_mara.
    *      BELNR(10).
    FIELD-SYMBOLS:<fs_tab> TYPE ANY TABLE,
    <fs_line> TYPE any.
    DATA:lf_ref TYPE REF TO data,
         lf_ref1 TYPE REF TO data.
    SELECT-OPTIONS so_matnr FOR mara-matnr.
    PARAMETERS p_werks LIKE t001w-werks.
    *BELNR = 'Z92'. " Give Document Number here
    SELECT matnr FROM mara INTO TABLE it_mara WHERE matnr IN so_matnr.
    DATA opt TYPE ctu_params.
    LOOP AT it_mara INTO wa_mara.
      CLEAR wa_it_bdcdata.
    wa_it_bdcdata-program  = 'SAPMKKB0'.
    wa_it_bdcdata-dynpro   = '0300'.
    wa_it_bdcdata-dynbegin = 'X'.
      APPEND wa_it_bdcdata TO it_bdcdata.
      CLEAR wa_it_bdcdata.
    wa_it_bdcdata-fnam = 'BDC_CURSOR'.
    wa_it_bdcdata-fval = 'KKB0-MATNR'.
      APPEND wa_it_bdcdata TO it_bdcdata.
      CLEAR wa_it_bdcdata.
    wa_it_bdcdata-fnam = 'KKB0-MATNR'.
      wa_it_bdcdata-fval = wa_mara-matnr.
      APPEND wa_it_bdcdata TO it_bdcdata.
      CLEAR wa_it_bdcdata.
    wa_it_bdcdata-fnam = 'BDC_CURSOR'.
    wa_it_bdcdata-fval = 'KKB0-WERKS'.
      APPEND wa_it_bdcdata TO it_bdcdata.
      CLEAR wa_it_bdcdata.
      wa_it_bdcdata-fnam = 'KKB0-WERKS'.
    wa_it_bdcdata-fval = p_werks.
      APPEND wa_it_bdcdata TO it_bdcdata.
      CLEAR wa_it_bdcdata.
    wa_it_bdcdata-fnam = 'BDC_OKCODE'.
    wa_it_bdcdata-fval = 'OSNY'."'ONLI'."=CRET'.
      APPEND wa_it_bdcdata TO it_bdcdata.
    *  CLEAR wa_it_bdcdata.
    * wa_it_bdcdata-program  = 'SAPLKKRSOO'.
    * wa_it_bdcdata-dynpro   = '0100'.
    * wa_it_bdcdata-dynbegin = 'X'.
    *  APPEND wa_it_bdcdata TO it_bdcdata.
    *  CLEAR wa_it_bdcdata.
    * wa_it_bdcdata-fnam = 'BDC_OKCODE'.
    *  wa_it_bdcdata-fval = 'BACK'."=CRET'.
    *  APPEND wa_it_bdcdata TO it_bdcdata.
    *  CLEAR wa_it_bdcdata.
    * wa_it_bdcdata-program  = 'SAPMKKB0'.
    * wa_it_bdcdata-dynpro   = '0300'.
    * wa_it_bdcdata-dynbegin = 'X'.
    *  APPEND wa_it_bdcdata TO it_bdcdata.
    *  CLEAR wa_it_bdcdata.
    * wa_it_bdcdata-fnam = 'BDC_OKCODE'.
    * wa_it_bdcdata-fval = 'EXIT'."=CRET'.
    *  APPEND wa_it_bdcdata TO it_bdcdata.
      opt-dismode = 'N'.
    cl_salv_bs_runtime_info=>set(
        EXPORTING display  = abap_false
                  metadata = abap_true
    data     = abap_true ).
      CALL TRANSACTION 'CK86_99' USING it_bdcdata OPTIONS FROM opt.
      TRY.
    cl_salv_bs_runtime_info=>get_data_ref(
            IMPORTING r_data = lf_ref ).
          ASSIGN lf_ref->* TO <fs_tab>.
        CATCH cx_salv_bs_sc_runtime_info.
          MESSAGE 'Unable to retrieve ALV data' TYPE 'E'.
      ENDTRY.
    cl_salv_bs_runtime_info=>clear_all( ).
      IF <fs_tab> IS ASSIGNED.
        CREATE DATA lf_ref1 LIKE LINE OF <fs_tab>.
        ASSIGN lf_ref1->* TO <fs_line>.
      ENDIF.
    *LOOP AT <FS_TAB> ASSIGNING <FS_LINE>.
    *ENDLOOP.

    Hi Abhay,
          If you go to Transaction code SE93, enter the tcode "CK86_99" and click display, you may see the default value for transaction is "KKBB" and the screen field for P_SCREEN = 0300, P_TCODE = ck86_99.
          You may need to copy the transaction code "KKBB" and go to SE93 again, enter the tcode for "KKBB" then click display, now you may see the program name is "RKKB1000".
          Hope this answer your question.
    Thanks
    Hock Lin

  • To capture the output

    Hi all ,
    I Wish You A Happy New Year!!!!!!!!
    I am trying to capture the output of a java program into a file i.e,when I run the java program at command prompt and get the output, the output must be automatically captured into a file is this possible using java code
    Please help me
    Thanks,
    raghu

    And Mac OS/X is a unix variant, so it works there too.
    You can also redirect standard output in Java itself by using System.setOut, but once you're altering the Java code, I'd suggest refactoring the code so that it doesn't send all its output to standard output necessarily.

  • JVM terminated exit code = ...

    When using wsad 5, and trying to start the server I obtain an error :
    JVM terminated exit code = -1073741819 E:\...\javaw.exe
    -cp E:\...\startup.jar org.eclipse.core.launcher.Main
    -oswin32
    -wswin32
    -arch x86
    -showsplash e:\...\eclipse.exe
    -showsplash 600 de programa\wsad\.\eclipse\eclipse.exe
    -data E:\...\workspace
    where can I find the meaning of JVM exit codes? or Does anybody knows what does this one means?
    thanks

    You might need to run Eclipse properly
    All arguments following (but not including) the -vmargs entry are passed directly through to the indicated Java VM as virtual machine arguments (that is, before the class to run). Note: If an Eclipse startup argument, such as -data, is provided after the Java vm arguments (-vmargs), Eclipse will not start and you will receive a "JVM terminated. Exit code=1" error.
    Running on Different VMs
    Running Eclipse on J9
    When running Eclipse on J9 version 1.5, it is recommended that you use the following VM options:
    eclipse.exe [eclipse arguments] -vm path_to_j9w.exe
    -vmargs -ms:32 -mm:2048 -mo:32768 -moi:32768 -mca:32 -mco:128 -mx:2000000
    When running Eclipse on J9 version 2.0, the default arguments chosen by J9W should be suitable. However, to override the parameters which are automatically set internally by the Eclipse executable, you must specify -vmargs with no following arguments as follows:
    eclipse.exe [eclipse arguments] -vm path_to_j9w.exe -vmargs
    Please refer to the J9 VM documentation and help for further information.
    Running Eclipse on the IBM Developer Kit, Java(TM) Technology Edition VM
    The default VM settings for IBM Developer Kit, Java(TM) Technology Edition 1.3 Linux work well for initial exploration, but are not sufficient for large scale development. For large scale development you should modify your VM arguments to make more heap available. For example, the following setting will allow the Java heap to grow to 256MB:
    -vmargs -Xmx256M
    for more details
    http://dev.eclipse.org/viewcvs/index.cgi/~checkout~/org.eclipse.platform.doc.user/tasks/running_eclipse.htm

  • Capturing Program Output

    I have a program in which I want to capture the output generated when I run the class. The function is off in another java file that I have imported into this one. Some of the code is below.
    Tester controllerTester = new Tester();
    controllerTester.runtest(testArray);
    runtest outputs information via System.out.println and I am wanting to capture that information. How do I go about doing this? I have sucessfully captured output in another program that executes an external program with the Process p = Runtime.getRuntime().exec(program) command. I just need to know how to capture the output from runtest above. Any help would be appreciated.
    Thanks...Chris

    Runtime.getRuntime().exec(program) command. I just
    need to know how to capture the output from runtest
    above. Any help would be appreciated.[url http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html#setOut(java.io.PrintStream)]System.setOut(PrintStream) might be of help. Though it'll capture any output to system out, not only that produced by the method you mention (no problem if the code is executed in a single-threaded environment).

  • Viewing JRockit generated machine code

    Hello,
    Is there an easy way of getting a assembler/machine code dump of an
    optimized method/class in the JRockit JVM?
    /Jesper Nordenberg

    Short answer: no.
    Regards,
    /Staffan

  • How to capture graphical outputs from other programs

    Does anyone know how we capture the graphical outputs from the other programs and show them
    on the swing?
    I'd like to use a java program to run gnuplot, capture the outputs, and show them using swing.

    Depends on what you mean by "graphic outputs".
    Taking a quick glance at the gnuplot homepage, it looks as if you can output to PNG files, so just run the app, and load the png file.

  • Error for output tax code:Tax code I4 may only contain one assignment line.

    Hi
    While posting customer invoice with output tax code, I am getting following error.
    Tax code I4 may only contain one assignment line.
    Please help me resolve.
    Regards
    Rekha

    There are quite some answered questions in this forum for this issue.
    Here is one.
    Error in Sample document (Message no. FF731)
    Also, please search the forum with the following search key words.
    Tax AND code AND may AND only AND contain AND one AND assignment AND line
    Make sure you select all posts, not just the past 90 days (the default option), and you will see quite some hits.

  • Could not create JVM Virtual machine(While starting soa managed server)?

    Hi,
    While starting managed server I am getting following errors:
    Could not commit 1048576KB heap memory at 0x0000000004790000.
    Could not create JVM Virtual machine.
    After above error SOA managed server is to be down.
    Please help me that how can i resolve this issue.
    Thanks
    Dharm

    Hi Dharm,
    This is typically printed when we are short on memory.
    What is OS version and JDK being using here ? 32bit or 64bit ?
    Current Xms and Xmx values ?
    Thanks,
    Sharmela

  • How to capture the output of another program into a File/String

    I needed to capture the output of a dos program in an String/file I tried doing Runtime.getRuntime.exec("ipconfig /all >tmp.txt");
    but still I am unable to capture the output frm the program which I would like to capture in a file or String.Can anyone help

    When you use the Runtime.exec() method, it returns a Process object, that process object has access to the streams; stdout, stdin, and stderr of the application you just executed. what you'll want to monitor is the stdout or stderr streams using the
    p.getInputStream() or p.getErrorStream(), where p = the process object returned via the Runtime.exe() method.

  • Capturing the output of a os command line

    I need to capture the output of a os command line executed from one java program and I don't know how can do it.
    For example:
    Runtime.getRuntime().exec("hostid");

    Your suggestion worked very well, just in case that this could interest somebody, this is the complete solution
    Thanks for your help
    import java.io.*;
    public class HostID
    public static void main(String args[]){
    try{
    InputStream in = (Runtime.getRuntime().exec("hostid")).getInputStream();
    byte[] arreglo= new byte[200];
    int cantidad = in.read(arreglo);
    System.out.println(new String(arreglo,0,cantidad));
    } catch (IOException ioe){System.out.println(ioe.getMessage());}
    }

  • Capturing the output of a jsp page and save that output in a WORD .doc file

    Hi,
    This is Naveen. I got stuck up with a problem/doubt. URGENT ! URGENT !
    My doubt is how to capture the output of a jsp page(the content is dynamic generated) and save that output to a MS-Word doc file.
    I know that therez an option of using Servlets Filters, but this concept is supported by Servlet 2.3 spec. and not earlier. And we are working on previous spec. and our web-servers also supports the prev. version and not the 2.3 version.
    If incase, therez a third-party utility for free usage, suggestions are appreciated.
    Hope most of them came across this kind of functional requirement. If anyone of them succeeded in this, please express ur bitter experience if any, faced during the coding.
    Thanks in Advance for help.
    Naveen

    You can set the MIME content type as .doc and try to open the Page.
    res.setContentType("application/vnd.ms-excel"); to generate the Page output as Excel
    res.setContentType("application/vnd.ms-word"); to generate the Page output as MS Word doc
    Hope this helps..

  • Can Labview output source code in text format?

    I am trying to file a patent that includes some Labview code. The patent office recommends attaching code (either source code or machine code) to show reduction to practice.
    However, it appears that the USPTO only accepts CD-Rs that have ASCII text on them. Is there a way to export Labview source code or machine code (from application builder?) to text?
    Does anyone have any advice for dealing with the PTO when Labview code is involved?
    Thanks,
    Casey

    > I am trying to file a patent that includes some Labview code. The
    > patent office recommends attaching code (either source code or machine
    > code) to show reduction to practice.
    >
    > However, it appears that the USPTO only accepts CD-Rs that have ASCII
    > text on them. Is there a way to export Labview source code or machine
    > code (from application builder?) to text?
    >
    > Does anyone have any advice for dealing with the PTO when Labview code
    > is involved?
    >
    I believe this has been done before. I did a quick search on
    www.uspto.gov, and found lots of them referencing LabVIEW -- meaning
    that LabVIEW was mentioned in the patent, and probably that LV code was
    the mentioned embodiment of the patent. I didn't browse all of them to
    see if or how they i
    ncluded source, but surely you can find a precedent
    for including a pdf or rtf with your diagrams.
    If you can't find anything else, print your VIs to RTF and see about
    submitting that.
    Greg McKaskle

  • Compile a Java code to a native machine code

    Hi Everyone,
    What tool do I need to compile a Java code to a native machine code? Is there any free tool?
    Cecilia

    google.com is a good place to start

  • Capturing the Output of a webservice on an APEX form

    Hi,
    I have created an application that calls a Webservice (BPEL process). The application has a single form that takes in a single field (ReviewDate) and calls the Webservice. The Webservice does its thing and returns a mesage "The review date has been accepted".How do I capture this message in my form? I have the placeholders for input and output parameters but the output is not returned to the form. What do I need to do capture this message?
    Also, please note that the webservice does its thing successfully. I only need to capture the output of the webservice in my form.
    Thanks
    Vijay

    You can set the MIME content type as .doc and try to open the Page.
    res.setContentType("application/vnd.ms-excel"); to generate the Page output as Excel
    res.setContentType("application/vnd.ms-word"); to generate the Page output as MS Word doc
    Hope this helps..

Maybe you are looking for

  • No system load data available in st03

    Dear Guru,               When i am executing Tcode ST03 it is showing that "No system load data available" when i am executing "RSSTAT83" report then its thriwing "LOGDB_SSCR_NOT_FOUND" dump. statndard job getting cancelled thats why i hae change the

  • What is acceptable level of Private Interconnect Latency for RAC

    We have build 3 Node RAC on RHEL5.4 on VMware. There is node eviction problem due to loss of Network Heartbeat. ocssd.log:[    CSSD]2010-03-05 17:48:21.908 [84704144] >TRACE: clssnmReadDskHeartbeat: node 3, vm-lnx-rds1173, has a disk HB, but no netwo

  • Color correction tool

    I am having difficulty using the color correction tool, basically, I would like to eliminate a single color from a frame (be desaturating it), or isolate a specific part of a frame to color correct. Any ideas? Thanks!

  • AE Comps in Premiere

    I've been cutting a project in Premiere with the intention of color-grading the final version in AE. While I go along I'll do the occasional effects shot using "Replace With After Effects Composition" then go back to Premiere and continue cutting. Th

  • How to save Adobe Flash Paper files.

    Hello !! While browisng I found one book is opened in flashpaperloader window. Can any one pls give me the suggestion to store the same file in my local machine. Now I am able to read these files only with online. I want to save these and want to che