________________________________________________________________________ IBM(R) OS/2 WARP RUNTIME ENVIRONMENT, JAVA(TM) TECHNOLOGY EDITION, VERSION 1.1.8 - PRODUCT README ________________________________________________________________________ IBM OS/2 WARP RUNTIME ENVIRONMENT, JAVA(TM) TECHNOLOGY EDITION, VERSION 1.1.8 (Runtime Environment) is based on Sun Microsystems' Java 1.1.8 maintenance level. The Developer Kit provides the Sun Microsystems, Inc. Java environment for the following products: OS/2 Warp 4 with FixPak 5 or higher or DBCS equivalent OS/2 Warp Server Version 4 with FixPak 32 or higher or DBCS equivalent OS/2 Warp Server Advanced Version 4 with FixPak 32 or higher or DBCS equivalent OS/2 Warp Server Advanced Version 4 SMP Feature with FixPak 32 or higher or DBCS equivalent OS/2 Warp Server for e-business WorkSpace On-Demand clients and servers OS/2 Warp 3 with FixPak 32 or higher or DBCS equivalent OS/2 Warp Connect with FixPak 32 or higher or DBCS equivalent Note: For information on the Double Byte Character Set (DBCS) FixPak equivalents, see the "FixPaks" section. This document uses the term "vendors" to refer to licensees, developers, and independent software vendors (ISVs) who license and distribute the Runtime Environment with their Java programs. The IBM build and version number can be obtained by typing the following at a command line: jre -d ________________________________________________________________________ CONTENTS 1.0 OVERVIEW 1.1 Files Included with the Runtime Environment 1.2 The JIT Compiler 1.3 FixPaks 2.0 REDISTRIBUTION REQUIREMENTS 2.1 Required Files for Internationalization Support and Redistribution 3.0 THE JAVA RUNTIME INTERPRETER 4.0 PACKAGING THE RUNTIME ENVIRONMENT WITH YOUR PRODUCT 5.0 JAVA RUNTIME EXAMPLE USING REXX 6.0 RUNTIME DOCUMENTATION 7.0 NOTICES 8.0 TRADEMARKS 1.0 OVERVIEW ______________________________________________________________________ The Java Runtime is the minimum standard Java Platform for running Java programs. It contains the Java Virtual Machine, Java Core Classes and supporting files. Included with the Runtime Environment are security enhancements based on the Java 2 security model (referred to as Security) and the RMI-IIOP, Supported by IBM Runtime (RMI-IIOP Runtime). READMEs for Security or the RMI-IIOP Runtime are located in the directory where you installed them. 1.1 Files Included with the Runtime Environment ______________________________________________________________________ The Runtime Environment includes the non-debuggable .dll files plus classes from the IBM OS/2 Warp Developer Kit, Java(TM) Technology Edition, Version 1.1.8 (Developer Kit) to support a runtime-only program. The Runtime Environment does not include any of the development tools (such as appletviewer or javac) or classes that pertain only to a development system. 1.2 The JIT Compiler ______________________________________________________________________ The Runtime Environment includes an IBM just-in-time (JIT) bytecode compiler. The JIT compiler is enabled by default on the Runtime Environment. To disable the compiler, you can use the -nojit option of the Java runtime interpreter. See the option list in the "The Java Runtime Interpreter" section for more information. 1.3 FixPaks ______________________________________________________________________ Required FixPak level for DBCS (Japanese, Traditional Chinese, Simplified Chinese, or Korean) Languages: o OS/2 Warp 3 WX03006 o OS/2 Warp 4 FX00505 For information about downloading a particular FixPak, visit the IBM FixPak Web site at: http://ps.software.ibm.com/pbin-usa-ps/getobj.pl?/pdocs-usa /otherservices.html Or see the Developer Kit README located in the [x:\JAVA11] directory. [x:\JAVA11] is the drive and directory where you installed the Developer Kit. By default, JAVA11 is the name of the directory. 2.0 REDISTRIBUTION REQUIREMENTS ______________________________________________________________________ For redistribution requirements, see the Runtime Environment License Agreement located on the Runtime Environment Web site at: http://ncc.hursley.ibm.com/javainfo/jrerequest_os2.html 2.1 Required Files for Internationalization Support and Redistribution ______________________________________________________________________ One version of the Runtime Environment is available to you to use for redistribution with your product. The version contains the files for internationalization support and the files listed below. The Runtime Environment includes the bin, dll and lib directories that must reside in the same directory. We call this directory . All paths are relative to the directory (originally "jre11"). The OS/2 bin directory contains the executables and native libraries: bin\jre.exe Java runtime executable bin\jrepm.exe Java runtime executable, no console window bin\rmiregst.exe rmiregistry executable bin\javakey.exe javakey executable bin\tnamesrv.exe tnameserv executable for RMI-IIOP bin\javad.dll native code support for sun.jdbc bin\javaj.dll native code support for sun.jpeg bin\javab.dll native code support for java.math bin\javam.dll native code support for sun.audio bin\javan.dll native code support for java.net bin\javan2.dll native code support for java.net bin\javas.dll native code support for sun.net.www.protocol bin\javaw.dll native code support for sun.awt bin\javax.dll JIT compiler bin\ioser.dll native code support for RMI-IIOP bin\secma.dll native code support for security backport bin\javaz.dll native code support for java.util.zip bin\syslevel.jre identifies the level for the syslevel command The OS/2 dll directory contains the native libraries loaded by their short name via a dynamically configured BEGINLIBPATH automatically set in jre.exe. There is no need for the dll directory to be on the CONFIG.SYS LIBPATH, so no changes need to be made to LIBPATH when the application is installed. These DLLs must be renamed before redistribution: dll\javri.dll Java runtime native code library o named javai.dll in the Developer Kit dll\javrr.dll Native code C runtime library o named javar.dll in the Developer Kit The OS/2 lib directory contains the classes and property files: lib\rt.jar Java runtime core classes lib\i18n.jar I18N character conversion classes from sun.io lib\rmi-iiop.jar RMI-IIOP runtime classes lib\orb.prp RMI-IIOP ORB properties lib\conttypes.prp MIME-type properties lib\awt.prp properties for key events for java.awt lib\font.prp AWT font properties for java.awt lib\f_ar.prp AWT font properties for Arabic locale lib\f_el.prp AWT font properties for Greek locale lib\f_he.prp AWT font properties for Hebrew locale lib\f_ja.prp AWT font properties for Japanese locale lib\f_ko.prp AWT font properties for Korean locale lib\f_th.prp AWT font properties for Thai locale lib\f_zh_tw.prp AWT font properties for Traditional Chinese locale lib\f_zh.prp AWT font properties for Simplified Chinese locale lib\security\java.sec properties for java.security lib\security\java_ex.pol sample policy file for security backport lib\security\java_ex.sec sample security file for security backport lib\security\user_ex.pol sample policy file for security backport lib\security\user_ex.sec sample security file for security backport lib\jre.prp properties for jre, has name of Java runtime native code library 3.0 THE JAVA RUNTIME INTERPRETER ______________________________________________________________________ The jre tool invokes the Java Runtime interpreter to run Java applications. To execute the jre tool, at an OS/2 command prompt type, jre [ options ] classname The classname argument is the name of the class file to be executed. Any arguments to be passed to the class must be placed after the classname on the command line. An alternative for the jre tool, jrepm, is available. The jrepm tool is identical to the jre tool, except that a console window is not invoked. To execute the jrepm tool, at an OS/2 command prompt type, jrepm [ options ] classname The jre tool will ignore the CLASSPATH environment variable. Use the -cp option to specify an application's class path. Options for the jre tool are as follows: -classpath path Specifies the path to the default CLASSPATH that the jre tool uses to look up classes. -cp path Places the specified path in front of the default classpath that the jre tool uses to look up classes. -help Print a usage message. -mx x Sets the maximum size of the memory allocation pool (the garbage collected heap) to x. The default is 16 megabytes of memory. x must be greater than or equal to 1000 bytes. -ms x Sets the startup size of the memory allocation pool (the garbage collected heap) to x. The default is 1 megabyte of memory. x must be greater than 1000 bytes. -maxe Sets the maximum size of each expansion to the heap when more memory is required. For example: jre -maxe2097152 MyClass -mine Sets the minimum size of each expansion of the heap. Also sets the minimum size of free object space in the heap. For example: jre -mine1048576 MyClass -maxf Sets the approximate percentage of maximum free heap. For example: jre -maxf0.60 MyClass -minf Sets the approximate percentage of minimum free space in the heap to give control over the rate of preallocation performed when heap space is expanded. For example: jre -minf0.35 MyClass -noasyncgc Turns off asynchronous garbage collection. When activated, no garbage collection takes place unless it is explicitly called or the program runs out of memory. -noclassgc Turns off garbage collection of Java classes. By default, the Java interpreter reclaims space for unused Java classes during garbage collection. -nojit Turns off the Just In Time bytecode compiler. By default, the virtual machine directly interprets bytecodes, without converting them to native code. -ss x The -ss option sets the maximum stack size that can be used by C code in a thread to x. The default units for x are bytes. The value of x must be greater than or equal to 1000 bytes. -oss x The -oss option sets the maximum stack size that can be used by Java code in a thread to x. The default units for x are bytes. The value of x must be greater than or equal to 1000 bytes. -v, -verbose Causes the jre tool to print a message to stdout each time a class file is loaded. -verify Performs byte-code verification on the class file. However, java -verify does not perform a full verification in all situations. Any code path that is not actually executed by the interpreter is not verified. Therefore, java -verify cannot be relied upon to certify class files unless all code paths in the class file are actually run. -verifyremote Runs the verifier on all code that is loaded into the system via a classloader. verifyremote is the default for the interpreter. -noverify Turns verification off. -verbosegc Causes the garbage collector to print out messages whenever it frees memory. -DpropName=value Defines a property value. propName is the name of the property whose value you want to change and value is the value you want to change it to. For example, the command java -Dawt.button.color=green ... sets the value of the property awt.button.color to "green". 4.0 PACKAGING THE RUNTIME ENVIRONMENT WITH YOUR PRODUCT ______________________________________________________________________ The Runtime Environment does not have an installer. Software developers should package the Runtime Environment with their OS/2 product. The DLLs in the Runtime Environment must be renamed using the "renjre.cmd" utility before redistribution. When packaging the Runtime Environment with application software on OS/2, the following points should be considered: o The Runtime Environment should be installed in its own subdirectory (referred to below as ). Include all the required files listed above in the bin and lib subdirectories of , following the same directory hierarchy and relative placement of files. The internationalization files are included for language localization support. o All application-specific classes should be placed in a directory other than . Application-specific classes may be individual .class files, .jar files, or .zip files. An example directory structure might look like the following: ________________|___________ | | | bin lib | | ________|________ app.jar | | | bin dll lib | | | o If native code support is required, then the native library must be located in the \\bin directory or on the LIBPATH on OS/2. The best way to do this is to install the native libraries in \\bin directory. That way, LIBPATH does not need to be set up to find these DLLs. o The Runtime Environment DLLs in the \dll directory must be renamed to avoid conflicts with any other versions of a Java runtime environment on the system. The renjre.cmd utility can be used to rename these DLLs, and to patch the other DLLs in the \bin directory to use these renamed DLLs. This utility uses the "rendllja.exe" utility supplied with this Runtime Environment distribution. The DLLs can be renamed using the following command: renjre \ Do not use a name for "JAVAI" or "JAVAR" beginning with "JAV" or with any other letters used as a product prefix for other IBM software products (for example, not "FAA", "CPP", or "DDE4"). If the application software has native method DLLs or JNI application EXEs or DLLs linked with JAVAI.LIB then these will have internal references to JAVAI.DLL. These references need to be replaced by references to the new name of JAVAI.DLL, as passed into the renjre.cmd command. This is done automatically by the renjre command if the DLLs and EXEs are placed in the \bin before running the renjre command. If the application program has a run-time reference to JAVAI.DLL (for example, DosLoadModule() on "JAVAI") then manually change the reference name to the new name of JAVAI.DLL and recompile the application program. o The application can be executed by using the jre command-line tool, using the -cp option to specify the application's class path. In the example directory tree above, for example, the command might look like this: \\bin\jre -cp \lib\app.jar Information on the Sun version of the jre command-line tool can be found in the JRE 1.1.8 CHANGES file and on the following two Sun Web sites: o http://java.sun.com/products/jdk1.1/docs/tooldocs/solaris/jre.html o http://java.sun.com/products/jdk1.1/docs/tooldocs/win32/jre.html For more information that might be relevant to installing and running a Java runtime environment, refer to the Sun JDK installation instructions: http://java.sun.com/products/jdk/1.1/installation-win32-x86.html http://java.sun.com/products/jdk/1.1/installation-solaris2.html 5.0 JAVA RUNTIME EXAMPLE USING REXX ______________________________________________________________________ On OS/2 there is no need to build a platform-specific executable because the jre.exe or jrepm.exe executables can be used. A REXX command file can be used to start the application without the user having to supply a variety of options. The REXX example is as follows: /* Simple jre application launcher */ parse source . . thiscmd /* find out the directory of this command file */ jrebin = filespec('drive', thiscmd)||filespec('path', thiscmd) /* presume the command file is in the bin directory of the jre */ /* get the location of the application jar file */ jrelib = jrebin || '..\lib\' /* run the application */ '@' || jrebin || 'jre.exe -cp' jrelib || 'myapp.jar com.mycompany.myapp' /* return any result to the caller */ return rc 6.0 RUNTIME DOCUMENTATION ______________________________________________________________________ We supply the following runtime documentation: o Each property file contains comments describing what the file is used for and how to modify it. o KeyEvent uses the awt.properties file (awt.prp) to print out properties of key events, usually for debugging purposes. This might be used by a GUI debugger that needs to print out events. 7.0 NOTICES ________________________________________________________________________ This edition applies to version 1.1.8 of the IBM OS/2 Warp Runtime Environment, Java(TM) Technology Edition and to all subsequent releases and modifications until otherwise indicated in new editions. Copyright International Business Machines Corporation 1997. All rights reserved. Note to U.S. Government Users Restricted Rights --Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Consult your local IBM representative for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the users responsibility to evaluate and verify the operation of any non-IBM product, program, or service. IBM may have patents or pending patent applications covering subject matter in this document. The furnishing of this document does not give you any license to these patents. You can send license inquiries, in writing, to: IBM Director of Licensing IBM Corporation North Castle Drive Armonk, NY 10504-1758> U.S.A. For license inquiries regarding double-byte (DBCS) information, contact the IBM Intellectual Property Department in your country or send inquiries, in writing, to: IBM World Trade Asia Corporation Licensing 2-31 Roppongi 3-chome, Minato-ku Tokyo 106, Japan The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you. This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the information. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this information at any time without notice. Any references in this information to non-IBM Web sites are provided for convenience only and do not in any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the materials for this IBM product and use of those Web sites is at your own risk. IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you. Licensees of this program who wish to have information about it for the purpose of enabling (i) the exchange of information between independently created programs and other programs (including this one) and (ii) the mutual use of the information which has been exchanged, should contact: JTCMAIL@uk.ibm.com [Hursley Java Technology Center (JTC) contact] Such information may be available, subject to appropriate terms and conditions, including in some cases, payment of a fee. The licensed program described in this document and all licensed material available for it are provided by IBM under terms of the IBM Customer Agreement, IBM International Program License Agreement or any equivalent agreement between us. Any performance data contained herein was determined in a controlled environment. Therefore, the results obtained in other operating environments may vary significantly. Some measurements may have been made on development-level systems and there is no guarantee that these measurements will be the same on generally available systems. Furthermore, some measurement may have been estimated through extrapolation. Actual results may vary. Users of this document should verify the applicable data for their specific environment. Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products. All statements regarding IBM's future direction or intent are subject to change or withdrawal without notice, and represent goals and objectives only. All IBM prices shown are IBM's suggested retail prices, are current and are subject to change without notice. Dealer prices may vary. COPYRIGHT LICENSE: This information contains sample application programs in source language, which illustrate programming techniques on various operating platforms. You may copy, modify, and distribute these sample programs in any form without payment to IBM, for the purposes of developing, using, marketing or distributing application programs conforming to the application programming interface for the operating platform for which the sample programs are written. These examples have not been thoroughly tested under all conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these programs. You may copy, modify, and distribute these sample programs in any form without payment to IBM for the purposes of developing, using, marketing, or distributing application programs conforming to IBM's application programming interfaces. 8.0 TRADEMARKS __________________________________________________________________________ The following terms are trademarks of International Business Machines Corporation in the U.S., or other countries, or both: IBM OS/2 Java is a trademark of Sun Microsystems, Inc. in the U.S. and other countries. The Java technology is owned and exclusively licensed by Sun Microsystems, Inc. Other company, product, and service names may be trademarks or service marks of others. Copyright (c) 1997, 1999 Sun Microsystems, Inc. 901 San Antonio Rd., Palo Alto, CA 94303 USA. All rights reserved. (c) Copyright IBM Corporation 1999, All rights reserved. ________________________________________________________________________ END-OF-README-FILE ________________________________________________________________________