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