/[gentoo]/xml/htdocs/doc/en/java.xml
Gentoo

Diff of /xml/htdocs/doc/en/java.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.27 Revision 1.28
1<?xml version="1.0" encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/java.xml,v 1.27 2006/07/25 08:13:47 rane Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/java.xml,v 1.28 2006/08/08 09:51:12 rane Exp $ -->
3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4 4
5<guide link="/doc/en/java.xml"> 5<guide link="/doc/en/java.xml">
6<title>Gentoo Java Guide</title> 6<title>Gentoo Java Guide</title>
7 7
8<author title="Author"> 8<author title="Author">
9 <mail link="karltk@gentoo.org">Karl Trygve Kalleberg</mail> 9 <mail link="nichoj@gentoo.org">Joshua Nichols</mail>
10</author> 10</author>
11<author title="Author"> 11<author title="Author">
12 <mail link="nichoj@gentoo.org">Joshua Nichols</mail> 12 <mail link="karltk@gentoo.org">Karl Trygve Kalleberg</mail>
13</author> 13</author>
14<author title="Editor"> 14<author title="Editor">
15 <mail link="nightmorph@gentoo.org">Joshua Saddler</mail> 15 <mail link="nightmorph@gentoo.org">Joshua Saddler</mail>
16</author> 16</author>
17 17
22 22
23<!-- The content of this document is licensed under the CC-BY-SA license --> 23<!-- The content of this document is licensed under the CC-BY-SA license -->
24<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 24<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
25<license/> 25<license/>
26 26
27<version>0.5</version> 27<version>0.6</version>
28<date>2006-07-24</date> 28<date>2006-08-07</date>
29 29
30<chapter> 30<chapter>
31<title>What is Java?</title> 31<title>What is Java?</title>
32<section> 32<section>
33<title>Overview</title> 33<title>Overview</title>
55</body> 55</body>
56</section> 56</section>
57</chapter> 57</chapter>
58 58
59<chapter> 59<chapter>
60<title>Installing a JRE/JDK</title> 60<title>New Java System</title>
61<section>
62<body>
63
64<p>
65The way Java is handled on Gentoo has recently seen many changes and
66improvements. This has only happened very recently, and as a result, all the
67packages related to it are marked with testing keywords, ie ~x86. This
68document assumes you are using the new system.
69</p>
70
71</body>
72</section>
73<section>
74<title>Keywords</title>
75<body>
76
77<p>
78If you are using the stable tree, i.e. x86, ppc, or amd64 as opposed to ~x86,
79~ppc, or ~amd64, you will need to add some entries to your
80<path>/etc/portage/package.keywords</path>:
81</p>
82
83<pre caption="package.keywords">
84# Core Gentoo/Java Packages
85dev-java/ant-core
86dev-java/ant-tasks
87dev-java/ant
88dev-java/java-config
89dev-java/java-config-wrapper
90dev-java/javatoolkit
91# JDKs
92=dev-java/sun-jdk-1.4*
93=dev-java/sun-jdk-1.5*
94=dev-java/ibm-jdk-bin-1.4*
95=dev-java/ibm-jdk-bin-1.5*
96=dev-java/jrockit-jdk-bin-1.4*
97=dev-java/jrockit-jdk-bin-1.5*
98=dev-java/blackdown-jdk-1.4*
99dev-java/kaffe
100# JREs
101=dev-java/sun-jre-bin-1.4*
102=dev-java/sun-jre-bin-1.5*
103=dev-java/ibm-jre-bin-1.4*
104=dev-java/blackdown-jre-1.4*
105# Virtuals
106virtual/jdk
107virtual/jre
108# Compilers
109dev-java/eclipse-ecj
110dev-java/jikes
111# Documentation
112dev-java/java-sdk-docs
113# Misc packages that have been updated to generation-2,
114# where the generation-1 won't build and/or run properly
115dev-java/lucene
116# These have optional Java support, but need ~arch to function properly
117# with generation-2
118dev-util/subversion
119sys-libs/db
120</pre>
121
122<impo>
123It is crucial that you keyword ALL packages related to the new Java system,
124otherwise you will have problems in the later steps of this guide.
125</impo>
126
127<impo>
128It can't be emphasized enough that you have to have ALL the packages related
129to the new Java system keyworded for it to function properly.
130</impo>
131
132</body>
133</section>
134<section>
135<title>Existing installs</title>
136<body>
137
138<p>
139For existing installs, regardless of if you have installed anything Java
140before, make sure you have followed the <uri
141link="/proj/en/java/java-upgrade.xml">Java Upgrade Guide</uri>.
142</p>
143
144</body>
145</section>
146<section>
147<title>New installs</title>
148<body>
149
150<p>
151New installs should require no further preparation.
152</p>
153
154</body>
155</section>
156</chapter>
157
158<chapter>
159<title>Installing a Virtual Machine</title>
61<section> 160<section>
62<title>The choices</title> 161<title>The choices</title>
63<body> 162<body>
64 163
65<p> 164<p>
66Gentoo provides numerous JREs and JDKs. Among the current alternatives, we 165Gentoo provides numerous Runtime Environments (JREs) and Development Kits
67have: 166(JDKs). Among the current choices, we have:
68</p> 167</p>
69 168
70<table> 169<table>
71<tr> 170<tr>
72 <th>Vendor</th> 171 <th>Vendor</th>
109The default is Blackdown for both the JRE and the JDK, as it is freely ("free 208The default is Blackdown for both the JRE and the JDK, as it is freely ("free
110as in beer") available without any registration fuss. 209as in beer") available without any registration fuss.
111</p> 210</p>
112 211
113<p> 212<p>
114Both the Sun and the IBM are generally faster, but getting them is a bit more 213The default for Java 1.4 is the Blackdown JRE/JDK pair, as it is freely
115hassle, as you are required to read and accept their license before downloading 214("free as in beer") available without any registration fuss.
215</p>
216
217<p>
218JREs and JDKs from Sun, IBM, and BEA are generally faster, but getting them
219is a bit more work, as you are required to read and accept their license before
116(IBM additionally requires you to register). 220downloading (IBM additionally requires you to register).
117</p>
118
119<p>
120Our ebuilds for the Sun and IBM JRE/JDKs will inform you how to download the
121appropriate files.
122</p> 221</p>
123 222
124</body> 223</body>
125</section> 224</section>
126<section> 225<section>
128<body> 227<body>
129 228
130<p> 229<p>
131To install your profile's default JDK, you can run <c>emerge virtual/jdk</c>. 230To install your profile's default JDK, you can run <c>emerge virtual/jdk</c>.
132Or to install your profile's default JRE, you can <c>emerge virtual/jre</c>. 231Or to install your profile's default JRE, you can <c>emerge virtual/jre</c>.
232</p>
233
234<p>
235In recent events, Sun has relicensed their JDK and JRE under a more Linux
236distro friendly license. As a result, Sun releases Java 1.5 and onwards are
237freely downloadable, without any further hassle.
133</p> 238</p>
134 239
135<note> 240<note>
136A JDK also includes a JRE, so if you install a JDK you shouldn't have to also 241A JDK also includes a JRE, so if you install a JDK you shouldn't have to also
137have to install a JRE. 242have to install a JRE.
138</note> 243</note>
139 244
140</body> 245</body>
141</section> 246</section>
142<section> 247<section>
143<title>Installing the Sun/IBM JRE/JDKs</title> 248<title>Installing fetch-restricted virtual machines</title>
144<body> 249<body>
145 250
146<p> 251<p>
147If you run <c>emerge dev-java/sun-jdk</c> or <c>emerge 252As already mentioned, some of the JDKs and JREs require you to jump through a
148dev-java/ibm-jdk-bin</c>, you will be notified that you are required to 253few hoops before installing. Simply emerge the packages as you normally would.
149download the actual files yourself. This has to do with license restrictions 254The ebuilds will then instruct you where to go and what to download.
150for the Sun JRE/JDK (online click-wrap license) and registration issues with
151the IBM JRE/JDK.
152</p> 255</p>
153 256
154<p> 257<p>
155You should download the indicated file(s) into 258You should download the indicated file(s) into
156<path>/usr/portage/distfiles</path>. Once there, you can rerun the emerge 259<path>/usr/portage/distfiles</path>. Once there, you can rerun the emerge
160</body> 263</body>
161</section> 264</section>
162</chapter> 265</chapter>
163 266
164<chapter> 267<chapter>
165<title>Configuring your JRE/JDK</title> 268<title>Configuring your virtual machine</title>
166<section> 269<section>
167<title>Overview</title> 270<title>Overview</title>
168<body> 271<body>
169 272
170<p> 273<p>
184</note> 287</note>
185 288
186</body> 289</body>
187</section> 290</section>
188<section> 291<section>
189<title>Setting a default JRE/JDK</title> 292<title>Setting a default virtual machine</title>
190<body> 293<body>
191 294
192<p> 295<p>
193Running the command <c>java-config --list-available-vms</c> will give you a 296Running the command <c>java-config --list-available-vms</c> will give you a
194list of all JREs and JDKs installed on your system. Here is an example of 297list of all JREs and JDKs installed on your system. Here is an example of
478 <li> 581 <li>
479 The <b>source</b> flag will install a zip of the package's source code. 582 The <b>source</b> flag will install a zip of the package's source code.
480 This is typically used to provide your IDE with the source code for the 583 This is typically used to provide your IDE with the source code for the
481 package. 584 package.
482 </li> 585 </li>
586 <li>
587 The <b>source</b> flag installs a zip of the source code of a package.
588 This is traditionally used for for IDEs to 'attach' source to the libraries
589 you are using.
590 </li>
591 <li>
592 For Java packages, the <b>doc</b> flag will build API documentation using
593 javadoc.
594 </li>
483</ul> 595</ul>
484 596
485</body> 597</body>
486</section> 598</section>
487</chapter> 599</chapter>

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

  ViewVC Help
Powered by ViewVC 1.1.20