Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
HP.com home
Home  |  FAQ Index

OpenVMS Alpha FAQ

HP software

for the Java™ Platform

» 

Java on Alpha

Site information

» Products
» Downloads
» Solutions
» Documentation
» FAQs
» Support

Performance and related products

» Fast VM paper

Promotions

» Test Drive
» DSPP Partner Edge

Related links

» Software
» Java on HP-UX 11i
» Java on NonStop
» Visual Threads
» Systems
» HP Alpha
» HP OpenVMS
» HP-UX 11i
» NonStop
 
 
 
Content starts here

Contents

1.0 General software release information

  1. Will Java™ applications run on OpenVMS VAX?

2.0 Downloading and installing the SDK & documentation

  1. Do I need to install any patches in order to run the SDK?
  2. Can I use MultiNet instead of TCP/IP Services for OpenVMS Alpha (UCX)?
  3. Where can I find documentation for the SDK?
  4. Would you explain your version naming convention for the SDK?

3.0 Using the SDK & error messages

  1. I've written a Java program that is in a file called SERTEST.JAVA and attempted to compile it two ways. Both Failed. What am I doing wrong?
  2. I've copied some Java source files with some errors. What's wrong?
  3. I've copied a .ZIP file from another computer and got some error messages. What can I do to prevent this?
  4. I am seeing error messages regarding 'shareable image's symbol vector table mismatch'. What is the problem?
  5. I get DECwindows error messages when trying to redirect my Java application's output to a VAXstation. What do I need to do?
  6. Can I use HPjmeter on OpenVMS? Or are there any tools to measure, view, and improve Java performance on OpenVMS?

4.0 Interfacing with non-Java code

  1. (a) Do you have any additional documentation that explains step by step what I need to do to write some native C programs to interact with Java code?
    (b) How do I handle procedure names over 31 characters?
    (c) How do I call OpenVMS System Services from Java code?
    (d) How do I invoke Java methods from C code?

5.0 Third party applications, Java tools & other utilities

  1. Will the JavaBeansTM Development Kit (BDK) run on the OpenVMS Alpha implementation of the SDK, and if so, how do I install it?
  2. Where can I find a JDBC driver if my application requires database access?
  3. Does Java Web Start run on the SDK for OpenVMS?

1.0 General software release information

Q1.1: Will Java applications run on OpenVMS VAX?

A: No. You can run Java applications on any operating system platform that implements the Java Virtual Machine. The Virtual Machine is included in both the Software Development Kit (SDK) for OpenVMS Alpha from HP and in the Netscape Navigator for OpenVMS Alpha. However, the Virtual Machine won't be available on OpenVMS VAX. Why? The Virtual Machine requires an implementation of the IEEE math standard within the operating system. This IEEE standard is not part of the OpenVMS VAX architecture. In our attempts to emulate this IEEE standard on OpenVMS VAX, we encountered architectural restrictions that hindered our ability to deliver a conformant Virtual Machine implementation required by Sun. Further attempts to work around these architectural restrictions on OpenVMS VAX resulted in Java applications running with unacceptable performance.

wpe2.jpg (2132 bytes)

2.0 Downloading and installing the SDK & documentation

Q2.1: Do I need to install any patches in order to run the SDK?

A: Yes. In order to successfully install and run the SDK for OpenVMS Alpha, mandatory prerequisite ECOs (patches) must be installed. Do not attempt to run the SDK kit without these patches. For more information, refer to release product page.

wpe2.jpg (2132 bytes)

Q2.2: Can I use MultiNet instead of TCP/IP Services for OpenVMS Alpha (UCX)?

A: Currently, we are not planning to support MultiNet directly. All of our testing and certification is done using TCP/IP Services for OpenVMS Alpha (UCX). However, since we do not call UCX directly and only use the socket functions available from HP C, it is possible that MultiNet will work with this SDK.

wpe2.jpg (2132 bytes)

Q2.3: Where can I find documentation?

A: The SDK documentation is installed on your system at the following location:

Version 1.1.8     SYS$COMMON:[SYSHLP.JAVA]INDEX.HTML
Version 1.2.2 and higher SYS$COMMON:[JAVA$1XX.DOCS]INDEX.HTML
(where 1xx=122, 130, 131...)

Documentation is also on-line and available from our software documentation page.

For information on how to optimize performance of the SDK for OpenVMS, see Optimizing Java™ technology software performance on OpenVMS - Tips and Trick for Users.

wpe2.jpg (2132 bytes)

Q2.4: Would you explain your version naming convention for the SDK? An example is that when typing the command, java -version, the SDK v 1.4.2-7 version displays as follows:

java version "1.4.2-7"

