Debugging the HelloWorld Sample from the Command Line

To debug the HelloWorld sample from the command line:
  1. Open a terminal window and perform the following:
    1. Navigate to the JC_HOME_SIMULATOR/runtime/bin directory.
    2. Start the simulator by entering the following command at the command prompt:

      [jcsw.exe|./jcsl] -debug_port=9090

  2. Open a second terminal window and perform the following:
    1. Navigate to the JC_HOME_SIMULATOR/samples/HelloWorld directory.
    2. Edit AMSHelloWorldClient.java to send only the deploy script.
    3. Execute the build script:

      [build.bat|./build.sh]

      This builds the applet and the client.
    4. Execute the run script:

      [run.bat|./run.sh]

      This will deploy the applet.
  3. In the second command prompt, navigate to the JC_HOME_SIMULATOR/client/DebugProxy directory and start the debug proxy:
    java -jar jc-debug-proxy.jar -capPath ${JC_HOME_SIMULATOR}/samples/HelloWorld/applet/deliverables/HelloWorld/com/oracle/jcclassic/samples/helloworld/javacard/helloworld.cap
  4. Start the Java debugger of your choice and attach it to the 8000 port of the local host.
  5. Now you can set a break point and see it hit after a proper APDU is issued using the AMService API.