Getting a JRuby REPL in my JConsole sounded cool, but the instructions are way out of date.

The demos dir referenced doesn’t come with Oracle’s JDK7; you’ve got to download it separately and copy the demo directory to your JDK home.

The script engine stuff is now included in the JDK, so once you have that set up it’s easy as pie:

mkdir jrconsole
cd jrconsole
#get the latest jruby-complete.jar http://www.jruby.org/download
wget http://jruby.org.s3.amazonaws.com/downloads/1.7.4/jruby-complete-1.7.4.jar
export JAVA_HOME=`/usr/libexec/java_home` 
jconsole -J-Djava.class.path=$JAVA_HOME/lib/jconsole.jar:$JAVA_HOME/lib/tools.jar:jruby-complete-1.7.4.jar \
    -J-Dcom.sun.demo.jconsole.console.language=jruby  \
    -pluginpath $JAVA_HOME/lib/jconsole.jar:$JAVA_HOME/demo/scripting/jconsole-plugin/jconsole-plugin.jar

…and the Script Shell tab should show up and you can proceed with the tutorial.

Other than that include_class is deprecated in favor of java_import these days, anyway. And this is fine to screw around with, but the jmx4r gem is the way to go for any actual JMX automation.