Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
»  Contact HP
Java Technology on Alpha
HP.com home

Release Notes

Software Development Kit (SDK) v 1.3.1-7
for the OpenVMS Alpha Operating System
for the Java™ Platform

 

Content starts here

Contents

Back to top
Introduction

Thank you for downloading the Software Development Kit (SDK) v 1.3.1-7 for the OpenVMS Alpha Operating System for the Java™ Platform (hereafter called the SDK). These release notes contain installation instructions, new features, known issues, fixed problems, usage documentation, and other information specific to the OpenVMS Alpha port of Sun Microsystems' Java™ 2 SDK, Standard Edition (J2SDK). This kit can be used to develop and run Java applets and programs on OpenVMS Alpha systems, Version 7.2-2 and higher.

Based on Sun’s J2SDK 1.3.1_10 Solaris Reference Release, the SDK v 1.3.1-7 kit implements J2SDK v 1.3.1 and passes all the tests in Sun's Java Compatibility Kit test suite (JCK V1.3a). Use the java -version command to check the version of the SDK that you are using.

This kit contains two virtual machines:

  • The classic virtual machine (classic VM, the virtual machine shipped with prior releases) is based on Sun's reference implementation. The classic VM contains Just-In-Time (JIT) compiler technology, but does not have the performance of the Fast Virtual Machine (Fast VM). However, it provides additional debugging support not currently available in the Fast VM.

  • The Fast Virtual Machine, included in this kit, is no longer provided as a separate kit. Refer to Fast Virtual Machine (Fast VM) v 1.3.1 is Included with the SDK for more information. To learn more about the Fast VM, refer to Using the Fast VM.

You select which VM to use when you set up your Java environment. To set up your environment, use one of the following two commands, as described in Setting Up the Java Environment:

$ @SYS$COMMON:[JAVA$131.COM]JAVA$131_SETUP FAST ! Use the Fast VM
$ @SYS$COMMON:[JAVA$131.COM]JAVA$131_SETUP ! Use the Classic VM

IMPORTANT: Please make sure you understand the Copyright (copyright.html, installed file) and License (license.html, installed file) information before using this release.

Back to top
New Features

The following sections briefly describe the new features HP has included in SDK v 1.3.1. HP recommends that you read Sun's Java 2 SDK, Standard Edition, version 1.3 Summary of New Features and Enhancements for a thorough description of all new features and enhancements available in the J2SDK v 1.3.

SDK v 1.3.1-7 New Features

This kit installs SDK v 1.3.1-7, which is a maintenance with the following new features from HP.

File Permissions with DECC$FILE_PERMISSION_UNIX Enabled

The DECC$FILE_PERMISSION_UNIX logical name is now supported; for more information, refer to Enabling UNIX-Style Behavior in Certain File-Manipulation Commands.

Expiring Certificates Replaced

Expiring certificates in the SYS$COMMON:[JAVA$131.JRE.LIB.SECURITY]CACERTS.;1 file have been replaced with the latest updates.

SDK v 1.3.1-6 New Features

SDK v 1.3.1-6 was a maintenance release with the following new features from HP.

New Command Procedures

This release includes two new command procedures that may help you begin using the Java programming language on OpenVMS:

$ @SYS$COMMON:[JAVA$131.COM]JAVA$CONFIG_WIZARD.COM
$ @SYS$COMMON:[JAVA$131.COM]JAVA$CHECK_ENVIRONMENT.COM

For more information, refer to Getting Started With the Java Programming Language on OpenVMS. HP would appreciate your opinion on whether you find these command procedures useful and how they could be improved in future iterations. Please use the Support page to provide feedback.

New Logical to Enhance Performance Tuning

Because some Web applications spend considerable time using Socket Streams with timeout values, the virtual machine makes use of C Runtime Library's select() function in a multi-thread nature. If the logical JAVA$TIMED_READ_USE_QIO is enabled, the virtual machine will use QIO(s) and AST(s) to implement the same functionality as select(). The result can be a reduction of overall kernel mode CPU usage, giving the application more available user mode CPU power. For more information, refer to Using JAVA$TIMED_READ_USE_QIO.

SDK v 1.3.1-5 New Features

SDK v 1.3.1-5 was a maintenance release with the following new feature from HP.

Additional Caching Available When JAVA$CACHING_INTERVAL is Enabled

A new logical name, JAVA$CACHING_DIRECTORY, is available to enhance the caching provided by JAVA$CACHING_INTERVAL. If JAVA$CACHING_INTERVAL is enabled and JAVA$CACHING_DIRECTORY is defined, the caching algorithm will attempt to find out the reason a file is "not found". If it is because a directory tree does not exist, the caching algorithm will be optimized to recognize that future attempts to this tree will also fail (until the directory has been created). This improves application startup for an application that has several directories defined in JAVA$CLASSPATH (or CLASSPATH). For more information, refer to Using JAVA$CACHING_INTERVAL in Application Performance Tuning.

SDK v 1.3.1-4 New Features

SDK v 1.3.1-4 was a maintenance release with the following new features from HP.

New Logicals

This release includes the following new logicals:

UNIX-like Behavior: The following logicals enable UNIX-style behavior for certain file-manipulation commands:

JAVA$DELETE_ALL_VERSIONS
JAVA$RENAME_ALL_VERSIONS
JAVA$CREATE_DIR_WITH_OWNER_DELETE

For more information, refer to Enabling UNIX-Style Behavior in Certain File-Manipulation Commands.

Debugging Tools: The following logicals can assist in debugging:

JAVA$PRINT_COMMAND_ARGS
JAVA$ENABLE_SIGQUIT_CTRLC
JAVA$ENABLE_SIGQUIT_MAILBOX

JAVA$FSYNC_INTERVAL

For more information, refer to Debugging Tools.

Performance Enhancement: The following logicals can improve performance for some applications:

JAVA$DAEMONIZE_MAIN_THREAD
JAVA$READDIR_CASE_DISABLE

For more information, refer to the Using JAVA$DAEMONIZE_MAIN_THREAD and Using JAVA$READDIR_CASE_DISABLE in Application Performance Tuning.

Bypassing the 255-character DCL Command-Line Limit: With the following logical, the Run Time Environment (the RTE) expands any logical or symbol that begins with a "$":

JAVA$ENABLE_ENVIRONMENT_EXPANSION

For more information, refer to Using JAVA$ENABLE_ENVIRONMENT_EXPANSION.

Placement of Plug-Ins

As of Mozilla 0.9.9, the user can choose where to place plug-ins, depending on system-wide or individual components. For more information, refer to Placing Plug-Ins.

Installing Plug-ins for SWB

Information on installing plug-ins for the Secure Web Browser (SWB) has been added. For more information, refer to Placing Plug-Ins.

SDK v 1.3.1-3 New Features


SDK v 1.3.1-3 was a maintenance release with the following new features from HP.

Optional Optimization for Select Applications

Some applications spend considerable time creating files, monitoring directories for the existence of files, and testing properties of files using file methods. This continuous polling for changes in a monitored set of files can result in hundreds of unnecessary calls per second to the stat() function. If your application does these kinds of operation, you may benefit from the logical JAVA$CACHING_INTERVAL, which caches the information gathered by stat(). For more information, refer to Using JAVA$CACHING_INTERVAL in Application Performance Tuning.

New Logical to Help Debug Runtime.exec() Calls

The logical name JAVA$EXEC_TRACE is available to help debug Runtime.exec() calls on OpenVMS. When this logical is defined,

$ define/job JAVA$EXEC_TRACE true

a printout displays the C Runtime Library exec variant and its list of arguments. Refer to JAVA$EXEC_TRACE in Debugging Tools for more information on this and other diagnostic tools.

Improved Memory Utilization

Improvements have been incorporated that will lower the amount of program stack space needed under certain circumstances. Note, however, that for these improvements to be used, a new C Run Time Library (C RTL) is needed. For more information refer to Improving Memory Utilization By Reducing Filename Mapping.

Reduced Fast VM Memory Requirements

The Fast VM is optimized for large, long-running programs running on server systems. Many users would like to use the Fast VM on their workstations for client-side applications; however, some of these systems do not have the resources to start up the Fast VM with its default configuration. A -client switch has been added to address these needs. For more information, refer to Reducing Fast VM Memory Requirements for Workstations and Client-side Applications.

SDK v 1.3.1-2 New Features

SDK v 1.3.1-2 was a maintenance release with the following new features from HP.

Fast Virtual Machine (Fast VM) is Included with the SDK

The Fast VM is Just-In-Time (JIT) compiler technology designed to provide optimal Java runtime performance on OpenVMS Alpha systems. The Fast VM offers significant performance advantages over the Classic JIT provided with the SDK.

Starting with SDK v 1.3.1-2, the Fast VM is included with the SDK v 1.3.1 kit. The Fast VM was previously a separate download.

To learn more about the Fast VM, refer to Using the Fast VM.

Java fork/exec now supports C's VAXC$PATH

Before SDK v 1.3.1-2, if you didn't specify a classpath directory path, the Run Time Environment ( RTE) would search only in the default directory. Now, you can use VAXC$PATH as an OpenVMS search path for locating .EXEs or .COMs outside the default directory. For more information, see Supporting VAXC$PATH.

The logical name JAVA$FORK_PIPE_STYLE is available to augment the features offered by JAVA$EXEC_USE_PIPES

You can now choose among three styles of data flow management from a child process to its parent Java application using the JAVA$FORK_PIPE_STYLE. Included are the ability to more closely simulate a true UNIX pipe and improved performance. Refer to the section Using JAVA$FORK_MAILBOX_MESSAGES, JAVA$EXEC_USE_PIPES, and JAVA$FORK_PIPE_STYLE in Application Performance Tuning.

SDK v 1.3.1-1 New Features

SDK v 1.3.1-1 contained the following new features from HP.

Plug-in for the OpenVMS Operating System

SDK v 1.3.1 includes the Plug-in for the OpenVMS Operating System (hereafter called the Plug-in) that enables users to run Java applets and JavaBeans™ components on web pages using the RTE for the OpenVMS Operating System as an alternative to using the default virtual machine for Java 2 that comes with the Web browser. Based on the Java Plug-in 1.3.1 provided by Sun Microsystems, the Plug-in contains similar functionality. The Open JVM Interface (OJI) Plug-in is now supported. For more information, refer to Using the Plug-In.

Mozilla® 0.9.6 Browser Support

SDK v 1.3.1 includes support for Java plug-ins to the Mozilla® 0.9.6 browser. See Using the Plug-in to enable this support on your system.

Extended Capability for JAVAC and JAR

The capability of JAVAC and JAR commands to accept wild-carded file specifications and automatically determine the right case of the name has been extended to include any .java and .class operands for JAVAC and JAR. This capability is no longer limited to wild-carded file operands. For more information, refer to Case of JAVAC and JAR File Operands is Determined Automatically.

Optimization to Speed Up Class Loading in Some Instances

With this release, you can disable certain costly operations when you know they will not be needed because of how your application is organized. See Avoiding Secondary stat() call in Application Performance Tuning for a full explanation of this capability.

Choice of Keyboard Style

By default, the RTE responds to keystrokes, assuming they came from a PC-style keyboard with the "NumLock", "/", "*" and "-" (NUM_LOCK, DIVIDE, MULTIPLY, and SUBTRACT) on the top row of the numeric keypad.

When you are using a DIGITAL-style keyboard, which has different keys at the top of the keypad (PF1, PF2, PF3, and PF4), this interpretation will not be correct for certain keys.

If you define the JAVA$KEYBOARD_TYPE_DEC logical name as shown:

$ define/log JAVA$KEYBOARD_TYPE_DEC true

then the keys will be interpreted correctly for the DIGITAL-style keyboard. In addition to the keys mentioned, the "Find" and "Select" keys will behave as expected for a DIGITAL-style keyboard.

Fast VM v 1.3.1-1 New Features

  • Memory allocation and garbage collection algorithms have been improved for better performance and scaling on symmetrical multiprocessing (SMP) systems.

  • Compacting garbage collector: This version of the Fast VM supports an alternative compacting garbage collector, which compacts live data in-place, rather than copying it as the default collector does. This collector is a hybrid mark-sweep/mark-compact collector, which will avoid moving data when it is not necessary. This collection scheme can have better performance characteristics and lower heap size requirements for applications in which the heap contains a high percentage of long-lived data. This collector can also perform minor collections, rather than collecting the entire heap, when the percentage of live data is moderate. It can also perform sweeps, which free space without moving any data at all. Thus, it may also provide performance advantages for certain applications with a moderate amount of long-lived data, but a high rate of short-lived object turnover.

    To use the compacting collector, specify the  -Xgc:compacting  option on the command line. The  -Xgc:copying  option causes the Fast VM to use the default "copying" collector.


  • Increased heap size: The maximum heap allocation has been increased from 512 MB to 900 MB. This increase benefits applications that use large amounts of memory and can increase performance in certain cases by decreasing garabage collections while running an application. Use the -Xmx and/or -Xms switches documented later in these release notes to control the amount of heap that is allocated.

Back to top
Fixed Problems

This kit installs SDK v 1.3.1-7. The following sections provide important information about problems that HP has fixed in SDK v 1.3.1. HP recommends that you also review Sun's Java 2 SDK and Runtime Environment Important Bug Fixes and Changes documentation for information concerning bug fixes that Sun has made for this release.

Problems Fixed in SDK v 1.3.1-7

The SDK v 1.3.1-7 kit is based on Sun Microsystems' J2SDK 1.3.1_10 Solaris Reference Release and passes all the tests in Sun's Java Compatibility Kit test suite (JCK V1.3a). SDK v 1.3.1-7 contains the following HP-specific fixes:

  • Previously, when using the the Fast VM, if an object in the Java heap spanned more than a page of memory, and the compacting garbage collector performed a sweep operation, in rare cases a SEGV exception could occur on the subsequent collection. This has been corrected.

  • The Fast VM has been modified to always use P1 space for heap storage. This leaves more P0 space for application libraries and allows more threads to operate.


  • Both the Fast VM and the classic VM now support the debugging assistance provided by the JAVA$ENABLE_SIGQUIT_CTRLC and JAVA$ENABLE_SIGQUIT_MAILBOX logical names. Previously, only the classic VM supported those debugging assistance logical names.


  • Fast VM now supports the -Xrs option, as described on Sun's site.

Problems Fixed in SDK v 1.3.1-6

The SDK v 1.3.1-6 kit was based on Sun Microsystems' J2SDK 1.3.1_08 Solaris Reference Release and passed all the tests in Sun's Java Compatibility Kit test suite (JCK V1.3a). SDK v 1.3.1-6 contained the following HP-specific fixes:

  • Invoking java "-Xrunhprof:cpu=times" no longer access violates.

  • When running the JIT, an IncompatibleClassChangeError exception might occur. This has been corrected.


  • Invoking java "-Xrunhprof" <class_name> now works correctly instead of running out of memory.


  • This release fixes some access violation and IllegalAccessError errors that previously occurred when using the Fast VM.


  • Previously, an infinite loop occurred when running rmiregistry using the Fast VM. This problem has been fixed in this release.


  • Previously, if a Java application that used the System.currentTimeMillis() method was running and the Fast VM was the virtual machine in use, HP recommended not setting the system time back to a value that was earlier than the time the Java application was started. This restriction has been lifted.

Problems Fixed in SDK v 1.3.1-5

The SDK v 1.3.1-5 kit was based on Sun Microsystems' J2SDK 1.3.1_04 Solaris Reference Release and passed all the tests in Sun's Java Compatibility Kit test suite (JCK V1.3a). SDK v 1.3.1-5 contained the following HP-specific fixes:

  • Close() I/O issue in multithreaded environment: Previously, in a multithreaded environment, if one thread was doing a read and a second thread proceeded to close the file descriptor, a memory corruption could occur. (The former thread would continue to access a file descriptor that had already been freed.) Eventually, this would lead to a random access violation. Now available is a C RTL ECO that corrects this problem. See the product page on the Web site for more information.


  • SDK v 1.3.1-4 for OpenVMS Alpha introduced a regression in command-line option switch processing. In SDK v 1.3.1-4, only in the case of the Fast VM, a defined CLASSPATH or JAVA$CLASSPATH logical would incorrectly override the -classpath option of the command line. This has been corrected so that if the -classpath option is on the command line, it will override the value of the logicals CLASSPATH and JAVA$CLASSPATH.


  • Fixed a problem that could have resulted in a hang condition with JAVA$CACHING_INTERVAL.

