/[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.11 Revision 1.12
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.11 2003/11/21 18:47:08 neysx Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/java.xml,v 1.12 2003/11/22 10:01:56 neysx 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 and Editor"> 8<author title="Author and Editor">
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="Editor"> 11<author title="Editor">
12 <mail link="swift@gentoo.org">Sven Vermeulen</mail> 12 <mail link="swift@gentoo.org">Sven Vermeulen</mail>
13</author> 13</author>
14 14
15<abstract> 15<abstract>
16Users' and Developers' Guide to Java in Gentoo 16Users' and Developers' Guide to Java in Gentoo
17</abstract> 17</abstract>
18 18
19<license/> 19<license/>
20 20
21<version>0.1.3</version> 21<version>0.1.4</version>
22<date>November 16, 2003</date> 22<date>November 21, 2003</date>
23 23
24<chapter> 24<chapter>
25<title>Installing a JDK/JRE</title> 25<title>Installing a JDK/JRE</title>
26<section> 26<section>
27<title>Overview</title> 27<title>Overview</title>
28<body> 28<body>
29 29
30<p> 30<p>
31Gentoo provides numerous JDKs and JREs. The default is the Blackdown JDK/JRE 31Gentoo provides numerous JDKs and JREs. The default is the Blackdown JDK/JRE
32pair, as it is freely (beer) available without any registration fuss. 32pair, as it is freely (beer) available without any registration fuss.
33</p> 33</p>
34 34
35<note> 35<note>
36As kaffe becomes a JRE/JDK drop-in replacement, that will most likely become our 36As kaffe becomes a JRE/JDK drop-in replacement, that will most likely become our
37default. 37default.
91<p> 91<p>
92Using the <c>java-config</c> tool, you can set the system-wide default if you 92Using the <c>java-config</c> tool, you can set the system-wide default if you
93have root access. Users can also use <c>java-config</c> to set up their own 93have root access. Users can also use <c>java-config</c> to set up their own
94personal default, that is different from the system-wide default. 94personal default, that is different from the system-wide default.
95</p> 95</p>
96 96
97</body> 97</body>
98</section> 98</section>
99 99
100<section> 100<section>
101<title>Setting a default JDK/JRE</title> 101<title>Setting a default JDK/JRE</title>
102<body> 102<body>
103 103
104<p> 104<p>
105Running the command <c>java-config --list-available-vms</c> will give you a list 105Running the command <c>java-config --list-available-vms</c> will give you a list
106of all availble JREs and JDKs on your system, thus: 106of all available JREs and JDKs on your system, thus:
107</p> 107</p>
108 108
109<pre caption="Listing available VMs"> 109<pre caption="Listing available VMs">
110[%1 ~] java-config --list-available-vms 110# <i>java-config --list-available-vms</i>
111[blackdown-jdk-1.3.1] Blackdown JDK 1.3.1 (/etc/env.d/java/20blackdown-jdk-1.3.1) 111[blackdown-jdk-1.3.1] Blackdown JDK 1.3.1 (/etc/env.d/java/20blackdown-jdk-1.3.1)
112[blackdown-jre-1.3.1] Blackdown JRE 1.3.1 (/etc/env.d/java/20blackdown-jre-1.3.1) 112[blackdown-jre-1.3.1] Blackdown JRE 1.3.1 (/etc/env.d/java/20blackdown-jre-1.3.1)
113[ibm-jdk-1.3.0] IBM JDK 1.3.0 (/etc/env.d/java/20ibm-jdk-1.3.0) 113[ibm-jdk-1.3.0] IBM JDK 1.3.0 (/etc/env.d/java/20ibm-jdk-1.3.0)
114[ibm-jdk-1.3.1] IBM JDK 1.3.1 (/etc/env.d/java/20ibm-jdk-1.3.1) 114[ibm-jdk-1.3.1] IBM JDK 1.3.1 (/etc/env.d/java/20ibm-jdk-1.3.1)
115[ibm-jre-1.3.1] IBM JRE 1.3.1 (/etc/env.d/java/20ibm-jre-1.3.1) 115[ibm-jre-1.3.1] IBM JRE 1.3.1 (/etc/env.d/java/20ibm-jre-1.3.1)
116[sun-jdk-1.4.0] Sun JDK 1.4.0 (/etc/env.d/java/20sun-jdk-1.4.0) 116[sun-jdk-1.4.0] Sun JDK 1.4.0 (/etc/env.d/java/20sun-jdk-1.4.0)
117</pre> 117</pre>
118 118
119<p> 119<p>
120The name in the brackets <path>"[]"</path> is the handle or ID for that 120The name in the brackets <path>"[]"</path> is the handle or ID for that
121particular VM. You use pass that ID to <c>java-config --set-system-vm</c>, thus: 121particular VM. You use pass that ID to <c>java-config --set-system-vm</c>, thus:
122</p> 122</p>
123 123
124<pre caption="Setting the System VM"> 124<pre caption="Setting the System VM">
125[#1 ~] java-config --set-system-vm=ibm-jdk-1.3.1 125# <i>java-config --set-system-vm=ibm-jdk-1.3.1</i>
126Now using IBM JDK 1.3.1 (/etc/env.d/java/20ibm-jdk-1.3.1) 126Now using IBM JDK 1.3.1 (/etc/env.d/java/20ibm-jdk-1.3.1)
127</pre> 127</pre>
128 128
129<note> 129<note>
130You will have to be root to run --set-system-vm. 130You will have to be root to run --set-system-vm.
131</note> 131</note>
132 132
133<p> 133<p>
134Once you have issued <c>java-config --set-system-vm</c> with a particular VM ID, 134Once you have issued <c>java-config --set-system-vm</c> with a particular VM ID,
135you will need to regenerate your /etc/profile.env, thus: 135you will need to regenerate your /etc/profile.env, thus:
136</p> 136</p>
137 137
138<pre caption="Regenerating /etc/profile.env" > 138<pre caption="Regenerating /etc/profile.env" >
139[#1 ~] env-update 139# <i>env-update</i>
140</pre> 140</pre>
141 141
142<p> 142<p>
143After this, you will either want to relogin, or resource 143After this, you will either want to relogin, or resource
144<path>/etc/profile</path> into your environment. 144<path>/etc/profile</path> into your environment.
145</p> 145</p>
146 146
147<p> 147<p>
148As a regular user, you can use <c>java-config --set-user-vm</c>, which will 148As a regular user, you can use <c>java-config --set-user-vm</c>, which will
149create <path>$HOME/.gentoo/java-env</path> with all required env vars. You would 149create <path>$HOME/.gentoo/java-env</path> with all required env vars. You would
150normally source this from your shell's startup script 150normally source this from your shell's startup script
151(<path>$HOME/.zshenv</path> in my case). 151(<path>$HOME/.zshenv</path> in my case).
152</p> 152</p>
153 153
154</body> 154</body>
157<section> 157<section>
158<title>Setting a default CLASSPATH</title> 158<title>Setting a default CLASSPATH</title>
159<body> 159<body>
160 160
161<p> 161<p>
162<c>java-config</c> can also be used to set a system-wide default CLASSPATH, and 162<c>java-config</c> can also be used to set a system-wide default CLASSPATH, and
163of course a user-specific default CLASSPATH. 163of course a user-specific default CLASSPATH.
164</p> 164</p>
165 165
166<p> 166<p>
167First you want to list available java libraries that might be interesting to put 167First you want to list available java libraries that might be interesting to put
168in your CLASSPATH, thus: 168in your CLASSPATH, thus:
169</p> 169</p>
170 170
171<pre caption="Listing classes"> 171<pre caption="Listing classes">
172[%1 ~] java-config --list-available-packages 172# <i>java-config --list-available-packages</i>
173[ant] No description (/usr/share/ant/classpath.env) 173[ant] No description (/usr/share/ant/classpath.env)
174[java-gnome] No description (/usr/share/java-gnome/classpath.env) 174[java-gnome] No description (/usr/share/java-gnome/classpath.env)
175[java-gtk] No description (/usr/share/java-gtk/classpath.env) 175[java-gtk] No description (/usr/share/java-gtk/classpath.env)
176[log4j] "" (/usr/share/log4j/package.env) 176[log4j] "" (/usr/share/log4j/package.env)
177</pre> 177</pre>
178 178
179<note> 179<note>
180None of these packages have a proper description. That is something that will be 180None of these packages have a proper description. That is something that will be
181implemented in the not-so-distant future. 181implemented in the not-so-distant future.
182</note> 182</note>
183 183
184<p> 184<p>
185Again, the name in brackets <path>"[]"</path> are the IDs that you have to pass 185Again, the name in brackets <path>"[]"</path> are the IDs that you have to pass
186to <c>java-config --set-system-classpath</c>, thus: 186to <c>java-config --set-system-classpath</c>, thus:
187</p> 187</p>
188 188
189<pre caption="Setting classpaths"> 189<pre caption="Setting classpaths">
190java-config --set-system-classpath=log4j,java-gtk,java-gnome 190# <i>java-config --set-system-classpath=log4j,java-gtk,java-gnome</i>
191</pre> 191</pre>
192 192
193<note> 193<note>
194The current directory (.) will not be part of the system classpath, as that 194The current directory (.) will not be part of the system classpath, as that
195should be added in root's login profile. 195should be added in root's login profile.
196</note> 196</note>
197 197
198<p> 198<p>
199Again, you will want to run <c>env-update</c> to update your system's 199Again, you will want to run <c>env-update</c> to update your system's
200environment, and you might also want to relogin or resource the 200environment, and you might also want to relogin or resource the
201<path>/etc/profile</path>. 201<path>/etc/profile</path>.
202</p> 202</p>
203 203
204<p> 204<p>
205For users, <c>java-config --set-user-classpath</c> will create 205For users, <c>java-config --set-user-classpath</c> will create
222<li><c>java-config --help</c></li> 222<li><c>java-config --help</c></li>
223<li>The <path>/usr/bin/java-config</path> script itself</li> 223<li>The <path>/usr/bin/java-config</path> script itself</li>
224</ul> 224</ul>
225 225
226</body> 226</body>
227</section> 227</section>
228 228
229<section> 229<section>
230<title>Online resources</title> 230<title>Online resources</title>
231<body> 231<body>
232 232
233<ul> 233<ul>
234<li>The <uri link="http://news.gmane.org/gmane.linux.gentoo.devel" 234<li>The <uri link="http://news.gmane.org/gmane.linux.gentoo.devel"
235>gentoo-dev</uri>, <uri link="http://news.gmane.org/gmane.linux.gentoo.user" 235>gentoo-dev</uri>, <uri link="http://news.gmane.org/gmane.linux.gentoo.user"
236>gentoo-user </uri> mailing list archives</li> 236>gentoo-user </uri> mailing list archives</li>
237<li>#gentoo on irc.openprojects.net</li> 237<li>#gentoo and #gentoo-java on irc.freenode.net</li>
238</ul> 238</ul>
239 239
240</body> 240</body>
241</section> 241</section>
242</chapter> 242</chapter>
243</guide> 243</guide>

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.20