ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

How Debug a Java Class invoked from an RPGLE program

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How Debug a Java Class invoked from an RPGLE program

    Hi all
    I would need to debug a java class called from an rpgle program , via 5250 emulation.
    I found this document ibm https://www-01.ibm.com/support/docvi...d=nas8N1021114
    I followed this steps:


    1- Job1:
    a - add the environment variables
    ADDENVVAR ENVVAR(QIBM_RPG_JAVA_PROPERTIES) VALUE('-debug;')
    and other variables that might be needed such as CLASSPATH.


    2- Job2:
    a- strsrvjob
    b- strdbg rpgprogram
    c- add a breakpoint on the call to Method1

    3- Job1:
    a- call the RPG program

    4- Job2:
    a- step into the call to Method1
    b- now you can debug the Java method and the RPG program

    Step 4a : my rpg program stop at the line that call my class method, but if press F22 the controll skyp the next RPG line, instead of going / open the java class source ..
    Where am i wrong ?
    Thanks in advance



  • #2
    Originally posted by gio.cot View Post
    Hi all
    I would need to debug a java class called from an rpgle program , via 5250 emulation.
    I found this document ibm https://www-01.ibm.com/support/docvi...d=nas8N1021114
    I followed this steps:


    1- Job1:
    a - add the environment variables
    ADDENVVAR ENVVAR(QIBM_RPG_JAVA_PROPERTIES) VALUE('-debug;')
    and other variables that might be needed such as CLASSPATH.


    2- Job2:
    a- strsrvjob
    b- strdbg rpgprogram
    c- add a breakpoint on the call to Method1

    3- Job1:
    a- call the RPG program

    4- Job2:
    a- step into the call to Method1
    b- now you can debug the Java method and the RPG program

    Step 4a : my rpg program stop at the line that call my class method, but if press F22 the controll skyp the next RPG line, instead of going / open the java class source ..
    Where am i wrong ?
    Thanks in advance

    in my job log i see : JVAB307 Unable to start Java system debug.

    Comment


    • #3
      I have found that I have to call at least one method in the class first before I can step into that method or other methods.

      If you need to debug the first method call, you could add an extra method in the class to call before the method that you want to debug.

      Comment

      Working...
      X