Problems Fixed in SDK v 1.3.1-4

The SDK v 1.3.1-4 kit was based on Sun Microsystems' J2SDK 1.3.1_04 Solaris Reference Release and passed all the tests in Sun's Java Compatibility Kit test suite (JCK V1.3a). SDK v 1.3.1-4 contained the following HP-specific fixes:

  • SDK v 1.3.1-3 for OpenVMS Alpha introduced a regression in the processing of some command-line parameters when using the Fast VM. If you have a program that obtains and prints out the value of properties that are specified on the command line, and the specification of the property occurs more than once, the last such specification is what should determine its value.

    For example, if you have a command that contains:

    $ java "-DMyArg=First" "-DMyArg=Second" "test_arg_interp"

    the value assigned to MyArg should be the last one, that is, the value "Second".

    In SDK v 1.3.1-3 the first value ("First") was erroneously assigned.

    This error has been corrected in SDK v 1.3.1-4.

  • Major set-up files have been modified to reduce the output displayed when running them more than once. Also, because the SDK no longer supports the DCL-style command-line interface (DCL /qualifiers versus UNIX -switches) the message, "Setting up symbols for foreign command-line usage...." has been removed.


  • Fixed problem with NoClassDefFoundError exception not being correctly thrown in compiled code.


  • Under SDK v 1.3.1-3 or earlier, when an application used the change directory feature of Runtime.exec(), the Java Virtual Machine would throw a "function not implemented" exception. This release provides a temporary workaround, as described in Changing the Working Directory Within Runtime.exec().


  • This release provides a fix to the "-V" method of bypassing the 255-character command-line length limitation. In earlier releases, if, within the data file, used as input to "-V" processing, an operand had white space, it would not be parsed correctly. For more information on the new logical that addresses this issue, refer to the JAVA$DISABLE_CMDFILE_WHITESPACE_PARSING logical description in Known Issues.


  • This release contains a performance enhancement for BEA WebLogic™.


  • This release contains enhancements to the RandomAccessFile class. The RTE now correctly shares random-access files within the same Java process. In previous versions of the RTE, the Java process did not correctly handle shared read and write operations to the same file. This condition usually happened only if the file was opened for "Read" and then opened for "Read/Write" later in the same process.

Problems Fixed in SDK v 1.3.1-3

The SDK v 1.3.1-3 kit was based on Sun Microsystems' J2SDK 1.3.1_02 Solaris Reference Release and passed all the tests in Sun's Java Compatibility Kit test suite (JCK V1.3a). SDK v 1.3.1-3 contained the following HP-specific fix:

  • This release serializes (synchronizes) access to the RTE's native exec() code to avoid possible data corruptions when spawning a child process via Runtime.exec() methods. Previously there was a small window where such corruption could occur with unpredictable results.

Problems Fixed in SDK v 1.3.1-2

The SDK v 1.3.1-2 kit was based on Sun Microsystems' J2SDK 1.3.1_02 Solaris Reference Release and passed all the tests in Sun's Java Compatibility Kit test suite (JCK V1.3a). SDK v 1.3.1-2 contained the following HP-specific fix:

  • Enabled correct operation of File (fname) when fname is a logical or a disk name: In SDK v 1.3.1-1 a fix was added to correct a problem that occurred when you tried to open a file using certain rooted logicals; however, this workaround created problems with nonrooted logicals. For SDK v 1.3.1-2, the errant fix has been removed. However, if you did not experience problems and did benefit from the SDK v 1.3.1-1 fix, you can explicitly select this behavior by defining a logical name. Refer to Enabling Correct Operation of File (fname) When fname is a Logical or a Disk Name.

Problems Fixed in SDK v 1.3.1-1

