The current version of wlshell is distributed as a zip file that can be downloaded from here.
Unzip the distribution file, it will create a subdirectory with the following structure:
+-- wlshell-2.1.0
+-- bin
+-- doc
+-- legal
+-- lib
+-- scripts
The command files to start wlshell are located under the "bin" directory:
Windows: wlsh.cmd Unix: wlsh.sh
Four additional environment command files are provided to use wlshell with WebLogic and other JMX implementations:
Windows: env4wls.cmd, env4jmx.cmd Unix: env4wls.sh, env4jmx.sh
In Unix, enable execution permission on the command files:
cd /opt/wlshell-2.1.0 cd bin chmod u+x *.sh
To use wlshell with WebLogic or with another JMX Implementation, edit the wlsh.cmd file (or wlsh.sh in Unix) and modify the "ENVFILE" variable as follows:
Windows: REM uncomment to use wlshell with WebLogic, also specify the WebLogic version set ENVFILE=env4wls.cmd 10 REM uncomment to use wlshell with other JMX implementations rem set ENVFILE=env4jmx.cmd
Unix: # uncomment to use wlshell with WebLogic, specify the WebLogic version ENVFILE="env4wls.sh 10" # uncomment to use wlshell with other JMX implementations #ENVFILE="env4jmx.sh"
If wlshell is going to be used with WebLogic and with other JMX implementations, several copies of the "wlsh.cmd" file can be done and customized accordingly, for example: "wlsh-wls-8.cmd", "wlsh-wls-10.cmd", "wlsh-jmx.cmd", etc.
See the following sections for instructions on how to setup the environment to use WebLogic and other JMX implementations.
Edit the file "env4wls.cmd" ("env4wls.sh" in Unix) and make the changes described in this section.
Specify the the directory where wlshell is installed by editing the "WLSHDIR" variable:
Windows: REM Set wlshell home directory set WLSHVER=2.1.0 set WLSHDIR=C:\wlshell-%WLSHVER%
Unix:
# Set wlshell home directory
WLSHVER="2.1.0"
WLSHDIR="/opt/wlshell-${WLSHVER}"
Specify the directory where the WebLogic environment set file is located, for each version of WebLogic that you plan to use:
Windows: set ENVFILE6=c:\bea\wlserver6.1\config\mydomain\setEnv.cmd set ENVFILE7=c:\bea\weblogic700\server\bin\setWLSEnv.cmd set ENVFILE8=c:\bea\weblogic81\server\bin\setWLSEnv.cmd set ENVFILE9=c:\bea\weblogic92\server\bin\setWLSEnv.cmd set ENVFILE10=c:\bea\wlserver_10.0\server\bin\setWLSEnv.cmd
Unix: ENVFILE6=/opt/bea/wlserver6.1/config/mydomain/setEnv.sh ENVFILE7=/opt/bea/weblogic700/server/bin/setWLSEnv.sh ENVFILE8=/opt/bea/weblogic81/server/bin/setWLSEnv.sh ENVFILE9=/opt/bea/weblogic92/server/bin/setWLSEnv.sh ENVFILE10=/opt/bea/wlserver_10.0/server/bin/setWLSEnv.sh
Edit the file "env4jmx.cmd" ("env4jmx.sh" in Unix) and make the changes described in this section.
Specify the the directory where wlshell is installed by editing the "WLSHDIR" variable:
Windows: REM Set wlshell home directory set WLSHVER=2.1.0 set WLSHDIR=C:\wlshell-%WLSHVER%
Unix:
# Set wlshell home directory
WLSHVER="2.1.0"
WLSHDIR="/opt/wlshell-${WLSHVER}"
Specify the directory where the JDK is installed by editing the "JAVA_HOME" directory:
Windows: REM uncomment and configure to use wlshell with SUN J2SE 5.0 JMX set JAVA_HOME="C:\Program Files\Java\jdk1.5.0_01" REM uncomment and configure to use wlshell with MX4J rem set JAVA_HOME="C:\Program Files\Java\j2sdk1.4.2_06"
Unix: # uncomment and configure to use wlshell with SUN J2SE 5.0 JMX JAVA_HOME="/usr/java" # uncomment and configure to use wlshell with MX4J #JAVA_HOME="/opt/j2sdk1.4.2_06"
Edit the "JMXPROVIDER" variable to reflect the JMX implementation in use:
Windows: REM uncomment to use wlshell with SUN J2SE 5.0 JMX set JMXPROVIDER=SUN REM uncomment to use wlshell with MX4J rem set JMXPROVIDER=MX4J
Unix: # uncomment to use wlshell with SUN J2SE 5.0 JMX JMXPROVIDER=SUN # uncomment to use wlshell with MX4J #JMXPROVIDER=MX4J
When using J2SE 5.0 JMX or Java SE 6, no additional setting is required.
When using other JMX implementations (MX4J, RI), it is necessary to update the classpath. Edit the "JMXHOME" and "CLASSPATH" variables to include the JMX implementation libraries as shown in this example:
Windows: REM uncomment to use wlshell with MX4J set JMXHOME=C:\mx4j-2.0.1 set CLASSPATH=%JMXHOME%\lib\mx4j.jar;%JMXHOME%\lib\mx4j-remote.jar
Unix:
# uncomment to use wlshell with MX4J
JMXHOME=/opt/mx4j-2.0.1
CLASSPATH=${JMXHOME}/lib/mx4j.jar:${JMXHOME}/lib/mx4j-remote.jar
Continue to the Getting Started section to find some examples on how to start using wlshell.