NonStop Server for Java 4.2 Programmer's Reference
$java HelloWorld
Note that you should not type java HelloWorld.class. All Java classes have the .class
extension. Typing .class at the end causes an error message.
Your Java application displays the message, "Hello World!".
Specifying the CPU and Process Name
with Which an Application Runs
You can specify which CPU an application process runs in and its process name by using options of the
run utility. The run utility starts OSS programs with specific attributes.
The format of the command to specify the CPU where a Java application is to run is:
run -cpu=cpu_number java class_name
For example, the command to run Java in CPU 3 is:
$run -cpu=3 java HelloWorld
The format of the command to give a java process a process name is:
run -name=/G/process_name java class_name
For example, the command to give Java the process name $APPJ is:
$run -name=/G/appj java HelloWorld
where the /G directory identifies the Guardian fileset. For information about the /G
directory, see the Open System Services User's Guide.
The following example combines more than one run option in a single command:
$run -name=/G/japp -cpu=3 java HelloWorld
For more information about the run(1) utility, see the Open System Services Shell and Utilities
Reference Manual.