The SDK v 1.3.1-1 kit was based on Sun Microsystems' J2SDK 1.3.1_01 Solaris Reference Release and passed all the tests in Sun's Java Compatibility Kit test suite (JCK V1.3a). SDK v 1.3.1-1 contained the following HP-specific fixes:

  • The Fast VM v 1.3.1-1 includes the following fixes:

    • Certain applications require a large number of open files at one time. The default value of allowed open file descriptors has been increased to 32K. This change fixes a potential memory corruption problem for these applications.


    • A socket close operation would sometimes hang. This problem has been fixed in this release.


  • Fixed erroneous destruction of mutex and condition variables belonging to main thread: All threads except the main thread need synchronization during thread creation. This involves creating and initializing a special mutex and condition variable. Because the main thread does not need the extra mutex/condition variables, the RTE does not initialize these variables; however, in prior versions of SDK v 1.3.*, the RTE, during thread rundown, always destroyed all the mutex/condition variables, even those for the main thread.

    This did not cause any real harm, but caused programs like Visual Threads that monitor thread operation to report mutex.destroy and condition.destroy "Rule Violations." In this release, this has been changed so that the special mutex and condition variables are destroyed only if the threat is not the main thread.


  • Fixed a problem passing environment variables via java.lang.Runtime.exec() call: In earlier versions of SDK v 1.3.*, the user would experience an Access Violation exception when passing environment variables to processes that were created using the java.lang.Runtime.exec() call.


  • Fixed a problem with thread cancellation point: In prior versions of SDK v 1.3.*, the RTE could not close a socket when there was a read pending on the socket. If one thread were trying to read from a socket, and another thread attempted to close the socket, the thread doing the close would hang. Similarly, attempts to cancel a thread with outstanding I/O would not be possible. These have been fixed so that they are now possible. This allows the orderly rundown of I/O on the channel being used by the thread being cancelled. (Note that cancelling an I/O operation in midoperation can result in a loss of data and the user's application bears the responsibility of dealing with this loss.)


  • Fixed error in parsing of Locale string: In prior versions of SDK v 1.3.* and SDK v 1.2.2 an error was introduced in the computation of the string returned by:

    Locale.getDefault().toString()

    For example, it would return:

    ja_JP.eucJP instead of ja_JP

    and

    fr_FR.ISO8859-1 instead of fr_FR.

    This has been corrected in this release.

  • Increased the size of strings that can be supplied via the files specified by the "-V" switch: Specifically, this allows users to use much larger Classpath strings.


  • Added new font converters to support new encoding:
    jisx0208.1983-1 encoding
    dec.cns11643.1986-2 encoding
    gb2312.1980-1

    This allows a greater variety of fonts to be specified in some foreign-language font.properties, e.g., Japanese  font.properties.ja files.


  • Keyboard enhancements/fixes include several new key definitions that make it possible to use older-style DIGITAL keyboards and eXcursion mappings. Also, revised handling of <ALT> key allows menus and buttons to be activated from the keyboard via accelerator keys.


  • Certain numeric keypad keys did not work when using the eXcursion window manager or DIGITAL keyboards. Keys "/", "*", "-", "+", "Home", and "End" now work correctly. These keyboard problems did not exist for PC keyboards when using CDE or Motif.


  • Memory leaks in code that deals with reading directories have been cleaned up; these leaks were exposed in servers that run for long periods.


  • In some situations users might have encountered a java.security.AccessControlException: access denied (java.net.NetPermission setDefaultAuthenticator), because of a problem parsing and correctly interpreting a "-" character in a net permissions .policy file. This error has been corrected.


  • An error attempting to obtain the the local timezone in GMT format from class Date has been corrected in this release.


  • In the 1.3.1-beta release, when operating with eXcursion, attempts to highlight text and copy to the clipboard in an application would hang the application. This now functions properly.

We also recommend that you review Sun's J2SDK 1.3.1 Important Bug Fixes and Changes documentation for information concerning bug fixes Sun has made for this release.

Back to top
Compatibility

SDK v 1.3.1 is compatible with previous versions of the SDK. Most existing programs will run on SDK v 1.3.1 platform. However, some important incompatibilities do exist and are thoroughly discussed in Sun's Java 2 Platform Compatibility with Previous Releases document. For specific incompatibilities, refer to the section, Incompatibilities in the Java 2 Platform, Standard Edition, v1.3, on the Sun site.

Back to top
Installation

The following sections describe how to install the SDK kit on your OpenVMS Alpha system.


Prerequisites

The prerequisites for installing this kit are:

  • OpenVMS Alpha Version 7.2-2 or higher. See Mandatory Patches below.
  • Compaq TCP/IP Services for OpenVMS Alpha V5.0A or higher (and required patches).
  • DECWindows Motif V1.2-4, if you plan on AWT use.
  • Mandatory Patches: To successfully install and run SDK v 1.3.1 for OpenVMS Alpha, mandatory prerequisite patches must be installed. For more information, refer to the product page on the Web site.

Back to top
Installing the Kit

To install the SDK v 1.3.1-7 kit:

  1. Download and install the prerequisite ECOs.


  2. Download the file DEC-AXPVMS-JAVA131-V0103-17-1.PCSI_SFX_AXPEXE (~63,000 blocks) from our Software Download page and execute it to unpack it and obtain the original DEC-AXPVMS-JAVA131-V0103-17-1.PCSI file (~180,000 blocks):

    $ RUN DEC-AXPVMS-JAVA131-V0103-17-1.PCSI_SFX_AXPEXE

    Note: When you are downloading the file to an ODS-5 disk on OpenVMS Version 7.2-2 or higher, the unpacking operation might convert the filename into lower case. Convert it to upper case before proceeding; for example:

    $ RENAME dec-axpvms-java131-v0103-17-1.pcsi -
    DEC-AXPVMS-JAVA131-V0103-17-1.PCSI

  3. Extract the Release Notes for this kit:

    $ PRODUCT EXTRACT FILE JAVA131 -
    /SOURCE=[directory_where_you_put_the_PCSI_file]-
    /SELECT=RELEASE_NOTES.HTML-
    /DEST=[] -
    /BASE_SYSTEM=AXPVMS

  4. Install the SDK v 1.3.1-7 kit from the .PCSI file obtained, using the PCSI (POLYCENTER Software Installation) utility PRODUCT command:

    $ PRODUCT INSTALL JAVA131-
    /SOURCE=[directory_where_you_put_the_PCSI_file]-
    /BASE_SYSTEM=AXPVMS

    The SDK gets installed in root directory SYS$COMMON:[JAVA$131].

    Also, the following files are installed by the PCSI utility with file attribute of ARCHIVE:

    SYS$COMMON:[JAVA$131.COM]JAVA$131_SETUP.COM
    SYS$COMMON:[JAVA$131.JRE.LIB]FONT.PROPERTIES
    SYS$COMMON:[JAVA$131.JRE.LIB]FONT_PROPERTIES.JA

    If a file having any of these names already exists on the system, the installation process renames it to a new name with a filetype ending in _OLD, before loading the new copy from the kit. Only the latest version of the existing file is preserved (by being renamed to file.type_old) before PCSI deletes all remaining versions.

    For example, an existing SYS$COMMON:[JAVA$131.COM]JAVA$131_SETUP.COM is renamed to SYS$COMMON:[JAVA$131.COM]JAVA$131_SETUP.COM_OLD before the new copy is copied from the kit.

    If you have previously personalized any of these files, you might need to merge your personalizations with the new copies.

    Notes:

    • The PCSI PRODUCT tool for OpenVMS Alpha installs different versions of the SDK using unique product names. For example:

      SDK v 1.1.8-n and SDK v 1.1.6-n are installed as product JAVA

      SDK v 1.2.2-n is installed as product JAVA122

      SDK v 1.3.0-n is installed as product JAVA130

      SDK v 1.3.1-n is installed as product JAVA131

      Therefore, if you decide to update to an earlier or later version of the SDK within the same product, you should not use the PCSI PRODUCT REMOVE command. Instead, use the PRODUCT INSTALL of the desired kit. By following these instructions you avoid potential shared-file conflicts.

      Installing in the SYS$COMMON area requires privileges. The SYS$COMMON:[JAVA$131] directory is the supported location for the installation of this kit.

  5. To use SDK v 1.3.1-7, you must first set up the Java environment. You can select either the classic VM or the Fast VM as your virtual machine.


  6. Because you can have multiple SDK versions installed on your OpenVMS system, and because you can change from one version to the other, you need to follow specific steps to set up your Java environment properly. To run the command procedure to do this, refer to Setting Up the Java Environment.
  7. Refer to Using the SDK on OpenVMS Alpha Systems for additional information on how to use this product in an OpenVMS environment. A local copy of these Release Notes is installed at SYS$COMMON:[JAVA$131.DOCS]RELEASE_NOTES.HTML.

Installing the API Reference Documentation

You can also download and install the API reference documentation for SDK v 1.3.1, to provide you with a local copy. Allow 201,000 blocks of permanent disk space for the installed API reference files.

Note: If you previously installed both the SDK and API documentation for earlier versions of SDK v 1.3.1, you do not need to repeat the installation of the API reference documentation for the SDK v 1.3.1-7 kit. The API reference documentation is the same; however, if you did not install the API reference documentation for an earlier version of SDK v 1.3.1, please note the installation instructions that follow.

Install the API documentation in the same way you installed the kit:

  1. Copy the API documentation file DEC-AXPVMS-JAVAAPIDOC131-V0103-11-1.PCSI_SFX_AXPEXE (18,000 blocks) by viewing the Software Download page and clicking on the software kit and following the path to download the kit. Next, execute the file to unpack it and obtain the original DEC-AXPVMS-JAVAAPIDOC131-V0103-11-1.PCSI file:
    $ RUN DEC-AXPVMS-JAVAAPIDOC131-V0103-11-1.PCSI_SFX_AXPEXE

  2. When you are downloading the file to an ODS-5 disk on OpenVMS Version 7.2-2 or higher, the unpacking operation might lowercase the filename. Make sure to convert it to upper case before proceeding. For example:
    $ RENAME dec-axpvms-javaapidoc131-v0103-11-1.pcsi -
         DEC-AXPVMS-JAVAAPIDOC131-V0103-11-1.PCSI
    
  3. Install the API documentation from the .PCSI file obtained, using the PCSI (POLYCENTER Software Installation) utility PRODUCT command:
    $ PRODUCT INSTALL JAVAAPIDOC131-
         /SOURCE=[directory_where_you_put_the_PCSI_file]-
         /BASE_SYSTEM=AXPVMS
    

    The API documentation files are installed in the following directories:

    SYS$COMMON:[JAVA$131.DOCS.API]INDEX.HTML (frames)
    SYS$COMMON:[JAVA$131.DOCS.API]OVERVIEW-SUMMARY.HTML (no frames)

Back to top
Determining Your Installed Version

After downloading, installing, and running the command procedure to set up the Java environment, use the java -fullversion command to display the version. For example:

$ java -fullversion
  java full version "1.3.1-7"

To switch from one version to another, see Switching Versions.

Back to top
Contents of the SDK

This section provides a general summary of the files and directories contained in the SDK once it has been installed on your system.


Development Tools

In SYS$COMMON:[JAVA$131.BIN]

This area contains programs that will help you develop, execute, debug, and document programs written in the Java programming language. For further information, see Sun's Tools and Utilities page.

Important: Review the information in the Interpreting Commands and OpenVMS Operating System Differences table to fully understand the nuances and differences in the SDK on OpenVMS Alpha.

Though Sun's Tools and Utilities documentation specifies all the details about operating various tools, you must interpret the literal examples of commands with an eye to OpenVMS Alpha differences.

Note: It is imperative that you understand these differences if you want to operate these tools successfully on OpenVMS Alpha.

Getting Started with the Java Programming Language on OpenVMS

The following two command procedures may assist you in getting started using the Java programming language on OpenVMS Alpha. The files help you determine whether you are set up to run the Java programming language (quota-wise) and to generate a configuration file of   $ DEFINE commands that you could invoke after running JAVA$131_SETUP.COM. These command procedures are independent of JAVA$131_SETUP.COM.

The first command procedure can be found in:

SYS$COMMON:[JAVA$131.COM]JAVA$CONFIG_WIZARD.COM

When you execute the following procedure:

$ @SYS$COMMON:[JAVA$131.COM]JAVA$CONFIG_WIZARD.COM

you are asked several questions about your environment and the Java application you intend to run.

Based on your answers, it generates a command procedure file (called JAVA$CONFIG_SETUP.COM) which, when executed, sets up the logical names that are appropriate for your intended usage.

The second command procedure can be found in:

SYS$COMMON:[JAVA$131.COM]JAVA$CHECK_ENVIRONMENT.COM

When you execute the following procedure:

$ @SYS$COMMON:[JAVA$131.COM]JAVA$CHECK_ENVIRONMENT.COM

it tests the process quotas in the current process and warns you if some of your account and sysgen quotas are not up to recommended level for running Java programs.

The following example illustrates a typical pattern for using these command procedures:

$ @SYS$COMMON:[JAVA$131.COM]JAVA$CHECK_ENVIRONMENT.COM !One time-Am I set up quota-wise to run Java?
$ @SYS$COMMON:[JAVA$131.COM]JAVA$CONFIG_WIZARD.COM !One time-Build me a JAVA$CONFIG_SETUP.COM for my intended usage

$ @SYS$COMMON:[JAVA$131.COM]JAVA$131_SETUP.COM {FAST} !Set up the Java environment, select VM
$ @JAVA$CONFIG_SETUP.COM !Define my tailored set of logical names

Note: If you choose to run JAVA$CONFIG_SETUP.COM, be sure to run it after running JAVA$131_SETUP.COM.



Interpreting Commands and OpenVMS Operating System Differences
OpenVMS Usage

Explanation

Stream_LF

All files read by Java code (.java, .class, .jar, etc.) must have a Stream_LF record format. To learn how to check whether files are Stream_LF and how to convert them if they are not, see Stream_LF File Format Required. Files created by Java tools will automatically be Stream_LF.

Role of JAVA$CLASSPATH

A number of tools rely on either a -classpath argument on the command line, or rely on the setting of a logical CLASSPATH--a colon-separated search list of directories in UNIX-style filename syntax. Sometimes it is easier to fabricate a comma-separated search list of directories in OpenVMS-style file syntax. This is done with a logical named JAVA$CLASSPATH. See Setting JAVA$CLASSPATH for details on JAVA$CLASSPATH and its interaction with CLASSPATH and -classpath.

Quoting Operand

Certain operands need to be quoted; Java tools are case-sensitive throughout their operation. Command-line operands are automatically lower-cased as they are acquired from the command line. In order to preserve the case so that these operands are acceptable to Java commands, you must quote them. The most common instances of this are:

  • Need to quote upper-case switches
    Memory allocation on Java command.
    $ java "-Xmx64m" mytest

  • Need to quote class names and package names
    Class name specification
    $ java "MyPackage/MyTest"

  • Need to quote upper-case keywords
    Encoding type keyword
    $ native2ascii -encoding "ISO8859_1" data.txt
    data.txt

See Known Issues for further discussion and examples of where quoting is needed.

Combating limitations on DCL command line length

DCL command-line length is limited to 255 characters. Constructing longer command lines is frequently convenient (and sometimes necessary).

To work around this limitation on the OpenVMS Operating System, the RTE has been customized to allow you to place operands into a data file and then simply point to the data file on the command line.

For example, you can type:

$ javac "-V" FILES_TO_COMPILE.DAT

where FILES_TO_COMPILE.DAT contains (the potentially long) list of files to compile. See Command lines on OpenVMS Alpha cannot exceed 255 characters for further discussion of this capability. Note that the -V is quoted for reason cited above.

Dealing with UNIX-style filenames that cannot be represented on OpenVMS Alpha

The OpenVMS file system on ODS-2 formatted disks cannot represent certain legitimate UNIX-style file names; for example, a file named font.properties.ja cannot be created.

On OpenVMS Alpha, the RTE supports a filename remapping strategy that allows you to represent otherwise-unrepresentable filenames via a filename-mapping capability. This allows you to specify, for example, that all filenames presented with mulitple dots in their names should be stored and retrieved as if all of the dots, except the last, have been replaced by underscores; hence the file above would be methodically read and written as if it were named font_properties.ja.

To learn more about other possible filename mappings, see UNIX-Style Filenames on OpenVMS Systems.

Getting around limitation of directory depth of 8 on ODS-2 disks

The OpenVMS file structure on ODS-2 formatted disks limits you to only eight levels of directories. It is not uncommon for Java programs imported from elsewhere to have a package structure that is more than eight levels deep.

To circumvent these limitations on OpenVMS Alpha, the RTE supports a filename remapping strategy that allows you to represent the deeper structure in a more shallow directory. Refer to Description of Mapping Options to see how this is accomplished.

See Known Issues for more descriptions of how the OpenVMS Operating System differs from the UNIX environment in which the Java platform originated.


Run Time Environment (RTE)

In SYS$COMMON:[JAVA$131.JRE]

An implementation of the Run Time Environment (RTE) for use by the SDK. The runtime environment includes a virtual machine for Java 2, class libraries, and other files that support the execution of programs written in the Java programming language. (Note: The RTE included in the SDK is separate from the RTE kit.)

Additional Libraries

In SYS$COMMON:[JAVA$131.LIB]

Additional class libraries and support files required by the development tools.

Demo Applets and Applications

In SYS$COMMON:[JAVA$131.DEMO]

Examples, with source code, of programming for the Java platform. These include examples that use Swing and other Java Foundation Classes.

C Header Files

In SYS$COMMON:[JAVA$131.INCLUDE]

Header files that support native-code programming using the Java Native Interface and the Java Virtual Machine Debugger Interface, as described on the Sun site.

Source Code

In SYS$COMMON:[JAVA$131]SRC.JAR

Java programming language source files for all classes that make up the Java 2 core API (that is, source files for the java.*, javax.* and org.omg.* packages, but not for com.sun.* packages). This source code is provided for informational purposes only, to help developers learn and use the Java programming language. These files do not include platform-specific implementation code and cannot be used to rebuild the class libraries. To extract these files, use this command:

   jar xvf src.jar 

Do not modify core API source files. To extend the behavior of the core API, write subclasses of the core API classes.

For core API documentation, refer to the following sources:

Back to top
Known Issues

This section provides descriptions of the known issues and limitations that exist in the SDK v 1.3.1 kit for OpenVMS Alpha; these issues include the following:

  • The java.awt.Robot class: MOTIF 1.2, the latest version available on OpenVMS Alpha, does not provide adequate support.

  • Correspondence between directory info in _java.policy and default directory: You must have a direct correspondence between the way you specify a directory in a _java.policy file and your current directory when used as part of the CLASSPATH. (Your current default directory is always part of your implied classpath.)

    For example, if your policy files say:

    grant codeBase "file:${rootdir}/-" {
    permission java.security.AllPermission;
    };

    and you invoke your application (in part) as:
    $ java -Drootdir=/DISK1$/directory/subdirectory/

    you must get to that directory via:
    $ SET DEF DISK1$:[directory.subdirectory]

    You cannot use an alias such as:
    $ SET DEF USER1$:[directory.subdirectory]

    even if USER1$ is the same disk as DISK1$, because the entire permission process (to determine allowable access) is based on the comparison of file specification strings. From a string-comparison standpoint (even case-blind), USER1$:[directory.subdirectory] is not the same path as DISK1:[directory.subdirectory], and access will be denied.

  • Javadoc fails to distinguish class and package names that reside in the same directory and differ only in case. An example is the package java.awt.event and the class java.awt.Event.
     
  • Javald has not been ported to the SDK v 1.3.1 for OpenVMS.
     
  • Starting with SDK v 1.3.0-1, the SDK contains better graphic performance than previous SDK v 1.2.2 releases. However, some graphics operations remain slower in the releases beginning with SDK v 1.3.0-1 than they do in SDK v 1.1.n releases.

    With Java 2, Sun changed the underlying architecture of the graphics subsystem. In Sun's Java Development Kit (JDK) V1.1.n, more of the graphics operations were done using native code. For example, the drawLine() method would result in a call to XDrawLine. With Java 2, the rendering of graphics has been moved to Java code, which computes the image and sends the pixels out to the display. As a result, the performance of graphical operations can be slower with J2SDK v 1.3.1, particularly when displaying to a remote machine.

    Consequently, the slow performance that you see with some graphics operations is not specific to the SDK, but is inherent in the architecture of Java 2.

    Sun has received a number of bug reports on this performance problem. For example, see the following list of bug reports in the Bug Database at Sun's Developer Services web site: 4204845, 4185726, 4217446, and 4210230. Once you have logged in (you have to register, but it is free), just follow the link to the Bug Database.

  • Java Sound is not supported. The following error is reported if you attempt to use Java Sound:
    Java Sound support not currently available
  • The presence of a file named .; on the classpath (a file with no name or extension) will result in a failure to find the class file specified on the command line. Note the following example:
    $ java helloworld 
    Hello world.
    
    
    $ create . 
    EXIT 
    $ java helloworld 
    Exception in thread main java.lang.NoClassDefFoundError: helloworld
  • The VolanoMark benchmark requires a large buffered I/O byte count quota. If you plan to try out the VolanoMark benchmark, increase the byte count quota to around 3 million. Otherwise, Volano will exhaust all buffer I/O resources and hang the system.
       
  • When seeking beyond the end of a file, the default behavior of the C RTL is to physically extend the file. Depending on the offset specified in the seek operation, this can take a long time. This behavior differs from most UNIX. systems, where the file is only extended if you write to it after the seek operation.

    Workaround: To enable the UNIX behavior on OpenVMS systems, uncomment the definition of the DECC$POSIX_SEEK_STREAM_FILE logical in the JAVA$131_SETUP.COM file.
     

  • Multiple listeners can bind to the same socket — a nonportable behavior.

    On OpenVMS systems, TCP/IP allows multiple listeners to bind to the same socket. This behavior is different from that exhibited on some other operating systems, where this phenomenon is detected and the following exception is thrown:

      "java.net.BindException: Address already in use"
    

    This is not a behavior specific to the RTE, but the way that TCP/IP Services works on OpenVMS systems. This difference is noted to caution you from relying on this exception if you intend to write portable Java applications.
     

  • Command lines on OpenVMS Alpha cannot exceed 255 characters.

    This means you cannot build command lines like the following:

     	 $ javac "MyClass001.java" -
                      "MyClass002.java" -
                      "MyClass003.java" -
                       ...
                      "MyClass127.java" -
                      "MyClass128.java" 
    

    To circumvent this shortcoming, use the @files feature of the SDK that allows you to put command operands in another file and simply name that operand file prefixed with an @ sign.

    For example, you can write the following:

            $ javac @CLASS_LIST_FILE.DAT
    

    where CLASS_LIST_FILE.DAT contains:

                    MyClass001.java
                    MyClass002.java
                    MyClass003.java
                    ...
                    MyClass127.java
                    MyClass128.java
    

    Another usage is:

            $ javac @sys$input:
                    MyClass001.java
                    MyClass002.java
                    MyClass003.java
                    ...
                    MyClass127.java
                    MyClass128.java
    

    Note that operands on the command line need to be in quotation marks to keep DCL from uppercasing the arguments, but the same arguments in a file do not need to be in quotes because they are not directly interpreted by DCL. File names appearing in the input file specified by @ should be in UNIX format rather than OpenVMS format and should not be in quotation marks. Also note that on OpenVMS, you can use "-V" in place of @files to achieve the same behavior. You can use "-V" with other Java commands in addition to javac; for example, you can write the following:

            $ java "-V" name_of_file_containing_operands.dat
    

    Note: The existence or accessibility of the file specified by -V is not tested. If the file does not exist or cannot be opened, then no additional data is added to the command line being built; no error is reported.

    If, within the data file used as input to "-V" processing, an operand has white space, it will not be parsed correctly.

    For example, the quoted argument on the following command line

    $ java xargs "< = 1" 2 3

    will work. The arguments will be interpreted as:
    < = 1
    2
    3

    If you put the parameters into a data file called datafile1.txt, e.g.,
    < = 1
    2
    3

    and then access them via:

    $ java xargs "-V" datafile1.txt

    they will be interpreted as:
    <
    =
    1
    2
    3

    The white space breaks up the processing of the line.

    Even if you enclose the operand in quotes, as in a data file called datafile2.txt,
    "< = 1"
    2
    3

    and then access them via:

    $ java xargs "-V" datafile2.txt

    they will be interpreted as:
    "<
    =
    1"
    2
    3

    The white space still breaks up the processing of the line. Note that the quotation marks are retained.

    The JAVA$DISABLE_CMDFILE_WHITESPACE_PARSING logical name enables you to provide operands that contain white space within the data file.

    $ define/job JAVA$DISABLE_CMDFILE_WHITESPACE_PARSING TRUE

    When this logical is defined, spaces and tabs are no longer treated as delimiters in "-V" files. Each line in the file is treated as a single command-line argument.

    Note: If the line contains a space, this space will be included as part of the command argument.

    For example, in:

    $ create java_input.dat
    param1 param2
    ^Z

    $ java "-V" java_input.dat

    Without the logical JAVA$DISABLE_CMDFILE_WHITESPACE_PARSING defined, the RTE sees two command line arguments: param1 and param2.

    With the logical JAVA$DISABLE_CMDFILE_WHITESPACE_PARSING defined, the RTE sees only one command-line argument, param1 param2.

    You can use the _JAVA_LAUNCHER_DEBUG logical name as a diagnostic tool, to see the arguments as they are passed to the Java Virtual Machine.

    Alternatively, you can provide these parameters on the command line itself.

  • Approximating functionality that does not exist:

    OpenVMS systems do not have a dlopen, dlsym, and/or dlclose runtime routine. To be able to support dynamically loaded runtime libraries, we have created dlopen, dlsym, and dlclose routines using LIB$FIND_IMAGE_SYMBOL (FIS).

    FIS does not support pure dynamically linked library in the same manner as dlopen does. FIS does NOT resolve global symbols from other shareable libraries at runtime. Under OpenVMS, this must be done at link time, and not at run time.

    Example:

    The Java Zip RTL library needs java_lang_String_intern, which is declared in the main Java library (JAVA.SO). On UNIX systems, dlopen resolves this external global at runtime.

    On OpenVMS systems, because FIS does NOT resolve any external globals at runtime that were not found at link time, the Java Zip library must be linked against the main Java library to allow java_lang_String_intern to be found at runtime. 

  • Problem displaying to a VAXstation

    You may see the following message when trying to display to a VAXstation:

         X error event received from server:  BadValue (integer parameter out of 
                                                         range for operation)
         Major opcode of failed request:  61 (X_ClearArea)
         Value in failed request:  0xffff****
         Serial number of failed request:  ###
    
         Current serial number in output stream:  ###
         %XLIB-E-ERROREVENT, error event received from server
         %TRACE-E-TRACEBACK, symbolic stack dump follows
    
         (* indicates a variance in the occurrence of the width & height)
           This is a problem with (width, height).
    

    The OpenVMS server implements these parameters (width, height) as a signed word as opposed to CARD16 (unsigned word) as specified by the X Windows System Protocol. Hence, anything over 32767, (hex 7fff) is unacceptable to an OpenVMS server.

    To fix this, in file SYS$MANAGER:DECW$PRIVATE_SERVER_SETUP.COM, specify:

    $DEFINE/TABLE=DECW$SERVER0_TABLE   DECW$CARD16_VALIDATE  TRUE
  • Some images do not exit on ^Y when another image is started.

    A small number of Java utilities (javap, javah, and verify), do not exit cleanly if they are aborted with a ^Y.

    When you then type another command, or even $ EXIT, you might find that you have to do a second ^Y and another $ EXIT in order to stop all the threads that are running on your behalf.

    If the application is deadlocked, holding a resource required by one of the exit handler's routines, the application will continue to hang, even after typing ^Y and EXIT. In these cases, type a second ^Y and STOP to terminate the application without running exit handlers. This behavior is not unique to Java applications but is characteristic of DECthreads operating in a multithreaded environment. See the Guide to DECthreads for a fuller discussion of this issue.

  • Japanese text fonts

    When using Japanese Motif, you should use the following font specification sizes 8, 10, 12, 14, 18, or 24. When other sizes are specified by an application, Japanese text is not displayed. For Japanese Motif, Java font specifications for application and applets are described in the file SYS$COMMON:[JAVA$131.JRE.LIB]FONT_PROPERTIES.JA.

    The graphic package AWT should pick font_properties.xx according to current locale, where xx means a country code such as ja and ko. For example, font_properties.ja is used in Japanese locale and font_properties.ko is used in Korean locale, instead of font.properties.

    This automatic selection based on locale does not work correctly; as a workaround, if the user copies the desired font_properties.xx into his SYS$LOGIN directory as font.properties, the desired font properties file will be accessed by default. For example,

    $COPY SYS$COMMON:[JAVA$131.JRE.LIB]FONT_PROPERTIES.JA -
    SYS$LOGIN:FONT.PROPERTIES
  • Restriction: On OpenVMS Alpha systems, the RTE does not support the use of typing ^\ to get a printout of the Java stack.
     
  • Restriction: Exhausting Event-Flag Numbers when using sockets

    On OpenVMS Alpha systems running TCP/IP Services lower than version 5.0, the operation of sockets is controlled by Event Flag Numbers (EFNs). The more sockets you operate simultaneously, the more EFNs you consume. There are only 32 EFNs available for your use. If you start to exhaust the number of available EFNs, you will see an error message like the following:

    Thu May 28 17:44:22 EDT 1998 Error starting connection.
      java.net.SocketException: insufficient event flags
              at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:387)
              at java.net.ServerSocket.implAccept(ServerSocket.java:206)
      ...
    
  • Restrictions using the Runtime.exec() method on OpenVMS Alpha:

    Note: The logical name JAVA$EXEC_TRACE is available to help debug Runtime.exec() calls on OpenVMS. Refer to JAVA$EXEC_TRACE in Debugging Tools for more information on this and other diagnostic tools.

    • Using SET VERIFY with exec does not work. If verification is on, then the Java application will hang. There is no workaround, except to ensure that verification is off.

    • Under SDK v 1.3.1-3 and earlier, if an application used the change directory feature of  Runtime.exec(), the Java Virtual Machine would throw a "function not implemented" exception:

      java.io.IOException: function not implemented

      As a temporary workaround, using the JAVA$FORK_SUPPORT_CHDIR logical, you can change the current working directory, as described in Changing the Working Directory Within Runtime.exec(). Note, however, that you might encounter errors with this workaround reporting files not found.

    • Normally, the argument passed to exec is the name of the image to be executed. But there are some instances where this does not work:

      • Asking a Java program to exec a DCL verb like DIR does not work.

        Workaround:

        Pass as the argument to exec, the OpenVMS-style filename of a .COM file that contains the DCL verb to be executed (or that builds the verb from input parameters to the .COM file).

      • Asking a Java program to exec a .COM file specified as a UNIX-style filename with a leading slash does not work.

        Alternative Workarounds:

        • Use an .exe file.
           
        • Use the OpenVMS-style filename for a .COM file.
           
        • Define a symbol for the absolute part of the path in OpenVMS-style, and prepend that symbol to the UNIX-style filename, thus eliminating the leading slash in the UNIX-style filename. (See the sample program that follows.)
           

      The following sample program shows what kinds of constructs work, and which ones do not:

      import java.io.*;
      
      public class ExecTest {
      
         public static void main(String args[]) {
            int i;
            Runtime rt = Runtime.getRuntime();
            String[] cmdarray =
            {
            // Tests involving .COM files
            // --------------------------
            //
      
            //  pass simple args to local .com
            "display_args.com 3 4", //works
      
            //  pass args that need to be quoted to local .com
            "display_args.com a/b/c  4",  //works -- but a/b/c will be
                                          //         upcased to AB/C
      
            //  pass args that need to be quoted to local .com
            "display_args.com \"a/b/c\"  4",  //works -- arg is quoted
      
            // no path, name of .com without .com extension
            "five_testing",               //works
      
            // no path, name of .com with .com extension
            "TEST_IEEE.com",              //works
      
            // VMS filespec path, name of .com with .com extension
            "user1$:[reichert.sanity_test]five_testing.com",  //works
      
            // UNIX-style filespec path, name of .com 
            // with .com extension
            "/user1$/reichert/sanity_test/five_testing.com",
                           //fails %DCL-W-IVQUAL, unrecognized qualifier
                           //Due to leading '/' on .com filespec
      
            // UNIX-style filespec path, name of .com 
            // without .com extension
            "/user1$/reichert/sanity_test/five_testing",
                           //fails %DCL-W-IVQUAL, unrecognized qualifier
                           //Due to leading '/' on .com filespec
      
            // UNIX-style filespec path, name of .com 
            // without .com extension
            // absolute path using a logical to avoid the leading '/'
            "my_dir/five_testing",
                           //works -- because my_dir is a logical:
                           // $ sho log my_dir
                           // "MY_DIR" = "USER1$:[REICHERT.SANITY_TEST]"
      
            // VMS-style filespec path, name of .com 
            // with .com extension -- write a file
            "user1$:[reichert.sanity_test]file_writer.com",   // works
      
            // Tests involving DCL verbs
            // --------------------------
            //
      
            // Trying to execute a DCL verb
            "SHOW LOG *INCLUDE* ",
                           // fails - can't execute a DCL verb.
      
            // Trying to execute a .EXE that corresponds to a verb
            // "SYS$COMMON:[SYSEXE]DIRECTORY.EXE ",
                           // fails - it will loop with no output. 
                           // You have to put commands in a .COM file 
                           // and execute that.
      
            // execute .com with the "SHOW LOG *INCLUDE* " in it
            "show_logical.com",                      //works
      
            // Tests involving .EXE files
            // --------------------------
            //
      
            // UNIX-style filespec path, name of .exe 
            // with .exe extension
            "/user1$/reichert/sanity_test/TEST_IEEE.EXE",  //works
      
            // Induce an error to test reading of sys$error
            //
            "TYPE_OUT_NONEXISTANT_FILE.COM"                //
      
            }; 
      
            // output from the process comes in on
            // br.readLine
            BufferedReader br;
      
            // error output from the process comes in on
            // error_br.readLine
            BufferedReader error_br;
      
            // execute the external file
            for (i=0; i<cmdarray.length; i++) {
      
               try {
               System.out.println();
               System.out.println("Executing string: " + cmdarray[i]);
      
                  Process proc = rt.exec(cmdarray[i]);
      
                  br = new BufferedReader(new InputStreamReader(
                          proc.getInputStream()));
      
                  error_br = new BufferedReader(new InputStreamReader(
                          proc.getErrorStream()));
      
                  String line;
      
                  System.out.println(
                  "### Following lines came back from SYS$OUTPUT:");
      
                  // Read back normal output
                  //
                  while ((line = br.readLine()) != null) {
                          System.out.println(line);
                  }       // end while
                  br.close();        // close the data input stream
      
      
                  System.out.println(
                  "### Following lines came back from SYS$ERROR:");
      
                  // Read back error output
                  //
      
                  while ((line = error_br.readLine()) != null) {
                          System.out.println(line);
                  }       // end while
                  error_br.close();  // close the data error stream
      
                  proc.getInputStream().close();
                  proc.getErrorStream().close();
      
               } catch (IOException e) {
                       e.printStackTrace();
               }  // end catch
            }
      
         System.out.println("*** End of ExecTest ***");
      
         }  // end main
      
      }       // end ExecTest
      

Back to top
Using the SDK on OpenVMS Alpha Systems

You need to know some significant differences in developing Java applications on OpenVMS systems. Read the following sections, along with the Known Issues section and the Frequently Asked Questions on our web site, for critical usage information that will save you time and effort.

Setting Process Quotas for Better Performance on OpenVMS

The Java runtime environment was designed to perform optimally on UNIX systems, where each process is given large quotas by default. On OpenVMS, the default behavior gives each process lower quotas so that many processes can co-exist on a system.  To get the best Java performance on OpenVMS, HP recommends that you set process quotas to match a typical UNIX system. HP also recommends these as minimum quota settings (except where noted).

The following numbers closely match the default UNIX process quota settings:

    UAF Fillm 4096
    Channelcnt 4096
    Wsdef 2048
    Wsquo 4096
    Wsextent and Wsmax 16384
    Pgflquo 2097152*
    bytlm 400000
    biolm 150
    diolm 150
    tqelm 100

*A good number for Pgflquo is (2 x heap-size), for example, 128 MB (2*128*1024*1024)/512 = 524288. Recall that the recommended minimum Pgflquo is 96 MB when using the RTE. When you increase the Pgflquo parameter, you should always increase the system's page file size to accommodate the new Pgflquo parameter, if needed.

Setting Up the Java Environment

You select which VM to use when you set up your Java environment. To set up your environment, use one of the following two commands:

$ @SYS$COMMON:[JAVA$131.COM]JAVA$131_SETUP FAST ! Use the Fast VM
$ @SYS$COMMON:[JAVA$131.COM]JAVA$131_SETUP ! Use the Classic VM

To set up the Java environment with the Fast VM your as virtual machine, use the FAST parameter on the following command:

$ @SYS$COMMON:[JAVA$131.COM]JAVA$131_SETUP FAST

Verify your Java environment by typing the java -version command. The screen displays the following message:

$ java -version  
java version "1.3.1"  
Java(TM) 2 Runtime Environment, Standard Edition
Fast VM (build 1.3.1-n ...) 

where n identifies the specific SDK v 1.3.1 that is installed, and Fast VM identifies the virtual machine.

To set up the Java environment with the classic VM as your virtual machine, type the following.

$ @SYS$COMMON:[JAVA$131.COM]JAVA$131_SETUP.COM

Verify your Java environment version by using the java -version command. The screen displays the following message:

$ java -version
java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition
Classic VM (build 1.3.1-n ...)

where n identifies the specific SDK v 1.3.1 that is installed, and Classic VM identifies the virtual machine.

Note: To revert to the Fast VM, type the following command:

$ @SYS$COMMON:[JAVA$131.COM]JAVA$131_SETUP  FAST

After setting up the Java environment, you invoke the SDK with the Java command:

Java 
Usage: Java [-options] classname [args] 

Any arguments that appear after classname on the command line are passed to the main method of the class.

For information on switching versions in separate processes, or in the same process, refer to Switching Versions.

Back to top
Using the Fast VM

As noted in the Introduction, this kit contains two virtual machines. The Fast VM is Just-In-Time (JIT) compiler technology designed to provide optimal Java runtime performance on OpenVMS Alpha systems. The Fast VM offers significant performance advantages over the Classic JIT. The following sections describe how to control the Fast VM.

You select which VM to use when you set up your Java environment. To set up the Java environment using the Fast VM, refer to Setting Up the Java Environment.

Standard Options

The Fast VM supports the following standard options:

Standard Options
Option

Function

-classpath classpath
-cp classpath

Specify a list of directories, JAR archives, and ZIP archives to search for user class files. Class path entries are separated by colons (:). Specifying -classpath or -cp overrides any setting of the CLASSPATH environment variable.

If -classpath and -cp are not used and CLASSPATH is not set, the user class path consists of the current directory (.).

-client

Initializes the Fast VM with a maximum heap size of 64 MB, a maximum global region size of 128 MB and the compacting collector. Refer to Reducing Fast VM Memory Requirements for Workstations and Client-side Applications for more information.

-Dproperty=value

Set a system property value.

-help

Display usage information and exit.

-jar

Execute a program encapsulated in a JAR file. The first argument is the name of a JAR file instead of a startup class name. In order for this option to work, the manifest of the JAR file must contain a line of the form Main-Class: classname.

Here, classname identifies the class having the public static void main(String[] args) method that serves as your application's starting point.

When you use this option, the JAR file is the source of all user classes, and other user class path settings are ignored.

-verbose
-verbose:class

Display information about each class loaded.

-verbose:gc

Report on each garbage collection event.

-verbose:jni

Report information about use of native methods and other Java Native Interface activity (JNI). (This option can be specified but it has no effect.)

-version

Display version information and exit.

-X

Display usage information for non-standard options and exit.

 

Nonstandard Options

This version of the Fast VM also includes support for the following Java nonstandard options.

Option

Function

-Xbootclasspath:<bootclasspath>

Specify a colon-separated list of directories, JAR archives, and ZIP archives to search for boot class files. These are used in place of the boot class files included in the SDK software.

-Xfuture

Enable strictest checks, anticipating future default.

-Xglobal<size>

Specifies the global region maximum allocation size. The global region contains class definitions, string constants, and other data internal to the VM. -Xglobal can be used to override the default size of 240 MB or the -client setting of 128 MB. Refer to Reducing Fast VM Memory Requirements for Workstations and Client-side Applications for more information.

-Xms<size>

Specify the initial size of the memory allocation pool. This value must be greater than 1000. To multiply the value by 1000, append the letter k. To multiply the value by 1 million, append the letter m. See Dynamic Heap Settings for information about the default value.

-Xmx<size>

Specify the maximum size of the memory allocation pool. This value must be greater than 1000. To multiply the value by 1000, append the letter k. To multiply the value by 1 million, append the letter m. See Dynamic Heap Settings for information about the default value.

-Xss<number>

Set the maximum stack size for any thread.

-XO

Do not generate stack trace information for exceptions.

-Xgc:compacting

Instructs the Fast VM to use the compacting garbage collector. (See also Dynamic Heap Settings.)

-Xgc:copying

Instructs the Fast VM to use the default "copying" garbage collector.

-Xmp

When used with the compacting garbage collector, this specifies the minimum percentage of heap space that the collector should try to free for new objects. Thus, it dictates when a full compaction must occur, rather than a sweep or minor compaction. Values from 0 to 100 may be specified in the form -Xmpnn, for example, -Xmp25. The default value is 25.

Nonstandard Options

Using the Fast VM with Java™ 2 Development Tools

Once the Fast VM is set up as your virtual machine, it is automatically used when you invoke any of the Java development tools (for example, javac, javadoc, javap, jar, appletviewer).

Dynamic Heap Settings

Rather than use fixed values for the default settings for the memory allocation pool (Java heap), the Fast VM determines the defaults for the initial heap size (-Xms) and the maximum heap size (-Xmx) dynamically based on the environment in which it is executing as shown below:

max_memory = min (physical memory on machine, total memory available to the process)
  
default initial heap size = 10% of max_memory
  
default maximum heap size = 60% of max_memory

By setting heap size defaults automatically, the Fast VM adjusts the heap size based on the amount of memory that is available. This generally produces better results than specifying fixed -Xmx and -Xms values, especially for an application that is executed on different systems with varying amounts of memory. It is sometimes possible to obtain better results by specifying -Xmx and -Xms rather than letting the Fast VM pick the defaults. To determine what values to use you should use the -verbose:gc command line option to monitor your application's heap activity. If you notice that a large number of garbage collections are occurring, increase the heap size as much as possible without causing excessive page faults. Also see Memory Usage for additional information.

Memory Usage

The Fast VM has been tuned for large memory systems and, in addition, a number of trade-offs have been made that favor speed of execution over memory usage. As a result, the Fast VM uses more physical and virtual memory for the same application, often as much as 50 percent more. This can lead to excessive paging and degraded performance if the system is not tuned correctly or if there is insufficient physical memory on the system.

If you notice that your application runs more slowly with the Fast VM than the classic SDK JIT, you should do the following:

Note that you are better off with a smaller heap that results in more garbage collections than allowing your application to page fault too often due to a large heap size.

For more information on system tuning and resource limits, see the OpenVMS Performance Management manual.

Reducing Fast VM Memory Requirements for Workstations and Client-Side Applications

The Fast VM is optimized for large, long-running programs running on server systems. Many users would like to use the Fast VM on their workstations for client-side applications; however, some of these systems do not have the resources to start up the Fast VM with its default configuration. A -client switch addresses these needs.

The client configuration significantly reduces the Fast VM memory footprint.

The -client switch is a convenience switch, analogous to setting the following switches on a command line:

java -Xmx64m -Xglobal128m -Xgc:compacting

The individual switch settings that make up the -client switch can be overridden; for example:

java -client -Xmx256m

will initialize the Fast VM with a maximum heap size of 256 MB, with a maximum global region size of 128 MB, and with the compacting collector.

Creating VM in C/C++ Programs Using the Invocation API

This release supports the ability to create and invoke the Fast VM in C/C++ programs using the Invocation API.

The Invocation API is an integral part of the Java Native Interface (JNI) that allows you to initialize virtual machine arguments, create and load a virtual machine into your application, and then unload or destroy the virtual machine. For additional information about the Invocation API and how to use it, refer to Sun's Java Native Interface Specification.

In order to take advantage of the Invocation API functionality, your C/C++ program (new and existing programs) must first create the virtual machine so that the Java code can be executed. Once the virtual machine is embedded into the program, the program can then load Java classes and execute Java methods.

Let us assume that you have a C++ program called invokejvm.cxx. This program creates a virtual machine and then calls a Java method. The following example shows how to compile and link a C++ program that invokes the Fast VM:

  1. Make sure the Fast VM is set up as your virtual machine.

  2. Create an options file that tells the linker to use the JAVA$JVM_SHR shareable image. For example, you could create EXAMPLE.OPT containing the lines:
    JAVA$JVM_SHR/SHAREABLE
  3. Then compile and link:
    $ CXX INVOKEJVM.CXX /INCLUDE=SYS$COMMON:[JAVA$131.INCLUDE...] -
      /NAMES=AS_IS/FLOAT=IEEE
    $ LINK INVOKEJVM, EXAMPLE/OPTIONS
    

