Skip to main content

IBM Systems  >  System z  >  Software  >  

Differences in Java 2 Technology Edition for OS/390, SDK 1.3

 
This page contains information about the IBM Developer Kit for OS/390, Java 2 Technology Edition.  It will help you if you are currently using Java for OS/390 at the JDK 1.1 level and want to move to Java 2 Technology Edition for OS/390 at the SDK 1.3 level. It lists differences in behavior and shows what changes you need to make to run an existing application. If you are an application developer, it shows what changes you must make for your application to work with SDK 1.3.0.

The information here relates specifically to IBM's Java products for OS/390. For general information on changes in Java 2 see Sun's web pages Java 2 SDK 1.3 Summary of new features and Java 2 Platform Compatibility with Previous Releases.

Related information:

PATH setting

The PATH environment variable is set at installation to point to the JDK/SDK directory containing the java command.
PATH setting
JDK 1.1 SDK 1.3

PATH is set to <hlq>/J1.1/bin where <hlq> is the directory where the JDK is installed. The default value of <hlq> is /usr/lpp/java. For example:

export PATH=/usr/lpp
/java/J1.1
/bin:$PATH

PATH is set to <hlq>/J1.3/bin. The default value of <hlq> is /usr/lpp/java/IBM. For example:

export PATH=/usr/lpp
/java/IBM/J1.3
/bin:$PATH

Note: It is no longer necessary to add system classes (classes.zip JDK 1.1.8) to CLASSPATH

java -version and java -fullversion

The commands java -version and java -fullversion can be used to verify correct installation and confirm the release and build level of the JDK/SDK.

java -version and java -fullversion
JDK 1.1 SDK 1.3
 java -fullversion prints a long string giving the release, build level, build type, JIT status (enabled or disabled) and JIT build level.  See Migrating JNI applications to Java 2 Technology Edition for OS/390, Compatibility between prior releases for a description of the various build types in JDK 1.1.

java -version prints a brief string giving simply the release of the JDK.  For example:

>java -version
java version "1.1.8"

>java -fullversion
java full version
"JDK 1.1.8
IBM build m118
-19991115 R06 BFP
(JIT enabled: jitc
V3.  0-19991122)"

java -fullversion prints the same information as before but without the build type (there is now only one build type) and without the JIT information.  It is practically guaranteed to work as it is returned by the SDK launcher without attempting to load any libraries.

java -version gives full information.  It relies on the SDK libraries being loaded and is a better test of the integrity of the SDK installation.  For example:

>java -version
java version "1.3.1"
Java(TM) 2 Runtime
Environment,
Standard Edition
(build 1.3.1)
Classic VM 
<build 1.3.1,
(J2RE 1.3.1
IBM OS/390 
Persistent 
Reusable VM build
hm13
1s-20011206(JIT 
enabled: jitc))

>java -fullversion
java full version
"J2RE 1.3.1 IBM
build cm131-20000620"

Disabling the JIT

The Just In Time compiler (JIT) is enabled by default.  It can be disabled by specifying the java.compiler property or setting the JAVA_COMPILER environment variable.  If both are specified the property takes precedence.

Disabling the JIT
JDK 1.1 SDK 1.3

The setting that disable the JIT are off, NONE and (blank).  For example:

export JAVA_COMPILER=NONE
java MyClass

java -Djava.compiler=off
MyClass

The settings that disable the JIT are NONE and (blank). off is no longer recognised.  For example:

export
JAVA_COMPILER=NONE
java MyClass

java -Djava.compiler
= MyClass

JAVA_HOME environment variable

JAVA_HOME is the name of an environment variable used in JDK 1.1.

JAVA_HOME environment variable
JDK 1.1 SDK 1.3

The variable is set to help the Java virtual machine determine the location where the JDK is installed.  For example:

export
JAVA_HOME=/usr
/lpp/java/J1.1

You normally do not need to set the variable since the java command determines and sets the required value automatically. You do need to set the variable if you are using RMI-IIOP or running a native application that uses the JNI Invocation API.

The variable is not used.  The Java virtual machine can always determine its location.

JNI

A JNI application built for JDK 1.1 can be both binary and source compatible with SDK 1.3 if certain conditions are met.  But the most general case is that a rebuild of the application is required.  In addition some migration paths require changes to the build scripts and an optional change to the source code.  The degree of change required depends on several factors:

  • Does the application use Java long, double or float?
  • Does the application exploit the macros and functions provided in float_md.h and longlong_md.h?
  • Is the application built for binary floating point (BFP) or floating point emulation?
  • Does the application use the JNI invocation API?
  • Does the application use the JNI helper functions (JNI_a2e_vsprintf and the string conversion functions)?

For full information see Migrating JNI applications to Java 2 Technology Edition for OS/390, SDK 1.3.

os390.ieee754 system property

os390.ieee754 is the name of a system property used in JDK 1.1.

os390.ieee754 system property
JDK 1.1 SDK 1.3

The property allows a Java application to determine which type of floating point implementation is in effect:  binary floating point (BFP) or floating point emulation.  It takes the value native (ie. BFP) or emulation.  A typical use of the property is to load the correct version of an application native library.  For example:

String fpSupport =
System.getProperty
("os390.ieee754");

if(fpSupport.equals
("native") {

   System.loadLibrary
   ("MyFuncBFP");

           }
else {

   System.loadLibrary
   ("MyFunc");

        }

The property is not used.  The floating point implementation is always binary floating point.  For information on migrating from floating point emulation to binary floating point see Migrating JNI applications to Java 2 Technology Edition for OS/390, SDK 1.3.

JAVA_IEEE754 environment variable

JAVA_IEEE754 is the name of an environment variable used in JDK 1.1.

JAVA_IEEE754 environment variable
JDK 1.1 SDK 1.3

The variable is set to force the Java virtual machine to load the floating point emulation library set even on a machine that supports binary floating point. For example:

export
JAVA_IEEE754=EMULATION

The variable is not used.  There is a single library set for binary floating point.  For information on migrating from floating point emulation to binary floating point see Migrating JNI applications to Java 2 Technology Edition for OS/390, SDK 1.3.

© IBM Corp. 2000