1 Reply Latest reply on Jun 16, 2012 4:53 AM by Stephen Coy

    jconsole.sh throws exception in Macos

    SMS JBOSS Newbie

      Hi, When I try to execute jconsole.sh, it throws exception


      Exception in thread "main" java.lang.NoClassDefFoundError: sun/tools/jconsole/JConsole

      Caused by: java.lang.ClassNotFoundException: sun.tools.jconsole.JConsole

                at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

                at java.security.AccessController.doPrivileged(Native Method)

                at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

                at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

                at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

                at java.lang.ClassLoader.loadClass(ClassLoader.java:247)


      Is this a bug with JBOSS AS 7.1.1.




        • 1. Re: jconsole.sh throws exception in Macos
          Stephen Coy Master

          This script requires JAVA_HOME to be set correctly in order to work.


          The correct way to set JAVA_HOME on MacOS X is


          {code}export JAVA_HOME=`/usr/libexec/java_home -v1.6`{code}


          {code}export JAVA_HOME=`/usr/libexec/java_home -v1.7`{code}


          I add the following to my ~/.bash_profile for convenience:


          {code}alias java6="export JAVA_HOME=`/usr/libexec/java_home -v1.6`"

          alias java7="export JAVA_HOME=`/usr/libexec/java_home -v1.7`"{code}