The /NAME=AS_IS qualifier is required to preserve the original case of external name strings. If your C/C++ code shares floating-point data with the RTE, the /FLOAT=IEEE qualifier is required because the RTE uses IEEE format floating-point, while C/C++ uses G-floating by default.

After you link the example, the program will use either the classic virtual machine or the Fast VM, depending on your Java environment setup, because it was linked with just JAVA$JVM_SHR, not the specific file that the logical name translates to.

Restrictions

Native methods used with the Fast VM must conform to the Java Native Interface (JNI) specification on the Sun site. The Fast VM does not support native method conventions older than the JNI specification.

 

Back to top
Using the Plug-In

Plug-in v 1.3.1 enables users to run Java applets and JavaBeans™ components on web pages using the RTE as an alternative to using the default virtual machine for Java 2 that comes with the web browser. It is based on the Java Plug-in 1.3.1 provided by Sun Microsystems and contains similar functionality.

For additional information on topics such as Java Plug-in Security, using signed applets, JNI and Java Plug-in, Using Java Plug-in in Intranet Environments, and How Proxy Configuration Works in Java Plug-in, see the Sun Microsystems Java Plug-in 1.3 Documentation web page; the documentation is the same for the Java Plug-in 1.3.1.

Note: You must be running Mozilla® 0.9.6 or higher.

Installing and Running Mozilla 0.9.6 and the Plug-In

To install Mozilla 0.9.6:

  1. Download Mozilla from http://mozilla.org/releases.
  2. Refer to Mozilla Technology Demonstration Release for OpenVMS Alpha Installation Guide and Release Notes  to install Mozilla on your system.

To run Mozilla:

$ @sys$common:[mozilla]mozilla

Note: We strongly recommend that you run Mozilla as an interactive job as indicated above.

If you spawn it off as a subprocess

$ spawn/nowait @sys$common:[mozilla]mozilla

you will likely exhaust some resources if you attempt to use the plug-ins for anything non-trivial.

To enable the RTE within your browser:

  1. Set preference:

    Edit->Preferences

    Click on Advanced.
    Check button labeled Enable Java.

  2. Exit Mozilla.

  3. When both SDK v 1.3.1 and Mozilla 0.9.6 have been installed in the standard areas, perform a one-time file copy to install the Plug-in:

    $ copy /prot=W:RE SYS$COMMON:[JAVA$131.JRE.PLUGIN.ALPHA.NS600]LIBJAVAPLUGIN_OJI.SO SYS$COMMON:[MOZILLA.PLUGINS]

    Thereafter, you can set up for Java operation:

    $ @SYS$COMMON:[JAVA$131.COM]JAVA$131_SETUP.COM

  4. Then run Mozilla:

    $ @sys$common:[mozilla]mozilla

    Mozilla will notice that new plug-ins are available and will then initialize those plug-ins for the current invocation.

To verify that Mozilla has found the plug-ins refer to:

Help->About Plug-ins

Mozilla will display the plug-ins it has initialized.

Placing Plug-Ins

As of Mozilla 0.9.9 and Secure Web Browser (SWB) 1.0, you can choose where to place plug-ins.

For system-wide usage, use the respective location in the Mozilla/SWB installation tree:

$ copy /PROT=W:RE -
SYS$COMMON:[JAVA$131.JRE.PLUGIN.ALPHA.NS600]LIBJAVAPLUGIN_OJI.SO -
SYS$COMMON:[MOZILLA.PLUGINS]

$ copy /PROT=W:RE -
SYS$COMMON:[JAVA$131.JRE.PLUGIN.ALPHA.NS600]LIBJAVAPLUGIN_OJI.SO -
SYS$COMMON:[CSWB.PLUGINS]


You can also use "private" plug-ins by creating a [.PLUGINS] directory in your _MOZILLA directory (which resides in SYS$LOGIN). For example:

USERS:[FLINTSTONE._MOZILLA.PLUGINS]

To use this "private" plug-ins area:

$ copy /PROT=W:RE -
SYS$COMMON:[JAVA$131.JRE.PLUGIN.ALPHA.NS600]LIBJAVAPLUGIN_OJI.SO -
USERS:[FLINTSTONE._MOZILLA.PLUGINS]


Note that the public plugin areas are distinct:

SYS$COMMON:[MOZILLA.PLUGINS]
SYS$COMMON:[CSWB.PLUGINS]

and affect only the indicated product.

However, the user-private area, e.g.,

USERS:[FLINTSTONE._MOZILLA.PLUGINS]

is shared by Mozilla and SWB.

Essentially, if you place a LIBJAVAPLUGIN_OJI.SO into USERS:[FLINTSTONE._MOZILLA.PLUGINS], it will be used by both Mozilla and SWB and override what is in both SYS$COMMON:[MOZILLA.PLUGINS] and SYS$COMMON:[CSWB.PLUGINS].

The Plug-In Control Panel

A Plug-in Control Panel lets you change Plug-in options such as proxies and enabling of the Java console window. It also allows you to switch the RTE version you want to run with your Plug-in. To run the Control Panel, enter the following command:

$ ControlPanel

Or you can use the Mozilla browser to visit the Control Panel applet page that was installed as 

SYS$COMMON:[JAVA$131.JRE]ControlPanel.html

For example:

@sys$common:[mozilla]mozilla -
file:///SYS$COMMON:[JAVA$131.JRE]ControlPanel.html

Some of the Control Panel features are discussed below. Refer to Sun's Java Plug-In Control Panel web page for information about additional features and uses of the Java Plug-in Control Panel.

Viewing Tracing Information

You can view a moderate amount of Java Plug-in tracing information in Mozilla's Java Console by setting the JAVA_PLUGIN_TRACE environment variable:

  1. Type the following before starting Mozilla: $ DEFINE JAVA_PLUGIN_TRACE true
  2. Open the Java Console (Tasks->Tools->Java Console).

Displaying Java Error Messages

To see Java error messages:

  1. Use the Plug-in Control Panel to enable the console window.
  2. Exit Mozilla and then restart it.

With the console window enabled, when you next visit a Plug-in enabled page, a separate window will come up to display error messages.

Back to top
Switching Versions

With SDK v 1.3.1, you can have multiple SDK versions installed on your OpenVMS system, and you can change from one to the other. The following sections describe how to do this.

 

In Separate Processes

To use different SDK versions in separate processes, you must first run a command procedure to set up the Java environment definitions for the version of the SDK you want to use in the given process. The command procedures to perform the Java environment setup are version-specific, and are as follows:

SDK Version

Command Procedure

SDK v 1.3.1

SYS$COMMON:[JAVA$131.COM]JAVA$131_SETUP.COM

SDK v 1.3.0

SYS$COMMON:[JAVA$130.COM]JAVA$130_SETUP.COM

SDK v 1.2.2

SYS$COMMON:[JAVA$122.COM]JAVA$122_SETUP.COM

SDK v 1.1.8

SYS$MANAGER:JAVA$SETUP.COM

You can select either the classic VM or Fast VM as your virtual machine using this command file. Refer to Setting Up the Java Environment to set up the Java environment.

Note: To run Fast VM with SDK v 1.3.0 or SDK v 1.2.2, you must install the appropriate version of Fast VM separately. Fast VM is not available for SDK v 1.1.8. Refer to our Software Download page for product listing.

For example, to run SDK v 1.3.1, first run the following command file in your process:

$ @SYS$COMMON:[JAVA$131.COM]JAVA$131_SETUP.COM

In the Same Process

To use different SDK versions in the same process, you must first run a command procedure to cancel the Java environment definitions of one version of the SDK before setting up the environment of another version of the SDK. The command procedures to accomplish the Java environment cleanup are version-specific, and are as follows:

SDK Version

Command Procedure

SDK v 1.3.1

SYS$COMMON:[JAVA$131.COM]JAVA$131_CANCEL_SETUP.COM

SDK v 1.3.0

SYS$COMMON:[JAVA$131.COM]JAVA$130_CANCEL_SETUP.COM

SDK v 1.2.2

SYS$COMMON:[JAVA$131.COM]JAVA$122_CANCEL_SETUP.COM

SDK v 1.1.8

SYS$COMMON:[JAVA$131.COM]JAVA$118_CANCEL_SETUP.COM

Once you have cancelled the Java environment, you must then run a command procedure to set up the Java environment definitions for the version of the SDK you want to use. For a list of these command procedures, see In Separate Processes.

For example, to switch from using SDK v 1.2.2 to using SDK v 1.3.1 in the same process, run the following command procedures:

@SYS$COMMON:[JAVA$131.COM]JAVA$122_CANCEL_SETUP.COM       ! Clean up 1.2.2 environment
@SYS$COMMON:[JAVA$131.COM]JAVA$131_SETUP.COM  ! Set up 1.3.1 environment

Running @SYS$COMMON:[JAVA$131.COM]JAVA$122_CANCEL_SETUP.COM cancels the setup of the SDK v 1.2.2 environment.

Back to top
Stream_LF File Format Required

All Java files that are to be read by any of the Java tools or that serve as input class libraries (listed in CLASSPATH) must be in Stream_LF format. Stream_LF format is required for all data files read or written by Java programs.

To determine the record format of your file, do the following:

    $ DIR/FULL MyFile.java

And observe the line:

    Record format

By default, a file initially created on an OpenVMS system, with a text editor for example, will have 'Variable length' record format.

Although a *.java file with 'Variable length' record format compiles correctly if it is error-free, the compiler does not produce proper diagnostic outputs if a compilation error occurs.

 

Converting ASCII Files

To get an ASCII file into Stream_LF record format, do the following:

$ CONVERT/FDL=SYS$COMMON:[JAVA$131.COM]STREAM_LF.FDL input_filename - 
                                                     output_filename

Where STREAM_LF.FDL is:

    FILE
            ALLOCATION              4
            BEST_TRY_CONTIGUOUS     yes
            EXTENSION               0
            ORGANIZATION            sequential

    RECORD
            BLOCK_SPAN              yes
            FORMAT                  stream_LF
            SIZE                    0

If the file is in the proper format (STMLF), you will see the source error line printed out, with a carat (^) indicating the point of error:

  $ javac "Bounce.java"
  Bounce.java:11: Superclass smith.java.applet.Applet of class Bounce not found. 
  public class Bounce extends smith.java.applet.Applet implements Runnable
                              ^
  1 error

If the file is not in STMLF format, a blank line is printed instead of the source error line, and the carat position is not useful:

  $ javac "Bounce.java"
  Bounce.java:10: Superclass smith.java.applet.Applet of class Bounce not found.
                                                                      ^
  1 error

Converting Binary Files

Binary .class files need to be Stream_LF as well. If they are not Stream_LF you will get error messages like the following, even though your CLASSPATH is correct and the correct .class file is on the path:

   Can't find class Test.HelloWorld

If you import .class files from a non-OpenVMS computer, be sure to convert them to Stream_LF.

To get a binary file (.class, .jar, .zip) into Stream_LF record format, do the following to give the file the right record format attributes:

   $ SET FILE/ATTR=(RFM:STMLF,RAT:CR) filespec

Back to top
Debugging Tips

  1. Are the files STMLF (Stream_LF Record Format)?

  2. Turn on JAVA$SHOW_FILENAME_MAPPING for a trace of filename translation.

UNIX-Style Filenames on OpenVMS Systems

There are a number of issues trying to represent UNIX directory and file specifications on an OpenVMS Alpha system. If you try to run a Java application developed elsewhere on an OpenVMS Alpha system, you might encounter problems with file and directory names.

The RTE provides a number of mapping algorithms that try to make a UNIX-style name usable under an OpenVMS Alpha file system.

These algorithms can be used in combinations. You can enable the use of each algorithm by turning on a particular bit in the following logical name:

        JAVA$FILENAME_CONTROLS

To change the JAVA$FILENAME_CONTROLS default values, edit the file:

     SYS$COMMON:[JAVA$131.COM]JAVA$FILENAME_CONTROLS.COM

This file is called by JAVA$131_SETUP.COM to establish these and other defaults.

We suggest that you start off using this file as-is to enable all algorithms.

Different users may want to read/edit this file to enable/disable different algorithms to avoid selected problems.

The algorithms and the bit values to set them are summarized below. A more detailed explanation of each option follows the table.

            Current Filename Mapping Table

   Option name                                       Value

   Support UNIX and VMS filename                      %x00000008
   Support Dir in the filename                        %x00000200
   Support Valid characters in filename               %x00001000
   Support Hidden Filename (replace with _)           %x00004000
   Support Hidden Filename (remove the .)             %x00008000
   Support Multi dot in directory (replace with _)    %x00020000
   Support Multi dot in directory (remove dots)       %x00040000
   Support Multi dot in file, keeping last            %x00100000
   Support Multi dot in file, keeping first           %x00200000
   Support more than 39 characters by truncation      %x04000000
   Support more than 39 characters by moving the dot  %x08000000
   Support Directory remapping                        %x20000000

To see individual filename mappings as they occur, define the logical JAVA$SHOW_FILENAME_MAPPING:

   $ DEFINE JAVA$SHOW_FILENAME_MAPPING 1

This is useful if you are experiencing problems with the way filenames are being mapped, perhaps resulting in unexpected "File not found" messages.

 

Example:

To enable "UNIX and VMS" and "Multi dot first" you must issue the following DEFINE:

   $ FILE_MASK = %x00000008 + %x00200000
   $ DEFINE JAVA$FILENAME_CONTROLS 'file_mask'

The options are processed at runtime in order from smallest to largest values.

Therefore, in this example, first "UNIX and VMS" would be processed, and then "Multi dot first".

To enable all the options:

   $ define JAVA$FILENAME_CONTROLS  -1

If JAVA$FILENAME_CONTROLS is not defined or is equal to zero, then no mappings are attempted.

 

Description of Mapping Options

The following sections further describe the available mapping options.

 

Support UNIX and OpenVMS filename

Use this to map a mix of UNIX and OpenVMS filenames into UNIX-style names.

For example,

     this:            $disk1:[smith]/test.jtjtj/test.jtjtj

     maps into this:  /$disk1/smith/test.jtjtj/test.jtjtj

Support Dir in the Filename

Change names of the form xxx.dir to their UNIX directory counterpart.

For example,

     a name like: /dkb500/smith.dir/testing.dat 
     maps into:   /dkb500/smith/testing.dat

Support Valid Characters in Filename

Characters that can occur in UNIX-style names but are prohibited in OpenVMS-style names are replaced by underscores. [ "_" ] unless these characters have special meaning in the UNIX-style name. In that case, we attempt to map the special meaning.

For example, "~" refers to SYS$LOGIN.

The list of characters contains characters like "+".

No uppercasing is done. C will create/open the correct file.

 

Support Hidden Filename (Replace with _)

Some Java applications expect to be able to create a hidden file or directory. The hidden character "." will be replaced by the "_" character.

For example:

     A name like:  .hotjava
     maps into:    _hotjava

  Or,

     A name Like:  test/.hotjava/appletviewer.dat
     maps into:    test/_hotjava/appletviewer.dat

Support Hidden Filename (Remove the .)

Some Java applications expect to be able to create a hidden file or directory. The hidden character "." will be removed from the filename.

For example:

     A name like:  .hotjava
     maps into:    hotjava

  Or,

     A name Like:  test/.hotjava/appletviewer.dat
     maps into:    test/hotjava/appletviewer.dat

Support Multi Dot in Directory, Replacing All by Underscore

    A name like:

       /dkb500/smith/version1.1.4.3/testing_dat.dat

    Maps into:

       /dkb500/smith/version1_1_4_3/testing_dat.dat

Support Multi Dot in Directory, Removing All Dots

    A name like:

       /dkb500/smith/version1.1.4.3/testing_dat.dat

    Maps into:

       /dkb500/smith/version1143/testing_dat.dat

Support Multi dot in File, Keeping the Last Dot

Multiple dots in the filename are turned into underscores, but the LAST dot is retained:

For example:

     A name like:  SDKDOC_1.3.1
     maps into:    SDKDOC_1_3.1

Support Multi dot in File, Keeping the First Dot

Multiple dots in the filename are turned into underscores, but the FIRST dot is retained:

