Changeset f125e94 for general/prog/jdk.xml
- Timestamp:
- 05/12/2008 05:07:53 AM (16 years ago)
- Branches:
- 6.3, 6.3-rc1, 6.3-rc2, 6.3-rc3
- Children:
- 2f22cf0a, f51265c3
- Parents:
- 9871466a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
general/prog/jdk.xml
r9871466a rf125e94 5 5 %general-entities; 6 6 7 <!ENTITY jdk-download-binary "http://java.sun.com/javase/downloads/index.jsp"> 8 <!ENTITY jdk-bin-md5sum "f7528500c17c09546566e05988beda86"> 9 <!ENTITY jdk-bin-size "67 MB"> 10 <!ENTITY jdk-bin-buildsize "207 MB"> 11 <!ENTITY jdk-bin-version "6u5"> 12 13 <!ENTITY jdk-source-jrl-md5sum "83390379fb9f3193e93a9d5eed5b31d9"> 14 <!ENTITY jdk-source-bin-md5sum "8b6f1b8d8dec051c18385539111141ec"> 15 <!ENTITY jdk-source-moz-md5sum "6dcaf7af16211617adff5d672a8b79f4"> 16 17 <!ENTITY jdk-source-jrl-size "111 MB"> 18 <!ENTITY jdk-source-bin-size "2 MB"> 19 <!ENTITY jdk-source-moz-size "8.2 MB"> 20 21 <!ENTITY jdk-src-buildsize "1.5 GB"> 22 <!ENTITY jdk-time "12.5 SBU (for both installations)"> 23 <!ENTITY jdk-version-string "6u3"> 24 <!ENTITY jdk-bin-version-string "1.6.0_05"> 25 26 <!ENTITY jdk-download-source-jrl "http://www.java.net/download/jdk6/&jdk-version-string;/promoted/b05/jdk-&jdk-version-string;-fcs-src-b05-jrl-24_sep_2007.jar"> 27 <!ENTITY jdk-download-source-bin "http://www.java.net/download/jdk6/&jdk-version-string;/promoted/b05/jdk-&jdk-version-string;-fcs-bin-b05-jrl-24_sep_2007.jar"> 28 <!ENTITY jdk-download-source-moz "http://www.java.net/download/jdk6/&jdk-version-string;/promoted/b05/jdk-&jdk-version-string;-fcs-mozilla_headers-b05-unix-24_sep_2007.jar"> 7 <!ENTITY jdk-download-http "http://java.sun.com/javase/downloads/index.jsp"> 8 <!ENTITY jdk-md5sum "f7528500c17c09546566e05988beda86"> 9 <!ENTITY jdk-size "67 MB"> 10 <!ENTITY jdk-buildsize "207 MB"> 11 <!ENTITY jdk-build-time "0.2 SBU"> 12 <!ENTITY jdk-bin-version "6u5"> 13 <!ENTITY jdk-version-string "1.6.0_05"> 29 14 30 15 ]> … … 54 39 <application>Java</application> aware.</para> 55 40 56 <!-- Previously, the plugin included 57 in the <application>JDK</application> binary package was unusable on LFS 58 owing to incompatibilities with <application>GCC</application>-3 compiled 59 browsers. This is not the case anymore.</para> --> 60 61 <para>The <application>JDK</application> comes in two flavors, a 62 precompiled binary and a source package. You will first need to download 63 and install the binary version of the <application>JDK</application> 64 (you'll need to click and agree to the <quote>Sun Microsystems, Inc. 65 Binary Code License Agreement</quote>). To build from the source, you 66 will need to read, and agree to the Sun 67 <!--<ulink url="&patch-root;/jdk-Readme.txt">-->Java Research License<!--</ulink>-->. 68 You will also need to download the additional files and patches to 69 complete the source build as detailed below. Note that in some countries 70 you cannot download the source code.</para> 71 72 <warning><para>Sun has recently decided not to provide JRL sources for 73 the latest update versions of the JDK. The source build instructions and 74 patches are here for reference only, and contain known security 75 vulnerabilities. For more information, please see Sun Alerts 76 <ulink url="http://sunsolve.sun.com/search/document.do?assetkey=1-66-231246-1">231246</ulink>, 77 <ulink url="http://sunsolve.sun.com/search/document.do?assetkey=1-66-233321-1">233321</ulink>, 78 <ulink url="http://sunsolve.sun.com/search/document.do?assetkey=1-66-233322-1">233322</ulink>, 79 <ulink url="http://sunsolve.sun.com/search/document.do?assetkey=1-66-233323-1">233323</ulink>, 80 <ulink url="http://sunsolve.sun.com/search/document.do?assetkey=1-66-233324-1">233324</ulink>, 81 <ulink url="http://sunsolve.sun.com/search/document.do?assetkey=1-66-233325-1">233325</ulink>, 82 <ulink url="http://sunsolve.sun.com/search/document.do?assetkey=1-66-233326-1">233326</ulink>, and 83 <ulink url="http://sunsolve.sun.com/search/document.do?assetkey=1-66-233327-1">233327</ulink>.</para> 84 <para> Sun is actively working on a GPL'd version of the JDK, titled 41 42 <note><para>Sun has recently decided not to provide JRL sources for 43 the latest update versions of the JDK. Sun is actively working on a GPL'd 44 version of the JDK, titled 85 45 <ulink url="http://openjdk.java.net/projects/jdk6/">OpenJDK</ulink>. 86 46 This new JDK will be licensed under the 87 47 <ulink url="http://openjdk.java.net/legal/gplv2+ce.html">GNU General 88 48 Public License, version 2, with the Classpath Exception</ulink>. 89 A stable OpenJDK was not available at the time of writing.</para></ warning>90 91 92 <bridgehead renderas="sect3"> BinaryPackage Information</bridgehead>49 A stable OpenJDK was not available at the time of writing.</para></note> 50 51 52 <bridgehead renderas="sect3">Package Information</bridgehead> 93 53 <itemizedlist spacing="compact"> 94 54 <listitem> 95 <para> Binary download (jdk-&jdk-bin-version;-linux-i586.bin):96 <ulink url="&jdk-download- binary;"/></para>55 <para>Download (jdk-&jdk-bin-version;-linux-i586.bin): 56 <ulink url="&jdk-download-http;"/></para> 97 57 </listitem> 98 58 <listitem> 99 <para>Download MD5 sum: &jdk- bin-md5sum;</para>59 <para>Download MD5 sum: &jdk-md5sum;</para> 100 60 </listitem> 101 61 <listitem> 102 <para>Download size (binary): &jdk- bin-size;</para>62 <para>Download size (binary): &jdk-size;</para> 103 63 </listitem> 104 64 <listitem> 105 <para>Estimated disk space required: &jdk-bin-buildsize;</para> 65 <para>Estimated disk space required: &jdk-buildsize;</para> 66 </listitem> 67 <listitem> 68 <para>Estimated build time: &jdk-build-time;</para> 106 69 </listitem> 107 70 </itemizedlist> 108 71 109 <bridgehead renderas="sect3">Source Package Information</bridgehead>110 111 <itemizedlist spacing="compact">112 <listitem>113 <para>JRL Source114 <simplelist>115 <member><ulink url="&jdk-download-source-jrl;"/></member>116 <member>&jdk-source-jrl-md5sum;</member>117 <member>&jdk-source-jrl-size;</member>118 </simplelist>119 </para>120 </listitem>121 <listitem>122 <para>Source Binaries123 <simplelist>124 <member><ulink url="&jdk-download-source-bin;"/></member>125 <member>&jdk-source-bin-md5sum;</member>126 <member>&jdk-source-bin-size;</member>127 </simplelist>128 </para>129 </listitem>130 <listitem>131 <para>Mozilla Headers132 <simplelist>133 <member><ulink url="&jdk-download-source-moz;"/></member>134 <member>&jdk-source-moz-md5sum;</member>135 <member>&jdk-source-moz-size;</member>136 </simplelist>137 </para>138 </listitem>139 <listitem>140 <para>Estimated disk space required: &jdk-src-buildsize;</para>141 </listitem>142 <listitem>143 <para>Estimated build time: &jdk-time;</para>144 </listitem>145 </itemizedlist>146 147 <bridgehead renderas="sect3">Additional Downloads</bridgehead>148 149 <bridgehead renderas="sect4">Required Patches</bridgehead>150 <itemizedlist spacing='compact'>151 <listitem>152 <para><ulink153 url="&patch-root;/jdk-&jdk-version-string;-gcc4-1.patch"/></para>154 </listitem>155 <listitem>156 <para><ulink157 url="&patch-root;/jdk-&jdk-version-string;-motif_fixes-1.patch"/></para>158 </listitem>159 <listitem>160 <para><ulink161 url="&patch-root;/jdk-&jdk-version-string;-remove_fixed_paths-1.patch"/></para>162 </listitem>163 </itemizedlist>164 165 72 <bridgehead renderas="sect3">JDK Dependencies</bridgehead> 166 73 167 <bridgehead renderas="sect4">Optional Runtime Dependencies (for binary 168 installation)</bridgehead> 74 <bridgehead renderas="sect4">Optional Runtime Dependencies</bridgehead> 169 75 <para role="optional"> 170 76 <xref linkend="alsa-lib"/>, … … 172 78 <xref linkend="gtk2"/></para> 173 79 174 <bridgehead renderas="sect4">Additional Requirements175 (for source build, including optional requirements)</bridgehead>176 <para role="required">177 <xref linkend="cpio"/>,178 <xref linkend="ksh"/>,179 <xref linkend="unzip"/>,180 <xref linkend="which"/>, and181 <xref linkend="zip"/></para>182 183 80 <para condition="html" role="usernotes">User Notes: 184 81 <ulink url="&blfs-wiki;/jdk"/></para> … … 188 85 <sect2 role="installation"> 189 86 <title>Installation of JDK</title> 190 191 <para>The instructions below install both the binary and source versions.192 You may stop after installing the binary version or continue on installing193 the source version. You can choose to keep either or both.</para>194 87 195 88 <tip> 196 89 <para>The <command>./jdk-&jdk-bin-version;-linux-i586.bin</command> 197 90 command below unpacks the distribution into a 198 <filename class='directory'>jdk&jdk- bin-version-string;</filename>91 <filename class='directory'>jdk&jdk-version-string;</filename> 199 92 directory. You will be required to view, and then accept (by entering a 200 93 <keycap>y</keycap> keypress), a license agreement before any files are … … 211 104 the downloaded files are located.</para> 212 105 213 <para>Install the binary<application>JDK</application> with the106 <para>Install the <application>JDK</application> with the 214 107 following commands:</para> 215 108 … … 226 119 <para>Now, as the <systemitem class="username">root</systemitem> user:</para> 227 120 228 <screen role="root"><userinput>cd jdk&jdk- bin-version-string; &&229 install -v -m755 -d /opt/jdk- bin-&jdk-bin-version; &&230 mv -v * /opt/jdk- bin-&jdk-bin-version; &&231 chown -v -R root:root /opt/jdk- bin-&jdk-bin-version; &&121 <screen role="root"><userinput>cd jdk&jdk-version-string; && 122 install -v -m755 -d /opt/jdk-&jdk-bin-version; && 123 mv -v * /opt/jdk-&jdk-bin-version; && 124 chown -v -R root:root /opt/jdk-&jdk-bin-version; && 232 125 ln -v -sf xawt/libmawt.so \ 233 /opt/jdk- bin-&jdk-bin-version;/jre/lib/i386/ &&126 /opt/jdk-&jdk-bin-version;/jre/lib/i386/ && 234 127 cd ..</userinput></screen> 235 128 … … 237 130 when used with the Xinerama extension. While still the 238 131 <systemitem class="username">root</systemitem> user, apply the 239 following sed to the installed binary to work around this 240 problem:</para> 132 following sed to work around this problem:</para> 241 133 242 134 <screen role="root"><userinput>sed -i 's@XINERAMA@FAKEEXTN@g' \ 243 /opt/jdk-bin-&jdk-bin-version;/jre/lib/i386/xawt/libmawt.so</userinput></screen> 244 245 <para>The binary version is now installed.</para> 246 247 <para>If you don't want to compile the source or are not in a position to 248 download the source owing to license restrictions, skip ahead to the 249 configuration section.</para> 250 251 <para>Save the existing path, and append the recently installed 252 <application>JDK</application>.</para> 253 254 <screen><userinput>export JAVA_HOME=/opt/jdk-bin-&jdk-bin-version; && 255 export PATH_HOLD=${PATH} && 256 export PATH=${PATH}:${JAVA_HOME}/bin</userinput></screen> 257 258 <para>The source code is contained in self-extracting 259 <filename class='extension'>jar</filename> files. You 260 will need to be in a windowed environment to extract the sources. 261 Create a directory to store the extracted sources. Choose the newly 262 created <filename class="directory">jdk-build</filename> directory 263 when prompted for the target directory.</para> 264 265 <screen><userinput>mkdir jdk-build && 266 cd jdk-build && 267 for JAR in ../jdk-&jdk-version-string;*.jar 268 do java -jar ${JAR} 269 done</userinput></screen> 270 271 <para>Apply all the patches downloaded above:</para> 272 273 <screen><userinput>for PATCH in ../jdk-&jdk-version-string;*.patch 274 do patch -Np1 -i ${PATCH} 275 done</userinput></screen> 276 277 <para>Use the following commands to apply some minor changes that 278 are a little more specific to BLFS, such as lack of a gcc-2.9 279 compiler, removing a broken demo, and forcing to link to shared 280 libraries. See the 'Command Explanations' section for more detail:</para> 281 282 <screen><userinput>sed -i '/^.*linux)/ { N; /.*/ { N; /.*/d }}' \ 283 deploy/make/plugin/{adapter,nscore}/Makefile && 284 sed -i '/.*mtrace.*/ { N; /.*/ s/.*mtrace.*\n.*/\t mtrace/ }' \ 285 j2se/make/mkdemo/jvmti/Makefile && 286 sed -i 's/= true/= false/' \ 287 j2se/make/common/shared/Compiler-gcc.gmk</userinput></screen> 288 289 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 290 href="../../xincludes/X11R6_symlink.xml"/> 291 292 <!-- <para>If your <application>X Window System</application> is installed into 293 any prefix other than <filename class="directory">/usr/X11R6</filename>, 294 execute the following commands, replacing 295 <replaceable><PREFIX></replaceable> with the installation prefix of 296 the <application>X Window System</application>:</para> 297 298 <screen><userinput>for file in `find . -name Makefile \ 299 -or -name Imakefile -or -name *.gmk` 300 do sed -i 's@/usr/X11R6@<replaceable><PREFIX></replaceable>@g' $file 301 done && 302 sed -i 's@/usr/X11R6@<replaceable><PREFIX></replaceable>@g' \ 303 j2se/src/solaris/native/sun/awt/fontpath.c \ 304 j2se/src/solaris/classes/sun/awt/motif/linux.fontconfig.Sun.properties \ 305 j2se/src/solaris/classes/sun/awt/motif/linux.fontconfig.RedHat.3.properties</userinput></screen> --> 306 307 <para>Set/unset some variables which affect the build:</para> 308 309 <screen><userinput>export ALT_BOOTDIR=${JAVA_HOME} && 310 export CLASSPATH_HOLD=${CLASSPATH} && 311 export ALT_CACERTS_FILE=${ALT_BOOTDIR}/jre/lib/security/cacerts && 312 export ALT_MOZILLA_HEADERS_PATH=${PWD}/share/plugin && 313 export MILESTONE="03-BLFS" && 314 export BUILD_NUMBER="b05" && 315 export INSANE=true && 316 export DEV_ONLY=true && 317 export SKIP_FASTDEBUG_BUILD=true && 318 unset JAVA_HOME CLASSPATH CFLAGS CXXFLAGS LDFLAGS</userinput></screen> 319 320 <warning><para>Setting CFLAGS/CXXFLAGS/LDFLAGS is guaranteed to make 321 the build fail. If you are interested in optimizing the build, set 322 OTHER_CFLAGS/OTHER_CXXFLAGS/OTHER_LDFLAGS instead. -O3, even in 323 OTHER_C{,XX}FLAGS, is known to cause a build failure.</para></warning> 324 325 326 <para>Additionally, if you would like to <command>make</command> in 327 parallel, add the following:</para> 328 329 <screen><userinput>export HOTSPOT_BUILD_JOBS=<replaceable><3></replaceable></userinput></screen> 330 331 <para>Build the <application>JDK</application> with the following 332 commands. There will be a few messages about missing files that look like 333 errors. These are caused by not meeting the expected build environment 334 (Red Hat). As long as the build doesn't stop, the messages 335 are harmless.</para> 336 337 <screen><userinput>pushd control/make && 338 make && 339 popd</userinput></screen> 340 341 <para>To test the results, you can run one of the provided demo programs 342 using the newly created <command>java</command> binary. Issue the 343 following commands:</para> 344 345 <screen><userinput>pushd control/build/linux-i586/j2sdk-image/demo/jfc/Java2D && 346 ../../../bin/java -jar Java2Demo.jar && 347 popd</userinput></screen> 348 349 <para>Now, as the <systemitem class="username">root</systemitem> user, 350 install the <application>JDK</application>:</para> 351 352 <screen role="root"><userinput>pushd control/build/linux-i586 && 353 cp -v -a j2sdk-image /opt/jdk-&jdk-version-string; && 354 chown -v -R root:root /opt/jdk-&jdk-version-string; && 355 ln -v -sf xawt/libmawt.so /opt/jdk-&jdk-version-string;/jre/lib/i386/ && 356 popd</userinput></screen> 357 358 <para>Restore the unprivileged user's environment using the following 359 commands:</para> 360 361 <screen><userinput>export JAVA_HOME=${ALT_BOOTDIR} && 362 export CLASSPATH=${CLASSPATH_HOLD} && 363 export PATH=${PATH_HOLD} && 364 unset PATH_HOLD ALT_BOOTDIR CLASSPATH_HOLD \ 365 ALT_CACERTS_FILE ALT_MOZILLA_HEADERS_PATH \ 366 BUILD_NUMBER MILESTONE INSANE DEV_ONLY \ 367 SKIP_FASTDEBUG_BUILD</userinput></screen> 135 /opt/jdk-&jdk-bin-version;/jre/lib/i386/xawt/libmawt.so</userinput></screen> 368 136 369 137 </sect2> … … 372 140 <title>Command Explanations</title> 373 141 374 <para><command>sed -i '/^.*linux)/...</command>: This command disables375 the build of a gcc-2.9 compatible browser plugin. LFS does not contain376 gcc-2.9, and hasn't in quite a few years.</para>377 378 <para><command>sed -i '/.*mtrace.*/...</command>: This command disables379 building of the broken 'waiters' demo.</para>380 381 <para><command>sed -i 's/= true/= false/'...</command>: This command382 forces the compiler to link against the standard C libraries383 dynamically.</para>384 385 <para><command>export ALT_BOOTDIR=${JAVA_HOME}</command>: This variable sets386 the location of the bootstrap <application>JDK</application>.</para>387 388 <para><command>export ALT_CACERTS_FILE...</command>: Specifies the389 certificate file to use (from the installed binary390 <application>JDK</application>).</para>391 392 <para><command>export ALT_MOZILLA_HEADERS_PATH=${PWD}/share/plugin/</command>:393 This tells the build exactly where to find the394 <application>Mozilla</application> headers. This has changed since the395 previous version and is not mentioned in the installation documentation396 included with the package source.</para>397 398 <para><command>export MILESTONE="03-BLFS"</command>: This appends399 the string '03-BLFS' to the buld number. 'internal' is400 unconditionally added if MILESTONE is unset. This is similar401 to the format used by Sun for the official release.</para>402 403 <para><command>export BUILD_NUMBER="b05"</command>:404 This will help you identify the compiled version of the runtime405 environment and virtual machine by appending this information to406 the version string. This is the same build number used by Sun to407 identify the official release.</para>408 409 <para><command>export INSANE=true</command>: The certified platform for the410 build is Redhat Enterprise Advanced Server 2.1. This variable ensures that411 all the errors related to compiling on a non-certified platform will be412 displayed as warnings instead of errors.</para>413 414 <para><command>export DEV_ONLY=true</command>: This command415 skips compiling the comparison build.</para>416 417 <para><command>export SKIP_FASTDEBUG_BUILD=true</command>: This command418 skips building of the debug version. Omit this command if you need419 to build the fastdebug target.</para>420 421 <para><command>unset JAVA_HOME CLASSPATH CFLAGS CXXFLAGS LDFLAGS</command>:422 These variables cause miscompilation of the build. Never set them.</para>423 424 142 <para><command>ln -sf xawt/libmawt.so 425 /opt/jdk-&jdk- version-string;/jre/lib/i386/</command>: This fixes143 /opt/jdk-&jdk-bin-version;/jre/lib/i386/</command>: This fixes 426 144 linking issues with other applications that expect to find the 427 145 <application>motif</application> libraries with the other … … 436 154 <title>Configuration Information</title> 437 155 438 <para>There are now two Java 2 SDKs installed in 439 <filename>/opt</filename>. You should decide on which one you 440 would like to use as the default. For example if you decide to use the 441 precompiled <application>JDK</application>, do the following as the 442 <systemitem class="username">root</systemitem> user:</para> 443 444 <screen role="root"><userinput>ln -v -nsf jdk-bin-&jdk-bin-version; /opt/jdk</userinput></screen> 156 <para>As the <systemitem class="username">root</systemitem> user, create 157 a symlink to the installation directory:</para> 158 159 <screen role="root"><userinput>ln -v -nsf jdk-&jdk-bin-version; /opt/jdk</userinput></screen> 445 160 446 161 <para>The information below assumes your system is set up using the … … 512 227 <envar>$JAVA_HOME</envar>/jre/lib/*, 513 228 and libjavaplugin_oji.so</seg> 514 <seg>/opt/jdk-&jdk- version-string;</seg>229 <seg>/opt/jdk-&jdk-bin-version;</seg> 515 230 </seglistitem> 516 231 </segmentedlist>
Note:
See TracChangeset
for help on using the changeset viewer.