Command Line Options

Whenever you compile using JCOBridge the following options are automatically parsed and available from the command line.

usage: yourSoftware [- -JCOBridgeHelp] [- -JDKHome:] [- -JVMPath:] [- -JVMClassPath:] [–JVMModulePath:] [- -JNIVerbosity:] [- -JNIOutputFile:] [- -JVMPackages:] [- -JVMOption:] [- -JVMKVOption:] [- -JVMHeapSize:] [- -JVMInitialHeapSize:] [- -JVMJmxPort:] [- -JVMEnableDebug] [- -JVMDebugPort:] [- -JVMDebugSuspendFlag:] [- -JVMDebugOpts:]

 
--JCOBridgeHelp Display the usage help
--LicensePath:“PATH” The path where is located the JCOBridge license file
--JDKHome:”PATH” The path where is located the JRE of the installed JDK
--JVMPath:”PATH” The path to the JRE ennvironment or full path to java virtual machine library file (jvm.dll / libjvm.so).
On windows, if not set, the library try to find a suitable version on the system.
--JVMClassPath:”PATH” Class-path to be sent to the JVM
--JVMModulePath:”PATH” Module-path to be sent to the JVM
--JNIVerbosity:”OPTIONS” Parameters for JNI verbosity; see Oracle documentation online
--JNIOutputFile:”PATH” The absolute path where the JNI verbose info will be written. The file will be opened in append mode.
--JVMPackages:”PKG1,PKG2…PKGN” Comma separated list of package name to be used eg: java.lang,java.util,etc…
--JVMOption:OPTION The options to pass to the JVM when a JVM will be created.
This set a single option of the jvm. The text shall be escaped to allows special chars.
Repeat it multiple times to sent multiple options to the jvm.
eg:
--JVMOption:-Xmx128M
--JVMOption:-XX:OnError=\”gcore %p;dbx – %p\”
--JVMKVOption:OPTION The options to pass to the JVM when a JVM will be created (from version 2.2.0.200516)
This set a key-value (-Dkey-value) option of the jvm. The text shall be escaped to allows special chars.
Repeat it multiple times to sent multiple options to the jvm. The equal ('=') splits between key and value
eg:
--JVMKVOption:key=value

--JVMHeapSize:value The Heap size (-Xmx) to be set when JVM will be created (from version 2.4.8.220319)

--JVMInitialHeapSize:value The initial Heap size (-Xms) to be set when JVM will be created (from version 2.4.8.220319)

--JVMJmxPort:value The JMX port to be set when JVM will be created (from version 2.4.8.220319)

--JVMEnableDebug Put in command line to enable JVM debug (from version 2.4.8.220319)

--JVMDebugPort:value The port to be used for debug when JVM will be created (from version 2.4.8.220319). Default is 5005.

--JVMDebugSuspendFlag:value The suspend flag to be used in the debug option when JVM will be created (from version 2.4.8.220319). Default is "n"

--JVMDebugOpts:value The string to be used in the debug option when JVM will be created (from version 2.4.8.220319).
Default is "-agentlib:jdwp=transport=dt_socket,server=y,suspend={JVMDebugSuspendFlag},address={JVMDebugPort}"

Version 2.5.*+

Starting from version 2.5.* it is possible to use environment variables to set the previous variables, they are parsed from the engine in the same way. The standard behavior is to prepend the name of the command-line option with JCOBRIDGE_, e.g. the command line switch LicensePath becomes JCOBRIDGE_LicensePath

IMPORTANT NOTE for Windows users: JCOBRIDGE_JVMPath environment variable takes precedence overJAVA_HOME and Windows registry. In the cases where the JDK/JRE installer does not set neither JAVA_HOME nor Windows registry and you receive an InvalidOperationException: Missing Java Key in registry: Couldn’t find Java installed on the machine try to set theJCOBRIDGE_JVMPathvalue to the jvm.dll location.

Usage Example:

prompt> yourSoftware --JVMPath:"C:\Program Files\Java\jre1.8.0_121\bin\server\jvm.dll" --JVMOption:-Xmx128M [your software options]