For example:

     A name like:  SDKDOC_1.3.1
     maps into:    SDKDOC_1.3_1

Support Greater Than 39-Character Filenames by Truncation

For filenames greater than 39 characters either to the left of the single dot or the right of the single dot, that portion of the name is truncated on the right.

For example:

    A name like: 

         abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz.extension

    Maps into: 

         abcdefghijklmnopqrstuvwxyzabcdefghijklm.extension

    Similarly, 

    A name like: 

         somename.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz

    Maps into: 

         somename.abcdefghijklmnopqrstuvwxyzabcdefghijklm
		 

Support Greater Than 39-Character Filenames by Moving the Dot

For filenames that have more than 39 characters either to the left or to the right of the single dot in the filename, AND the total number of characters is less than [39+39 =] 78, the algorithm tries to shift the single dot so that there are no more than 39 characters to the left of the dot.

For example:

    A name like:

       abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz.extension

    Maps into:

       abcdefghijklmnopqrstuvwxyzabcdefghijklm.nopqrstuvwxyzextension

Support Directory Remapping

There is support for representing a directory structure that is more than 8 levels deep on an ODS-2 format disk.

If your application will use more than the OpenVMS maximum of 8 nested directories, then define the following logicals to work around this restriction:

    JAVA$DIRECTORY_MAPPING_COUNT nn  : How many directory mappings exist?
    JAVA$DIRECTORY_MAPPING_nn        : Directory mapping value

    where nn is an integer from 01 to 99.

For example, the following filename previously failed with SDK v 1.1 for OpenVMS because the directory has too many levels for RMS:

    /test1/test2/test3/test4/test5/test6/test7/test8/test9/test10

Using the directory mapping logic, you can redirect deep directory names to either a concealed logical or another directory.

Using the example above:

    $ DEF JAVA$DIRECTORY_MAPPING_COUNT 1 ! how many directory mappings.
    $ DEF JAVA$DIRECTORY_MAPPING_01 -
   _$ "/test1/test2/test3/test4/test5/test6/test7=/test7_relevel"

All files/directories created with a prefix of the following will now be created in the directory /test7_relevel:

    /test1/test2/test3/test4/test5/test6/test7 

So, the filename

    /test1/test2/test3/test4/test5/test6/test7/test8/test9/test10/foo.bar

would actually be created as:

    /test7_relevel/test8/test9/test10/foo.bar

Note: Define the JAVA$DIRECTORY_MAPPING_nn logical only from the first character on. You cannot map directories from the middle of a directory tree. Note the limit of 99 remappings.

Improving Memory Utilization By Reducing Filename Mapping

Historically, at users' request, the RTE has performed filename mapping to map file names that are not directly representable on an OpenVMS file system into ones that are representable. This filename mapping requires several (potentially large) buffers on the stack. As the number of requested mappings increases, an increasingly larger number of such buffers are required. See Description of Mapping Options in UNIX-Style Filenames on OpenVMS Systems for a full discussion of these filename mappings.

Now available for OpenVMS Alpha V7.2-2 and V7.3 is a C RTL ECO that enriches the kinds of filenames you can directly specify on an ODS-5 volume under OpenVMS Alpha. This functionality is included with higher versions of OpenVMS Alpha without the need for an ECO. See the product page on the Web site for more information.

To summarize, if your application is intended to run only on an OpenVMS system that has this C RTL functionality, and your files are restricted to an ODS-5 volume, then you can probably reduce the number of filename mappings that you request.

Whenever you eliminate a filename mapping option, you reduce the number of internal buffers that need to be allocated—leading to a smaller memory footprint for your application. When no filename mapping is needed (JAVA$FILENAME_CONTROLS defined to 0), you can lower the -ss (stack size) value. The gains will be in memory usage and thread creation.

Setting JAVA$CLASSPATH

The JAVA$CLASSPATH logical is an alternative way of specifying the class path. Defining this logical overrides the CLASSPATH logical, if set.

JAVA$CLASSPATH lets you define a class path using OpenVMS file specification syntax. Therein lies its advantage: with JAVA$CLASSPATH, you specify multiple paths with a comma-separated expression; with CLASSPATH, you use a single, quoted string comprised of colon-separated pathnames. JAVA$CLASSPATH, therefore, avoids the OpenVMS 255-character length restriction that you can encounter with CLASSPATH.

The following two sample statements accomplish the same result:

   $ DEF JAVA$CLASSPATH USER1$:[SMITH.KIT]MY_CLASSES.ZIP,[]

   $ DEF CLASSPATH "/user1$/smith/kit/my_classes.zip:."

Note that:

  • CLASSPATH is a colon-separated list enclosed in quotes.
  • JAVA$CLASSPATH is a comma-separated list not enclosed in quotes.
  • JAVA$CLASSPATH overrides CLASSPATH, if JAVA$CLASSPATH is defined.
  • The -classpath option on a Java tool overrides both JAVA$CLASSPATH and CLASSPATH.

For further information, see Setting the Classpath on Sun's site.

 

Using JAVA$ENABLE_ENVIRONMENT_EXPANSION

You can use the JAVA$ENABLE_ENVIRONMENT_EXPANSION logical to bypass the 255-character DCL command-line limit:

$ define/job JAVA$ENABLE_ENVIRONMENT_EXPANSION TRUE

When this logical is defined, the RTE will attempt to expand any logical or symbol that is preceded by "$" on the Java command line. To bypass the 255-character DCL command line limit, you can define lengthy command-line operands as more compact symbols or logical names and specify them on the Java command line, each preceded by a "$". They will be passed by DCL to the RTE for expansion. Also, if the logical is a multi-valued logical, this feature will attempt to convert the list into a UNIX list with a ":" as a delimiter.

For example:

$ define java$classpath [], dka200:[apache.jakarta.tomcat.lib]servlet.jar
$ extra_option = "-Dfoobar=value1 -Dfoobar1=value2"
$ java -cp $java$classpath $extra_option javaprogram

With the logical defined, the RTE would expand the command line to the following:

$ java -cp .:/dka200/apache/jakarta/tomcat/lib/servlet.jar -
"-Dfoobar=value1" "-Dfoobar1=value2" javaprogram

Note: This feature does not expand operands provided via the "-V" method.

You can use the _JAVA_LAUNCHER_DEBUG logical name as a diagnostic tool to see the arguments as they are passed to the Java Virtual Machine.

Relaxation in Shareable Image Name Usage

There is a relaxation in the way shareable image names are used.

Before SDK v 1.1.8, the JNI example provided for OpenVMS systems suggests you put your native code into a shareable image named JAVA$foo_SHR.EXE, where you choose the foo portion of the image name. In your Java code, you would have the following statement to load your shareable image so you can call its native methods:

   System.loadLibrary("foo");

This has the disadvantage of requiring users to create shareable images using our reserved name prefix of JAVA$.

As of SDK v 1.1.8, you are allowed and encouraged to create shareable image names that do not collide with our namespace:

  • To avoid naming conflicts with future releases, do not prefix user application shareable images with JAVA$. You can avoid naming your images JAVA$foo_SHR as long as you define a logical name JAVA$foo_SHR to point to your image.

    As a workaround to support old SDKs, we recommend you define two logical names: "JAVA$foo_SHR" and "foo", both pointing to your foo.exe shareable image:

       $ DEFINE/JOB JAVA$foo_SHR USER_DISK:[FOO]FOO.EXE
    
       $ DEFINE/JOB foo          USER_DISK:[FOO]FOO.EXE
    

    The corresponding statement in your Java code would be:

       System.loadLibrary("foo");
    

    When you no longer support SDKs prior to SDK v 1.1.8, you could stop defining the JAVA$foo_SHR logical. The foo logical would then continue to get you to your shareable image.

  • Consider using a project prefix for shareable image names.

  • Put the real library name in the call to loadLibrary. For example, if a user application has an image named FOO.EXE, then the call would be:
       System.loadLibrary("foo");
    

  • Do not put your shareable images (or .class files) in the SYS$COMMON:[JAVA...] area. Instead, use the CLASSPATH logical to make user classes known to the environment. Future releases of the SDK could contain additional images and/or .class files that might conflict with user file names. (This is another good reason for you to use a project prefix as suggested in the second item above.)

Limited File Sharing Support

The RTE supports limited file-sharing and has several user-selectable modes of file sharing. To enable RTE file-sharing modes, define the logical JAVA$FILE_OPEN_MODE to any of the following values:

0 or not defined

no file sharing

 

2

sync writes, every write to a file, the file is sync with the disk.

Note: A sync for every write gives you file sharing close to what the SDK expects. However, things that normally took seconds to run, can take minutes or longer.

3

A table of all open file descriptors is kept by the SDK. The SDK then monitors when an application writes to a file, and sets a write_pending flag. Before every read operation the SDK scans the list of open file descriptors. If a match is found with a write pending, the pending write is flushed to the disk before the read.

Limitations: only one process can share the file reliably.

We are working with HP C engineering to enhance the file-sharing features in the C RTL and the SDK.

Name-Shortening Capability

The SDK for OpenVMS Alpha has the capability to shorten long procedure names (more than 31 characters) using the same translation algorithm used by the C/C++ compilers. (This capability was first included with SDK v 1.1.8-5.) To make use of this feature, compile your C/C++ code with the /NAMES=(SHORTENED, AS_IS) qualifier.

The old name-shortening method using SCAN_FOR_31_CHARS.COM is still supported. You can choose either method. (For information on using SCAN_FOR_31_CHARS.COM, included in the JNI_EXAMPLE.BCK saveset, follow the instructions at How do I handle procedure names over 31 characters? on our FAQ page , and then read the files JNI_README.TXT, JNI_EXAMPLE.COM, and SCAN_FOR_31_CHARS.COM. You run SCAN_FOR_31_CHARS.COM manually to produce .H files that redefine the oversized name to be 31 characters.) The names produced in this way are different from those produced by the C/C++ compilers.

When the RTE is confronted with an oversized name, it first tries to find a match using the new compiler-based name compression algorithm -- the same one used by running the C or C++ compiler with the /NAMES=(AS_IS,SHORTENED) qualifier.

If the RTE fails to find such a match, it then tries to create a short name using the algorithm used by SCAN_FOR_31_CHARS.COM.

Although the old manual name-shortening method will continue to work, we encourage you to take advantage of the new, more automatic method.

 

Back to top
Extended File Specifications

OpenVMS Version 7.2 introduces support for Extended File Specifications, which consists of two parts: deep directory nesting and extended file names. See the OpenVMS Guide to Extended File Specifications for more information. The RTE can take advantage of both of these capabilities, particularly the extended file names on an ODS-5 disk, which allow much longer file names and mixed-case file names.

To activate this support:

  1. Execute the following command:
    SET PROCESS/PARSE_STYLE=EXTENDED
    

    This command preserves the case of the arguments on the command line, and must be enabled to take advantage of C RTL changes.

  2. Enable the new features of the C RTL by defining special logical names. These logical names are in the JAVA$131_SETUP.COM file, where they are commented out by default. The two of interest here are DECC$ARGV_PARSE_STYLE and DECC$EFS_CASE_PRESERVE:

  3. Enable DECC$ARGV_PARSE_STYLE to cause the C RTL to preserve the case of command-line arguments (instead of converting them to lowercase):
    $ DEFINE DECC$ARGV_PARSE_STYLE ENABLE
    

  4. Enable DECC$EFS_CASE_PRESERVE to cause the C RTL to preserve the case of file names in all C RTL I/O functions:
    $ DEFINE DECC$EFS_CASE_PRESERVE ENABLE
    

With this support enabled, the file "Foo.java" compiles to "Foo.class" instead of "FOO.CLASS".

To disable this feature, issue any one of the following commands:

$ SET PROCESS/PARSE_STYLE=TRADITIONAL
$ DEFINE/SYSTEM DECC$ARGV_PARSE_STYLE DISABLE
$ DEASSIGN DECC$ARGV_PARSE_STYLE
$ DEFINE DECC$EFS_CASE_PRESERVE DISABLE

The values for the DECC$ARGV_PARSE_STYLE and DECC$EFS_CASE_PRESERVE logicals are case-insensitive.

 

Case of JAVAC and JAR File Operands is Determined Automatically

Previously, HP had added the capability for JAVAC and JAR to accept wild-carded file specifications and would automatically determine the right case of the name. This allowed you to say:

$ JAVAC *.java

and

$ JAR cvf test.jar *.class

SDK v 1.3.1 extends this capability in these two tools for any .java and .class file operand, so you can say, e.g.,

$ JAR cvf test.jar TESTPLOT.CLASS

and not worry whether it really should be:

$ JAR cvf test.jar "TestPlot.class"

$ JAR cvf test.jar "TESTPLOT.CLASS" 

or

$ JAR cvf test.jar "testplot.class"

This can be particularly helpful to those using DCL to automatically generate operands, because DCL will uppercase them. In general, this reduces the number of situations where you need to present the exact-cased name and quote it.

Note: This works only for JAVAC and JAR. You still need to use the right case for verbs like JAVA itself.

This feature is enabled by default; if it causes troubles with existing command procedures, it can be entirely disabled by setting:

$ define JAVA$OMIT_CASE_CHECK true

Enabling UNIX-Style Behavior in Certain File-Manipulation Commands

The following logical names enable UNIX-style behavior for certain file-manipulation commands:

$ define JAVA$DELETE_ALL_VERSIONS true
(on delete, delete all versions)

$ define JAVA$RENAME_ALL_VERSIONS true
(on rename, rename all versions)

$ define JAVA$CREATE_DIR_WITH_OWNER_DELETE true
(on directory creation, establish O:REWD protection as default)

The DECC$FILE_PERMISSION_UNIX logical name supercedes the effects of JAVA$CREATE_DIR_WITH_OWNER_DELETE.

On OpenVMS, if you type:

mkdir("a/b/c", mode)

and later:

chmod("a/b/c", mode)

only the directory 'c' gets the new mode.

By turning on the DECC$FILE_PERMISSION_UNIX logical name, the directories 'a' and 'b' are affected by the new mode as well.

For more information, refer to Enabling Compaq C RTL Features Using Feature Logical Names in the Compaq C Run-Time Library Reference Manual for OpenVMS Systems.

Back to top
Application Performance Tuning

You can optimize the performance of your application on OpenVMS Alpha in several ways, without changing your application code. The RTE is sensitive to the existence of a certain logicals that will alter its behavior. The following descriptions offer several techniques you can use to optimize performance:

First Technique: Using JAVA$FORK_MAILBOX_MESSAGES, JAVA$EXEC_USE_PIPES, and JAVA$FORK_PIPE_STYLE

Applications can be tuned for performance using the logical JAVA$FORK_MAILBOX_MESSAGES and JAVA$EXEC_USE_PIPES.

On OpenVMS Alpha systems, Java process creation and parent-child relationships are managed by native threads. If they pass data between them it is done by mailboxes. For example, a typical scenario is where a child process produces a stream of output, and the parent process consumes this stream as input.

Schematically,

Child Writes
     |
     V
  Mailbox
     |
     V
Parent Reads

Some applications are written such that the parent starts off the child and then waits for the child to finish before starting to read its stream of data. In others applications, the parent starts reading as soon as it can, but cannot keep up with the child. Both of these approaches can get into trouble.

The trouble arises because the mailboxes are of a finite size.

If the mailbox fills up, the child is blocked from doing further work and never gets done. Meanwhile, the parent is waiting for the child to finish, and also cannot proceed. This state is known as a Read-Write MailBoX (RWMBX) wait state (or RWINS), and the process running this application is blocked.

To try to avoid this situation, the RTE does buffering between the mailbox and the consumer. One thread reads data from the mailbox and stores it in heap storage. Another thread reads buffered data from this heap and delivers it to the parent when it asks for it.

Schematically:

Child Writes
     |
     V
  Mailbox
     |
     V
PutToHeap
     |
     V
GetFrom Heap
     |
     V
  Mailbox
     |
     V
(Java Application)Parent Reads

In the case where the parent is waiting for the child to finish, this buffering may empty the mailbox enough so that the child can continue to run and finish, thereby freeing the parent to continue as well. In the case where the parent is continually reading but is temporarily being overwhelmed, the buffering smooths the production-consumption data flow.

If the parent is really waiting for the child to complete before consuming any of the information stream, this buffering mechanism itself starts to fail when the volume of output exceeds the amount of heap storage available. When no more heap is available, PutToHeap cannot empty the Mailbox, and again you face (RWMBX or RWINS) wait state. The blocked state persists unless some asynchronous agent comes along and changes the resources involved; for example, releasing some heap storage.

