| 1 | <?xml version="1.0" encoding="UTF-8"?> |
1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!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.53 2011/11/15 19:03:31 swift Exp $ --> |
3 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/java.xml,v 1.54 2012/07/24 12:12:51 swift 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"> |
| 9 | <mail link="nichoj@gentoo.org">Joshua Nichols</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="karltk@gentoo.org">Karl Trygve Kalleberg</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 | |
| 18 | <abstract> |
18 | <abstract> |
| 19 | This guide will introduce you to Java and explain how to use Java with Gentoo |
19 | This guide will introduce you to Java and explain how to use Java with Gentoo |
| 20 | Linux. |
20 | Linux. |
| 21 | </abstract> |
21 | </abstract> |
| 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>4</version> |
27 | <version>5</version> |
| 28 | <date>2011-11-15</date> |
28 | <date>2012-07-24</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> |
| 34 | <body> |
34 | <body> |
| 35 | |
35 | |
| 36 | <p> |
36 | <p> |
| 37 | Java is a programming language developed by engineers of Sun Microsystems. The |
37 | Java is a programming language developed by engineers of Sun Microsystems. The |
| 38 | language is object-oriented and designed to run on multiple platforms without |
38 | language is object-oriented and designed to run on multiple platforms without |
| 39 | the need of recompiling code for each platform. Although Java can be compiled |
39 | the need of recompiling code for each platform. Although Java can be compiled |
| 40 | as a native program, much of Java's popularity can be attributed to its |
40 | as a native program, much of Java's popularity can be attributed to its |
| 41 | portability, along with other features such as garbage collection. To make |
41 | portability, along with other features such as garbage collection. To make |
| 42 | platform independence possible the Java compiler compiles the Java code to an |
42 | platform independence possible the Java compiler compiles the Java code to an |
| 43 | intermediate representation called "Java bytecode" that runs on a JRE (Java |
43 | intermediate representation called "Java bytecode" that runs on a JRE (Java |
| … | |
… | |
| 102 | --> |
102 | --> |
| 103 | </body> |
103 | </body> |
| 104 | </section> |
104 | </section> |
| 105 | <section> |
105 | <section> |
| 106 | <title>Installing a JRE/JDKs</title> |
106 | <title>Installing a JRE/JDKs</title> |
| 107 | <body> |
107 | <body> |
| 108 | |
108 | |
| 109 | <p> |
109 | <p> |
| 110 | To install your profile's default JDK, you can run <c>emerge virtual/jdk</c>. |
110 | To install your profile's default JDK, you can run <c>emerge virtual/jdk</c>. |
| 111 | Or to install your profile's default JRE, you can <c>emerge virtual/jre</c>. |
111 | Or to install your profile's default JRE, you can <c>emerge virtual/jre</c>. |
| 112 | </p> |
112 | </p> |
| 113 | |
113 | |
| 114 | <p> |
114 | <p> |
| 115 | Some JDKs and JREs, including the Sun packages, require accepting an End User |
115 | Some JDKs and JREs, including the Sun packages, require accepting an End User |
| 116 | License Agreement, or EULA. If its license (such as dlj-1.1) is not listed in |
116 | License Agreement, or EULA. If its license (such as dlj-1.1) is not listed in |
| 117 | ACCEPT_LICENSE in <path>/etc/make.conf</path>, then you won't be able to install |
117 | ACCEPT_LICENSE in <path>/etc/portage/make.conf</path>, then you won't be able to install |
| 118 | the JDK/JRE. For more information on how to add acceptable licenses to |
118 | the JDK/JRE. For more information on how to add acceptable licenses to |
| 119 | <path>make.conf</path>, please read the <uri |
119 | <path>make.conf</path>, please read the <uri |
| 120 | link="/doc/en/handbook/handbook-x86.xml?part=2&chap=1#doc_chap4">Portage |
120 | link="/doc/en/handbook/handbook-x86.xml?part=2&chap=1#doc_chap4">Portage |
| 121 | Handbook</uri>. |
121 | Handbook</uri>. |
| 122 | </p> |
122 | </p> |
| 123 | |
123 | |
| 124 | <p> |
124 | <p> |
| 125 | To avoid any restrictive license hassle, consider installing |
125 | To avoid any restrictive license hassle, consider installing |
| 126 | <c>icedtea-bin</c>, which is an open Java implementation from the OpenJDK |
126 | <c>icedtea-bin</c>, which is an open Java implementation from the OpenJDK |
| 127 | project. |
127 | project. |
| 128 | </p> |
128 | </p> |
| 129 | |
129 | |
| 130 | <note> |
130 | <note> |
| 131 | A JDK also includes a JRE, so if you install a JDK you shouldn't have to also |
131 | A JDK also includes a JRE, so if you install a JDK you shouldn't have to also |
| 132 | have to install a JRE. |
132 | have to install a JRE. |