[263] | 1 | OpenJDK 6 for OS/2 and eCS
|
---|
[168] | 2 |
|
---|
[282] | 3 | Version 1.6.0 Build 22 RC2 (2011-03-28)
|
---|
[168] | 4 |
|
---|
[263] | 5 | This is a release candidate build intended for testing purposes.
|
---|
[168] | 6 |
|
---|
| 7 |
|
---|
| 8 |
|
---|
| 9 | INTRODUCTION
|
---|
| 10 |
|
---|
[225] | 11 | This document contains a brief information on the OS/2 version of the
|
---|
[168] | 12 | OpenJDK 6 product. Please read it carefully before starting your work.
|
---|
| 13 | You may also visit the project page at
|
---|
| 14 |
|
---|
| 15 | http://svn.netlabs.org/java/wiki
|
---|
| 16 |
|
---|
| 17 | to get more information and the latest news and also to report bugs.
|
---|
| 18 |
|
---|
| 19 | To get a brief list of OS/2-specific changes from release to release
|
---|
| 20 | please see the CHANGES.OS2 file included in this distribution.
|
---|
| 21 |
|
---|
| 22 |
|
---|
| 23 |
|
---|
| 24 | REQUIREMENTS
|
---|
| 25 |
|
---|
| 26 | In order to use this version of OpenJDK, you will need the following:
|
---|
| 27 |
|
---|
| 28 | - A OS/2 Warp 4 Fixpack 16+, OS/2 Warp 4.5 or eComStation operating system.
|
---|
| 29 |
|
---|
[282] | 30 | - Odin32 library version 0.6.21606 (2011-03-28) or above:
|
---|
[168] | 31 |
|
---|
[282] | 32 | ftp://ftp.netlabs.org/pub/odin/odin32bin-20110328-release.wpi
|
---|
[168] | 33 |
|
---|
[282] | 34 | - Extended system tray widget for XCenter version 0.1.1 or above (optional,
|
---|
| 35 | but required for system tray support in Java applications):
|
---|
[225] | 36 |
|
---|
[282] | 37 | ftp://ftp.netlabs.org/pub/qt4/xsystray/xsystray-0_1_1.wpi
|
---|
[225] | 38 |
|
---|
[282] | 39 |
|
---|
| 40 |
|
---|
[168] | 41 | INSTALLATION
|
---|
| 42 |
|
---|
[169] | 43 | The OpenJDK product is distributed in two packages: the JRE and the SDK
|
---|
| 44 | (which includes a copy of JRE). Simply take a necessary package and unzip it
|
---|
| 45 | to a directory of your choice. You will need to add the \bin subdirectory
|
---|
| 46 | inside this directory to PATH and BEGINLIBPATH to allow for starting Java
|
---|
| 47 | executables from an arbitrary location:
|
---|
[168] | 48 |
|
---|
| 49 | set PATH=<directory>\bin;%PATH%
|
---|
| 50 | set BEGINLIBPATH=<directory>\bin;%BEGINLIBPATH%
|
---|
| 51 |
|
---|
[170] | 52 | Also make sure there are no traces of other Java installations in the
|
---|
[241] | 53 | environment because this is known to make problems (in particular, this means
|
---|
| 54 | that the CLASSPATH/JAVA_HOME/SWING_HOME environment variables should not be
|
---|
| 55 | set).
|
---|
[170] | 56 |
|
---|
[169] | 57 | Alternatively, you may add this subdirectory to PATH and LIBPATH statements
|
---|
| 58 | of your CONFIG.SYS (and reboot) to make the given Java installation the
|
---|
| 59 | default one.
|
---|
[168] | 60 |
|
---|
[231] | 61 | Please read the further sections (especially the "CURRENT LIMITATIONS" section
|
---|
| 62 | below) to make sure that you are aware of possible problems you may run into
|
---|
| 63 | while running Java applications using this product.
|
---|
[168] | 64 |
|
---|
[169] | 65 |
|
---|
[231] | 66 |
|
---|
| 67 | FONT SELECTION
|
---|
| 68 |
|
---|
| 69 | OpenJDK comes with no fonts and uses the system fonts by default. On OS/2,
|
---|
| 70 | these fonts are Helvetica, Times New Roman and Courier -- they are are
|
---|
| 71 | present in any version of OS/2. However, these are very old Type1 fonts with
|
---|
| 72 | many glyphs having poor quality which can be seen even with font anti-aliasing
|
---|
| 73 | turned on.
|
---|
| 74 |
|
---|
| 75 | For this reason, OpenJDK for OS/2 provides an alternative font configuration
|
---|
| 76 | that uses a freely available Liberation font family: Liberation Sans,
|
---|
| 77 | Liberation Serif and Liberation Mono (with font metrics close to a widely
|
---|
| 78 | used set of Monotype TTF fonts: Arial, Times New Roman and Courier New,
|
---|
| 79 | respectively). In order to use the Liberation font family instead of the
|
---|
| 80 | default Type1 fonts, do the following:
|
---|
| 81 |
|
---|
| 82 | 1. Download the latest binary (TTF) archive of Liberation fonts from:
|
---|
| 83 |
|
---|
| 84 | https://fedorahosted.org/liberation-fonts/
|
---|
| 85 |
|
---|
| 86 | 2. Copy all *.TTF files from the archive to a directory and install them
|
---|
| 87 | normally (for example, using the OS/2 Font Palette object).
|
---|
| 88 |
|
---|
[241] | 89 | 3. Go to the directory "<SDK>\bin\jre\lib" (where <SDK> is where you installed
|
---|
| 90 | SDK package) or "<JRE>\lib" (where <JRE is where you installed the JRE
|
---|
| 91 | package) and copy the file "fontconfig.liberation.bfc" to "fontconfig.bfc".
|
---|
| 92 | It is safe to overwrite the target file.
|
---|
[231] | 93 |
|
---|
| 94 | In order to return back to the default fonts, go to "<OpenJDK>\bin\jre\lib"
|
---|
[241] | 95 | (or to "<JRE>\lib") again and copy the file "fontconfig.default.bfc" to
|
---|
| 96 | "fontconfig.bfc".
|
---|
[231] | 97 |
|
---|
| 98 | Note that you need to restart all Java applications to let them pick up the
|
---|
| 99 | new fonts.
|
---|
| 100 |
|
---|
| 101 | Font Anti-Aliasing
|
---|
| 102 |
|
---|
| 103 | In the current release, due to the low quality of the standard OS/2 Type1
|
---|
| 104 | fonts, both AWT and Swing Java GUI toolkits use subpixel font anti-aliasing by
|
---|
| 105 | default for all standard components.
|
---|
| 106 |
|
---|
| 107 | If you want to change this behavior, you may use the following Java command
|
---|
| 108 | line option:
|
---|
| 109 |
|
---|
| 110 | -Dawt.useSystemAAFontSettings=<mode>
|
---|
| 111 |
|
---|
| 112 | where <mode> is one of the following anti-aliasing modes:
|
---|
| 113 |
|
---|
| 114 | off Turns anti-aliasing off
|
---|
| 115 | on Turns on monochrome anti-aliasing
|
---|
| 116 | lcd | lcd_hrgb * Turns on subpixel anti-aliasing optimized for HRGB LCD panels
|
---|
| 117 | lcd_hbgr Turns on subpixel anti-aliasing optimized for HBGR LCD panels
|
---|
| 118 | lcd_vrgb Turns on subpixel anti-aliasing optimized for VRGB LCD panels
|
---|
| 119 | lcd_vbgr Turns on subpixel anti-aliasing optimized for VBGR LCD panels
|
---|
| 120 |
|
---|
| 121 | The setting marked with * is the default anti-aliasing value as it is suitable
|
---|
| 122 | for the majority of the modern display hardware.
|
---|
| 123 |
|
---|
| 124 |
|
---|
| 125 |
|
---|
[229] | 126 | MEMORY REQUIREMENTS
|
---|
| 127 |
|
---|
| 128 | Sometimes you may find out that starting a Java application fails with the
|
---|
| 129 | following error message:
|
---|
| 130 |
|
---|
| 131 | Error occured during initialization of VM
|
---|
| 132 | Could not reserve enough space for object heap
|
---|
| 133 | Could not create the Java virtual machine.
|
---|
| 134 |
|
---|
| 135 | This means that the amount of memory Java wants to reserve for its heap is
|
---|
| 136 | bigger than the maximum free block of memory available to the Java process.
|
---|
| 137 | Note that the size of this free block does not directly depend on the amount
|
---|
| 138 | of physical RAM installed in your computer (because the physical RAM may be
|
---|
| 139 | extended using the swap file, for instance). It rather depends on the virtual
|
---|
| 140 | address limit set by OS/2 for the process. In older OS/2 versions that don't
|
---|
| 141 | support high memory (e.g. the ones based on pre-WSeB kernels) this limit
|
---|
| 142 | is known to be 512M. In later versions it is controlled by the
|
---|
| 143 | VIRTUALADDRESSLIMIT parameter in CONFIG.SYS (which is specified in megabytes
|
---|
[231] | 144 | and defaults to 1024).
|
---|
[229] | 145 |
|
---|
| 146 | Furthermore, not all memory within the virtual address limit is available to
|
---|
| 147 | the process. Some small fraction of it is used by the kernel and the rest is
|
---|
| 148 | divided in two more or less equal parts: the private arena and the shared
|
---|
| 149 | arena. As said, the size of these arenas does not depend on the amount of
|
---|
| 150 | physical RAM and can be approximated using the following table. Note that the
|
---|
| 151 | values in the table are not the initial arena sizes but rather the sizes of
|
---|
| 152 | the maximum free block of memory available in the corresponding arena to a
|
---|
| 153 | dummy process that does nothing but queries these system values (all numbers
|
---|
| 154 | are in MB, the first column is for systems with no high memory support):
|
---|
| 155 |
|
---|
| 156 | VIRTUALADDRESSLIMIT *512 | 1024 | 1536 | 2048 | 3072
|
---|
| 157 | -------------------------------------------------------------------
|
---|
| 158 | Max free block in private arena 267 | 432 | 880 | 1328 | 2224
|
---|
| 159 | Max free block in shared arena 228 | 404 | 852 | 1230 | 2196
|
---|
| 160 |
|
---|
| 161 | Note that these values are gathered on a default eCS 2.0 GA system and may
|
---|
[230] | 162 | vary depending on what system DLLs get loaded into each process; they are
|
---|
[229] | 163 | given only as an example. You may get the real values on your system with
|
---|
| 164 | a variety of tools gathering system information, such as THESEUS.
|
---|
| 165 |
|
---|
| 166 | On the other hand, when calculating the default amount of memory to reserve
|
---|
[230] | 167 | for the heap (which is called the maximum heap size in the documentation),
|
---|
[229] | 168 | Java uses the physical RAM size as a base, not the the size of the free block
|
---|
| 169 | in the private arena (where Java actually allocates the heap). Below is a
|
---|
| 170 | simplified version of the algorithm for these calculations:
|
---|
| 171 |
|
---|
[230] | 172 | 1. Use MIN (MaxRAM, <physical_RAM>) as the base RAM value. MaxRAM is a Java
|
---|
| 173 | constant that defaults to 1G for the client (default) Java virtual machine
|
---|
| 174 | and to 4G for the server JVM.
|
---|
[229] | 175 |
|
---|
| 176 | 2. Divide this base RAM value by MaxRAMFraction (4 by default) and assign the
|
---|
| 177 | result as the default value for the maximum heap size (MaxHeapSize).
|
---|
| 178 |
|
---|
| 179 | 3. Use the MaxHeapSize value increased by 20-30% (for the needs other than the
|
---|
[230] | 180 | Java heap) as the size of the memory block to allocate in the private
|
---|
| 181 | arena.
|
---|
[229] | 182 |
|
---|
[231] | 183 | So, if your machine has, say, 2G of RAM and you attempt to start a Java
|
---|
| 184 | application Java server mode (using the -server command line option), Java
|
---|
| 185 | will want 512M (2G/4) plus additional 20-30%. This would obviously not fit
|
---|
| 186 | into 432M of free private memory available for the process when
|
---|
| 187 | VIRTUALADDRESSLIMIT is set to 1024 and this was the case with earlier releases
|
---|
| 188 | of OpenJDK 6 for OS/2 as well as with the releases of InnoTek Java 1.4.x for
|
---|
| 189 | OS/2.
|
---|
[229] | 190 |
|
---|
| 191 | Starting with version 6 Beta 2, OpenJDK for OS/2 solves this problem by
|
---|
| 192 | limiting the amount of memory Java wants for the heap to the actual size of
|
---|
| 193 | the available memory block in the private arena. So, in the above case Java
|
---|
[231] | 194 | will actually get about 310M in server mode (instead of performing a failed
|
---|
[230] | 195 | attempt to allocate 512M). You may change this limit by changing the
|
---|
| 196 | VIRTUALADDRESSLIMIT value in CONFIG.SYS (according to the table above), but
|
---|
| 197 | please note that values higher than 1024 may cause problems with some drivers
|
---|
| 198 | (for example, it is known that JFS and HPFS386 drivers cannot allocate a disk
|
---|
| 199 | cache of the big size if the VIRTUALADDRESSLIMIT value is too high).
|
---|
[229] | 200 |
|
---|
| 201 | In either case, the above describes how Java calculates the defaulut maximum
|
---|
| 202 | heap size. You may always override this default using the -Xmx<size> Java
|
---|
| 203 | command line option if you are not satisfied with the default value for some
|
---|
| 204 | reason or if your applcation gives you the "Could not reserve enough space for
|
---|
[231] | 205 | object heap" error message at startup. However, keep in mind that if you
|
---|
| 206 | specify a -Xmx value which is, increased by 20-30% as described in step 3
|
---|
| 207 | above, bigger than the maximum free block in the private arena, you will get
|
---|
| 208 | the same memory allocation error which indicates that you should use a smaller
|
---|
| 209 | value.
|
---|
[229] | 210 |
|
---|
| 211 |
|
---|
| 212 |
|
---|
[263] | 213 | DLL NAMES
|
---|
| 214 |
|
---|
| 215 | In the environment necessary to run OpenJDK on OS/2, the directory containing
|
---|
| 216 | JDK DLLs is listed in either LIBPATH or BEGINLIBPATH variable which makes
|
---|
| 217 | these DLLs available to Java processes as well as to any other process running
|
---|
| 218 | in the same environment. The original versions of OpenJDK use very generic DLL
|
---|
| 219 | names for some components (such as jpeg.dll, zip.dll) which may create name
|
---|
| 220 | conflicts with system DLLs and cause the Java DLLs to be loaded by programs
|
---|
| 221 | instead of the system ones leading to program malfunction.
|
---|
| 222 |
|
---|
| 223 | To reduce the possibility of such conflicts, all Java DLLs that didn't have
|
---|
| 224 | a 'j' prefix in their names were renamed by prepending 'j' to the original
|
---|
| 225 | DLL name.
|
---|
| 226 |
|
---|
| 227 | Besides adding the 'j' prefix, some DLLs were also renamed further to fit the
|
---|
[266] | 228 | 8 character DLL name length limit forced by the OS/2 kernel loader.
|
---|
[263] | 229 |
|
---|
[266] | 230 | This rename operation is transparent to all Java applications except a few
|
---|
| 231 | cases which involve custom agent libraries used to enhance the functionality
|
---|
| 232 | of JDK or JVM. These libraries in particular include:
|
---|
[263] | 233 |
|
---|
[266] | 234 | Original Name New Name
|
---|
| 235 | --------------------------------------------
|
---|
| 236 | hprof.dll jhprof.dll
|
---|
| 237 | dt_shmem.dll jdtshmem.dll
|
---|
| 238 | dt_socket.dll jdtsock.dll
|
---|
[263] | 239 |
|
---|
[266] | 240 | In order to use the renamed libraries, you need to substitute the old name
|
---|
| 241 | with the new name wherever the old name is used in Java documentation,
|
---|
| 242 | configuration files or command line options. For example, to use the profiler
|
---|
| 243 | library, you will have to write "-agentlib:jhprof.dll" on the command line
|
---|
| 244 | instead of "-agentlib:hprof.dll" and so on.
|
---|
[263] | 245 |
|
---|
| 246 |
|
---|
| 247 |
|
---|
[168] | 248 | CURRENT LIMITATIONS
|
---|
| 249 |
|
---|
[225] | 250 | 1. OpenJDK will not work correctly under the OS/2 SMP kernel (Java process
|
---|
| 251 | hangs are very likely). This is a known problem of Odin32 which will be
|
---|
| 252 | addressed in further releases. The workaround is to use the OS/2 UNI or
|
---|
| 253 | Warp4 kernel instead.
|
---|
[168] | 254 |
|
---|
[266] | 255 | 2. The com.sun.tools.attach package (API to attach to a Java virtual machine)
|
---|
[241] | 256 | is missing.
|
---|
[225] | 257 |
|
---|
[168] | 258 | See the project roadmap for more information on the current progress and
|
---|
| 259 | future plans:
|
---|
| 260 |
|
---|
| 261 | http://svn.netlabs.org/java/roadmap
|
---|
| 262 |
|
---|
| 263 | Feel free to request new features and report bugs using the project bug
|
---|
| 264 | tracker abaialble at:
|
---|
| 265 |
|
---|
| 266 | http://svn.netlabs.org/java/report
|
---|
| 267 |
|
---|
| 268 |
|
---|
| 269 |
|
---|
| 270 | CREDITS
|
---|
| 271 |
|
---|
[282] | 272 | Dmitriy Kuminov (development)
|
---|
[168] | 273 | Silvan Scherrer (management)
|
---|
| 274 |
|
---|
| 275 | netlabs.org (hosting & support)
|
---|
| 276 |
|
---|
| 277 | Oracle Corporation (original OpenJDK product)
|
---|
| 278 |
|
---|
| 279 | We also want to THANK all individuals and organizations who made the donations
|
---|
| 280 | to this project and helped to make it happen.
|
---|
| 281 |
|
---|
| 282 |
|
---|
| 283 | Oracle and Java are registered trademarks of Oracle and/or its affiliates.
|
---|
| 284 | OS/2 and OS/2 Warp are trademarks of the IBM Corporation and/or its subsidiary(-ies).
|
---|
| 285 | eComStation is a trademark of Serenity Systems International and/or its subsidiary(-ies).
|
---|
| 286 | Other names may be trademarks of their respective owners.
|
---|