Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java Hotswap with Eclipses and Remote Debugging on Local Machine

I'm trying to find out how to enable hotswapping of code while debugging with my build system and am coming up dry.

I've got an Ant build with a debug target like so:

<target name="debug_dev" depends="compile"
    description="Runs development version with the debugger.">
    <java classname="applets.TabHandler" fork="true" dir="build">
      <jvmarg value="-Xdebug" />
      <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000" />
        <classpath refid="compile_classpath" />
    </java>
</target>

I then use the remote debugging option in Eclipse to connect to port 8000. Debugging works fine, but I cannot edit code like I was able to before I was using Ant. I know that it is possible to get hotswapping working with JBoss, Tomcat, and other situations, but I am just running my program locally with a JVM call, as you can see from above.

Does anyone know if this is possible with my setup?

Thanks!

like image 629
Eric Avatar asked Sep 04 '26 01:09

Eric


1 Answers

Java Ant hotswap works rather well. There is no need to do it in Eclipse.

http://code.google.com/p/hotswap/

like image 61
andersonbd1 Avatar answered Sep 05 '26 15:09

andersonbd1