Search code examples
eclipsejakarta-eejboss5.xhotswap

Using Hotswap agent with Jboss 5 in Eclipse


Trying to configure JBoss 5 to work with hotswapagent using eclipse. So far I have done the following: Patched my jdk using DCEVM (installer-light-jdk7u71.2.jar) with option - install DCEVM as aljvm. Jdk patched is v1.6_45 (which Jboss uses). Downloaded the lastet version of hotswap-agent.jar and added vm arg to my server configuration: XXaltjvm=dcevm -javaagent:C:\tools\hotswap-agent.jar

However when I start the server I get the follwing error:

java.lang.UnsupportedClassVersionError: org/hotswap/agent/HotswapAgent : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

am I using the wrong version of hotswap to run with jdk v1.6? any help please


Solution

  • AFAIK, HotswapAgent works with JDK 7 and above.

    Or

    If you want to use JDK v1.6_45, try to patch the JDK using the binaries available here.

    Also noticed that there is a hyphen (-) missing in your XXaltjvm=dcevm configuration. It should be -XXaltjvm=dcevm