A: The number following the hyphen indicates an Update release - in this case number "7". It does NOT indicate that this is a beta release. Beta releases are indicated by including the word "beta" as part of the version name; for example, "1.4.2-beta". This version naming convention (hyphen#) is necessary because we have had to re-release kits to fix Sun's or other problems. This numbering scheme makes it much easier to determine exactly which kit you are using.

Also note that an 'Update' release contains the full SDK release based on Sun's Java Development Kit (J2SDK) along with the latest features and bug fixes.

wpe2.jpg (2132 bytes)

3.0 Using the SDK on OpenVMS Alpha & Error Messages

Q3.1: What am I doing wrong?  I've written a Java program that is in a file called SERTEST.JAVA. My public class definition starts off with:

public class SerTest {
...

I've tried to compile it with:

$ javac SERTEST.JAVA

and 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

A: The Java runtime environment insists on 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".

In the the example above you need to type the command as:

$ javac "SerTest.java"

If you don't quote the file name, DCL will automatically upcase the string, and by the time javac sees it, the file name will be SERTEST.JAVA which doesn't match the classname.

wpe2.jpg (2132 bytes)

Q3.2:  I've copied some Java source files from another computer and/or have created some new .java files from scratch. Some files compile just fine on OpenVMS. But if an error occurs it tells me what the error is but the indicator "^" showing where the error occurs on the line, does not point to anything. What's wrong?

A: Java source files on OpenVMS should be in Stream_LF record format. Other record formats will, in fact, work if the compilation is error-free. However, if an error occurs, the program cannot show you where it is on the line. In order to do this, the file must be in Stream_LF record format. Do a:

$ DIR/FULL mysource.java

and note the line that starts with the string:

Record format:

If it does not indicate that the Record Format is "Stream_LF" you will have to convert it so that it is Stream_LF.

Text files can be converted to Stream_LF format by doing:

$ 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:[SYSHLP.JAVA]STREAM_LF.FDL

See the technical documentation for more details.

wpe2.jpg (2132 bytes)

Q3.3: I've copied a .ZIP file from another computer and I've added a reference to this .ZIP file to my CLASSPATH. I still get error messages indicating the system is not seeing the classes define in my new .ZIP file. What can I do to prevent this?

A: Make sure that this new .ZIP file is in Stream LF format. Do a:

$ DIR/FULL MY.ZIP

and note the line that starts with the string:

Record format:

If it does not indicate that the Record Format is "Stream_LF" you will have to convert it so that it is Stream_LF.

Binary files like .ZIP files can be converted by doing:

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

See the technical documentation for more details.

wpe2.jpg (2132 bytes)

Q3.4: What is the problem? I am seeing error messages such as:

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

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

wpe2.jpg (2132 bytes)

Q3.5: What do I need to do? My Java application displays its output to an Alphastation with no problems. But when I try to redirect the display to a VAXstation, I get no window at all or DECwindows error messages like the following:

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

A: You will need to add a line that says:

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

to the file:

SYS$MANAGER:DECW$PRIVATE_SERVER_SETUP.COM

for the DECW$PRIVATE_SERVER_SETUP.COM controlling your VAXstation and restart DECwindows.

See the technical documentation for further details.

wpe2.jpg (2132 bytes)

Q3.6: Can I use HPjmeter on OpenVMS? Or are there any tools to measure, view, and improve Java performance on OpenVMS?

A: Yes, the ClassicVM offers the profiling option supported by Hpjmeter.

http://www.hp.com/products1/unix/java/hpjmeter/

What does Hpjmeter offer?

HPjmeter features include:

  • CPU Time - Inclusive or Exclusive; List or Call Tree; Process or Thread
  • Clock Time - Inclusive or Exclusive; List or Call Tree; Process or Thread
  • Call Count - List, or Call Tree; Process or Thread
  • Object Creation - Location in code where created
  • Heap Analysis - Live and Residual Objects; Heuristic memory leak detection
  • Monitor Contention - List or Call Tree; Process or Thread
  • Thread-based Metrics - Histogram color-coded: CPU, I/O, GC, Lock-wait, ... Program Heuristics.

Quickly identify performance bottlenecks in your Java application:

  • Save readable performance information to a file.
  • Compare profile files - See impact of your changes on application performance.
  • Find relevant information - package, class or method.
  • Find methods with high monitor contention.

VMS specific example:

download hpjmeter.zip (in binary mode)

$ SET FILE/ATTR=(RFM:STMLF,RAT:CR) HPJMETER-1-6.ZIP
$ jar -xvf hpjmeter-1-6.zip

extracted: HPjmeter.jar
extracted: Java2Demo.eprof
extracted: HPjmeter.release.notes

Note: For long running application, make sure you include the "gc_okay=n" option.
This will keep the PC sample and Garbage collector threads from creating a deadlock condition.

Run your application:

$ java -Xrunhprof:gc_okay=n,cpu=samples,depth=6,thread=y yourapplication
$ java -jar HPjmeter.jar !

Then open java.hprof.txt from the file dialog.

Note: The FastVM does not support hprof, you should tune or debug your application using the ClassicVM.

wpe2.jpg (2132 bytes)

4.0 Interfacing with non-Java code

Q4.1a: Do you have any additional documentation that explains step by step what I need to do to write some native C programs to interact with Java code?

A: You're in luck! We have a few examples, each in the form of a set of files that contains sample Java and C code to show you the basics of how they interact. They also include some command procedures which will compile, link and execute the sample JNI-based application. See the answer to Q4.1b for more information on calling C code from Java code. Q4.1c demonstrates calling OpenVMS System Services from Java code. Q4.1d demonstrates calling Java methods from C.

Starting with Java 1.4.2, the VMS save sets discussed below are on the SDK kit itself and are installed in a directory called [.VMS_DEMO] below where the product itself was installed.

There is no longer a need to manually download them.

For example, the files from the Java 1.4.2 kit are typically at:

SYS$COMMON:[JAVA$142.VMS_DEMO]

INVOKE_JAVA_FROM_C_EXAMPLE.SAV;1
JNI_EXAMPLE.SAV;1
SYSTEM_SERVICE_INVOKE_DEMO.SAV;1

Q4.1b: How do I handle procedure names over 31 characters?

A: There are two ways you can shorten external names that are longer than 31 characters.

  1. Starting with our SDK v 1.1.8-5 and SDK v 1.2.2-1, you don’t need to take any special action as long as you compile your C and C++ code with the /NAMES=(AS_IS,SHORTENED) qualifier. The SHORTENED keyword for this qualifier instructs the compilers to shorten external names that are longer than 31 characters. The Java runtime system automatically shortens long names using the same algorithm. We recommend this method, as it simplifies the process of building native images, and it can make debugging easier too. The file JNI_EXAMPLE.COM, in the example saveset, demonstrates this method.

  2. If you are using an older version of the SDK than listed above, or you don’t wish to use the SHORTENED keyword on the /NAMES qualifier, then you can use the utility program contained in the JNI_EXAMPLE.BCK saveset. This utility will manually shorten the long names in your native code. The file JNI_EXAMPLE_31CHARS.COM demonstrates this method.

To obtain this set of files:

  1. Expand the save set:

    $ BACKUP -
    SYS$COMMON:[JAVA$142.VMS_DEMO]JNI_EXAMPLE.SAV/SAVE –
    […]*.*

  2. Read JNI_README.TXT for an overview of what files are in this package.

  3. Read and execute JNI_EXAMPLE.COM or JNI_EXAMPLE_31CHARS.COM to see how it all works.

Q4.1c: How do I call OpenVMS System Services from Java code?

A: We have packaged an example that demonstrates how to call OpenVMS System Services from Java code. It is a complete example that compiles and links everything it needs from the components on the demo kit file.

It creates two classes—LibGetJPI and LibGetSYI—which act as jacket routines that call Java Native Interface (JNI) C-based native code that actually accesses the GETJPI and GETSYI system services.

This example demonstrates a number of techniques:

  • Defining the needed item codes, etc. at the Java level. This is accomplished by creating *DEF*.java files which were hand-edited from their corresponding *DEF*.h files for these system services.
  • The use of packages to organize the overall positioning of these files within a larger application.
  • The approach of creating classes to represent these system services—thereby allowing seamless Java-based access to the results of these system service calls.
  • The creating of shareable libraries to allow the dynamic loading of these services as needed.
  • The use of SCAN_GLOBALS_FOR_OPTION.COM and JAVA$BUILD_OPTION.EXE to dynamically create the .OPT files needed for linking the shareable libraries.

To obtain and use the example:

  1. Expand the saveset:

    $ BACKUP -
    SYS$COMMON:[JAVA$142.VMS_DEMO]SYSTEM_SERVICE_INVOKE_DEMO.SAV/SAVE –
    […]*.*

  2. Go to the example directory created by BACKUP

    $ SET DEF [.SYSTEM_SERVICE_INVOKE_DEMO]

  3. Set up your Java environment, e.g.

    $ @SYS$MANAGER:JAVA$142_SETUP.COM

  4. Read/Execute the command procedure which builds the example from scratch and executes it.

    $ @BUILD_EXAMPLE.COM

Q4.1d: How do I invoke Java methods from C code?

A: We have packaged an example that demonstrates how to write an application that starts in C code and then calls Java methods.

The example program demonstrates:

  • Compiling and linking the example.
  • Starting application in C code.
  • Activating a Virtual Machine
  • Calling a Java method which, in turn, throws an exception. The sample code shows how to detect and process the Java exception.
  • Calling a Java method which, in turn, calls back to a native C routine—demonstrating how to establish callbacks in C code that are eventually called from the Java code.
  • The creating of shareable libraries to allow the dynamic loading of the C code as needed.
  • The use of SCAN_GLOBALS_FOR_OPTION.COM and JAVA$BUILD_OPTION.EXE to dynamically create the .OPT files needed for linking the shareable libraries.

To obtain and use the example:

  1. Expand the saveset:

    $ BACKUP -
    SYS$COMMON:[JAVA$142.VMS_DEMO]INVOKE_JAVA_FROM_C_EXAMPLE.SAV/SAVE –
    […]*.*

  2. Go to the example directory created by BACKUP

    $ SET DEF [.INVOKE_JAVA_FROM_C]

  3. Set up your Java environment, e.g.

    $ @SYS$MANAGER:JAVA$142_SETUP.COM

  4. Read/Execute the command procedure which builds the example from scratch and executes it.

    $ @JNIINVTEST.COM

wpe2.jpg (2132 bytes)

5.0 Third party applications, Java tools & other utilities

Q5.1: Will the JavaBeansTM Development Kit (BDK) run on the OpenVMS Alpha implementation of the SDK, and if so, how do I install it?

A: Yes, the Java BDK will run on the OpenVMS Alpha implementation of our SDK. There are two methods for installing the BDK, depending on the format of the disk (ODS-5 vs. ODS-2) to which you install the BDK.

with ODS-5, do the following:

  1. Make sure you have the latest version of the ZIP utility for OpenVMS which can be found at http://h71000.www7.hp.com/.

  2. Set JAVA$FILENAME_CONTROLS = -1. See the release notes for the SDK for details on JAVA$FILENAME_CONTROLS settings.

  3. Download the BDK from Sun. Currently, this can be found at http://java.sun.com/products/index.html.


  4. Unzip the file and you can begin using the BDK on OpenVMS.

with ODS-2, do the following:

  1. Set JAVA$FILENAME_CONTROLS = -1. See the release notes for the SDK for details on JAVA$FILENAME_CONTROLS settings.

  2. Download the BDK from Sun to a computer running UNIX or Windows. Currently, this can be found at http://java.sun.com/products/index.html.


  3. Extract the contents of the downloaded zip file and then repackage it using the jar utility. For example:
    UNIX> unzip bdkjul98.zip -d /bdk
    
    UNIX> jar cvf bdk.jar bdk/*
    
    Windows> unzip bdkjul98.zip -d \bdk
    
    Windows> jar -cvf bdk.jar bdk\*
  4. Move the jar file to your OpenVMS system and extract it in the area where you want your JavaBeans development kit to be located.

    NOTE: It is CRITICAL that you use the SDK's jar command and not some variant of unzip. There will be filenames and directory names in the jar file that are not directly representable on an OpenVMS Alpha system. When these are encountered, they must be remapped into a name that is acceptable. Each un-archiving tool applies its own rules about how to do this mapping. Only jar will apply the specific mapping rules that will subsequently be used by the rest of the Java system.

    $ jar xf bdk.jar

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

To test the JavaBeans development kit:

  1. Go to a directory containing a sample application:
    $ SET DEF [.bdk.beanbox]
  2. Set your classpath to include the files needed by the BDK. For example for SDK v 1.1.8:
    $ DEFINE CLASSPATH -
    "/your_class_directory/JDK118_CLASSES.ZIP:./classes:./infobus.jar:."
  3. Run the test application:
    $ java "sun.beanbox.BeanBoxFrame" - version
    BeanBox version: BDK1.0 - July 1998
    $ java "sun.beanbox.BeanBoxFrame"

wpe2.jpg (2132 bytes)

Q5.2: Where can I find a JDBC driver if my application requires database access?

A: A JDBC driver and several data source interfaces can be obtained from Attunity as part of their Attunity Connect product suite. For additional information, go to http://www.attunity.com/Products/AttunityConnect.Asp.

Oracle also provides JDBC drivers for Oracle Rdb and Oracle Database. For more information , see http://www.oracle.com/technology/products/rdb/htdocs/rdb_jdbc/rdb_jdbc_more_info.html or http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm#02_00 respectively.

wpe2.jpg (2132 bytes)

Q5.3: Does Java Web Start run on the SDK for OpenVMS?

A: No. Java Web Start is not supported on OpenVMS. Currently, there are no plans to support Java Web Start applications on the OpenVMS platform.

wpe2.jpg (2132 bytes)

Printable version Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc., in the U.S. and other countries.
Privacy statement Using this site means you accept its terms Feedback to Java on Alpha
© 2009 Hewlett-Packard Development Company, L.P.