View previous topic :: View next topic |
Author |
Message |
kustos Apprentice
Joined: 10 Sep 2003 Posts: 168
|
Posted: Wed Nov 17, 2004 12:29 am Post subject: JDK 1.6.0 is upon us |
|
|
Wait, JDK 1.6.0? You mean JDK 1.5.0?
Nope, I mean the snapshot releases for JDK 1.6.0 early access.
Nope, I don't have an ebuild. Sorry.
Yes I know JDK 1.5.0 is still hard masked.
- get "Linux self-extracting file" from http://www.java.net/download/jdk6/binaries/
You might also try to compile it from source (yes they provide sources too), but I took the binary one.
- execute it
- move it somewhere like /opt/jdk1.6.0/
- make a file /etc/env.d/java/20sun-jdk-1.6.0_ea with the contents:
Code: | VERSION="Sun JDK 1.6.0_ea"
JAVA_HOME=/opt/jdk1.6.0
JDK_HOME=/opt/jdk1.6.0
JAVAC=${JAVA_HOME}/bin/javac
ADDPATH="${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin"
ADDLDPATH="/opt/jdk1.6.0/jre/lib"
MANPATH="/opt/jdk1.6.0/man"
ENV_VARS="JAVA_HOME JDK_HOME JAVAC ADDPATH ADDLDPATH MANPATH" |
replace /opt/jdk1.6.0 with where you moved the jdk
Code: | java-config -S sun-jdk-1.6.0_ea |
Code: | /usr/sbin/env-update && source /etc/profile |
open a new terminal and do
to check if everything is ok
What's new?
Changelogs, mostly bugfixes, String#isEmpty(), Math.abs is faster.
What I heard and is implemented yet
- intra-vm communication (one java app to another)
- merge of JDIC and JDNC
- improvements and fixes to Swing
- JSR-203
Just be warned, qulity is likely to temporary decrease.
Eclipse and Azureus work.
Last edited by kustos on Tue Jan 18, 2005 5:16 pm; edited 2 times in total |
|
Back to top |
|
|
Lazlo n00b
Joined: 25 Jan 2003 Posts: 66 Location: Gl. Lejre, Denmark
|
Posted: Fri Dec 10, 2004 11:21 pm Post subject: Thanks! |
|
|
I used this method to do a general install of a binary jdk without having gentoo bothering me.
I install my jdk's binary in /opt like you suggest. Plain vanilla self-extracting download from sun.
I then create a link currently /opt/jdk -> /opt/jdk1.5.0
Then I created a file /etc/env.d/sun-jdk:
Code: |
VERSION="Sun JDK"
JAVA_HOME=/opt/jdk
JDK_HOME=/opt/jdk
JAVAC=${JAVA_HOME}/bin/javac
ADDPATH="${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin"
ADDLDPATH="/opt/jdk/jre/lib"
MANPATH="/opt/jdk/man"
ENV_VARS="JAVA_HOME JDK_HOME JAVAC ADDPATH ADDLDPATH MANPATH"
|
# env-update
# java-config --list-available-vms
# java-config -S sun-jdk
From now on just install the jdk staight from java.sun.com. If you want to change versions just move the link. |
|
Back to top |
|
|
rofro Apprentice
Joined: 21 Jun 2004 Posts: 234 Location: Piaseczno, Poland
|
Posted: Tue Jan 18, 2005 9:44 am Post subject: |
|
|
Lazlo, correct
Quote: | Then I created a file /etc/env.d/sun-jdk |
to /etc/env.d/java/sun-jdk _________________ Linux #358594
gentoo bug comment 175808#c26
You either must have patience or contribute to open source. There is only one guaranteed way to have open source do what you want it to do, and that's write it yourself. |
|
Back to top |
|
|
Foobat n00b
Joined: 02 Nov 2004 Posts: 25
|
Posted: Tue Jan 18, 2005 12:15 pm Post subject: |
|
|
and they've got a great project name for it
"Mustang"
ahhh that kept me amused for a while...... _________________ women love to see a man recompile his kernel..... |
|
Back to top |
|
|
fallow Bodhisattva
Joined: 08 Jan 2004 Posts: 2208 Location: Poland
|
Posted: Wed Jan 19, 2005 1:20 pm Post subject: |
|
|
I`ve done "speedy" ebuild for this ( corrected 1.5.0 from portage )
is working for me
http://vivid.dat.pl/sun-jdk-1.6.0/sun-jdk-1.6.0_temp1.tar.bz2
of course binary file
Code: |
jdk-6_0-ea-bin-b19-linux-i586-13_jan_2005.bin
|
must be placed in /usr/portage/distfiles first.
cheers. _________________ "Time is a companion that goes with us on a journey. It reminds us to cherish each moment, because it will never come again. What we leave behind is not as important as how we have lived" J-L. Picard |
|
Back to top |
|
|
rofro Apprentice
Joined: 21 Jun 2004 Posts: 234 Location: Piaseczno, Poland
|
Posted: Wed Feb 02, 2005 4:34 pm Post subject: |
|
|
if yout want to use only sun-jdk type in /etc/make.profile/virtuals
Code: | virtual/jdk dev-java/sun-jdk
virtual/jre dev-java/sun-jdk |
more info on setting: http://www.gentoo.org/doc/en/java.xml _________________ Linux #358594
gentoo bug comment 175808#c26
You either must have patience or contribute to open source. There is only one guaranteed way to have open source do what you want it to do, and that's write it yourself. |
|
Back to top |
|
|
kustos Apprentice
Joined: 10 Sep 2003 Posts: 168
|
Posted: Wed Feb 16, 2005 7:05 pm Post subject: |
|
|
Sun published the planned features:
http://jcp.org/en/jsr/detail?id=270
Nothing *really* exciting.
Stuff I miss:
NIO 2.0 (JSR-203)
Isolates (JSR-121) |
|
Back to top |
|
|
mslinn Apprentice
Joined: 24 Sep 2004 Posts: 206 Location: Half Moon Bay, CA
|
Posted: Tue Mar 29, 2005 4:15 am Post subject: Can't the ebuild download the binary file |
|
|
I'd like to automatically fetch and install the current version on a regular schedule (via a cron job). I mean to get the files like jdk-6_0-ea-bin-b19-linux-i586-13_jan_2005.bin as they become available. Can the ebuild be modified to do that?
Mike |
|
Back to top |
|
|
Balancer Guru
Joined: 04 Jun 2004 Posts: 465
|
Posted: Sat Feb 25, 2006 3:01 pm Post subject: |
|
|
Anybody have worked ebuild to install latest jdk-6-beta2-bin-b73-linux-i586-23_feb_2006.bin ? |
|
Back to top |
|
|
vyzivus Apprentice
Joined: 05 Jul 2004 Posts: 173 Location: Slovakia
|
Posted: Sun Apr 16, 2006 2:46 pm Post subject: |
|
|
linky
complete listing of new mustang features
edit by nixnut: wrapped loooooooong url in tags to prevent mile wide html page _________________ I thought what I'd do was, I'd pretend I was one of those deaf-mutes or should I? |
|
Back to top |
|
|
mslinn Apprentice
Joined: 24 Sep 2004 Posts: 206 Location: Half Moon Bay, CA
|
Posted: Sun Apr 16, 2006 3:30 pm Post subject: This used to work |
|
|
I created a bash script to download and install JDK 6. It worked for a few months, until Sun changed something. If you'd like to correct it, and incorporate it into an ebuild, here it is:
Code: | $ cat /usr/local/bin/newjdk
#!/bin/bash
# Parses http://www.java.net/download/jdk6/binaries/ and downloads the .bin file after
# the string "Linux self-extracting file"
if [ $# != 0 ]; then
echo "Downloads and installs the most recent JDK 6 ea release"
echo "Usage: $(basename $0)"
exit -1
fi
REL=$1
function parseDL {
# Discover most recent binary and download; exit if it already was downloaded
TMPFILE=/var$(mktemp)
wget -qO $TMPFILE http://www.java.net/download/jdk6/binaries
BINFILE="$(cat $TMPFILE|grep -m 1 -o "jdk-6_0-ea-bin-b[0-9]*-linux-i.86-[[:alnum:]_]*.bin"|uniq)"
REL="$(echo $BINFILE|grep -o 'b[0-9]\+')"
REL=${REL:1} # chop off leading 'b'
DIR="/opt/sun-jdk-1.6.0-ea-b$REL"
rm -f $TMPFILE
if [ -d "$DIR" ]; then exit 0; fi # Already downloaded, assumed installed, so quit
wget -qO /var/tmp/$BINFILE http://www.java.net/download/jdk6/binaries/$BINFILE
}
parseDL
if [ ! -f "$(ls /var/tmp/$BINFILE)" ]; then
echo "Error: Binary JDK 6 install file /var/tmp/$BINFILE not found. Aborting."
exit -3
fi
sudo rm -f /etc/env.d/java/20sun-jdk-1.6
sudo cp -a /etc/{,env.d/java/}20sun-jdk-1.6
sudo sed -ie "s/XX/$REL/g" /etc/env.d/java/20sun-jdk-1.6
chmod a+x /var/tmp/$BINFILE
cd /var/tmp
eval ./$BINFILE # extract the JDK after agreeing to the license
# Keep the previous JDK build in case the new one has a problem
sudo mv jdk1.6.0 /opt/sun-jdk-1.6.0-ea-b$REL
sudo /usr/sbin/env-update # Read the new env.d package entry
# Test the new JDK 1.6
#/usr/bin/java-config -s sun-jdk-1.6
#source ~/.gentoo/java
#if [ -z "$(java -version 2>&1 | grep $REL)" ]; then
# echo "Error: JDK 1.6 b$REL did not install properly, aborting"
# exit -2
#fi
env-update
source /etc/profile |
I also created an expect script to fully automate installation:
Code: | $ cat /etc/newjdk.exp
#!/usr/bin/expect -f
set force_conservative 0
if {$force_conservative} {
set send_slow {1 .1}
proc send {ignore arg} {
sleep .1
exp_send -s -- $arg
}
}
set timeout -1
log_user 0 # set to 0 to disable echoing output
spawn /usr/local/bin/newjdk
match_max 100000
expect {
-re ".*--More--" {send " "; puts "\npressed space\n"; exp_continue}
-re ".*yes or no" {sleep 1;send "yes\r\n"; puts "\nsaid yes\n"}
eof exit
}
expect eof |
It would be great if someone used the above to create a proper ebuild. |
|
Back to top |
|
|
nixnut Bodhisattva
Joined: 09 Apr 2004 Posts: 10974 Location: the dutch mountains
|
Posted: Wed Jul 26, 2006 8:26 pm Post subject: |
|
|
Moved from Portage & Programming to Unsupported Software. _________________ Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered
talk is cheap. supply exceeds demand |
|
Back to top |
|
|
mslinn Apprentice
Joined: 24 Sep 2004 Posts: 206 Location: Half Moon Bay, CA
|
Posted: Thu Jul 27, 2006 2:13 am Post subject: |
|
|
Mustang (J2SE 6) is targeted for final release in fall 2006. Sure would be nice to have official Gentoo support in 2006 as well. |
|
Back to top |
|
|
immudium Guru
Joined: 12 Oct 2004 Posts: 332 Location: Utah
|
|
Back to top |
|
|
mslinn Apprentice
Joined: 24 Sep 2004 Posts: 206 Location: Half Moon Bay, CA
|
Posted: Thu Jul 27, 2006 9:38 pm Post subject: |
|
|
I looked at Java experimental and found that it dragged in a whole lot of other stuff, which I didn't want. I just want to be able to use J2SE 6 in an otherwise stable system. |
|
Back to top |
|
|
immudium Guru
Joined: 12 Oct 2004 Posts: 332 Location: Utah
|
Posted: Thu Jul 27, 2006 11:17 pm Post subject: |
|
|
mslinn wrote: | I looked at Java experimental and found that it dragged in a whole lot of other stuff, which I didn't want. I just want to be able to use J2SE 6 in an otherwise stable system. |
Hmm, well, the only thing I'm using from the java experimental overlay is the jdk 6 ebuild so I'm not sure what other stuff you're referring to. Certainly you can delete out whatever you don't want or copy the ebuild to your own overlay. The alternative is to roll your own. Are you suggesting that it should be in the mainline portage tree for some reason? I'd be really surprised if that happened even when jdk 1.6 reaches rc status, but what do I know it's not like I have any influence in the matter anyway. Just making sure you knew about it which apparently you do. |
|
Back to top |
|
|
|