2 Replies Latest reply on Apr 20, 2006 10:34 PM by Charles Crouch

    Remote debuging with eclipse

    Thomas Diesler Master

      When I remotely connect to jboss using

      # Sample JPDA settings for remote socket debuging
      JAVA_OPTS="$JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"

      I never seem to be able to hot swap code in the server after minor modification. Eclipse 3.1RC4 always tells me

      Hot code replace failed - scheme change not implemented.

      This is a major productivity impact for me. Has anyone found how to hot swap with eclipse?

        • 1. Re: Remote debuging with eclipse
          Thomas Diesler Master

          Jason wrote,

          Ok, I did some research on this, and I have an answer for you. The
          reason why hotcode replace is not working, is because the eclipse
          compiler and the javac compiler are generating different byte code.
          This effectively causes all code changes to be a schema change.

          I was able to fix this by changing the my build configuration to use
          the eclipse compiler. These are the steps I took to fix this:

          1. Copy org.eclipse.jdt.core_3.1.0.jar from your eclipse/plugins
          directory to your ant/lib. If you are using the build.sh or
          build.bat then this will be in jboss-head/tools/lib.

          2. Extract the jdtCompilerAdapter.jar file from
          org.eclipse.jdt.core_3.1.0.jar and put it in your ant/lib (or
          jboss-head/tools/lib)

          3. Edit your build/local.properties file and set
          build.compiler=org.eclipse.jdt.core.JDTCompilerAdapter

          4. do a build clean; build to recompile the main jboss build with
          the eclipse compiler.

          I am not sure whether the byte code difference is intentional, it
          could be that this is all a bug, but I am guess that it is not. I
          have not tried the final release of 3.1 (released the 25th). I will
          report back when I find that out.

          • 2. Re: Remote debuging with eclipse
            Charles Crouch Expert

            More details on using the compiler can be found here:

            http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse.jdt.doc.isv/guide/jdt_api_compile.htm

            Including options to pass to turn off all the flippin' warnings :-).