source: trunk/doc/README.OS2@ 241

Last change on this file since 241 was 241, checked in by dmik, 15 years ago

Readme/changes for Beta 2.

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