In most cases, however, the added capacity of heap storage is enough for the child to complete and the parent to continue.

As a further enhancement to control this data flow, we monitor the pipeline for how many messages are outstanding.

Schematically:

	 
      +--------->Child Writes
      |                |
      |                V
      |            Mailbox
count                  |
messages               |
outstanding            V
      |     	 PutToHeap
      |                |
      |                V
      +---------->GetFrom Heap
                       |
                       V
   	             Mailbox
                       |
                       V
      (Java Application)Parent Reads

When the number of messages written exceeds the number read by an amount equal to the lesser of 1024 and the value of the logical JAVA$FORK_MAILBOX_MESSAGES, then we stop the writes to prevent the RWMBX condition. JAVA$FORK_MAILBOX_MESSAGES is assumed to be 8 if not defined.

This temporary curtailment of production allows the parent thread to catch up (get within the exceeded message threshold), and the overall application continues.

As mentioned above, if JAVA$FORK_MAILBOX_MESSAGES is not defined, it is assumed to be 8. With this value in control, any time the writer gets 8 records ahead of the consumer, the writer is temporarily suspended. For applications that produce many small records, you might want to set a value of JAVA$FORK_MAILBOX_MESSAGES to a larger value -- something on the order of 1024 divided by your typical mailbox record size. The bigger you can make it -- think of it as a blocking factor -- the more efficient the operation becomes because you are minimizing the start-stop time of the producer thread. If you make it too large, you might induce the RWMBX state. If you see the Java application in RWMBX state for a period of time without having explicitly used JAVA$FORK_MAILBOX_MESSAGES, try setting it to a value less than the default value of 8.

You can revert to unbuffered behavior for exec and pipes by defining the logical JAVA$EXEC_USE_PIPES.

$ DEFINE JAVA$EXEC_USE_PIPES 1  ! use unbuffered behavior

Starting with SDK v 1.3.1-2, the logical name JAVA$FORK_PIPE_STYLE is available to augment the features offered by JAVA$EXEC_USE_PIPES. You can choose among three styles of data flow management:

Value for JAVA$FORK_PIPE_STYLE Behavior Same as…
0 Use unbuffered behavior JAVA$EXEC_USE_PIPES = 1
1 Default behavior JAVA$EXEC_USE_PIPES undefined
2 Default behavior, except uses a socket rather than a mailbox for buffering data between the heap and the Java application Parent Reads (requires a TCP/IP stack) JAVA$EXEC_USE_PIPES undefined, except uses a socket rather than a mailbox for buffering data between the heap and the Java application Parent Reads (requires a TCP/IP stack)


Defining JAVA$FORK_PIPE_STYLE with the value 0 is the same as defining JAVA$EXEC_USE_PIPES with the value 1. The result is that the unbuffered behavior is used.

Defining JAVA$FORK_PIPE_STYLE with the value 1 is the same as NOT defining JAVA$EXEC_USE_PIPES. The result is the buffered behavior described in the previous paragraphs.

Defining JAVA$FORK_PIPE_STYLE with the value of 2 is similar to NOT defining JAVA$EXEC_USE_PIPES, but will result in the use of a socket rather than a mailbox for buffering data between the heap and the Java application Parent Reads. Note: This style requires a TCP/IP stack.

Schematically:

Child Writes
     |
     V
Mailbox
     |
     V
PutToHeap
     |
     V
GetFrom Heap
     |
     V
Socket 
     |
     V
(Java Application)
Parent Reads

Because the Java application is reading from a socket device, it can use nonbuffered IO, ioctl features, cancel IO operations, etc. It is the closest to simulating true UNIX pipe functionality. Processing data from the child using this style results in a performance improvement.

Second Technique: Using JAVA$DISABLE_MULTIDOT_DIRECTORY_STAT

Avoiding Secondary stat() call

Because of the way File Name Mapping works, and the way in which directories that contain dots are handled on OpenVMS Alpha, the RTE may need to do an extra stat() call whenever you seek a class file that is not found on the initial stat() call.

Consider this example: Suppose you import an application from another platform that has within its overall directory structure a directory named project-4.1-A.

During operation you may need to verify that the directory exists. On OpenVMS Alpha you cannot yet represent a directory named project-4.1-A. As a result, if the application attempts to see if the directory exists, the RTE will first try to access via stat(): projects/project-4.1-A.

When that fails, it will do another stat() wherein the path has been modified to remove all dots from directory names: projects/project-4_1-A.

Because this second attempt is needed to support remapping of directories that contain "dot(s)," any failed stat() will result in a second call to stat() to attempt to see if it is a directory containing a "dot(s)."

In general, whenever a stat() call fails, the RTE attempts another stat() call with a potentially modified path name.

What is the impact of doing a second stat() call?

Modern Java applications are typically constructed by drawing together class files (libraries) provided by a number of vendors. In order to tie this together at runtime, you must specifiy long Classpath strings that can contain hundreds of individual path names.

For example, for projects/classes/MyApp.class, the RTE would try to stat() "projects/classes/MyApp.class" first; if that fails, it would try "projects/classes/MyApp_class" to see if it is a directory that contains any "dot(s)."

If you are looking from a particular class file, you will generally need to look through approximately 50 percent of the paths to find the one you need; this means that the RTE will do two stat()s for every class file lookup failure.

Each time you look on a path that does not contain the sought class, the failure of the stat() causes a secondary stat() to be issued. If you multiply these secondary stat() calls by the several hundred classes that are loaded during a typical application you can see that the total number of secondary stat() calls can account for a significant amount of application start up.

However, if you know that your application never deals with directories that have dots in their names, you can now tell the RTE not to do the secondary stat() call because it will have no value to your application.

This is accomplished by setting:

$ define/nolog JAVA$DISABLE_MULTIDOT_DIRECTORY_STAT true

This will disable the secondary stat() call.

Realize, however, that if you turn on this logical and your application does attempt to find something in a directory that originally had dots in it, your application will fail, probably by throwing a java.lang.NoClassDefFoundError or Directory error.

Third Technique: Using JAVA$CACHING_INTERVAL

Some applications spend considerable time creating files, monitoring directories for the existence of files, and testing properties of files using file methods such as

File file = new File(name);
file.exists()
file.isDirectory()
file.isAbsolute()

These methods indirectly use the underlying C Runtime Library stat() function.

A typical sequence might appear as:

if (file.exists()) { // ends up calling stat()
if (file.isDirectory()) { // ends up calling stat() again
...
}
}

If your application does these kinds of operations--continuous polling for changes in a monitored set of files--you might benefit from this optimization.

If you define a logical,

$ DEFINE/JOB JAVA$CACHING_INTERVAL <caching interval in seconds>

e.g.,

$ DEFINE/JOB JAVA$CACHING_INTERVAL 60

then the information gathered by the stat() function is cached for the interval indicated before it is deemed stale and the cache is invalidated.

Hence, in the code fragment above, the question file.isDirectory()is answered from cached information and no I/O is actually performed. This represents a considerable difference in time. Some web servers have been observed making hundreds of calls per second to monitor the status of the same group of files. The overall speed-up in such cases can be dramatic.

Additional caching occurs when JAVA$CACHING_INTERVAL is enabled and JAVA$CACHING_DIRECTORY defined; the caching algorithm will attempt to discover the reason a file is "not found". If it is because a directory tree does not exist, the caching algorithm will be optimized to recognize that future attempts to this tree will also fail (until the directory has been created). This improves application startup for an application that has several directories defined in JAVA$CLASSPATH (or CLASSPATH).

The cache is invalidated and a real call to stat() is made the first time after:

  • The current caching interval expires.


  • An explicit action is taken within the current application that may be assumed to change the validity of the cached information, including:

    • A file is opened for something other than READ.


    • A file or directory is created or destroyed.


    • A child process is spawned via Runtime.exec() or completes.

The main drawback to this caching is that if another application, without the cooperation of this application (e.g., FTP), copies a file into the monitored set, the RTE might not see it until the cache is invalidated for one of the reasons above.

By default, this optimization is not enabled. You can enable it only by setting the logical JAVA$CACHING_INTERVAL to a positive non-zero value.

Fourth Technique: Using JAVA$DAEMONIZE_MAIN_THREAD

With applications that make heavy use of ASTs, the main Java thread could be starved for CPU time.

As described in section B.12.5, Delivery of ASTs, in the Guide to the POSIX Threads Library:

In addition to per-thread ASTs, there are also user mode ASTs that are directed to the process as a whole, or to no thread in particular, or to a thread that has since terminated. These "process" ASTs are queued to the initial thread, making the thread runnable in a fashion similar to per-thread ASTs. They are executed in the context of the initial thread ....

Later, the same section describes how, among the implications that must be considered for application development:

If an application makes heavy use of ASTs, it can starve the initial thread to a degree, because only that thread executes the ASTs that are directed to the entire process.

In other words, "process" ASTs are executed first, and the Java thread running in the main thread only gets the CPU if there are not any ASTs. If you define a logical,

$ define JAVA$DAEMONIZE_MAIN_THREAD true

a new thread is created to run the main Java thread. In applications that make heavy use of ASTs, this allows ASTs to use a CPU without starving the main Java thread.

Without JAVA$DAEMONIZE_MAIN_THREAD defined, the main Java thread shares a CPU with ASTs. With JAVA$DAEMONIZE_MAIN_THREAD defined, the main Java thread is an empty thread allowing it to handle only ASTs. The real main Java thread is moved to another thread. On a multi-CPU system, the main Java thread could be running on a new thread and the ASTs could be running on the initial thread.

Fifth Technique: Using JAVA$READDIR_CASE_DISABLE

This logical name allows the user to turn off the case-sensitive filename extraction feature (ODS-2 “auto case” correction for “readdir” entries) if it is not needed:

$ define JAVA$READDIR_CASE_DISABLE true

If you use the Java method File.list() and JAVA$READDIR_CASE_DISABLE is not defined (by default it is not defined), the RTE will ensure that all directory lookups for .java or .class filename entries will have the correct case. For example, if the properly cased filename is “Foobar.class,” on an ODS-2 disk structure, the filename will be stored as “FOOBAR.CLASS”. By default, the RTE will ensure the internal view of the filename is “Foobar.class”. If you can restrict all your files to an ODS-5 disk structure and ensure the filenames are created/named with the correct case, defining JAVA$READDIR_CASE_DISABLE will increase the performance of scanning directories that contain “*.java” and “*.class” filenames.

Sixth Technique: Using JAVA$TIMED_READ_USE_QIO

Some Web applications spend considerable time using Socket Streams with timeout values. Because of this, the virtual machine makes use of C Runtime Library's select() function in a multi-thread nature. If the logical JAVA$TIMED_READ_USE_QIO is enabled, the virtual machine will use QIO(s) and AST(s) to implement the same functionality as select(). The major result has been a reduction of overall kernel mode CPU usage, giving the application more available user mode CPU power.

If you are running TCP/IP Services for OpenVMS, you can use the command tcpip show comm/mem to determine if your application might benefit from using this logical.

Capture a baseline for the number TCPIP Timer and Select structures before starting the application.

$ tcpip show comm/mem
...

    8 mbufs allocated to OpenVMS TCPIP Timer structure
    3 mbufs allocated to OpenVMS LAN VCI VCIB structure
    1 mbufs allocated to OpenVMS LAN MCAST_REQ structure
    2 mbufs allocated to OpenVMS SELECT structure

...

Continue to monitor these values as the application is stressed.

$ tcpip show comm/mem
...

    30 mbufs allocated to OpenVMS TCPIP Timer structure
    3 mbufs allocated to OpenVMS LAN VCI VCIB structure
    1 mbufs allocated to OpenVMS LAN MCAST_REQ structure
    24 mbufs allocated to OpenVMS SELECT structure

...

If the mbuf "Select" structure count is double digits, your application could benefit from this logical.

You can monitor the overall system performance improvement. The system will use less Kernel and Executive Mode CPU.

Before:
$ monitor system/all

                               SYSTEM STATISTICS
                                 on node SECURE
                            12-MAY-2003 15:22:19.28

                                       CUR        AVE        MIN        MAX

    Interrupt State                  16.33      15.80      14.83      16.33
    MP Synchronization                5.33       5.19       4.16       5.66
    Kernel Mode                      80.83      80.73      77.66      84.66
    Executive Mode                   20.50      20.16      18.83      20.66
    Supervisor Mode                   0.00       0.00       0.00       0.00
    User Mode                        94.16      95.03      90.83      99.00
    Compatibility Mode                0.00       0.00       0.00       0.00
    Idle Time                       183.16     183.03     175.50     191.83


After:

                             SYSTEM STATISTICS
                                 on node SECURE
                            12-MAY-2003 15:38:44.41

                                       CUR        AVE        MIN        MAX

    Interrupt State                  16.50      17.95      16.50      20.16
    MP Synchronization                4.00       4.25       4.00       4.83
    Kernel Mode                      32.83      35.87      32.83      41.33
    Executive Mode                    1.00       0.50       0.00       1.00
    Supervisor Mode                   0.00       0.00       0.00       0.00
    User Mode                        75.00      77.95      72.83      87.00
    Compatibility Mode                0.00       0.00       0.00       0.00
    Idle Time                       270.83     263.62     246.83     270.83

Note: The major benefit was a decrease in CPU usage. This test case also handled 33% more transactions than the "Before" test.

Back to top
Supporting VAXC$PATH

Before SDK v 1.3.1-2, if you did not specify a classpath directory path, RTE would search only in the default directory. Beginning with SDK v 1.3.1-2, you can use VAXC$PATH as an OpenVMS search path for locating .EXEs or .COMs files outside the default directory. For example,


$ define VAXC$PATH GNU:[bin],[],sys$common:[java$131.bin] ! open source GNU files

br = new BufferedReader(new InputStreamReader(
rt.exec("chmod").getInputStream()));

The above will now search the three directories defined in VAXC$PATH for chmod., chmod.exe, or chmod.com. Also,

br = new BufferedReader(new InputStreamReader(
rt.exec("javac").getInputStream()));

The above will search for javac., javac.exe, or javac.com.

Enabling Correct Operation of File (fname) When fname is a Logical or a Disk Name

NOTE: This is an incompatible change to behavior in SDK v 1.3.1-1.

SDK v 1.3.1-1 fixed a problem that occurred when you tried to open a file using rooted logicals such as:

File f = new File ("/sys$sysroot");

A problem would occur if you attempted to get a directory listing of rooted logicals, (e.g., sys$sysroot) or of disk names (e.g., "/sys$sysdevice" or "/node$dka200"). With the current C RTL the RTE must internally add a "/000000" to these names to make this directory listing operation work correctly.

This workaround created problems with nonrooted logicals like "/sys$errorlog". HP expects that newer C RTLs will handle these special cases internally and the RTE will no longer need to use this workaround. Anticipating this transition, we have removed the automatic addition of "/000000" as the default behavior. If you still need this capability in your application with the current C RTL you must explicitly request it by defining a logical:

$ define/job JAVA$ENABLE_ROOT_WITH_000000 TRUE

Printing on OpenVMS

Printing has been enabled on OpenVMS. The classes PSPrinterJob and PSPrintControl will create input dialogs. You may enter your printer queue name in the Printer text input field. Please see Sun's documentation for examples of using these classes.

Changing the Working Directory Within Runtime.exec()

Under SDK v 1.3.1-3 or earlier, when an application used the change directory feature of Runtime.exec(), the Java Virtual Machine would throw a "function not implemented" exception:

java.io.IOException: function not implemented

This would protect the Java application from changing its own current working directory. While we are waiting for a C RTL enhancement, if JAVA$FORK_SUPPORT_CHDIR is defined, as in:

$ define/job JAVA$FORK_SUPPORT_CHDIR TRUE

The RTE will do the following (where CWD is the current working directory):

  1. Save CWD.
  2. Switch to new CWD.
  3. vfork()
  4. execv*()
  5. Restore saved CWD.

Note: Between steps 2 and 5 another thread could attempt to open a relative filename (e.g., foobar.dat). If this happens you might see random errors reporting files not found.

Back to top
Font Support

The SDK release includes the following font support.

Role of the font.properties File

