| NOTE: Some of the usage documentation previously included in these release notes has been moved to the Java for HP-UX Programmer's Guide at Programmer's Guide for Java™ 2
The Java for HP-UX Programmer's Guide at Programmer's Guide for Java™ 2 contains usage documentation for developers. There you will find information on HotSpot options, HP-specific optons and features, suggestions and examples for allocating memory, how to use WDB to examine backtraces in Java threads, code examples for using Java Native Interface, and much more.
Another change is that beginning with 5.0, we are combining the JDK, JRE, Runtime Plug-in, and Java WebStart technology release notes in this document.
JDK/JRE Usage
Removing support for unwanted architectures in the JRE
Under the JRE license agreement, partners who redistribute the JRE may remove support for unwanted architectures. Functional components may NOT be removed under any circumstances. You may remove support for unwanted architectures as follows:
The following commands assume that the JRE has been installed in the standard location, i.e. /opt/java1.5/.
- On PA-RISC, to remove 64-bit support:
/usr/sbin/swremove Jre15.JRE15-PA20W Jre15.JRE15-PA20W-HS
- On HP Integrity (Itanium), to remove 64-bit support:
/usr/sbin/swremove Jre15.JRE15-IPF64 Jre15.JRE15-IPF64-HS
Using WDB to examine backtraces in Java thread stacks
You can now use HP's debugger WDB 3.0.01 or later (the GNU Debugger GDB) to examine backtraces containing mixed language frames (Java and C/C++) in Java thread stacks. This will simplify debugging the VM and Java mixed-language applications. Set the environment variable GDB_JAVA_UNWINDLIB to the path name of the Java Unwind Shared Library libjunwind.sl (PA), which is in the SDK.
The default location of the Java Unwind Library in the SDK is:
/opt/java1.5/jre/lib/PA_RISC/server/libjunwind.sl
/opt/java1.5/jre/lib/PA_RISC2.0/server/libjunwind.sl
/opt/java1.5/jre/lib/PA_RISC2.0W/server/libjunwind.sl
/opt/java1.5/jre/lib/IA64N/server/libjunwind.so
/opt/java1.5/jre/lib/IA64W/server/libjunwind.so
Here are a few examples. In ksh, you would set the environment variable like this:
For 64-bit PA2.0 machines:
export export GDB_JAVA_UNWINDLIB=/opt/java1.5/jre/lib/\
PA_RISC2.0W/server/libjunwind.sl
For 64-bit HP Integrity 2 machines:
export GDB_JAVA_UNWINDLIB=/opt/java1.5/jre/lib/\
IA64W/server/libjunwind.so
If you installed the SDK in a location other than the default, you would substitute the non-default location for "/opt/java1.5" in the above commands. Then use WDB as usual to debug your Java applications or core files. See the tutorial slides on Debugging at Performance Tuning, Tutorials, & Training for help on how to use the new Java stack unwind functionality.
The Java for HP-UX Programmer's Guide at Programmer's Guide for Java™ 2 contains usage documentation for developers. There you will find information on HotSpot options, HP-specific optons and features, suggestions and examples for allocating memory, how to use WDB to examine backtraces in Java threads, code examples for using Java Native Interface, and much more.
Please refer also to Sun Microsystems' Java HotSpot VM Options at http://java.sun.com/docs/hotspot/VMOptions.html.
Support for C++ applications built with -AA and -AP options (PA-RISC)
Java supports the -AA and -AP options to build your C++ product. On HP Itanium systems, the C++ runtime libraries support -AA and -AP by default. On HP-UX 11.0 or 11.11 PA-RISC, if you are using the ANSI Standard C++ runtime (-AA) option in an application that loads Java, you need to use the -AA version of libjvm and libfontmanager. Note that these libraries are provided as a separate download on the same page from where you download the JDK and JRE, starting at this webpage:
JDK, JRE, and Plug-In 5.0.x Downloads and Documentation
These are the Standard C++ Runtime version of these libraries:
./jre/lib/PA_RISC2.0/libjvm_v2.sl
./jre/lib/PA_RISC2.0W/libjvm_v2.sl
./jre/lib/PA_RISC2.0/libfontmanager_v2.sl
./jre/lib/PA_RISC2.0W/libfontmanager_v2.sl
The native application must be linked with, or must dynamically load these versions of the Java libraries if your C++ application is compiled using -AA.
The Standard C++ version of the JVM libraries are supported for PA_RISC2.0 and PA_RISC2.0W architectures only.
If the JVM is invoked through the standard Java driver, then use the -V2 option to use the Standard C++ runtime.
For example:
java -V2 <javaprog>
Using Java 2 JNI on HP-UX
For C and C++ applications, it is important to link with the -mt (multithread) option if the application calls a Java VM. Both executables and shared libraries must be linked with -mt. Use of -mt must be consistent during both compilation and linking. For more information, refer to the Native (non-Java) calling Java methods section in the Programmer's Guide.
If you embed libjvm in a 32-bit native application and wish to use a large Java heap, you must link with the -N option. Refer to the Expanding heap size in native applications on PA-RISC HP-UX 11.11 and later releases and Expanding heap size in native applications on Integrity HP-UX 11.23 and later releases for more information.
Garbage collectors: Parallel, Concurrent mark, and Sweep
For a summary of changes in the garbage collector for version 5.0 refer to http://java.sun.com/j2se/1.5.0/docs/guide/vm/gc-ergonomics.html The parallel collector (-XX:+UseParallelGC) has been enhanced in 5.0 to monitor and adapt to the memory needs of the application in order to eliminate the need to tune command-line options to achieve the best performance.
Allocating physical memory and swap in the Java heap
Since 1.4.1.05, the method of allocating physical memory and swap within the Java heap has changed. As a result, you are likely to see higher RSS (resident set size) memory usage when monitoring your Java processes with Glance or other tools, or your application startup may be slightly slower.
For more details on why this occurs and for examples of using key command line options, see: Allocating Physical Memory and Swap in the Java Heap.
Asian TrueType fonts and Asian locales
Asian Locales are supported by HP's JDK 5.0.13 with TrueType fonts. For more details, please refer to HP-UX Fonts and the Java™ Runtime Environment.
Date/Time methods defaults
The HotSpot JVM uses the gettimeofday() system call to obtain date and time information. For performance reasons a new mechanism that uses the number of CPU ticks since the application started is used to calculate the current time. As a result, changes to the system date or time using date(1), adjtime(2) or time synchronization utilities such as ntp will not be reflected in the date and time that the Java program returns, until the process is restarted.
If your application requires that system time changes are immediately reflected, you can use the
-XX:+UseGetTimeOfDay option to tell the JVM to use the gettimeofday call instead of the new, lightweight mechanism. However you may notice a drop in performance.
Profiling
Currently a SIGUSR2 handler to support -Xeprof profiling and a SIGPROF handler to support future profiling capability are installed automatically. This may cause incompatibilities with other native code or profiling tools which use SIGUSR2 or SIGPROF. You can turn off both handlers by using the following option -XX:+ReduceSignalUsage
However be aware that using this option also turns off the SIGQUIT handler, and you therefore will not be able to get a Java stack trace.
You can also turn off the SIGUSR2 handler only by using the following option -Xeprof:off. In this case you will retain the ability to get a Java stack trace using SIGQUIT. For more information about -Xeprof profiling, see the HP-UX Programmer's Guide for Java 2 at HotSpot Technology Tools and Commands
Closing a socket (PA-RISC only)
Because of changes to the mechanism by which a socket is closed in the VM, you no longer need to use the -XdoCloseWithReadPending option we recommended in earlier releases. For further information, refer to the HP-UX Programmer's Guide at HotSpot Technology Tools and Commands#socket
Compatibility with previous releases
Sun Microsystems maintains upward compatibility, therefore an application written for a 1.4 JVM will run on a 5.0 JVM. Downward compatibility is generally not supported, because new API's are introduced that cannot be run on earlier JVMs.
For a detailed description of the incompatibilities between 1.4 and 5.0, refer to http://java.sun.com/j2se/1.5.0/compatibility.html
Java Cryptography Extension (JCE) policy files
Due to import control restrictions for some countries, the Java Cryptography Extension (JCE) policy files shipped with the J2SE Development Kit and the J2SE Runtime Environment allow strong but limited cryptography to be used. These files are located at
<java-home>/lib/security/local_policy.jar
<java-home>/lib/security/US_export_policy.jar
where <java-home> is the jre directory of the JDK or the top-level directory of the J2SE Runtime Environment. An unlimited strength version of these files indicating no restrictions on cryptographic strengths is available on the JDK web site for those living in eligible countries. Those living in eligible countries may download the unlimited strength version and replace the strong cryptography jar files with the unlimited strength files.
Unlimited strength Jurisdiction Policy Files may be downloaded from the JavaSoft's web site. http://java.sun.com/products/jce/javase.html
Configuring the Runtime Plug-In
For additional information on the Runtime Plug-In, refer to the Plug-In FAQs at
Java™ Runtime Plug-in (JPI) for 1.3, 1.4, 5.0, & 6.0 Frequently Asked Questions.
The JPI configuration has been redesigned in the 5.0 release. Please refer to Sun Microsystems' documentation at:
http://java.sun.com/j2se/1.5.0/docs/guide/deployment/deployment-guide/jcp.html
CLASSPATH
A user's CLASSPATH environment variable can be passed by the JVM by running the Control Panel and specifying either '-cp' or '-classpath' in the "Java Run Time Parameter" box. You need to exit and rerun the browser for this change to take effect.
Java Webstart Technology Usage
Java™ Web Start is an application-deployment technology, which gives you the power to launch full-featured applications with a single click from a web browser. It is located in the jre directory. Some of Java Web Start's features include:
- Runs independently of any browser, so you can shut down your browser or go to another Web page and continue using your application.
- Applications deployed with Java Web Start do not require a browser interface to operate.
- Includes security features of the Java 2 platform.
The hardware and operating system requirements for using Java Web Start are the same as those recommended for J2SE platform implementation on which it runs.
Upgrading from a Previous Java Web Start Version
Do NOT uninstall your previous version of Java Web Start (if you have one) before installing the new version. Uninstalling the previous version will cause the download cache to be cleared, and all of the previously installed Java Web Start applications will have to be downloaded again.
This version will overwrite previous installations and automatically update browsers to use this new release. If you want to reactivate a previous version after installing this new release, you have to re-install the old version. The configuration files and program files folder used by Java Web Start have not changed, so all your settings will remain intact after the upgrade.
Additional Java Web Start documentation
More information, including developer documentation, can be found in Sun Microsystems' documentation at: http://java.sun.com/products/javawebstart/reference/index.html.
Additional HP and Sun Java documentation
The following websites have additional information:
Java man pages (located at/opt/java1.5/man)
|