NonStop Server for Java 7.0 Tools Reference Pages HP Part Number: 693950-002 Published: March 2014 Edition: J06.26 and all subsequent J-series RVUs and H06.
© Copyright 2013, 2014 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.
Contents About this Manual.........................................................................................6 Product Version........................................................................................................................6 Supported Hardware................................................................................................................6 Supported Release Version Updates (RVUs)..................................................................................
10 javap: Java Class File Disassembler...........................................................28 Synopsis................................................................................................................................28 See Also:...............................................................................................................................28 11 jdb: Java Debugger.................................................................................29 Synopsis....................
24 wsgen : Java API for XML Web Services (JAX-WS) 2.0.................................51 Synopsis................................................................................................................................51 25 wsimport: JAX-WS 2.0.............................................................................52 Synopsis................................................................................................................................
About this Manual This document contains the Tools Reference Pages for the HP NonStop™ Server for Java™, based on the Java Platform Standard Edition 7. Product Version HP NonStop Server for Java, based on Java Platform Standard Edition 7 Supported Hardware All HP Integrity NonStop NS-series servers Supported Release Version Updates (RVUs) This manual supports J06.15 and all subsequent J-series RVUs and H06.26 and all subsequent H-series RVUs, until otherwise indicated by its replacement publications.
computer type Computer type letters within text indicate C and Open System Services (OSS) keywords and reserved words. Type these items exactly as shown. Items not enclosed in brackets are required. For example: myfile.c italic computer type Italic computer type letters within text indicate C and Open System Services (OSS) variable items that you supply. Items not enclosed in brackets are required. For example: pathname [ ] Brackets Brackets enclose optional syntax items. For example: TERM [\.
Item Spacing Spaces shown between items are required unless one of the items is a punctuation symbol such as a parenthesis or a comma. For example: CALL STEPMOM ( process-id ) ; If there is no space between two items, spaces are not permitted. In this example, no spaces are permitted between the period and any other items: $process-name.
lowercase italic letters Lowercase italic letters indicate variable items whose values are displayed or returned. For example: p-register process-name [ ] Brackets Brackets enclose items that are sometimes, but not always, displayed. For example: Event number = number [ Subject = first-subject-value A group of items enclosed in brackets is a list of all possible items that can be displayed, of which one or none might actually be displayed.
!r The !r notation following a token or field name indicates that the token or field is required. For example: ZCOM-TKN-OBJNAME token-type ZSPI-TYP-STRING. !r !o. The !o notation following a token or field name indicates that the token or field is optional. For example: ZSPI-TKN-MANAGER token-type ZSPI-TYP-FNAME32. !o HP Encourages Your Comments HP encourages your comments concerning this document. We are committed to providing documentation that meets your needs.
NonStop Server for Java 7.0 Tools Reference Pages This section provides information about the tools used in NonStop Server for Java 7.0. Table 1 (page 11), illustrates the commands, tools, and its relative functionality. Table 1 NonStop Server for Java 7.0 Tools Reference Pages Command Tool Name Function “apt: Annotation Processing Tool” (page 13) Annotation Process Tool Processes program annotations through a set of reflective APIs and a supporting infrastructure.
Table 1 NonStop Server for Java 7.0 Tools Reference Pages (continued) Command Tool Name Function or IIOP. Also, generates OMG Interface Definition Language (IDL). “rmid: Java RMI Activation System Daemon” (page 40) Java RMI Activation System Daemon Starts the activation system daemon that allows objects to be registered and activated in a Java virtual machine (VM).
1 apt: Annotation Processing Tool The apt tool processes program annotations through a set of reflective APIs and a supporting infrastructure. For more information on apt tool, see the Oracle Java documentation for apt. Synopsis apt [-classpath classpath] [-sourcepath sourcepath] [-d directory] [-s directory] [-factorypath path] [-factory class] [-print] [-nocompile] [-Akey[=val] ...
2 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 more information on extcheck tool, see the Oracle Java documentation for extcheck. Synopsis extcheck [ -verbose ] targetfile.
3 idlj: IDL-to-Java Compiler The idlj tool generates Java bindings from a specified IDL (Interface Definition Language) file. For more information on idlj tool, see the Oracle Java documentation for idlj.
4 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 more information on jar tool, see the Oracle Java documentation for jar.
5 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 more information on jarsigner tool, see the Oracle Java documentation for jarsigner.
6 java: Java Application Launcher The java tool launches a Java application by starting a Java run time environment, loading a specified class, and invoking that class' main method. For more information on java tool, see the Oracle Java documentation for java. Synopsis java [ options ] classname [ arguments ] java [ options ] -jar file.jar [ arguments ] classname Name of the class to be invoked. file.jar Name of the jar file to be invoked. Used only with -jar.
is a list of key[=value] arguments separated by commas. The following options are used in most of the cases: • For CPU time metrics with minimal intrusion: -Xeprof • Exact call count information and object creation profiling: -Xeprof:inlining=disable • To see the complete list of available options, use: java -Xeprof:helps After the profiled application terminates execution, the Java Virtual Machine writes the profile data to a file in the current directory. Use HPjmeter to analyze the file.
time_slice= Specifies the time in seconds between the profiling start and the time when profiling will be terminated. When the profiling is terminated, the profile data is written to a file. The application will continue running. If time_slice is not specified, or if the application terminates before the specified time elapses but the profiling has started, the profile data is written after the termination of the application.
The process ID is automatically appended to the verbosegc filename you specify. This helps you to associate a verbosegc output with the corresponding Java process, especially in cases where an application executes several Java processes. Synopsis The syntax of the option is: -Xverbosegc[:help]|[0|1][:file=[stdout|stderr|] -Xverbosegc:help for Java 7.0 NOTE: Parallel and Concurrent GC are available in NSJ 7. Therefore, the -Xverbosegc options pertaining to them are applicable to NSJ 7.
7: Old generation expanded on last scavenge 8: Old generation too full to scavenge 9: FullGCAlot 10: Allocation profiler triggered 11: JVMTI force GC 12: Adaptive Size Policy 13: Last ditch collection 3: represents a complete background CMS GC • • %2: indicates the GC reason: ◦ 1: Occupancy > initiatingOccupancy ◦ 2: Expanded recently ◦ 3: Incremental collection will fail ◦ 4: Linear allocation will fail ◦ 5: Anticipated promotion ◦ 6: Incremental CMS m indicates the background CMS state when
Eden Sub-space (within the New Generation) • %7: Before • %8: After • %9: Capacity Survivor Sub-space (within the New Generation) • %10: Before • %11: After • %12: Capacity Old Generation • %13: Before • %14: After • %15: Capacity Permanent Generation (Storage of Reflective Objects) • %16: Before • %17: After • %18: Capacity • %19: The total stop-the-world duration, in seconds. • %20: The total time used in collection, in seconds. Could not create the Java virtual machine.
HP Extensions to NonStandard Java Options -Xabend Turns on the abend option to abort the process instead of exiting with a non-zero exit code. If the NonStop Server for Java 7.0 application runs as a Pathway server, you can enable this option to alert Pathmon to restart the server after NSJ7 application shuts down. -XX:GuaranteeFreeHeapSizeAfterGC= Prevents excessive garbage collection (GC) activity in Java applications that have not been tuned well with respect to GC.
7 javac: Java Programming Language Compiler The javac tool compiles Java source code into bytecode. For more information on javac tool, see the Oracle Java 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. The -J options are not allowed in these files.
8 javadoc: Java API Documentation Generator The javadoc tool generates API documentation in HTML format from Java source code. For more information on javadoc tool, see the Oracle Java documentation for javadoc. Synopsis javadoc [ options ] { packagenames ] [ sourcefilenames ] [ - subpackages pkg1:pkg2:...
9 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 more information on javah tool, see the Oracle Java documentation for javah. Synopsis For files that are needed to implement native methods: javah [ options ] fully-qualified-classname ...
10 javap: Java Class File Disassembler The javap tool disassembles compiled Java files. For more information on javap tool, see the Oracle Java documentation for javap. Synopsis javap [ options ] class ...
11 jdb: Java Debugger The jdb tool helps you to find and fix errors in Java programs. For more information on jdb tool, see the Oracle Java documentation for jdb. Synopsis jdb [ options ] [ class ] [ arguments ] options See “Command Line Options” (page 31). class Name of the class to begin debugging. arguments Arguments passed to the main() method of class. Description The Java Debugger, jdb, is a simple command line debugger for Java classes.
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).
If the current thread is suspended (either through an event such as a breakpoint or through the suspend command), local variables and fields can be displayed with theprint anddump commands. The up and down commands select which stack frame is current. Breakpoints Breakpoints can be set in jdb at line numbers or at the first instruction of a method, for example: • stop at MyClass:22 (sets a breakpoint at the first instruction for line 22 of the source file containing MyClass) • stop in java.lang.String.
-attach address Attaches the debugger to the previously running Java VM by using the default connection mechanism. -listen address Waits for a running VM to connect to the specified address through a standard connector. -listenany Waits for a running VM to connect to any available address through a standard connector. -launch Launches the debugged application immediately upon startup of jdb. This option removes the need for using the run command.
Connecting for Remote Debugging 1. The Debugger launches the target Java VM. -launch jdb -launch ClassName 2. 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.
See Also: “javac: Java Programming Language Compiler” (page 25) “java: Java Application Launcher” (page 18) “javah: C Header and Stub File Generator” (page 27) “javap: Java Class File Disassembler” (page 28) “javadoc: Java API Documentation Generator” (page 26) 34 jdb: Java Debugger
12 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.
13 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 more information keytool on tool, see the Oracle Java documentation for keytool.
14 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 more information on native2ascii tool, see the Oracle Java documentation for native2ascii.
15 orbd: Object Request Broker Daemon The server manager included with the orbd tool enables clients to transparently locate and invoke persistent objects on servers in the CORBA environment. For more information on orbd tool, see the Oracle Java documentation for orbd.
16 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 more information on rmic tool, see the Oracle Java documentation for rmic. Synopsis rmic [ options ] package-qualified-classname ...
17 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 more information on rmid tool, see the Oracle Java documentation for rmid. Synopsis rmid [ options ] See Also: 40 • “java: Java Application Launcher” (page 18) • CLASSPATH in the NonStop Server for Java 7.
18 rmiregistry: Java Remote Object Registry The rmiregistry tool starts a remote object registry on the specified port on the current host. For more information on rmiregistry tool, see the Oracle Java documentation for rmiregistry. Synopsis rmiregistry [ port ] See Also: • “java: Java Application Launcher” (page 18) • java.rmi.registry.LocateRegistry • java.rmi.
19 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 more information on schemagen tool, see the Oracle Java documentation for schemagen. Synopsis schemagen [-options ...] The following table lists the schemagen options. Option 42 Description -d Specifies where to place the processor and javac generated class files.
20 serialver: Serial Version Command The serialver tool returns the serialVersionUID of one or more classes. For more information on serialver command, see the Oracle Java documentation for serialver. Synopsis serialver [ option ] [ classname ... ] See Also: • java.io.
21 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 more information in servertool tool, see the Oracle Java documentation for servertool.
22 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 more information on tnameserv tool, see the Oracle Java documentation for Naming Service.
23 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. The input and output options of nsjps tool are enhanced in the 64–bit version of NSJ7. NOTE: The nsjps tool can list or monitor NSJ7 Java applications. To list or monitor previous Java applications, use previous version of nsjps tool.
size and process time are consolidated values for the Java and corresponding GC processes. NOTE: This option is applicable only for J-series systems. The following example shows the usage and sample output for -gc option: nsjps —gc PID 45676 67894 Cmd java javagc -gcpid To obtain details about the Java process corresponding to a GC process, -gcpid is provided, where, refers to the of the GC process. NOTE: This option is applicable only for J-series systems.
nsjps -parent 16777243 PID 754974740 Cmd java Cross Reference Option NSJPS provides -x option that prints the parent-child Java process relationships. This helps to identify the child Java processes started by a particular parent process. In the cross reference listing, only the Java processes are considered and not the GC processes. The following example shows the usage and output for -x option.
-v option This option lists the argument passed to the Java process. The following example shows the usage and output for -v option: nsjps —v PID 989855920 Cmd java arguments -XX:+UseParallelGC HelloWorld -p option This option lists the Guardian pin of the Java or GC process. The following example shows the usage and output for -p option: nsjps —p PID 989855920 922747051 Cmd java java PIN 1,1173 1,390 -u option This option lists the Java process and the owner of this Java or GC process.
PID 1895825444 1040187405 Cmd java java 1895825444 1040187405 java java Help Command Output The help command reflects the command line options and they are listed in “Synopsis” (page 46).
24 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 more information on wsgen tool, see the Oracle Java documentation for wsgen. Synopsis wsgen.sh The following table lists the wsgen options.
25 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 more information on wsimport tool, see the Oracle Java documentation for wsimport. Synopsis wsimport [options] 52 wsimport: JAX-WS 2.
26 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 more information on xjc tool, see the Oracle Java documentation for xjc. Synopsis xjc [-options ...] ... [-b ] ... The following table lists the xjc options. Option Description -nv Does not perform strict validation of the input schema(s).