Release Notes for the JDK 1.1.6 OpenVMS Systems Final Kit

These release notes describe the final release of the Java Development Kit (JDK) Version 1.1.6 for OpenVMS Alpha. This JDK Version 1.1.6 is an update of the July 13th JDK 1.1.6 beta2 release and represents the Final JDK Version 1.1.6 for OpenVMS Alpha. This kit can be used to develop and run Java applets and programs on OpenVMS for Alpha Versions 7.1 and higher.

Prerequisites
One Product, Two Faces
Jit Compiler Usage
UNIX Style Filenames on OpenVMS Systems
Stream_LF File Format Required
Setting JAVA$CLASSPATH
Command Qualifiers
Java Commands on OpenVMS Systems
Running a Java Multimedia Applet
Fixed Problems and Other Changes
Known Issues

Prerequisites

Prerequisites for installing this kit include:

The above list of ECOs was current when this release note was written. Because the status of ECOs changes frequently as new versions supersede previous versions, we recommend that you query the ECO cited above, and install the latest version shown by your query. To verify that you have the correct file, refer to the ECO Note found on the page of the ECO you queried. Generally, this Note lists any ECO kits superseded by the most current kit.

This kit includes all the functionality and bug fixes that are in Sun Microsystems JDK 1.1.6.

If you identify any problems, please use the accompanying problem-report template (bugreport.txt) to send a bug report to java-bugs@zko.dec.com, specifying the following information:

Send comments or suggestions on the JDK to java-info@zko.dec.com.

One Product, Two Faces

In addition to preserving the UNIX style JDK command-line interface, this JDK product also lets you use it as if it were a traditional OpenVMS product.

This dual interface is achieved with the following file installed during the product installation:

        SYS$MANAGER:JAVA$SETUP.COM

To use a DCL interface:

      $ DEFINE JAVA$USE_DCL 1
      $ @SYS$MANAGER:JAVA$SETUP

To use a UNIX style command-line interface:

      $ DEASSIGN JAVA$USE_DCL
      $ @SYS$MANAGER:JAVA$SETUP

These commands could be added to SYS$MANAGER:SYLOGIN.COM or entered into your local or project-wide login.com file.

See the section 'Setting JAVA$CLASSPATH' in these release notes for details about the behavior if both CLASSPATH and JAVA$CLASSPATH are defined.

JIT Compiler Usage

This release of the JDK contains a Just-in-Time (JIT) compiler to substantially increase run-time performance. The JIT compiler provides on-the-fly compilation of your application's Java byte-codes and runtime calls into native Alpha machine code. This results in significantly faster execution of your Java application compared with running it using the Java interpreter, while maintaining the same behavior.

Whether jit compiler will or will not be used is controlled by the -jit switch:

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.

Java on OpenVMS Alpha systems can use 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$SYSROOT:[SYSHLP.JAVA]JAVA$FILENAME_CONTROLS.COM

This file is called by SYS$MANAGER:JAVA$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                        %x40000000

To see individual filename mappings as they occur, you can 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.

Useful Debugging Tips

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

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

Detailed Description of Mapping Options

Support UNIX and VMS filename

Use this to map a mix of UNIX and VMS 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. DECC 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:  JDKDOC_1.1.6
         maps into:    JDKDOC_1_1.6

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:  JDKDOC_1.1.6
         maps into:    JDKDOC_1.1_6

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.

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 mapping exist?
        JAVA$DIRECTORY_MAPPING_nn        : Directory mapping value

        where nn is an integer from 01 to 99.

For example, the following filename previous failed with JDK V1.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 following filename would actually be created as /test7_relevel/test8/test9/test10/foo.bar:

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

Note: Define the JAVA$DIRECTORY_MAPPING_nn logical only from the first character on. It will not match directories in the middle of the filename. Note the limit of 99 remappings.

Stream_LF File Format Required (PTR# 80-4-6)

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.

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.

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

$ CONVERT/FDL=SYS$COMMON:[SYSHLP.JAVA]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

Setting JAVA$CLASSPATH

The JAVA$CLASSPATH logical lets you define a classpath using OpenVMS filespecs.

Defining this logical overrides the CLASSPATH logical, if set.

The following two sample statements accomplish the same result:

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

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

Note that:

Command Qualifiers

You can specify the options on java commands as either OpenVMS DCL style qualifiers or DIGITAL UNIX style switches.

Notes on the /PARAMETER qualifier

In the current implementation of the /PARAMETER qualfier, the operand of the qualfier is used internally like a -J switch.

Therefore, if you write the following:

    $ javac /PARAMETER="-mx16m" "sanitytest.java"

Internally, java is invoked as if you had written:

    $ javac -mx16m  "sun.tools.javac.Main" "sanitytest.java"

However, if you need to pass multiple arguments using the /PARAMETER qualfier, you can write:

 
    /PARAMETER=("-mx16m","-ms16m") "sanitytest.java"

This is treated internally as :

javac -mx16m -ms16m sun.tools.javac.Main "sanitytest.java" 

In general, (though there may be exceptions) wherever the UNIX-style command line takes a space-separated list, the DCL-style interface takes a comma-separated list.

An example involving a set of arguments:

To run a program called Test and pass it arguments 27, 28 and 29:

    $ JAVA "Test" 27 28 29

   becomes

    $ JAVA "Test",27,28,29

Similarly,

    $ JAR -cf0 multiple.jar "SanityTest.java" "ShowDate.java"

     becomes
 
    $ JAR /NEW /NOCOMPRESS /JAR=multiple.jar "SanityTest.java","ShowDate.java"

And for a set of repeated switches:

     $ javac -J-mx32m -J-ms32m -deprecated "SanityTest.java"

     becomes

     $ javac /PARAM=("-mx32m","-ms32m") /DEPRECATED "SanityTest.java"

Java Commands on OpenVMS Systems

java           [basic runtime-interpreter]

javac          [Compiler]

appletviewer   [Appletviewer]

javap          [Class file disassembler]

javah          [Header and Stub file Generator]

javadoc        [Documentation Generator]

jar            [Java Archiver]

serialver      [The Serial Version Command]

native2ascii   [Native-to-ASCII Converter]

jdb            [java debugger]

rmic           [Stub and skeleton class file generator for Java
                objects implementing the java.rmi.Remote interface.]

rmiregistry    [Remote object registry ]

javakey        [Java Key Management and Digital Signatures]

Running a Java Multimedia Applet

In order to successfully use an application that uses audio, four things must be in place:

  1. You must have an audio device.
  2. MultiMedia Server must be running.
  3. You must have the logical JAVA$ENABLE_MMEDIA defined.
  4. Your process must have SYSNAM privileges.

These are things to check and error messages you might see when running a Java multimedia applet on an OpenVMS Alpha system: