/[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.48 Revision 1.50
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.48 2010/03/31 23:38:40 nightmorph Exp $ -->
3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 2<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/java.xml,v 1.50 2011/05/09 19:16:31 nightmorph Exp $ -->
4 4
5<guide> 5<guide>
6<title>Gentoo Java Guide</title> 6<title>Gentoo Java Guide</title>
7 7
8<author title="Author"> 8<author title="Author">
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.22</version> 27<version>1</version>
28<date>2009-12-23</date> 28<date>2011-05-09</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>
111</tr> 111</tr>
112<tr> 112<tr>
113 <ti>BEA WebLogic's J2SE Development Kit</ti> 113 <ti>BEA WebLogic's J2SE Development Kit</ti>
114 <ti>dev-java/jrockit-jdk-bin</ti> 114 <ti>dev-java/jrockit-jdk-bin</ti>
115</tr> 115</tr>
116<tr>
117 <ti>The IcedTea Open Java Kit</ti>
118 <ti>dev-java/icedtea</ti>
119 <ti>dev-java/icedtea6-bin</ti>
120</tr>
116</table> 121</table>
117 122
118<!-- 123<!--
119TODO: list free implementations? 124TODO: list free implementations?
120note about not drop-in replacements 125note about not drop-in replacements
130To install your profile's default JDK, you can run <c>emerge virtual/jdk</c>. 135To install your profile's default JDK, you can run <c>emerge virtual/jdk</c>.
131Or to install your profile's default JRE, you can <c>emerge virtual/jre</c>. 136Or to install your profile's default JRE, you can <c>emerge virtual/jre</c>.
132</p> 137</p>
133 138
134<p> 139<p>
135In recent events, Sun has relicensed their JDK and JRE under a more Linux 140Some JDKs and JREs, including the Sun packages, require accepting an End User
136distro friendly license. As a result, Sun Java 1.5 and onwards are 141License Agreement, or EULA. If its license (such as dlj-1.1) is not listed in
137freely downloadable, without any further hassle. 142ACCEPT_LICENSE in <path>/etc/make.conf</path>, then you won't be able to install
143the JDK/JRE. For more information on how to add acceptable licenses to
144<path>make.conf</path>, please read the <uri
145link="/doc/en/handbook/handbook-x86.xml?part=2&amp;chap=1#doc_chap4">Portage
146Handbook</uri>.
147</p>
148
149<p>
150To avoid any restrictive license hassle, consider installing <c>icedtea6-bin</c>
151or <c>icedtea</c>, which are more open Java implementations from the OpenJDK
152project.
138</p> 153</p>
139 154
140<note> 155<note>
141A JDK also includes a JRE, so if you install a JDK you shouldn't have to also 156A JDK also includes a JRE, so if you install a JDK you shouldn't have to also
142have to install a JRE. 157have to install a JRE.
257</p> 272</p>
258 273
259</body> 274</body>
260</section> 275</section>
261<section id="preferred-vm"> 276<section id="preferred-vm">
262<title>Preferred VM</title> 277<title>Preferred Build VM</title>
263<body> 278<body>
264 279
265<p>
266While merging Java packages, the VM can and will be switched as necessary.
267</p> 280<p>
268 281While merging Java packages, the VM used for building can sometimes be different
282from the one currently set as the system VM.
269<p> 283</p>
270Because of the wide variety of available VMs, we do not have the resources to 284
271test and verify every package works on all of them. So to ensure that every 285<p>
272packages merges smoothly, we have defined a list of <e>default/supported 286This merge time VM switching is needed when, for example, your system-vm is
287set to a 1.6 VM and the package you are merging requires a 1.5 VM. While merging
288it will select and use a 1.5 VM, leaving your system-vm choice intact.
289</p>
290
291<p>
292To define which VM is selected when a switch is needed, we have created a list of <e>default/supported
273VMs</e> per arch. You can find them in 293VMs</e> per arch. You can find them in
274<path>/usr/share/java-config-2/config/jdk-defaults.conf</path>. When you are 294<path>/usr/share/java-config-2/config/jdk-defaults.conf</path>.
275merging a Java package, and it detects one of the VM in that file is installed,
276it will automatically use that VM, instead of the system-vm.
277</p>
278
279<p> 295</p>
280The merge time VM switching is also needed when, for example, your system-vm is 296
281set a 1.4 VM and the package you are merging requires a 1.5 VM. While merging
282it will use the preferred 1.5 VM, leaving your system-vm choice intact.
283</p> 297<p>
284 298You can override these defaults (and even your selected system VM) in
285<p>
286Of course, Gentoo is all about choice, so you can override these defaults in
287<path>/etc/java-config-2/build/jdk.conf</path> and have complete control over 299<path>/etc/java-config-2/build/jdk.conf</path> and have complete control over
288which VM will get used. Some examples: 300which VM will get used for merging. Some examples:
289</p> 301</p>
290 302
291<pre caption="Example /etc/java-config-2/build/jdk.conf"> 303<pre caption="Example /etc/java-config-2/build/jdk.conf">
292<comment>(I always want it to use a sun-jdk, ie sun-jdk-1.4 for 1.4, sun-jdk-1.5 for 1.5, etc)</comment> 304<comment>(I always want it to use a sun-jdk, ie sun-jdk-1.4 for 1.4, sun-jdk-1.5 for 1.5, etc)</comment>
293*=sun-jdk 305*=sun-jdk
3051.5=sun-jdk 3171.5=sun-jdk
306</pre> 318</pre>
307 319
308<warn> 320<warn>
309You do not <e>have</e> to edit this file. If you change these options to use a 321You do not <e>have</e> to edit this file. If you change these options to use a
310unsupported VM, things could possibly break. Bugs reported with a unsupported VM 322unsupported VM, things could possibly break. Because of the wide variety of
323available VMs, we do not have the resources to test and verify every package
324works on all of them. Bugs reported with a unsupported VM won't be prioritized
311won't be prioritized as much as bugs present within supported VMs. 325as much as bugs present within supported VMs.
312</warn> 326</warn>
313 327
314</body> 328</body>
315</section> 329</section>
316</chapter> 330</chapter>
319<title>Compilers</title> 333<title>Compilers</title>
320<section> 334<section>
321<body> 335<body>
322 336
323<p> 337<p>
324The standard Java compiler used for building is javac, which comes with each 338The standard Java compiler used for building is <c>javac</c>, which comes with
325JDK. In addition to configuring the VM used at build time, it is also possible 339each JDK. In addition to configuring the VM used at build time, it is also
326configure which compiler is used. Essentially, you define a list your 340possible configure which compiler is used. Essentially, you define a list your
327preference for which compiler to use in 341preference for which compiler to use in
328<path>/etc/java-config-2/build/compilers.conf</path>. 342<path>/etc/java-config-2/build/compilers.conf</path>.
329</p> 343</p>
330 344
331<pre caption="/etc/java-config-2/build/compilers.conf"> 345<pre caption="/etc/java-config-2/build/compilers.conf">

Legend:
Removed from v.1.48  
changed lines
  Added in v.1.50

  ViewVC Help
Powered by ViewVC 1.1.20