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 systems) in the subdirectory cli-sample of the Management Console installation directory (see Application scenarios (examples) ) are available as examples.
CLASSPATHmust contain the BeanConnect jar files from thelibdirectory. TheCLASSPATHis set by the scriptjavaenv.cmd(Windows systems) orjavaenv.sh(Linux systems). Call this script with:<MC_home>\bin\javaenv.cmd(Windows) or<MC_home>/bin/javaenv.sh(Linux systems)<console-home>stands for the Management Console installation directory.JYTHONPATHmust contain the Jython installation directory:set JYTHONPATH=<jython_home>(Windows) orJYTHONPATH=<jython_home>(Linux systems)PATH must be extended to include the Jython installation directory:
set PATH=<jython_home>;%PATH%(Windows) orPATH=<jython_home>:$PATH(Linux systems)You must specify the following VM arguments in the
Jythoncommand 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 fileConsole.log4j2.properties.xmlin theconfigsubdirectory of the Management Console installation directory.