1 |
On Wed, 2005-11-30 at 00:35 +0900, Daigo Kobayashi wrote: |
2 |
> Hi. |
3 |
> |
4 |
> I want to use Java 5.0 on gentoo. But now it marks unstable. |
5 |
> Is there any task that I can help to unmask Java 5.0? If possible |
6 |
> I want to try. |
7 |
|
8 |
OK, here's how this is done. It's actually easy but I'll include |
9 |
specific details for you, just in case you're new to this: |
10 |
|
11 |
* If it doesn't already exist, create the directory "/etc/portage" |
12 |
|
13 |
* Then create the file "/etc/portage/package.unmask" if it doesn't |
14 |
already exist. |
15 |
|
16 |
* Add the following line(s) to that file (comments may be |
17 |
omitted): |
18 |
|
19 |
#---------------- |
20 |
dev-java/sun-jdk |
21 |
# (or whatever vendor package you want -- use the full name) |
22 |
dev-java/java-sdk-docs |
23 |
# (if you have your "doc" USE flag on) |
24 |
#---------------- |
25 |
|
26 |
* The above removes the package mask added by the Gentoo |
27 |
developers. However, since the sun-jdk 1.5 package is also |
28 |
marked unstable ("~"), you may need to enable the "testing" |
29 |
profile for these packages as well. Unless your system is set |
30 |
to ~ you will need to perform the following: |
31 |
|
32 |
* If it doesn't already exist, create the file |
33 |
"/etc/portage/package.keywords". |
34 |
|
35 |
* Add the following lines to that file, where "~arch" is the |
36 |
unstable flag for your architecture (e.g., most likely ~x86 or |
37 |
~amd64). Comments may be omitted, of course: |
38 |
|
39 |
#---------------- |
40 |
dev-java/sun-jdk ~arch |
41 |
dev-java/java-sdk-docs ~arch |
42 |
#---------------- |
43 |
|
44 |
|
45 |
That should do it. You can now emerge the package with a standard |
46 |
command: |
47 |
|
48 |
emerge -av dev-java/sun-jdk |
49 |
|
50 |
|
51 |
** VERY IMPORTANT ** |
52 |
|
53 |
Unless you know what you're doing, I strongly recommend that you leave |
54 |
your system VM set to a 1.4 JDK/runtime. Your message didn't indicate |
55 |
if you have one installed, so I'll assume you are using Blackdown (which |
56 |
is 1.4). If you aren't, you should install it now: |
57 |
|
58 |
emerge -av dev-java/blackdown-jdk |
59 |
|
60 |
(or use the JRE... I'm just giving examples at this point) |
61 |
|
62 |
** Back to the WARNING ** |
63 |
|
64 |
Installing the new sun-jdk will usually set your system VM to that one |
65 |
(which is 1.5). To fix this and set a 1.4 system VM, you need to |
66 |
perform the following steps *AFTER* the emerge: |
67 |
|
68 |
* Run the following command (as root) to set a new 1.4 system VM: |
69 |
|
70 |
java-config --set-system-vm=blackdown-jre-1.4.2.02 |
71 |
|
72 |
(assuming you have that version of the blackdown JRE installed) |
73 |
|
74 |
* Now set your user VM to the 1.5 JVM. Run the following command |
75 |
as you standard user account(s): |
76 |
|
77 |
java-config --set-user-vm=sun-jdk-1.5.0.05 |
78 |
|
79 |
(assuming you installed that version of the sun-jdk) |
80 |
|
81 |
|
82 |
That should do it. Enjoy! |
83 |
|
84 |
|
85 |
> By the way, I'm really sorry to send e-mail to Greg's personal address. |
86 |
> So I send same mail to list. |
87 |
|
88 |
No problem at all. |
89 |
|
90 |
Cheers, |
91 |
Greg |