Tuesday, September 21, 2010

Batch Script to connect JConsole to a WLS 10.3.x

Batch script anyone can use to connect JConsole to a WLS 10.3.x instance. But make sure to edit it according to your specifications.

@setlocal

rem runtime_url=service:jmx:rmi:///jndi/iiop://localhost:7001/weblogic.management.mbeanservers.runtime
set domain_url=service:jmx:rmi:///jndi/iiop://localhost:7001/weblogic.management.mbeanservers.domainruntime

set JAVA_HOME=C:\oracle\Middleware\jdk160_14_R27.6.5-32
set WLS_HOME=C:\oracle\Middleware\wlserver_10.3\server

set JCONSOLE_CLASSPATH
set JCONSOLE_CLASSPATH=%JCONSOLE_CLASSPATH%;%JAVA_HOME%\lib\jconsole.jar
set JCONSOLE_CLASSPATH=%JCONSOLE_CLASSPATH%;%JAVA_HOME%\lib\tools.jar

set WLS_CLASSPATH=
set WLS_CLASSPATH=%WLS_CLASSPATH%;%WLS_HOME%\lib\wljmxclient.jar
set CLASSPATH=%JCONSOLE_CLASSPATH%;%WLS_CLASSPATH%

set PROPS=
set PROPS=%PROPS% -J-Djmx.remote.proto.provider.pkgs=weblogic.management.remote 
set PROPS=%PROPS% -J-Djava.class.path=%CLASSPATH%

jconsole %PROPS% 

@endlocal

No comments: