/[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.25 Revision 1.26
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.25 2006/07/13 06:29:21 rane Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/java.xml,v 1.26 2006/07/20 23:55:32 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="karltk@gentoo.org">Karl Trygve Kalleberg</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="nichoj@gentoo.org">Joshua Nichols</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
88 <ti>dev-java/ibm-jdk-bin</ti> 88 <ti>dev-java/ibm-jdk-bin</ti>
89 <ti>dev-java/ibm-jre-bin</ti> 89 <ti>dev-java/ibm-jre-bin</ti>
90</tr> 90</tr>
91<tr> 91<tr>
92 <ti>The Compaq Java Kit for Alpha/Linux/GNU</ti> 92 <ti>The Compaq Java Kit for Alpha/Linux/GNU</ti>
93 <ti>dev-java/compaq-jdk</ti> 93 <ti>dev-java/compaq-jdk</ti>
94 <ti>dev-java/compaq-jre</ti> 94 <ti>dev-java/compaq-jre</ti>
95</tr> 95</tr>
96<tr> 96<tr>
97 <ti>BEA WebLogic's J2SE Development Kit</ti> 97 <ti>BEA WebLogic's J2SE Development Kit</ti>
98 <ti>dev-java/jrockit-jdk-bin</ti> 98 <ti>dev-java/jrockit-jdk-bin</ti>
99</tr> 99</tr>
100</table> 100</table>
101 101
102<!-- 102<!--
103TODO: list free implmentations? 103TODO: list free implementations?
104note about not drop-in replacemenets 104note about not drop-in replacements
105kaffe/sablevm/gcj/jamvm 105kaffe/sablevm/gcj/jamvm
106--> 106-->
107 107
108<p> 108<p>
109The default is Blackdown for both the JRE and the JDK, as it is freely ("free 109The default is Blackdown for both the JRE and the JDK, as it is freely ("free
110as in beer") available without any registration fuss. 110as in beer") available without any registration fuss.
111</p> 111</p>
112 112
113<p> 113<p>
114Both the Sun and the IBM are generally faster, but getting them is a bit more 114Both the Sun and the IBM are generally faster, but getting them is a bit more
115hassle, as you are required to read and accept their license before downloading 115hassle, as you are required to read and accept their license before downloading
116(IBM additionally requires you to register). 116(IBM additionally requires you to register).
117</p> 117</p>
118 118
119<p> 119<p>
275<comment>(Always use sun-jdk-1.5 wherever possible, except for when a 1.4 or 1.3 VM is explicitly required)</comment> 275<comment>(Always use sun-jdk-1.5 wherever possible, except for when a 1.4 or 1.3 VM is explicitly required)</comment>
276*=sun-jdk-1.5 276*=sun-jdk-1.5
277</pre> 277</pre>
278 278
279<pre caption="Example /etc/java-config-2/build/jdk.conf"> 279<pre caption="Example /etc/java-config-2/build/jdk.conf">
280<comment># For 1.3 I prefer sun-jdk 1.4 but when it is not available, use ibm-jdk-bin, 280<comment># For 1.3 I prefer sun-jdk 1.4 but when it is not available, use ibm-jdk-bin,
281# For 1.4, use blackdown-jdk, and for 1.5, use sun-jdk </comment> 281# For 1.4, use blackdown-jdk, and for 1.5, use sun-jdk </comment>
2821.3=sun-jdk-1.4 ibm-jdk-bin 2821.3=sun-jdk-1.4 ibm-jdk-bin
2831.4=blackdown-jdk 2831.4=blackdown-jdk
2841.5=sun-jdk 2841.5=sun-jdk
285</pre> 285</pre>
286 286
287<warn> 287<warn>
288You do not have to edit this file. If you change these options to use a 288You do not have to edit this file. If you change these options to use a
289unsupported VM, things could possibly break. Bugs reported with a unsupported 289unsupported VM, things could possibly break. Bugs reported with a unsupported
290VM will a lower priority if they aren't present with supported VMs. 290VM won't be prioritized as much as bugs present within supported VMs.
291</warn> 291</warn>
292 292
293</body> 293</body>
294</section> 294</section>
295</chapter> 295</chapter>
296 296
297<chapter> 297<chapter>
298<title>Compilers</title> 298<title>Compilers</title>
299<section> 299<section>
300<body> 300<body>
301 301
302<p> 302<p>
303The standard Java compiler used for building is javac, which comes with each 303The standard Java compiler used for building is javac, which comes with each
304JDK. In addition to configuring the VM used at build time, it is also possible 304JDK. In addition to configuring the VM used at build time, it is also possible
305configure which compiler is used. Essentially, you define a list your 305configure which compiler is used. Essentially, you define a list your
362 </ti> 362 </ti>
363</tr> 363</tr>
364</table> 364</table>
365 365
366</body> 366</body>
367</section> 367</section>
368</chapter> 368</chapter>
369 369
370<chapter> 370<chapter>
371<title>Setting a default CLASSPATH</title> 371<title>Setting a default CLASSPATH</title>
372<section> 372<section>
373<body> 373<body>
374 374
375<warn> 375<warn>
376The options explained in this section should be considered deprecated and will 376The options explained in this section should be considered deprecated and will
377be most likely be removed in the future. We strongly recommend against using 377most likely be removed in the future. We strongly recommend against using
378these, because your Java projects or application should ideally manage their 378these, because your Java projects or application should ideally manage their
379own classpaths. If you choose to specify a default CLASSPATH, some applications 379own classpaths. If you choose to specify a default CLASSPATH, some applications
380may behave unexpectedly, because classes they weren't expecting would be on the 380may behave unexpectedly, because classes they weren't expecting would be on the
381classpath. 381classpath.
382</warn> 382</warn>
383 383
384<p> 384<p>
385<c>java-config</c> can also be used to set a system-wide default CLASSPATH, as 385<c>java-config</c> can also be used to set a system-wide default CLASSPATH, as
386well a user-specific default CLASSPATH. 386well a user-specific default CLASSPATH.
387</p> 387</p>
388 388
389<p> 389<p>
390First, you will want to list available Java libraries installed on your system 390First, you will want to list available Java libraries installed on your system
391that might want to be put in your CLASSPATH. Here is an example of output: 391that might want to be put in your CLASSPATH. Here is an example of output:
392</p> 392</p>
404<p> 404<p>
405Again, the names in brackets (<e>[]</e>) are the IDs that you have to pass to 405Again, the names in brackets (<e>[]</e>) are the IDs that you have to pass to
406<c>java-config --set-system-classpath</c>. Here is an example: 406<c>java-config --set-system-classpath</c>. Here is an example:
407</p> 407</p>
408 408
409<pre caption="Setting classpaths"> 409<pre caption="Setting classpaths">
410# <i>java-config --set-system-classpath log4j,xerces-2</i> 410# <i>java-config --set-system-classpath log4j,xerces-2</i>
411</pre> 411</pre>
412 412
413<note> 413<note>
414The current directory (<path>.</path>) will not be part of the system 414The current directory (<path>.</path>) will not be part of the system
415classpath, as that should be added in your system's login profile. 415classpath, as that should be added in your system's login profile.
416</note> 416</note>
417 417
418<p> 418<p>
419You will have to update your environment by relogging in or sourcing 419You will have to update your environment by logging out, then in again or
420<path>/etc/profile</path>. 420sourcing <path>/etc/profile</path>.
421</p> 421</p>
422 422
423<p> 423<p>
424For users, <c>java-config --set-user-classpath</c> will create 424For users, <c>java-config --set-user-classpath</c> will create
425<path>~/.gentoo/java-env-classpath</path>, which you should then source from 425<path>~/.gentoo/java-env-classpath</path>, which you should then source from
426your shell's profile. 426your shell's profile.
427</p> 427</p>
428 428
429<pre caption="Sourcing user specific classpath"> 429<pre caption="Sourcing user specific classpath">
430<i>if [[ -f "${HOME}/.gentoo/java-env-classpath" ]]; then 430<i>if [[ -f "${HOME}/.gentoo/java-env-classpath" ]]; then
431 source ${HOME}/.gentoo/java-env-classpath 431 source ${HOME}/.gentoo/java-env-classpath
432fi</i> 432fi</i>
433</pre> 433</pre>
434 434
435<p> 435<p>

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

  ViewVC Help
Powered by ViewVC 1.1.20