Tools Home Page NonStop Server for Java 5.0 Tools Reference Pages Abstract This document consists of this title page, a table of contents, and the Tools Reference Pages for the HP NonStop™ Server for Java™, based on Java 2 Platform Standard Edition 5.0. Product Version HP NonStop Server for Java, based on Java 2 Platform Standard Edition 5.0, Version 5.0 Supported Hardware All HP Integrity NonStop NS-series servers. Supported Release Version Updates (RVUs) This manual supports H06.
526239-002 NonStop Server for Java based on Java 2 Platform, Standard Edition, SDK 1.4.2), Version 2.0 December 2004 529775-001 For TNS/R, HP NonStop Server for Java, based on Java 2 Platform, Standard Edition, SDK 1.4.2, Version 2.0 May 2005 For TNS/E, HP NonStop Server for Java, based on Java 2 Platform, Standard Edition, SDK 1.4.2, Version 1.0 540386-001 HP NonStop Server for Java, based on Java 2 Platform Standard Edition 5.0, Version 5.
Motif, OSF/1, UNIX, X/Open, and the "X" device are registered trademarks, and IT DialTone and The Open Group are trademarks of The Open Group in the U.S. and other countries. Open Software Foundation, OSF, the OSF logo, OSF/1, OSF/Motif, and Motif are trademarks of the Open Software Foundation, Inc. OSF MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THE OSF MATERIAL PROVIDED HEREIN, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Title Page NonStop Server for Java 5.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. 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.
keytool Key and Certificate Management Tool Manages a database of private keys and their associated certificate chains authenticating the corresponding public keys. kinit Kerberos Tool Obtains and caches Kerberos ticket-granting tickets. klist Kerberos Tool Allows the viewing of entries in the local credentials cache and key table. ktab Kerberos Key Table Manager Allows for managing the principal names and service keys stored in a local key table.
© 2007 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 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 5.0 Tools Reference Pages (540386-002) © 2007 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 5.0 Tools Reference Pages (540386-002) © 2007 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 ● Nonstandard Java Options ● Deviations from Nonstandard Java Options ● Deviations from Nonstandard Java -XX 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.
for Java 5. -server Selects the Java HotSpot Server virtual machine (VM). Note: -server is the default option for NonStop Server for Java 5; therefore, specifying -server is optional. -d32 -d64 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 5, which uses only the 32-bit environment to run Java programs. Nonstandard Java Options The following nonstandard options are shown for your convenience.
Deviations from Nonstandard -XX Java Options -XX:+UseParallelGC Specifies a parallel garbage collector. This option is disabled. If you specify this option, the Java VM exits with the error: -XX:+UseParallelGC option is not supported on this platform. -XX:+UseParNewGC Specifies a parallel garbage collection. This option is disabled. If you specify this option, the Java VM exits with the error: -XX:+UseParNewGC option is not supported on this platform.
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 5 application is run as a Pathway server, you can enable this option to alert Pathmon to restart the server after the NonStop Server for Java 5 application dies. -XX:GuaranteeFreeHeapSizeAfterGC= Prevents excessive garbage collection (GC) activity in Java applications that have not been tuned well with respect to GC.
● The Java Extensions Framework ● Security Features ● Garbage Collection (GC) in the NonStop Server for Java Programmer's Reference for more implementation-specific information on options Title Page | Tools Home Page NonStop Server for Java 5.0 Tools Reference Pages (540386-002) © 2007 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.
NonStop Server for Java 5.0 Tools Reference Pages (540386-002) © 2007 Hewlett-Packard Development Company L.P. All rights reserved.
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 5.0 Tools Reference Pages (540386-002) © 2007 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.
Description The Java Debugger, jdb, is a simple command-line debugger for Java classes. It is an example of the use of the Java Platform Debugger Architecture that provides inspection and debugging of a local or remote Java virtual machine (VM). 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.
You can then attach jdb to the Java VM with the following command: jdb -attach 8000 Note: MyClass is not specified in the jdb command line in this case because jdb connects to an existing Java VM instead of launching a new one. There are many other ways to connect the debugger to a Java VM, and all of them are supported by jdb, as specified in Connecting for Remote Debugging. Basic jdb Commands The following is a list of the basic jdb commands.
❍ print myObj.myMethod() (to print the value if myMethod() returns a non-null) ❍ print new java.lang.String("Hello").length() dump For primitive values, this command is identical to print. For objects, it prints the current value of each field defined in the object. Static and instance fields are included. The dump command supports the same set of expressions as the print command. threads List the threads that are currently running.
● stop in java.lang.String.length (sets a breakpoint at the beginning of the method java.lang.String.length) ● stop in MyClass.init (init identifies the MyClass constructor) ● stop in MyClass.clinit (clinit identifies the static initialization code for MyClass) If a method is overloaded, you must also specify its argument types so that the proper method can be selected for a breakpoint. For example, MyClass.myMethod(int,java.lang.String), or MyClass.myMethod().
Command-Line Options When you use jdb in place of the Java application launcher on the command line, jdb accepts many of the same options as the java command, including -D, -classpath, and -Xoption. The following additional options are accepted by jdb: -help Displays a help message. -sourcepath directory1 [:directory2]... Uses the given path in searching for source files in the specified path. If this option is not specified, the default path of "." is used.
Deviations from Standard Java -tclient Runs the application in the Java HotSpot client VM. Note: The -tclient option is not valid with NonStop Server for Java 5. -tserv Runs the application in the Java HotSpot server VM. Note: -tserv is the default option for NonStop Server for Java 5; therefore, specifying -tserv is optional. Options Forwarded to the Process Being Debugged -v -verbose[:class|gc|nji] Turns on verbose mode. -D name=value Sets a system property. -classpath directory1 [:directory2]...
-Xrunjdwp:transport=dt_socket,\ address=hostname:portnum,server=y ClassName Note: If address option is not given, the server will start on any available port on the local host and print portnum. This portnum should be used by the jdb to attach. iii. The target JVM attaches to previously running debugger. -listen jdb -listen hostname:portnum To attach a target JVM, use the following command : java -Xnoagent -Xdebug -Djava.
See Also: ● javac ● java ● javah ● javap ● javadoc Title Page | Tools Home Page NonStop Server for Java 5.0 Tools Reference Pages (540386-002) © 2007 Hewlett-Packard Development Company L.P. All rights reserved.
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 kinit: Kerberos Tool The kinit tool obtains and caches Kerberos ticket-granting tickets. Kerberos is an authentication system to enable two parties to exchange private information across an otherwise open network. For a complete description of the tool and its use, see the Sun Microsystems documentation for kinit. Synopsis kinit [ commands ] principal-name Title Page | Tools Home Page NonStop Server for Java 5.
Title Page | Tools Home Page klist: Kerberos Display Entries in Credentials Cache and keytab The klist tool allows you to view entries in the local credentials cache and key table. For a complete description of the tool and its use, see the Sun Microsystems documentation for klist. Synopsis klist [ commands ] Title Page | Tools Home Page NonStop Server for Java 5.0 Tools Reference Pages (540386-002) © 2007 Hewlett-Packard Development Company L.P. All rights reserved.
Title Page | Tools Home Page ktab: Kerberos Key Table Manager The ktab tool allows you to manage the principal names and service keys stored in a local key table. For a complete description of the tool and its use, see the Sun Microsystems documentation for ktab. Synopsis ktab [ commands ] Title Page | Tools Home Page NonStop Server for Java 5.0 Tools Reference Pages (529775-002) © 2007 Hewlett-Packard Development Company L.P. All rights reserved.
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 5.
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 5.
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 Programmer's Reference rmic ● Title Page | Tools Home Page NonStop Server for Java 5.
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 5.
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 5.0 Tools Reference Pages (540386-002) © 2007 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 5.
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 5.0 Tools Reference (540386-002) © 2007 Hewlett-Packard Development Company L.P.