source: trunk/doc/README.OS2@ 299

Last change on this file since 299 was 299, checked in by dmik, 14 years ago

README.OS2: Added libc/gcc links to REQUIREMENTS and provided a link to the Liberation TTF WPI.

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