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