Tools Home Page NonStop Server for Java 6.0 Tools Reference Pages Abstract This document contains the Tools Reference Pages for the HP NonStop™ Server for Java™, based on the Java Platform Standard Edition 6.0. Product Version HP NonStop Server for Java, based on Java Platform Standard Edition 6.0 Supported Hardware All HP Integrity NonStop NS-series servers Supported Release Version Updates (RVUs) This manual supports J06.04 and all subsequent J-series RVUs and H06.
Legal Notices © Copyright 2010 Hewlett-Packard Development Company L.P. Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor’s standard commercial license. The information contained herein is subject to change without notice.
Microsystems, Inc. © 1989, 1990, 1991 Transarc Corporation. This software and documentation are based in part on the Fourth Berkeley Software Distribution under license from The Regents of the University of California. OSF acknowledges the following individuals and institutions for their role in its development: Kenneth C.R.C. Arnold, Gregory S. Couch, Conrad C. Huang, Ed James, Symmetric Computer Systems, Robert Elz.
Title Page NonStop Server for Java 6.0 Tools Reference Pages Command Tool Name Function apt Annotation Process Tool Processes program annotations through a set of reflective APIs and a supporting infrastructure. dynamic saveabend Dynamic Saveabend File Creation extcheck JAR Conflict Detection Tool Detects version conflicts between a target Java Archive (JAR) file and currently installed extension JAR files. idlj IDL-to-Java Compiler Generates Java bindings from a specified IDL file.
jrunscript Command-Line Script Shell Supports both an interactive (read-eval-print) mode and a batch ( -f option) mode of script execution. keytool Key and Certificate Management Tool Manages a database of private keys and their associated certificate chains authenticating the corresponding public keys. native2ascii Native-to-ASCII Converter Converts a file with native-encoded characters to one with Unicode-encoded characters.
xjc Java Architecture for XML Binding Compiles schemas. Title Page NonStop Server for Java 6.0 Tools Reference Pages (517828-002) © 2010 Hewlett-Packard Development Company L.P. All rights reserved.
Title Page | Tools Home Page apt: Annotation Processing Tool The apt tool processes program annotations through a set of reflective APIs and a supporting infrastructure. For a complete description of the tool and its use, see the Sun Microsystems documentation for apt. Synopsis apt [-classpath classpath] [-sourcepath sourcepath] [-d directory] [-s directory] [-factorypath path] [-factory class] [-print] [-nocompile] [-Akey[=val] ...
Title Page | Tools Home Page dynamic saveabend: Dynamic Saveabend File Creation The Dynamic Saveabend File Creation feature helps to create a saveabend file of a running Java process, without abending (aborting) the Java process, by issuing a signal to the process. This feature allows the Java process to continue normal execution after the abend file is created. The time taken to create the abend file, that is, application pause time is low (measurable in milliseconds).
Title Page | Tools Home Page extcheck: JAR Conflict Detection Tool The extcheck tool detects version conflicts between a target Java Archive (JAR) file and currently installed extension JAR files. For a complete description of the tool and its use, see the Sun Microsystems documentation for extcheck. Synopsis extcheck [ -verbose ] targetfile.jar See Also: jar Title Page | Tools Home Page NonStop Server for Java 6.0 Tools Reference Pages (517828-002) © 2010 Hewlett-Packard Development Company L.P.
Title Page | Tools Home Page idlj: IDL-to-Java Compiler The idlj tool generates Java bindings from a specified IDL (Interface Definition Language) file. For a complete description of the tool and its use, see the Sun Microsystems documentation for idlj. Synopsis idlj [ options ] idl-file Title Page | Tools Home Page NonStop Server for Java 6.0 Tools Reference Pages (517828-002) © 2010 Hewlett-Packard Development Company L.P. All rights reserved.
Title Page | Tools Home Page jar: Java Archive Tool The jar tool combines multiple files into a single Java Archive (JAR) file or retrieves files from a JAR file. For a complete description of the tool and its use, see the Sun Microsystems documentation for jar.
Title Page | Tools Home Page jarsigner: JAR Signing and Verification Tool The jarsigner tool generates signatures for Java Archive (JAR) files and verifies the signatures of signed JAR files. For a complete description of the tool and its use, see the Sun Microsystems documentation for jarsigner.
Title Page | Tools Home Page java: Java Application Launcher ● Synopsis ● Deviations from Standard Java Options ● -Xeprof ● -Xverbosegc ● Nonstandard Java Options ● Deviations from Nonstandard Java Options ● HP Extensions to Standard Java Options ● See Also The java tool launches a Java application by starting a Java run-time environment, loading a specified class, and invoking that class' main method.
Selects whether the program is to be run in a 32-bit or 64-bit environment. Note: These options are not valid with NonStop Server for Java 6.0, which uses only the 32-bit environment to run Java programs. -Xeprof The -Xeprof option generates profile data for HPjmeter. The -Xeprof option controls profiling of Java applications running on JRE for NonStop operating system for the Java™ 2 Platform and collects method clock and CPU times, method call count, and call graph. (For information on HPjmeter, see www.
There is no degradation of performance unless you actually start profiling by the specified signal. times=quick|thorough The quick value instructs the profiler to use the hardware Interval Timer register for time measurement. This value results in faster profiling runs, but in extremely rare circumstances, it can produce bad data. This is the default value. If you ever suspect that the profile data generated using the quick value is incorrect, re-run to see whether the results can be replicated.
the VM in interpreted mode (-Xint), although this is usually much slower. The consequences of inlining for the profiling are: ● The obtained profile data does not reflect faithfully all the calls within the Java code as written by the programmer, but rather as it is actually executed by the VM. For most performance analysis cases, this is a desired feature.
At every garbage collection, the following 20 fields are printed: %1 Indicates the type of the garbage collection. 1: represents a Scavenge (GC of New Generation only) %2: indicates if this is a parallel scavenge.
%3: Program time at the beginning of the collection, in seconds %4: Garbage collection invocation.
(-Xss512k). You can use this option to increase the stack size if you experience stack overflow exceptions. The default units for n are bytes; n must be greater than 1000 bytes. To modify the meaning of n, append either the letter k (or K) to indicate kilobytes, or the letter m (or M) to indicate megabytes. For example, –Xss10240 and –Xss10k are equal. -Xincgc Specifies using the incremental low-pause garbage collector.
See Also: ● javac ● jdb ● javah ● jar ● The Java Extensions Framework ● Security Features ● Garbage Collection (GC) in the NonStop Server for Java 6.0 Programmer's Reference for more implementation-specific information on options Title Page | Tools Home Page NonStop Server for Java 6.0 Tools Reference Pages (517828-002) © 2010 Hewlett-Packard Development Company L.P. All rights reserved.
Title Page | Tools Home Page javac: Java Programming Language Compiler The javac tool compiles Java source code into bytecode. For a complete description of the tool and its use, see the Sun Microsystems documentation for javac. Synopsis javac [ options ] [ sourcefiles ] [ @argfiles ] Arguments may be in any order. options Command-line options. sourcefiles One or more source files to be compiled (such as MyClass.java). @argfiles One or more files that list options and source files.
Title Page | Tools Home Page javadoc: Java API Documentation Generator The javadoc tool generates API documentation in HTML format from Java source code. For a complete description of the tool and its use, see the Sun Microsystems documentation for javadoc. Synopsis javadoc [ options ] { packagenames ] [ sourcefilenames ] [ - subpackages pkg1:pkg2:...
Title Page | Tools Home Page javah: C Header and Stub File Generator The javah tool generates C header files and stub C source files from a Java class. These files provide the connections that allow your Java code and C code to interact. For a complete description of the tool and its use, see the Sun Microsystems documentation for javah. Synopsis For files that are needed to implement native methods: javah [ options ] fully-qualified-classname ...
Title Page | Tools Home Page javap: Java Class File Disassembler The javap tool disassembles compiled Java files. For a complete description of the tool and its use, see the Sun Microsystems documentation for javap. Synopsis javap [ options ] class ... See Also: ● javac ● rmic ● java ● jdb ● javah ● javadoc Title Page | Tools Home Page NonStop Server for Java 6.0 Tools Reference Pages (517828-002) © 2010 Hewlett-Packard Development Company L.P. All rights reserved.
Title Page | Tools Home Page jdb: Java Debugger The jdb tool helps you find and fix errors in Java programs. For a complete description of the tool and its use, see the Sun Microsystems documentation for jdb.
Starting a jdb Session There are many ways to start a jdb session. The most frequent way is to have jdb launch a new Java VM with the main class of application to be debugged. You do this by substituting the command jdb for the command java in the command line.
Basic jdb Commands The following is a list of the basic jdb commands. The Java debugger supports other commands, which you can list by using the jdb help command. {help | ?} Displays the list of recognized commands with a brief description. run After starting jdb and setting any necessary breakpoints, you can use this command to start the execution of the debugged application. This command is available only when jdb launches the debugged application (as opposed to attaching to an existing Java VM).
List the threads that are currently running. For each thread, its name and current status are printed, as well as an index that can be used for other commands, for example: 4. (java.lang.Thread)0x1 main running In this example, the thread index is 4, the thread is an instance of java.lang.Thread, the thread name is main, and it is currently running. thread Select a thread to be the current thread. Many jdb commands are based on the setting of the current thread.
Stepping The step command advances execution to the next line whether it is in the current stack frame or a called method. The next command advances execution to the next line in the current stack frame. Exceptions When an exception occurs for which there is not a catch statement anywhere in the throwing thread's call stack, the Java VM normally prints an exception trace and exits. When running under jdb, however, control returns to jdb at the offending throw.
connector. -launch Launches the debugged application immediately upon startup of jdb. This option removes the need for using the run command. The debugged application is launched and then stopped just before the initial application class is loaded. At that point you can set any necessary breakpoints and use the cont to continue execution. -connect connector-name:name1=value1,... Connects to the target VM through a named connector that uses the listed argument values.
-X option Sets a nonstandard target VM option. Connecting for Remote Debugging i. The Debugger launches the target Java VM. -launch jdb -launch ClassName ii. The Debugger attaches to a previously running Java VM. -attach jdb -attach hostname:portnum For this command, the JVM must already be running as a server at To start the server, use the following command : java -Xnoagent -Xdebug -Djava.
java -Xnoagent -Xdebug -Djava.compiler=NONE \ -Xrunjdwp:transport=dt_socket,\ address=hostname:portnum ClassName Transports A Java Platform Debugger Architecture (JPDA) transport is a form of inter-process communication used by a debugger application and the debuggee. NonStop Server for Java 6.0 provides a socket transport that uses the standard TCP/IP sockets to communicate between debugger and the debuggee. NonStop Server for Java 6.0 defaults to socket transport. NonStop Server for Java 6.
Title Page | Tools Home Page jrunscript: Command-line script shell jrunscript is a command-line script shell that supports an interactive (read-eval-print) mode and a batch ( -f option) mode of script execution. This is a scripting language-independent shell. By default, JavaScript is the language used, but the -l option can be used to specify a different language. Through Java to scripting language communication, jrunscript supports "exploratory programming" style.
Title Page | Tools Home Page keytool: Key and Certificate Management Tool The keytool tool manages a keystore (database) of private keys and their associated X.509 certificate chains authenticating the corresponding public keys. For a complete description of the tool and its use, see the Sun Microsystems documentation for keytool.
Title Page | Tools Home Page native2ascii: Native-to-ASCII Converter The native2ascii tool converts a file that has native-encoded characters (characters that are not Latin-1 and not Unicode) to a file with Unicode-encoded characters. For a complete description of the tool and its use, see the Sun Microsystems documentation for native2ascii. Synopsis native2ascii [ options ] [ inputfile [ outputfile ] ] Title Page | Tools Home Page NonStop Server for Java 6.
Title Page | Tools Home Page orbd: Object Request Broker Daemon The Server Manager included with the ordb tool enables clients to transparently locate and invoke persistent objects on servers in the CORBA environment. For a complete description of the tool and its use, see the Sun Microsystems documentation for orbd. Synopsis orbd -ORBInitialPort nameserverport [ options ] See Also: ● Naming Service ● servertool Title Page | Tools Home Page NonStop Server for Java 6.
Title Page | Tools Home Page rmic: Java RMI Compiler The rmic tool generates stubs and skeletons for remote objects that use either the JRMP or Internet Inter-ORB Protocol (IIOP). The rmic tool also generates Object Management Group (OMG) Interface Definition Language (IDL). For a complete description of the tool and its use, see the Sun Microsystems documentation for rmic. Synopsis rmic [ options ] package-qualified-classname ...
Title Page | Tools Home Page rmid: Java RMI Activation System Daemon The rmid tool starts the activation system daemon that allows objects to be registered and activated in a Java virtual machine (VM). For a complete description of the tool and its use, see the Sun Microsystems documentation for rmid. Synopsis rmid [ options ] See Also: ● java ● CLASSPATH in the NonStop Server for Java 6.0 Programmer's Reference rmic ● Title Page | Tools Home Page NonStop Server for Java 6.
Title Page | Tools Home Page rmiregistry: Java Remote Object Registry The rmiregistry tool starts a remote object registry on the specified port on the current host. For a complete description of the tool and its use, see the Sun Microsystems documentation for rmiregistry. Synopsis rmiregistry [ port ] See Also: ● java ● java.rmi.registry.LocateRegistry ● java.rmi.Naming Title Page | Tools Home Page NonStop Server for Java 6.
Title Page | Tools Home Page schemagen: Java™ Architecture for XML Binding Schema Generator The schemagen tool creates a schema file for each namespace referenced in your Java class generator for Java Architecture for XML Binding. For a complete description of the tool and its use, see the Sun Microsystems documentation for schemagen. Synopsis schemagen [-options ...] The following table lists the schemagen options.
Title Page | Tools Home Page serialver: Serial Version Command The serialver tool returns the serialVersionUID of one or more classes. For a complete description of the tool and its use, see the Sun Microsystems documentation for serialver. Synopsis serialver [ option ] [ classname ... ] See Also: ● java.io.ObjectStreamClass Title Page | Tools Home Page NonStop Server for Java 6.0 Tools Reference Pages (517828-002) © 2010 Hewlett-Packard Development Company L.P. All rights reserved.
Title Page | Tools Home Page servertool: Java IDL Server Tool The servertool tool provides a command-line interface for application programmers to register, unregister, start up, and shut down a persistent server. For a complete description of the tool and its use, see the Sun Microsystems documentation for servertool. Synopsis servertool -ORBInitialPort nameserverport options [ commands ] See Also: ● orbd Title Page | Tools Home Page NonStop Server for Java 6.
Title Page | Tools Home Page tnameserv: Naming Service Access The tnameserv tool starts the Java Interface Definition Language (IDL) name server to provide access to the CORBA Common Object Services (COS) Naming Service. For a complete description of the tool and its use, see the Sun Microsystems documentation for Naming Service. Synopsis tnameserv [ -ORBInitialPort n ] Title Page | Tools Home Page NonStop Server for Java 6.0 Tools Reference (517828-002) © 2010 Hewlett-Packard Development Company L.P.
Title Page | Tools Home Page NSJPS: NonStop Java Virtual Machine Process Status Tool The NSJPS tool is a process status tool that lists and monitors the Java processes running on a system. Synopsis nsjps [ ] The following options are supported: Option Purpose -cpu Lists the Java processes running on the CPU. -user Lists the Java processes owned by a user.
-help Prints the nsjps help text. -count Repeats the listing for the specified number of times. -delay
Title Page | Tools Home Page wsgen : Java™ API for XML Web Services (JAX-WS) 2.0 The wsgen tool generates the JAX-WS portable artifacts used in JAX-WS web services. The tool reads a web service endpoint implementation class (SEI) and generates all the required artifacts for web service deployment, and invocation. For a complete description of the tool and its use, see the Sun Microsystems documentation for wsgen. Synopsis wsgen.sh The following table lists the wsgen options.
-verbose Displays output messages about what the compiler is doing. -version Prints version information. Use of this option will ONLY print version information. Normal processing will not occur. -wsdl[:protocol] By default, wsgen does not generate a WSDL file. This flag is optional and will cause wsgen to generate a WSDL file and is usually used so that the user can look at the WSDL before the endpoint is deployed.
Title Page | Tools Home Page wsimport: JAX-WS 2.0 The wsimport tool generates JAX-WS portable artifacts, such as: ● Service Endpoint Interface (SEI) ● Service ● Exception class mapped from wsdl:fault (if any) ● Async Reponse Bean derived from response wsdl:message (if any) ● JAXB generated value types (mapped java classes from schema types) For a complete description of the tool and its use, see the Sun Microsystems documentation for wsimport.
Title Page | Tools Home Page xjc: Java™ Architecture for XML Binding Compiler The xjc tool is the XML binding compiler. The binding compiler can be launched using the appropriate xjc shell script in the bin directory for your platform. For a complete description of the tool and its use, see the Sun Microsystems documentation for xjc. Synopsis xjc [-options ...] ... [-b ] ... The following table lists the xjc options.
-catalog Specifies catalog files to resolve external entity references support TR9401, XCatalog, and OASIS XML Catalog format. -readOnly Enables the XJC binding compiler to mark the generated files read-only. -npa Suppresses generation of package-level annotations (**/package-info.java). -no-header Suppresses generation of a file header with timestamp. -target 2.0 Behaves like XJC 2.0 and generates code that does not use any 2.1 features.