Starting with J2SDK v 1.2.1, Java applications require a font property file to properly display the application's AWT windowing and Java2D components. This file contains mappings of Java logical font names to physical fonts on the X server and is installed by this kit in SYS$COMMON:[JAVA$131.JRE.LIB]FONT.PROPERTIES. It identifies fonts that should be available on your X server. This version is different from previous versions of the Java Development Kit (JDK) 1.1.n, where a font property file was not required. Instead of using Java default fonts, which were resolved at run-time by the X server to physical fonts on the display side, the font.properties file provides a mapping of the Java logical font names to fonts on the system. This allows for greater consistency across Java applications using the same J2SDK. Therefore, you might notice some differences in your window displays because of the fonts now being used. You might also see a noticeable difference in the size of the text displayed when using the J2SDK compared with using JDK 1.1.n; text will now be displayed larger. This is because JDK 1.1.n as implemented by Sun for Solaris incorrectly implements font point sizes, causing text to appear smaller on the screen. This was fixed in J2SDK v 1.2.1 and the correct point sizes for fonts are now used. If your GUI display does not appear as expected, you may need to make some adjustments in your application for a component's size and placement.

If you prefer to use fonts other than those that have been predefined by the property file for your use, copy the file installed by this kit from [.JRE.LIB]FONT.PROPERTIES to your SYS$LOGIN directory and modify it. When you run a Java application, it will use your local font property file instead of the one installed by this kit.

Multiple font.properties Files Provided

It is difficult to supply a font.properties file that is ideal for use in all environments -- to enable the use of many fonts in environments that have them, yet work properly in font-poor environments.

As a result, this kit contains two font.properties files:

  • font.properties

    This default font.properties file is optimized for use if you plan on displaying your application only to OpenVMS and Tru64 UNIX workstations.

  • font_properties.excursion

    This alternate font.properties file is optimized for use if you plan on displaying your application only to PCs running the DIGITAL eXcursion™ window manager. It takes advantage of the rich font environment.

Both of these files reside in [.JRE.LIB], and the one actually named font.properties is the one that will be used. This file is a system-wide file and is used for the display of all Java programs that are run on that system. The SDK supports local customizations of the font property file which can take affect on a user or system-wide basis. When the RTE needs to find a font.properties file, it starts its search in SYS$LOGIN. A local version of the font.properties file takes precedence over a system-wide version. Therefore, you can make either of these two files your user local font.properties by copying the font property file of your choice to a file named font.properties in SYS$LOGIN.

If you prefer to use fonts other than those that have been predefined by the font properties file for your use, copy the file installed by this kit from [.JRE.LIB]FONT.PROPERTIES to your SYS$LOGIN directory and modify it. When you run a Java application, it will use your local font property file instead of the one installed by this kit. The following example makes the eXcursion version of the file the one that is used, on a user-local basis only.

$ COPY SYS$COMMON:[JAVA$131.JRE.LIB]font_properties.excursion -
       SYS$LOGIN:font.properties

Alternatively, if you want to use the font_properties.excursion file as a system-wide file for use by all users on the system (thus overriding the system-wide default font.properties file), perform the following steps:

$ COPY SYS$COMMON:[JAVA$131.JRE.LIB]font.properties - 
SYS$COMMON:[JAVA$131.JRE.LIB]font_properties.orig
$ COPY SYS$COMMON:[JAVA$131.JRE.LIB]font_properties.excursion -
       SYS$COMMON:[JAVA$131.JRE.LIB]font.properties

If later you wish to revert to the original file that shipped with the SDK kit, you would copy font_properties.orig to font.properties.

Font Problems?

If you encounter one of the following warnings, you are probably referencing a font in your font.properties file that is not available on your system. Check your font path by issuing the OpenVMS command:$ mcr decw$utils:xset.exe -q. If your font path setting is not what you expect, you might need to change the search order. Also, make sure that the font property file references fonts that are installed on your system; you may be attempting to use a font that is not available.

  "Font specified in font.properties not found [-*-helvetica-bold-r-normal...]"

If you are having problems with fonts when you display remotely to a PC using eXcursion™, you might need to upgrade to a newer version of the eXcursion software and install additional fonts. Also, make sure that the font property file references fonts that are installed on your PC.

Back to top
Debugging Tools

You can define the following logical names to assist in debugging.

 

JAVA$PRINT_COMMAND_ARGS

$ define JAVA$PRINT_COMMAND_ARGS true

When defined, this prints out the parsed argument list before the RTE sees it and tabulates the argument list before the RTE can add default parameters like "-Djava.class.path=."

For example:

$ type x.x
-Xms64m

$ java "-V" x.x decus wait_time

will produce as output:

0: sys$common:[java$131.bin]java$java.exe
1: -Xms64m
2: decus
3: wait_time

_JAVA_LAUNCHER_DEBUG

$ define _JAVA_LAUNCHER_DEBUG 1

This will show the arguments in effect at the time the Java Virtual Machine starts up.

$ java -mx32m TestArgs “< = 1” 2 3
  ----_JAVA_LAUNCHER_DEBUG----
  JRE path is /JSTABLE/build/OpenVMS-alpha
  jvm.cfg[0] = ->-classic<-
  1 micro seconds to parse jvm.cfg
  Does ‘java$jvm_shr’ exist ... yes.
  JVM path is java$jvm_shr
  JavaVM args:
        version 0x00010002, ignoreUnrecognized is JNI_FALSE, nOptions is 2
        option[ 0] = ‘-Djava.class.path=.’
        option[ 1] = ‘-Xmx32m’
  1 micro seconds to InitializeJVM
  Main-Class is ‘TestArgs’
  Apps’ argc is 3
        argv[ 0] = ‘< = 1’
        argv[ 1] = ‘2’
        argv[ 2] = ‘3’
  1 micro seconds to load main class
  ----_JAVA_LAUNCHER_DEBUG----
  $

JAVA$EXEC_TRACE

$ define/job JAVA$EXEC_TRACE true

You can use the logical name JAVA$EXEC_TRACE to help debug Runtime.exec() calls on OpenVMS. When this logical is defined, a printout displays the C Runtime Library exec variant and its list of arguments.

JAVA$ENABLE_SIGQUIT_CTRLC

$ define JAVA$ENABLE_SIGQUIT_CTRLC true

This replaces the ^] feature in UNIX.

When defined, a CRTL-C handler will be established that will raise the SIGQUIT signal. Then, if you type ^C, the RTE dumps out all the Java thread information.

This logical will only work for terminal devices, when the RTE is running interactively from a terminal process. See JAVA$ENABLE_SIGQUIT_MAILBOX for information on how to communicate with batch jobs or detached jobs.

JAVA$ENABLE_SIGQUIT_MAILBOX

$ define JAVA$ENABLE_SIGQUIT_MAILBOX true

Use this logical to force a Java application to dump threads, if no terminal is involved, e.g., a batch job or a detached job. Use it to dump out where the subprocess is stuck. This mimics UNIX sending a SIGQUIT to a Java process. When this logical is defined, the RTE creates a temporary mailbox you can ping from another process, allowing you to ping stuck batch jobs.

To use this, perform the following steps:

Before starting the Java application, define the following logical:

$ define JAVA$ENABLE_SIGQUIT_MAILBOX true

This creates a logical with a mailbox name. After starting your Java application, scan the job logicals tables to determine the correct mailbox. Run the following command from another terminal:

$ pipe show log/table=* *signal* | search sys$input: signal

Sample output:

"JAVA$SIGNAL_MAILBOX_20200234" = "MBA90:"

For the process pid 20200234 you have a mailbox MBA90:

Issue the following command, substituting your mailbox name for MBA90:

$ copy tt: MBA90:

You will not see any output, but whenever you press RETURN, the subprocess will print a thread dump.

When done, type ^Y to exit the COPY command.

JAVA$FSYNC_INTERVAL

RMS buffers are not usually flushed to disk until the buffer is full or the program exits. If you want to view the contents of the file before the buffer is full (e.g., monitoring a logfile for output), the JAVA$FSYNC_INTERVAL logical allows you to define an interval after which all pending output is flushed to the disk with the command:

$ define/job JAVA$FSYNC_INTERVAL <number_of_seconds>

For example,

$ define/job JAVA$FSYNC_INTERVAL 60 ! flush any pending output to disk every 60 seconds.

Note: Defining the logical to a very low value could cause performance degradation.

Back to top
Troubleshooting

The following scenarios suggest resolutions to problems you might encounter on OpenVMS Alpha systems when using the RTE.

 

One-to-One Relationship Between Class Names and File Names

Problem:

You wrote a Java program in a file called SERTEST.JAVA. The public class definition starts off with:

    public class SerTest {
    ... 

You've tried to compile it with the following:

   $ javac SERTEST.JAVA 

and also with:

   $ javac sertest.java 

In both cases the compilation fails with the error message:

    sertest.java:7: 
    Public class SerTest must be defined in a 
        file called "SerTest.java".
    public class SerTest {
                 ^
    1 error

What's wrong?

The Java runtime environment insists in a one-to-one relationship between class names and file names. You must express the file name in the same case-sensitive manner as your public class declaration, namely "SerTest.java".

So, in this example, you need to type the command as:

   $ javac "SerTest.java" 

If the file name is not in quotation marks, DCL automatically uppercases the string. So by the time javac sees it, the file name is SERTEST.JAVA, which does not match the class name.

 

Java Source Files on OpenVMS Systems Must be in Stream_LF Record Format

Problem:

You copied some Java source files from another computer and/or have created some new .java files from scratch. Some files compile just fine on your OpenVMS Alpha system. But if an error occurs, the error message tells you what the error is but the indicator "^" showing where the error occurs on the line, does not point to anything.

What's wrong?

Java source files on OpenVMS systems must be in Stream_LF record format, although other record formats will work if the compilation is error-free. However, if an error occurs, the program cannot show you where it is on the line. To do this, the file must be in Stream_LF record format. Enter the command:

   $ DIR/FULL mysource.java

Then note the line that starts with the string:

   Record format:

If the Record Format is not shown as Stream_LF, you must convert it to Stream_LF. Text files can be converted to Stream_LF format with the following command:

   $ CONVERT/FDL=STREAM_LF.FDL input_file.JAVA output_file.JAVA

An example of a valid STREAM_LF.FDL is shipped on the kit and can be found in:

   SYS$COMMON:[JAVA$131.COM]STREAM_LF.FDL

Problem:

You copied a .ZIP file from another computer and added a reference to this .ZIP file to your CLASSPATH. You still get error messages indicating that the system is not seeing the classes defined in your new .ZIP file.

What's wrong?

Make sure that the new .ZIP file is in Stream LF format. Enter the following command:

   $ DIR/FULL MY.ZIP

Note the line that starts with the string:

   Record format:

If the Record Format is not shown as Stream_LF, you must convert it to Stream_LF. Binary files like .ZIP files can be converted to Stream_LF format with the following command:

   $ SET FILE MY.ZIP /ATTR=(RFM:STMLF,RAT:CR) 

For more details, see Stream_LF File Format Required.

 

ECOs Must be Installed

Problem:

You get error messages like the following:

   %IMGACT-F-SYMVECMIS, shareable image's symbol vector table mismatch
   -IMGACT-F-FIXUPERR, error when JAVA$JAVA_SHR referenced DECC$SHR

What's wrong?

The SDK for OpenVMS Alpha has been linked against a specific set of OpenVMS shareable images assumed to be on the user's system at runtime. These images contain enhanced functionality required by the RTE. This specific set of images is packaged into one or more ECOs (Engineering Change Orders). These ECOs are specified on the product page from which you obtained the pointers for the SDK. You must download and install these ECOs for the RTE to operate correctly.

For a list of ECOs required for your version of OpenVMS Alpha, see Prerequisites.

 

Redirecting Your Display to a VAXstation

Problem

Your Java application displays its output to an AlphaStation without a problem. But when you try to redirect the display to a VAXstation, you get no window at all, or you see DECWindows error messages like the following:

   X error event received from server: 
   BadValue (integer parameter out of range for operation)

What's wrong?

You need to add the following line:

   $DEFINE/TABLE=DECW$SERVER0_TABLE DECW$CARD16_VALIDATE TRUE

to the following file controlling your VAXStation:

   SYS$MANAGER:DECW$PRIVATE_SERVER_SETUP.COM

Then restart DECWindows.

For more details, see Problem displaying to a VAXstation.

 

Resolving Problems with JAVADOC-Generated Files

Problem

The javadoc tool produces .html files that contain references to files that have been given different names.

What's wrong?

javadoc attempts to create .html files for each module in the system being documented. These files are given a name that matches its packaging hierarchy. Therefore, a package named alpha.beta.gamma will go into a file named alpha.beta.gamma.html.

In the course of writing this file, the filename mapping algorithms enabled by JAVA$FILENAME_CONTROLS are applied, and in the default case (JAVA$FILENAME_CONTROLS = -1), the file is automatically written to a file named alpha_beta_gamma.html so that it can be represented on an OpenVMS Alpha file system.

However, references to this file, both within the file itself and in other .html files produced by javadoc, still refer to it by its alpha.beta.gamma.html name.

A utility program to solve this problem can be downloaded from the Frequently Asked Questions area of our web site. The utility searches through directory trees of .html files and rewrites these files so that their internal references match the names that the files were actually given.

For example, if a file contains the following reference:

   <img src="javautil.doc.anc2.gif">

That reference is rewritten as:

   <img src="javautil_doc_anc2.gif">

Similarly, an anchor reference like the following:

   <a href="8.doc.html#40898">

Is rewritten as:

   <a href="8_doc.html#40898">

To use this utility:

  1. Download the self-extracting executable file PARSE_ANCHOR_IMAGE.BCK_DCX_AXPEXE (85,491 bytes).

  2. Execute PARSE_ANCHOR_IMAGE.BCK_DCX_AXPEXE:
       $ RUN PARSE_ANCHOR_IMAGE.BCK_DCX_AXPEXE
    

    This unpacks itself into a save set called PARSE_ANCHOR_IMAGE.BCK;1.

  3. Unpack this save set:
       $ BACKUP PARSE_ANCHOR_IMAGE.BCK/SAVE *.*
    

    This gives you the following individual files:

       README.HTML (This note)
       REWRITE_HTML_TREE.COM
       PARSE_ANCHOR_IMAGE.EXE
    

  4. Edit the two places marked in REWRITE_HTML_TREE.COM. The first edit controls what set of files to process. The second edit simply creates a foreign command pointing to wherever you put PARSE_ANCHOR_IMAGE.EXE.

  5. Execute REWRITE_HTML_TREE.COM.

  6. Use $ DIFFERENCES to check the rewrites done.

  7. You may want to PURGE your directory tree of .html files because you now have two copies of many of these files.


Back to top

Documentation and Other Information

Documentation

The SDK v 1.3.1 documentation tree begins at the following location on the system where the SDK is installed:

    SYS$COMMON:[JAVA$131.DOCS]INDEX.HTML 

The installed documentation is in HTML format and includes this release notes file and additional documentation.

Note: The documentation in the above directory does not include the API reference documentation. If you want to use the API reference documentation locally, download the separate API documentation file (DEC-AXPVMS-JAVAAPIDOC131-V0103-11-1.PCSI_SFX_AXPEXE), and install it as described in the Installing the API Reference Documentation section.

You can also browse the SDK documentation we provide with our kit on our web site.

There is also a Java entry in the OpenVMS Help facility that describes the Java command and points to the installed documentation. The Java Help file ships with the operating system and describes the version of the SDK that was shipped with the operating system; the Help file is not updated by this kit.

More Information

For more information on this release, refer to the Release Notes for the J2SDK v 1.3.1 software from Sun Microsystems, and to the Frequently Asked Questions (FAQ) web page.

If you are new to the Java programming language, you can browse or download the Java Tutorial on Sun's site.

 

Back to top
Problem Reporting

To report problems, refer to the Support web page.

© 2001, 2004 Hewlett-Packard Development Company, L.P.

Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.

Hewlett-Packard shall not be liable for technical or editorial errors or omissions contained herein. The information in this document is subject to change without notice.

INFORMATION PROVIDED HEREWITH IS PROVIDED “AS IS” “WHERE IS” WITHOUT ANY WARRANTY WHATSOEVER. THE ENTIRE RISK ASSOCIATED WITH THE USE OF MATERIALS RESIDES WITH LICENSEE. ALL OTHER WARRANTIES, EITHER EXPRESS OR IMPLIED, ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY, ACCURACY, CONDITION, OWNERSHIP, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY RIGHTS.

Privacy statement Using this site means you accept its terms Feedback to Java on Alpha
© 2004 Hewlett-Packard Development Company, L.P.