/[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.33 Revision 1.34
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.33 2006/09/10 22:27:26 nightmorph Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/java.xml,v 1.34 2006/10/08 22:52:16 nightmorph 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
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.9</version> 27<version>0.10</version>
28<date>2006-09-10</date> 28<date>2006-10-08</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>
289output: 289output:
290</p> 290</p>
291 291
292<pre caption="Listing available VMs"> 292<pre caption="Listing available VMs">
293# <i>java-config --list-available-vms</i> 293# <i>java-config --list-available-vms</i>
2941) Blackdown JDK 1.3.1 [blackdown-jdk-1.3] (/etc/env.d/java/20blackdown-jdk-1.3) 294The following VMs are available for generation-2:
2952) Blackdown JDK 1.4.2.02 [blackdown-jdk-1.4] (/etc/env.d/java/20blackdown-jdk-1.4) 2951) Blackdown JDK 1.4.2.03 [blackdown-jdk-1.4.2]
2963) Blackdown JRE 1.4.2.02 [blackdown-jre-1.4] (/etc/env.d/java/20blackdown-jre-1.4) 2962) Blackdown JRE 1.4.2.03 [blackdown-jre-1.4.2]
2974) IBM JDK 1.4.2 [ibm-jdk-bin-1.4] (/etc/env.d/java/20ibm-jdk-bin-1.4) 2973) Blackdown 32bit JRE 1.4.2.03 [emul-linux-x86-java-1.4.2]
2985) IBM JRE 1.4.2 [ibm-jre-bin-1.4] (/etc/env.d/java/20ibm-jre-bin-1.4) 2984) Sun 32bit JRE 1.5.0.08 [emul-linux-x86-java-1.5]
2996) WebLogic JRockit 1.4.2.05 [jrockit-jdk-bin-1.4] (/etc/env.d/java/20jrockit-jdk-bin-1.4) 2995) Kaffe 1.1.7 [kaffe]
3007) WebLogic JRockit 1.5.0.03 [jrockit-jdk-bin-1.5] (/etc/env.d/java/20jrockit-jdk-bin-1.5) 300*) Sun JDK 1.5.0.08 [sun-jdk-1.5]
3018) Sun JDK 1.3.1.13 [sun-jdk-1.3] (/etc/env.d/java/20sun-jdk-1.3)
3029) Sun JDK 1.4.2.09 [sun-jdk-1.4] (/etc/env.d/java/20sun-jdk-1.4)
303*) Sun JDK 1.5.0.04 [sun-jdk-1.5] (/etc/env.d/java/20sun-jdk-1.5)
30411) Sun JRE 1.4.2.09 [sun-jre-bin-1.4] (/etc/env.d/java/20sun-jre-bin-1.4)
30512) Sun JRE 1.5.0.04 [sun-jre-bin-1.5] (/etc/env.d/java/20sun-jre-bin-1.5)
306</pre> 301</pre>
307 302
308<p> 303<p>
309The <e>*</e> indicates this is the current active vm (system-vm or user-vm when 304The <e>*</e> indicates this is the current active vm (system-vm or user-vm when
310set). The name in the brackets (<e>[]</e>) is the handle or ID for that 305set). The name in the brackets (<e>[]</e>) is the handle or ID for that
313</p> 308</p>
314 309
315<pre caption="Setting the System VM"> 310<pre caption="Setting the System VM">
316<comment>(By handle (preferred))</comment> 311<comment>(By handle (preferred))</comment>
317# <i>java-config --set-system-vm blackdown-jdk-1.4</i> 312# <i>java-config --set-system-vm blackdown-jdk-1.4</i>
313Now using blackdown-jdk-1.4 as your generation-2 system JVM
318<comment>(By number)</comment> 314<comment>(By number)</comment>
319# <i>java-config --set-system-vm 2</i> 315# <i>java-config --set-system-vm 6</i>
316Now using sun-jdk-1.5 as your generation-2 system JVM
320</pre> 317</pre>
321 318
322<p> 319<p>
323As a regular user, you can use <c>java-config --set-user-vm</c>. 320As a regular user, you can use <c>java-config --set-user-vm</c>.
324</p> 321</p>
532against it. 529against it.
533</p> 530</p>
534 531
535<pre caption="Setting classpath"> 532<pre caption="Setting classpath">
536# <i>export CLASSPATH="${CLASSPATH}:$(java-config --classpath log4j,xerces-2)"</i> 533# <i>export CLASSPATH="${CLASSPATH}:$(java-config --classpath log4j,xerces-2)"</i>
534</pre>
535
536</body>
537</section>
538</chapter>
539
540<chapter>
541<title>Java Browser Plug-ins</title>
542<section>
543<title>Installing a plug-in</title>
544<body>
545
546<p>
547You can install a Java plug-in for your web browser by emerging a Java VM with
548the <c>nsplugin</c> USE flag set.
549</p>
550
551<note>
552<c>nsplugin</c> is not available for all architectures. Check for available
553plug-ins on your arch before trying to install a VM by running <c>emerge -pv
554&lt;java-vm&gt;</c>.
555</note>
556
557<p>
558Portage will allow you to install multiple versions of Java plug-ins, though
559only one will be used by your browser. You can check the list of available
560plug-ins by running:
561</p>
562
563<pre caption="Viewing available plug-ins">
564# <i>eselect java-nsplugin list</i>
565 [1] sun-jre-bin-1.5
566 [2] blackdown-jre-1.4.2
567</pre>
568
569<p>
570In this example, <c>sun-jre-bin</c> is selected for the browser plug-in.
571</p>
572
573<pre caption="Selecting a plug-in">
574# <i>eselect java-nsplugin sun-jre-bin-1.5</i>
575</pre>
576
577<p>
578Verify that the correct plug-in was selected:
579</p>
580
581<pre caption="Verifying the correct plug-in">
582# <i>eselect java-nsplugin list</i>
583 [1] sun-jre-bin-1.5 current
584 [2] blackdown-jre-1.4.2
585</pre>
586
587<p>
588Java.com also provides a link to <uri
589link="http://java.com/en/download/installed.jsp">verify your installed
590plug-in</uri>. Additionally, if you are using a Mozilla-based browser, you can
591verify your Java plug-in by typing <c>about:plugins</c> into the address bar.
592</p>
593
594</body>
595</section>
596<section>
597<title>Plug-ins on multilib systems</title>
598<body>
599
600<p>
601If you are running a mixed 64-bit and 32-bit multilib system (for example, on AMD64),
602you can have both 64-bit and a 32-bit Java plug-ins installed.
603</p>
604
605<p>
606First, check which plug-ins are available:
607</p>
608
609<pre caption="Viewing available plug-ins">
610# <i>eselect java-nsplugin list</i>
611Available 32-bit Java browser plugins
612 [1] emul-linux-x86-java-1.4.2
613 [2] emul-linux-x86-java-1.5
614Available 64-bit Java browser plugins
615 [1] blackdown-jdk-1.4.2
616 [2] blackdown-jre-1.4.2
617</pre>
618
619<p>
620You can select a 32-bit plug-in for a 32-bit browser (for example,
621<c>firefox-bin</c>), and you can select a 64-bit plug-in for your 64-bit
622browser (for example, <c>konqueror</c>).
623</p>
624
625<pre caption="Selecting plug-ins">
626# <i>eselect java-nsplugin set 32bit emul-linux-x86-java-1.4.2</i>
627# <i>eselect java-nsplugin set 64bit blackdown-jdk-1.4.2</i>
628</pre>
629
630<p>
631Verify the correct plug-ins were selected:
632</p>
633
634<pre caption="Verifying the correct plug-ins">
635# <i>eselect java-nsplugin list</i>
636Available 32-bit Java browser plugins
637 [1] emul-linux-x86-java-1.4.2 current
638 [2] emul-linux-x86-java-1.5
639Available 64-bit Java browser plugins
640 [1] blackdown-jdk-1.4.2 current
641 [2] blackdown-jre-1.4.2
537</pre> 642</pre>
538 643
539</body> 644</body>
540</section> 645</section>
541</chapter> 646</chapter>

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34

  ViewVC Help
Powered by ViewVC 1.1.20