In order for it to be possible to use the Jython modules provided in the MC-CLI, the following conditions must be fulfilled when an MC-CLI user script is started.
The scripts startBcAdmin.cmd
(Windows) and startBcAdmin.sh
(Linux and Solaris systems) in the subdirectory cli-sample
of the Management Console installation directory (see Application scenarios (examples) ) are available as examples.
CLASSPATH
must contain the BeanConnect jar files from thelib
directory. TheCLASSPATH
is set by the scriptjavaenv.cmd
(Windows systems) orjavaenv.sh
(Linux and Solaris systems). Call this script with:<MC_home>\bin\javaenv.cmd
(Windows) or<MC_home>/bin/javaenv.sh
(Solaris /Linux systems)<console-home>
stands for the Management Console installation directory.JYTHONPATH
must contain the Jython installation directory:set JYTHONPATH=<jython_home>
(Windows) or
JYTHONPATH=<jython_home>
(Solaris/Linux systems)PATH must be extended to include the Jython installation directory:
set PATH=<jython_home>;%PATH%
(Windows) or
PATH=<jython_home>:$PATH
(Linux and Solaris systems)You must specify the following VM arguments in the
Jython
command used to start the CLI user script:–DBEANCONNECTPATH=<beanConnect_lib>
<beanConnect_lib>
is the directory containing the BeanConnect jar files.–DBEANCONNECT_JDK_HOME=<jdk_home>
<jdk_home>
is the JDK installation directory–DBEANCONNECT_USERCONS=<MC_home>
<MC_home>
is the Management Console installation directory–Dlog4jCfgFile=<log4j_properties_file>
<log4j_properties_file>
is the file containing the log4j properties. In most cases, this is the filelog4j.properties.xml
in theconfig
subdirectory of the Management Console installation directory.