cjclstartap (start Java application )
Format
cjclstartap [[Java-option]...] Java-application-class-name
[[Argument-passed-to-main-method] ...]
Function
This subcommand starts a Java application.
Arguments
When no arguments are specified, the command's usage is displayed.
- Java-option
- Specifies the invoke JavaVM option.
- If you specify the same option in the Java-option and option definition file (usrconf.cfg), the contents specified in the Java-option become valid.
- You can specify the following options:
- -cp
- -classpath
- -D<name>=<value>
- -verbose[:class|gc|jni]
- -ea[:<packagename>...|:<classname>]
- -enableassertions[:<packagename>...|:<classname>]
- -da[:<packagename>...|:<classname>]
- -disableassertions[:<packagename>...|:<classname>]
- -esa | -enablesystemassertions
- -dsa | -disablesystemassertions
- -agentlib:<libname>[=<options>]
- -agentpath:<pathname>[=<options>]
- -javaagent:<jarpath>[=<options>]
- -Xmixed
- -Xint
- -Xbootclasspath:<directories and zip/jar files separated by ;>
- -Xbootclasspath/a:<directories and zip/jar files separated by ;>
- -Xbootclasspath/p:<directories and zip/jar files separated by ;>
- -Xnoclassgc
- -Xloggc:<file>
- -Xbatch
- -Xms<size>
- -Xmx<size>
- -Xmn<size>
- -Xss<size>
- -Xprof
- -Xrunhprof[:help]|[:<option>=<value>, ...]
- -Xdebug
- -Xrs
- -Xcheck:jni
- -XX:NewRatio=<value>
- -XX:PermSize=<size>
- -XX:MaxPermSize=<size>
- -XX:SurvivorRatio=<value>
- -XX:[+|-]PrintTenuringDistribution
- -XX:TargetSurvivorRatio=<value>
- -XX:MaxTenuringThreshold=<value>
- You cannot specify the following options:
- -jar jarfile (substitute with -cp jarfile Java-application-class-name)
- -client (substitute by specifying jvm.type=client in the usrconf.cfg file)
- -server (substitute by specifying jvm.type=server in the usrconf.cfg file)
- -hotspot
- -version
- -showversion
- -? -help
- -X
- -XX
- -Xfuture
- Java-application-class-name
- Specifies the user-created Java application class name.
- Argument-passed-to-main-method
- Specifies the argument passed to the main method of Java application.
Return value
Values other than the following return values return the Java application termination code. However, if SIGHUP, SIGINT, or SIGTERM occurs in UNIX, this command returns the value with +128 added to the signal number.
- 1:
- An error occurred in the start Java application command.
- 143:
- The following operations are performed when the command is running (in Windows):
- The x button is clicked for closing the command prompt window from which the command is invoked.
- The Windows system shuts down.
- The Windows system logs out.
Notes
- When you specify the directory path where the option definition file (usrconf.cfg) and user property file (usrconf.properties) are saved, you must specify the storage destination environment variable of the user definition file (CJCLUSRCONFDIR). For setting up the environment variables of Java applications, see 3.3.2 When using the cjclstartap command in the uCosminexus Application Server EJB Container Functionality Guide.
The storage destination environment variable of the user definition file is not specified, the current directory is referenced. When the option definition file (usrconf.cfg) or the user property file (usrconf.properties) does not exist in the directory specified with the environment variable, an error message is displayed and the command is terminated abnormally.
- This command executes the main method of the Java application main class. The main method must be declared as public static void main(String[]).
- The class path specified in the CLASSPATH environment variable is ignored.
- You must have the write permission for the current directory and log output destination directory to execute this command.
- In UNIX, set 0 for umask for enabling multiple users to use the log output destination.
- If you specify false in the ejb.client.directory.shareable option or if you try to invoke multiple processes that use the same current directory or the same log output destination directory concurrently, an error message is displayed and the command terminates abnormally.
- If false is specified in the ejb.client.directory.shareable option, the file storing the process ID (.cjclstartap.pid) and the lock file (.cjclstartap.lock) are created in the current directory. In UNIX, the pipe file (.COSMINEXUS_CC_EJBCLIENT_process_ID) is created. If you edit or delete these files, the log file and thread dump might not be output properly.
- The hs_err<pid>.log in the JavaVM event log and the core dump are output in the current directory.
- In Windows, if you specify a path containing UNC name as the current directory, the log might not be output.
- In UNIX, if you specify anfs mounted disk as the current directory, the log might not be output.
- When false is not specified in the ejb.client.directory.shareable option of usrconf.cfg, or when Java log is output simultaneously from multiple cjclstartap commands specifying the same log output destination, the Java log might not be output correctly. In such cases, change the directory path specified in the ejb.client.log.directory.
- If the -cp option and -classpath option are not specified, the current directory is not used as the default class path.
- If you specify multiple -cp and -classpath options, all the specified options become valid.
- If you execute this command while logging off from the account, the invocation of the command might fail.
- This command sends the Ctrl+Break signal to itself, for the output of the thread dump. In this case, all the applications, which share the console with the cjclstartap command and do not ignore Ctrl+Break are terminated.
- In Windows Server 2012, Windows Server 2008, Windows 8, Windows 7, or Windows Vista, you execute this command in the directory in which you have write permission. If you execute this command with the general user permission in %ProgramFiles% and the subdirectories, the current directory is redirected, and hence the operations will become as follows:
- The log file, lock file, or pid file are redirected.
- If multiple users execute this command, the processing is executed for all the users at the same time.
- Only the user who executes this command can execute the cjcldumpap command.
- This command sets the directory path of a library provided by the product to an environment variable or a class path. When you acquire the information of the class path from a Java application, ignore the information of the directory path of a library provided by the product.