View previous topic :: View next topic |
Author |
Message |
mae2050 n00b
Joined: 12 Sep 2002 Posts: 45
|
Posted: Sat Feb 07, 2004 5:56 pm Post subject: Java 1.5.0 Beta 1 is out - Installation w/o Ebuild |
|
|
The new Java JRE and SDK Beta 1 is out.
I heard that they optimized some stuff for all platforms. Specifically increasing its performance on Linux.
Here is what I did to install it without an ebuild:
1. download j2sdk-1_5_0-beta-linux-i586.bin from http://java.sun.com/j2se/1.5.0/download.jsp
2. Code: | chmod +x j2sdk-1_5_0-beta-linux-i586.bin |
3. Code: | ./j2sdk-1_5_0-beta-linux-i586.bin |
4. Code: | mv j2sdk1.5.0 /opt/j2sdk1.5.0B1 |
5. Add new java profile file under /etc/env.d/java/ called 20j2sdk1.5.0B1 and fill it with the following:
Code: | # Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author: Karl Trygve Kalleberg
VERSION="Sun JDK 1.5.0.1"
JAVA_HOME=/opt/j2sdk1.5.0B1
CLASSPATH=.:/opt/j2sdk1.5.0B1/jre/lib:/opt/j2sdk1.5.0B1/lib/tools.jar:/opt/j2sdk1.5.0B1/jre/lib/rt.jar
JDK_HOME=/opt/j2sdk1.5.0B1
JAVAC=${JAVA_HOME}/bin/javac
ADDPATH="${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin:${JAVA_HOME}/jre/javaws"
ADDLDPATH="/opt/j2sdk1.5.0B1/jre/lib"
MANPATH="/opt/j2sdk1.5.0B1/man"
ENV_VARS="JAVA_HOME CLASSPATH JDK_HOME JAVAC ADDPATH ADDLDPATH MANPATH" |
6. Update your java settings using java-config:
Code: | java-config -s j2sdk1.5.0B1 |
7. Update environment variables to use correct version:
Code: | source ~/.gentoo/java |
8. Check that is sourced it right by using export which should show:
Code: | CLASSPATH=".:/opt/j2sdk1.5.0B1/jre/lib:/opt/j2sdk1.5.0B1/lib/tools.jar:/opt/j2sdk1.5.0B1/jre/lib/rt.jar"
JAVAC="/opt/j2sdk1.5.0B1/bin/javac"
JAVA_HOME="/opt/j2sdk1.5.0B1"
JDK_HOME="/opt/j2sdk1.5.0B1"
(Only beginning is important) PATH="/opt/j2sdk1.5.0B1/bin:/opt/j2sdk1.5.0B1/jre/bin:/opt/j2sdk1.5.0B1/jre/javaws:/opt/j2sdk1.5.0B1/bin:/opt/j2sdk1.5.0B1/jre/bin:/opt/j2sdk1.5.0B1/jre/javaws:/bin:/usr/bin
|
9. Make sure correct version is executed:
should say:
Code: | java version "1.5.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b32c)
Java HotSpot(TM) Client VM (build 1.5.0-beta-b32c, mixed mode) |
Hope this works.
Can someone derive an ebuild from the existing ones in portage?
L8r. |
|
Back to top |
|
|
neenee Veteran
Joined: 20 Jul 2003 Posts: 1786
|
Posted: Mon Feb 09, 2004 3:41 pm Post subject: |
|
|
hm.. i did all the steps, but at the bit
with ~/.gentoo/java, i am stuck. i do
not have that file, nor that directory.
i tried creating the file and putting in
the info you mentioned, and then us-
ing source ~/.gentoo/java, but that
does not seem to change anything. |
|
Back to top |
|
|
j-kidd Apprentice
Joined: 20 Feb 2003 Posts: 213
|
Posted: Mon Feb 09, 2004 5:42 pm Post subject: |
|
|
There is an older 1.5 beta ebuild in the portage. Just change this line
Code: | At="j2sdk-1_5_0-beta-bin-b31-linux-i586-11_dec_2003.bin" |
to
Code: | At="j2sdk-1_5_0-beta-linux-i586.bin" |
and it will work fine. |
|
Back to top |
|
|
neenee Veteran
Joined: 20 Jul 2003 Posts: 1786
|
Posted: Mon Feb 09, 2004 6:20 pm Post subject: |
|
|
thank you. that worked beautifully |
|
Back to top |
|
|
dub.wav Tux's lil' helper
Joined: 09 Apr 2003 Posts: 149 Location: Norway
|
Posted: Sat Feb 14, 2004 4:29 pm Post subject: |
|
|
Have anyone tried using System.out.printf()? Doesn't seem to work here, even though I've tried including both java.io.* and java.util.*. |
|
Back to top |
|
|
TheBohemian n00b
Joined: 17 Feb 2004 Posts: 33
|
Posted: Sat Feb 21, 2004 2:51 am Post subject: |
|
|
Yeah it works nicely but requires that you provide the compiler with a command line switch to recognize 1.5 compatible source:
just call: javac -source 1.5 <source files>
if you're using an IDE just find an option to add this switch the commandline. for netbeans there is a description of how to do this. it is meant for 3.6 beta but works for 3.5.1 too.
Oh just to mention. you can use System.out.printf() in 1.4 source too but must use the old style syntax:
eg: System.out.print("the format string: %s - %d", new Object[] { someObject, new Integer(someInt) });
you find the above code ugly? well thats 1.5's syntax extensions were invented for
cya
TheBohemian |
|
Back to top |
|
|
taskara Advocate
Joined: 10 Apr 2002 Posts: 3763 Location: Australia
|
Posted: Sat Jun 19, 2004 6:14 am Post subject: |
|
|
thanks for the howto..
the sun-jdk-1.5.0-beta2 ebuild works well
if I emerge jdk, do I still need jre to get java to work? or is jre included in jdk?
cheers! _________________ Kororaa install method - have Gentoo up and running quickly and easily, fully automated with an installer! |
|
Back to top |
|
|
Adaptive n00b
Joined: 07 Dec 2004 Posts: 8
|
Posted: Tue Dec 07, 2004 4:54 am Post subject: |
|
|
the JRE is included in the JDK.
/opt/sun-jdk-1.4.2.06/jre/ is where mine is. |
|
Back to top |
|
|
taskara Advocate
Joined: 10 Apr 2002 Posts: 3763 Location: Australia
|
Posted: Tue Dec 07, 2004 5:14 am Post subject: |
|
|
cheers _________________ Kororaa install method - have Gentoo up and running quickly and easily, fully automated with an installer! |
|
Back to top |
|
|
mandraker n00b
Joined: 23 Jan 2005 Posts: 3
|
Posted: Sun Jan 23, 2005 11:03 pm Post subject: Eclipse IDE with j2sdk1.5? |
|
|
Hi, the j2sdk1.5 work fine with your help. Thanks.
But, i can't emerge the eclipse IDE.
P.D. : excuse me for my english. |
|
Back to top |
|
|
kustos Apprentice
Joined: 10 Sep 2003 Posts: 168
|
Posted: Mon Jan 24, 2005 2:08 pm Post subject: Re: Eclipse IDE with j2sdk1.5? |
|
|
mandraker wrote: |
But, i can't emerge the eclipse IDE. |
Yes, Eclipse doens't compile with 1.5.
You have to use a 1.4 JDK to compile it. |
|
Back to top |
|
|
KristyX Apprentice
Joined: 18 Dec 2003 Posts: 206 Location: Malaysia
|
Posted: Thu Jan 27, 2005 6:11 am Post subject: |
|
|
Hi,
Sorry.. where should that line located? I'm having the same problem with the source ~/.gentoo/java.. it's a not found error.
Thanks,
Kristy
j-kidd wrote: | There is an older 1.5 beta ebuild in the portage. Just change this line Code: | At="j2sdk-1_5_0-beta-bin-b31-linux-i586-11_dec_2003.bin" |
to
Code: | At="j2sdk-1_5_0-beta-linux-i586.bin" |
and it will work fine. |
_________________ Knowledge is a process of piling up facts; wisdom lies in their simplification. [Martin Fischer] |
|
Back to top |
|
|
TheRuler Tux's lil' helper
Joined: 06 Aug 2003 Posts: 96
|
Posted: Thu Jan 27, 2005 7:21 am Post subject: |
|
|
btw: where is the source code ebuild from Sun Java 1.5.0? i find only the bin ebuild, for me is the source better gcc-3.4.3+*flags = faster as bin |
|
Back to top |
|
|
alchemistik n00b
Joined: 09 Apr 2005 Posts: 2
|
Posted: Mon Apr 11, 2005 12:02 am Post subject: where is the line |
|
|
Where can I find the line
that
j-kidd wrote:
There is an older 1.5 beta ebuild in the portage. Just change this line
Code:
At="j2sdk-1_5_0-beta-bin-b31-linux-i586-11_dec_2003.bin"
to
Code:
At="j2sdk-1_5_0-beta-linux-i586.bin"
and it will work fine.
thanks
alchemistik _________________ www.alchemistik.com |
|
Back to top |
|
|
wjholden l33t
Joined: 01 Mar 2004 Posts: 826 Location: Augusta, GA
|
Posted: Mon Apr 11, 2005 3:30 am Post subject: |
|
|
Just wondering, why are you guys using JDK 1.5? I write Java programs for school and for fun (see signiture) and I truely detest JDK 1.5 since most of the programs I've written bitch about using the -deprecated flag since they don't like using JPasswordField or object.show()? I'm just wondering if someone can point me to a website telling about changes from 1.4.2 --> 1.5 that might actually be interesting. |
|
Back to top |
|
|
kustos Apprentice
Joined: 10 Sep 2003 Posts: 168
|
Posted: Mon Apr 11, 2005 3:39 pm Post subject: |
|
|
destuxor wrote: | I've written bitch about using the -deprecated flag since they don't like using JPasswordField or object.show()? |
Where's the problem with setVisible(true)?
destuxor wrote: | I'm just wondering if someone can point me to a website telling about changes from 1.4.2 --> 1.5 that might actually be interesting. |
http://java.sun.com/j2se/1.5.0/docs/relnotes/features.html
http://java.sun.com/j2se/1.5.0/relnotes.html
What they actually try to hide, is that they fixed the typesystem too. That's probabaly burried somewhere deep in the generics docu. |
|
Back to top |
|
|
dfnord Tux's lil' helper
Joined: 17 Aug 2004 Posts: 90 Location: GeoFront
|
Posted: Tue Apr 19, 2005 9:24 pm Post subject: |
|
|
destuxor wrote: | Just wondering, why are you guys using JDK 1.5? I write Java programs for school and for fun (see signiture) and I truely detest JDK 1.5 since most of the programs I've written bitch about using the -deprecated flag since they don't like using JPasswordField or object.show()? I'm just wondering if someone can point me to a website telling about changes from 1.4.2 --> 1.5 that might actually be interesting. |
I myself, have to use it for its new concurrency support (especifically for some tests i have to make regarding classes that implement BlockingQueue). _________________ Do not try and bend the spoon. That's impossible. Instead only try to realize the truth. Then you'll see that it is not the spoon that bends, it is only yourself. |
|
Back to top |
|
|
earcam n00b
Joined: 30 May 2005 Posts: 26
|
Posted: Sun Oct 30, 2005 2:40 am Post subject: Will the initial instructions work with 1.5.0.05 ? |
|
|
Hi,
I've downloaded jdk-1_5_0_05-linux-i586.bin and jre-1_5_0_05-linux-i586.bin from the Sun site, but as the inital post is about a year and a half old I was wondering if the instructions still applied in general, and what changes i would need to make other than replacing filenames and j2sdk1.5.0B1 with j2sdk1.5.0.05 ?
This was the best thread I found regarding gentoo and java 1.5 and I desperately need to get 1.5 working with mysql jdbc for my coursework; so if anyone has any tips that'd be great.
thanks |
|
Back to top |
|
|
cdmstro Tux's lil' helper
Joined: 26 Apr 2003 Posts: 93
|
Posted: Sun Oct 30, 2005 1:32 pm Post subject: |
|
|
Just use the masked ebuilds for sun-jdk-1.5.0.05. You will have to add it to your /etc/portage/package.keywords, and /etc/portage/package.unmask files, and it will get installed via the ebuild. (In it's own slot). Code: | echo "dev-java/sun-jdk ~x86">>/etc/portage/package.keywords
echo "dev-java/sun-jdk" >> /etc/portage/package.unmask
emerge sun-jdk | After the emerge has completed you will want to set your system VM back to a version that is NOT the 1.5 release, otherwise you are going to run into problems when emerging other java ebuilds. Code: | java-config -S sun-jdk-1.4.2.09 (replace 1.4.2.09 with your normal version of the JVM) | If you do not have another version of the JVM installed, I would highly recommend you do so, to use as your system VM. |
|
Back to top |
|
|
earcam n00b
Joined: 30 May 2005 Posts: 26
|
Posted: Sun Oct 30, 2005 7:35 pm Post subject: Thanks !!! |
|
|
Hey cdmstro, many thanks for sharing your expertise, i had jdk-1.5.0.05 up and running in no time - kudos to you
Originally I tried unmasking the specific version, but I'm not too good with gentoo/emerge and when it wasn't listed by emerge I gave up...
Just in case anyone lands here in my predicament, and as there were a few things to do, here's what was required:
Do as cdmstro suggests:
Quote: | echo "dev-java/sun-jdk ~x86">>/etc/portage/package.keywords
echo "dev-java/sun-jdk" >> /etc/portage/package.unmask
emerge sun-jdk |
As I had +docs in my make.conf USE flags i also had to get the java docs and policy, umasking the same way cdmstro showed. But emerge will tell you what to do.
Everything installed fine.
However when trying to run java-conf, I got:
Code: |
Traceback (most recent call last):
File "/usr/bin/java-config", line 14, in ?
from java_config import jc_options
ImportError: No module named java_config
|
It turns out you need to unmerge jdk and java-conf, then re-emerge them, java-conf first - got this fix from
http://www.linuxquestions.org/questions/history/371852
Then ensure the system VM is 1.4... and set your user VM to 1.5
The wiki FAQ may be helpful http://gentoo-wiki.com/Java_FAQ
cheers,
earcam
// Great support in the Forums, yet another reason to choose a superior distro - Gentoo! |
|
Back to top |
|
|
|