source: trunk/doc/README.OS2@ 392

Last change on this file since 392 was 344, checked in by dmik, 13 years ago

Release b24 GA2.

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