The JVM feature that would improve my productivity the most: unlimited Hot Swap

I develop IntelliJ IDEA plugins and web applications. I must see “Can’t reload classes: add method not supported” 20 times per day. Then I shut down, wait 2 minutes for IDEA or Tomcat to start in debug mode, and continue debugging. I think I could get twice as much done in a day if I didn’t have to do this. I know there’s a bug in the Sun database but I can’t find it. The Sun issue report for this problem is 4910812.

Are you a slave to hot swap? Do you avoid renaming, extracting, or changing modifiers of methods so you can reload the classes? How do you get around it?

7 Responses to “The JVM feature that would improve my productivity the most: unlimited Hot Swap”

  1. Ron Says:

    w.r.t. tomcat, why not just redeploy your war?

  2. Carfield Yim Says:

    Or you can try Jetty, which take much much less time to restart

  3. Anonymous Says:

    Is it this one? http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4910812

  4. Patrick Lightbody Says:

    Bob Lee and I have been searching for a JVM that might do this, or _something_. Lately we’ve given up that Sun is interested in solving this, and instead started to look at writing some crazy classloader that could emulate this for you by recompiling objects, tracking references to objects, and using reflection to copy over changes. Not sure how possible it is.

    This is exactly what I was trying to solve with WebWork’s “prototype” feature — it works great until lame libraries (read: Hibernate) hold on to objects/class definitions longer than they should. Then it’s game over: time to restart your app.

    To those who think reloading the webapp is an option — heh, you’ll sing a diffirent tune as soon as you have to deal with an app that takes a long time to start up (for whatever valid or invalid reason).

  5. Blogbody Says:

    PLEASE VOTE: the only JVM bug you’ll ever really care about

    If there was only one bug/feature request everyone should care about, this. The expansion of HotSwap support is required for Java to stay cutting edge. Java will get passed up if it continues to require that entire web apps be…

  6. Anonymous Says:

    I think IBM’s J9 JVMs fair a little better. I could be wrong though

  7. Mert on Software Says:

    Please vote for this java bug

    Please vote for this java bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4910812

    This is related to the hotswap feature of java vm.

Leave a Reply