View previous topic :: View next topic |
Author |
Message |
gimpel Advocate
Joined: 15 Oct 2004 Posts: 2720 Location: Munich, Bavaria
|
Posted: Tue Nov 13, 2007 10:32 pm Post subject: Howto: IcedTea 64bit java plugin (the ugly way) |
|
|
Update:
Meanwhile there are 3 methods to get icedtea installed:
* java-overlay: uses gcj/classpath to bootstrap icedtea
* geki's overlay: more relaxed, just uses sun-jdk
* updated openjdk-bin from fedora rpms
Now the deprecated part:
---------------------------------------------------------------------------------------------------
Now that Fedora, Ubuntu and Mandriva come with a working 64bit java browser plugin thanks to icedtea I wondered how difficult it would be to run that on Gentoo.
So first I tried compiling it, but LOL icedtea-1.4 needs an older version of itself to compile itself. Now that sounds like a Monty Python classic, really. Fedora simply provides an rpm of an older icedtea, without src.rpm. We would have to bootstrap the old version first, and then compile the new. No idea how to do that in a fashioned way...
So let's install the Fedora binaries. Thx Fedora!
EDIT: ebuild here:
Code: | svn co http://gimpel.ath.cx/svn/gimpel/dev-java/icedtea-bin/ |
Manual way:
get java-1.7.0-icedtea-1.7.0.0-0.19.b21.snapshot.fc8.x86_64.rpm and java-1.7.0-icedtea-plugin-1.7.0.0-0.19.b21.snapshot.fc8.x86_64.rpm from e.g.
http://fedora.tu-chemnitz.de/pub/linux/fedora/linux/releases/8/Fedora/x86_64/os/Packages/
and
Code: | mkdir /tmp/icedtea
cd /tmp/icedtea
rpm2targz *.rpm
tar xvf *.tar.gz
sudo cp -a ./usr/lib/jvm* /usr/lib64
sudo ln -s /usr/lib64/jvm/java-1.7.0-icedtea-1.7.0.0.x86_64/jre/lib/amd64/gcjwebplugin.so /usr/share/java-config-2/nsplugin/icedtea-jdk-1.7-javaplugin.so
rm -rf ../icedtea |
And put this file in /usr/share/java-config-2/vm/ as icedtea-jdk-1.7
Code: | VERSION="IcedTea JDK 1.7.0"
JAVA_HOME=/usr/lib/jvm/java-1.7.0-icedtea-1.7.0.0.x86_64
JDK_HOME=/usr/lib/jvm/java-1.7.0-icedtea-1.7.0.0.x86_64
JAVAC=${JAVA_HOME}/bin/javac
PATH="${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin"
ROOTPATH="${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin"
LDPATH="${JAVA_HOME}/jre/lib/amd64/:${JAVA_HOME}/jre/lib/amd64/native_threads/:
${JAVA_HOME}/jre/lib/amd64/xawt/:${JAVA_HOME}/jre/lib/amd64/server/"
# ^^ NO NEW LINE FOR THIS!! ^^^
PROVIDES_TYPE="JDK JRE"
PROVIDES_VERSION="1.7"
# Taken from sun.boot.class.path property
BOOTCLASSPATH="${JAVA_HOME}/jre/lib/resources.jar:${JAVA_HOME}/jre/lib/rt.jar:${JAVA_HOME}/jre/lib/jsse.jar:
${JAVA_HOME}/jre/lib/jce.jar:${JAVA_HOME}/jre/lib/charsets.jar"
# ^^ NO NEW LINE FOR THIS!! ^^^
GENERATION="2"
ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH MANPATH"
VMHANDLE="icedtea-jdk-1.7"
PROVIDES="jdbc-stdext jdbc-rowset" |
Code: | # eselect java-nsplugin set 64bit icedtea-jdk-1.7
# eselect java-nsplugin list
Available 32-bit Java browser plugins
[1] emul-linux-x86-java-1.6 current
Available 64-bit Java browser plugins
[1] icedtea-jdk-1.7 current
$ java-config-2 -L
The following VMs are available for generation-2:
*) Blackdown JDK 1.4.2.03 [blackdown-jdk-1.4.2]
2) Sun 32bit JRE 1.6.0.03 [emul-linux-x86-java-1.6]
3) IcedTea JDK 1.7.0 [icedtea-jdk-1.7]
4) Sun JDK 1.5.0.13 [sun-jdk-1.5]
5) Sun JDK 1.6.0.03 [sun-jdk-1.6] |
Don't use it as jvm though, that would require some of the other rpm's to be installed first! (no javac included etc)
The best thing is, even that killer java thing http://map24.com works fine! That's known to kill firefox on fedora!
I think I'll hack up an ebuild for this. It's ugly, really. But it works great.
Cheers. _________________ http://proaudio.tuxfamily.org/wiki - pro-audio software overlay
Last edited by gimpel on Wed Nov 05, 2008 8:56 pm; edited 6 times in total |
|
Back to top |
|
|
OmSai l33t
Joined: 30 Sep 2007 Posts: 605 Location: Manchester, CT, USA
|
Posted: Wed Nov 14, 2007 12:17 am Post subject: Re: Howto: 64bit java plugin (the ugly way) |
|
|
Great work!
My Godaddy FTP applet still isn't working though
It just shows a gray screen
EDIT: Actually I don't need Godaddy's applet 'cos gftp does the job
But map24.com works
Minor edits:
gimpel wrote: | mkdir /tmp/icedtea
cd /tmp/icedtea
rpm2targz *.rpm
gunzip *.tar.gz
tar xvf *.tar
sudo cp -a ./usr/lib/jvm* /usr/lib64
sudo ln -s /usr/lib64/jvm/java-1.7.0-icedtea-1.7.0.0.x86_64/jre/lib/amd64/gcjwebplugin.so /usr/share/java-config-2/nsplugin/icedtea-jdk-1.7-javaplugin.so
rm -rf ../icedtea |
gimpel wrote: | # eselect java-nsplugin set 64bit icedtea-jdk-1.7
# eselect java-nsplugin list
Available 32-bit Java browser plugins
[1] emul-linux-x86-java-1.6 current
Available 64-bit Java browser plugins
[1] icedtea-jdk-1.7 current |
Last edited by OmSai on Wed Nov 14, 2007 12:43 am; edited 1 time in total |
|
Back to top |
|
|
gimpel Advocate
Joined: 15 Oct 2004 Posts: 2720 Location: Munich, Bavaria
|
Posted: Wed Nov 14, 2007 12:26 am Post subject: |
|
|
Modern tar knows itself if it has to gunzip or bunzip2, without specifying -j or -z or the extra gunzip step
Added the other edits though, thanks.
There is still some more stuff missing, like the extra rpm's needed for javac etc.
I'd prefer to have real ebuilds for this. _________________ http://proaudio.tuxfamily.org/wiki - pro-audio software overlay
|
|
Back to top |
|
|
desultory Bodhisattva
Joined: 04 Nov 2005 Posts: 9410
|
Posted: Wed Nov 14, 2007 9:59 am Post subject: |
|
|
Moved from Gentoo on AMD64 to Unsupported Software. |
|
Back to top |
|
|
FireBurn Apprentice
Joined: 19 Sep 2004 Posts: 170 Location: Edinburgh, UK
|
Posted: Wed Nov 14, 2007 1:47 pm Post subject: |
|
|
I wondered why there had been no Icetea ebuild yet. Especially considering there are OpenJDK builds and gcj-jdk builds too
Mike |
|
Back to top |
|
|
loftwyr l33t
Joined: 29 Dec 2004 Posts: 970 Location: 43°38'23.62"N 79°27'8.60"W
|
Posted: Thu Nov 15, 2007 11:04 pm Post subject: |
|
|
IcedTea is still an early beta (java 1.6 went to over 100 beta releases). Can you imagine the bug reports if it was in portage now? _________________ My emerge --info
Have you run revdep-rebuild lately? It's in gentoolkit and it's worth a shot if things don't work well.
Celebrating 5 years of Gentoo-ing. |
|
Back to top |
|
|
FireBurn Apprentice
Joined: 19 Sep 2004 Posts: 170 Location: Edinburgh, UK
|
Posted: Fri Nov 16, 2007 9:59 am Post subject: |
|
|
Sorry not portage but in the java-overlay or the java-experimental-overlay at the v least
Mike |
|
Back to top |
|
|
loeb-it n00b
Joined: 15 May 2007 Posts: 37
|
Posted: Sat Nov 24, 2007 7:01 pm Post subject: icedtea-plugin-0.19.ebuild |
|
|
Hi,
built an ebuild for that. Copy to /usr/local/portage/dev-java/icedtea-plugin
ebuild icedtea-plugin-0.19.ebuild digest and be happy
Greetz
loeb-it
Code: |
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: icedtea-plugin-1.7.0.0-0.19.ebuild
inherit eutils java-vm-2
DESCRIPTION="Java Plugin for 64 Bit Browsers"
HOMEPAGE="http://icedtea.classpath.org"
MY_P="icedtea-plugin-${PV}"
SRC_URI="http://fedora.tu-chemnitz.de/pub/linux/fedora/linux/releases/8/Fedora/x86_64/os/Packages/java-1.7.0-icedtea-1.7.0.0-${PV}.b21.snapshot.fc8.x86_64.rpm
http://fedora.tu-chemnitz.de/pub/linux/fedora/linux/releases/8/Fedora/x86_64/os/Packages/java-1.7.0-icedtea-plugin-1.7.0.0-${PV}.b21.snapshot.fc8.x86_64.rpm"
SLOT="0"
LICENSE="OSGPL-0.0"
KEYWORDS="amd64"
IUSE=""
DEPEND="app-arch/rpm2targz"
S="${WORKDIR}/icedtea-plugin"
src_unpack() {
echo ${PV}
rpm2targz ${DISTDIR}/java-1.7.0-icedtea-1.7.0.0-${PV}.b21.snapshot.fc8.x86_64.rpm
rpm2targz ${DISTDIR}/java-1.7.0-icedtea-plugin-1.7.0.0-${PV}.b21.snapshot.fc8.x86_64.rpm
tar xzf java-1.7.0-icedtea-1.7.0.0-${PV}.b21.snapshot.fc8.x86_64.tar.gz
tar xzf java-1.7.0-icedtea-plugin-1.7.0.0-${PV}.b21.snapshot.fc8.x86_64.tar.gz
}
src_install() {
insinto "/usr/lib/pkgconfig"
mkdir -p ${D}/usr/lib64
mkdir -p ${D}/usr/share/java-config-2/vm/
cp -a "${WORKDIR}"/usr/lib/jvm* ${D}/usr/lib64
cp -a "${WORKDIR}"icedtea-jdk-1.7 ${D}/usr/share/java-config-2/vm/
}
pkg_postinst() {
mkdir -p ${D}usr/share/java-config-2/nsplugin
ln -s /usr/lib64/jvm/java-1.7.0-icedtea-1.7.0.0.x86_64/jre/lib/amd64/gcjwebplugin.so /usr/share/java-config-2/nsplugin/icedtea-jdk-1.7-javaplugin.so
eselect java-nsplugin set 64bit icedtea-jdk-1.7
eselect java-nsplugin list
}
pkg_postrm(){
rm /usr/share/java-config-2/nsplugin/icedtea-jdk-1.7-javaplugin.so
}
|
_________________ The box said 'Windows 2000 Server or better', so I installed Gentoo
Linux galadriel 4.12.12-gentoo #4 SMP PREEMPT Fri Nov 3 00:09:29 CET 2017 x86_64 Intel(R) Core(TM) i7-2860QM CPU @ 2.50GHz GenuineIntel GNU/Linux
Visit www.mygnu.de
Last edited by loeb-it on Sun Nov 25, 2007 1:18 am; edited 1 time in total |
|
Back to top |
|
|
gimpel Advocate
Joined: 15 Oct 2004 Posts: 2720 Location: Munich, Bavaria
|
Posted: Sun Nov 25, 2007 1:01 am Post subject: |
|
|
The part where it says "# ^^ NO NEW LINE FOR THIS!! ^^^" means, that the 2 lines before should be one line.
I just made a new line as otherwise it would have been hard to read this thread. Sorry if that was confusing.
Also the java-vm-2 eclass could take care of creating this file. Half of it is unneeded/even wrong.
But hey, the plugin works _________________ http://proaudio.tuxfamily.org/wiki - pro-audio software overlay
|
|
Back to top |
|
|
loeb-it n00b
Joined: 15 May 2007 Posts: 37
|
Posted: Sun Nov 25, 2007 1:20 am Post subject: |
|
|
thx, corrected. Was my first ebuild... Now java-config mentions icedtea as available java vm, shouldn't be a problem _________________ The box said 'Windows 2000 Server or better', so I installed Gentoo
Linux galadriel 4.12.12-gentoo #4 SMP PREEMPT Fri Nov 3 00:09:29 CET 2017 x86_64 Intel(R) Core(TM) i7-2860QM CPU @ 2.50GHz GenuineIntel GNU/Linux
Visit www.mygnu.de |
|
Back to top |
|
|
clement.cc n00b
Joined: 25 Nov 2007 Posts: 1
|
Posted: Sun Nov 25, 2007 3:10 am Post subject: GCC 4.2+ required |
|
|
Would like to add that GCC 4.2 seems to be required by the icedtea binary from that Fedora rpm. GCC 4.2 must also be the currently selected compiler in gcc-config. (Just installing it is not good enough)
If you see only gray area in the java applet area, that's probably why. If it's still gray area, try running firefox from a console and see what it says.
This is what I got before upgrading to GCC 4.2:
Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/lib64/jvm/java-1.7.0-icedtea-1.7.0.0.x86_64/jre/lib/amd64/libfontmanager.so: /lib/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib64/jvm/java-1.7.0-icedtea-1.7.0.0.x86_64/jre/lib/amd64/libfontmanager.so)
at java.lang.ClassLoader$NativeLibrary.load(Native Method) |
|
Back to top |
|
|
desultory Bodhisattva
Joined: 04 Nov 2005 Posts: 9410
|
Posted: Sun Nov 25, 2007 10:01 am Post subject: |
|
|
loeb-it wrote: | Code: | eselect java-nsplugin set 64bit icedtea-jdk-1.7
eselect java-nsplugin list |
| Better to not do that in the ebuild, just document it with elog and let the user do it as required or desired. |
|
Back to top |
|
|
gimpel Advocate
Joined: 15 Oct 2004 Posts: 2720 Location: Munich, Bavaria
|
Posted: Sun Nov 25, 2007 11:04 am Post subject: |
|
|
loeb-it, thanks for the ebuild! I cleaned it up a bit to use portage eclass stuff.
Still far from being perfect, but usable.
EDIT: added gcc version check and warning.
icedtea-bin-1.7.0.ebuild
Code: | # Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit eutils java-pkg-2 java-vm-2 rpm toolchain-funcs
DESCRIPTION="Java Plugin for 64 Bit Browsers"
HOMEPAGE="http://icedtea.classpath.org"
FEDORA_V="1.7.0.0-0.19.b21.snapshot.fc8.x86_64"
BASE_URI="http://fedora.tu-chemnitz.de/pub/linux/fedora/linux/releases/8/Fedora/x86_64/os/Packages"
SRC_URI="${BASE_URI}/java-${PV}-icedtea-${FEDORA_V}.rpm
${BASE_URI}/java-${PV}-icedtea-devel-${FEDORA_V}.rpm
nsplugin? ( ${BASE_URI}/java-${PV}-icedtea-plugin-${FEDORA_V}.rpm )"
SLOT="1.7"
LICENSE="OSGPL-0.0"
KEYWORDS="-* ~amd64"
IUSE="nsplugin"
RDEPEND=">=sys-devel/gcc-4.2"
S="${WORKDIR}"
pkg_setup() {
java-vm-2_pkg_setup
java-pkg-2_pkg_setup
if [ $(gcc-version) != "4.2" ]; then
ewarn "${P} is a binary package, and needs gcc-4.2 to be installed and"
ewarn "set as currently active compiler!"
sleep 5
fi
}
src_unpack() {
rpm_src_unpack
}
src_compile() {
elog "We install a Fedora binary distribution. Nothing to compile."
}
src_install() {
dodir /usr/lib64
cp -a usr/lib/jvm* ${D}/usr/lib64
if use nsplugin; then
install_mozilla_plugin \
/usr/lib64/jvm/java-${PV}-icedtea-${PV}.0.x86_64/jre/lib/amd64/gcjwebplugin.so
fi
set_java_env
} |
files/icedtea-bin-1.7.env
Code: | # Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
VERSION="IcedTea JDK @PV@"
JAVA_HOME=/usr/lib/jvm/java-@PV@-icedtea-@PV@.0.x86_64
JDK_HOME=/usr/lib/jvm/java-@PV@-icedtea-@PV@.0.x86_64
JAVAC=${JAVA_HOME}/bin/javac
PATH="${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin"
ROOTPATH="${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin"
LDPATH="${JAVA_HOME}/jre/lib/amd64/:${JAVA_HOME}/jre/lib/amd64/native_threads/:${JAVA_HOME}/jre/lib/amd64/xawt/:${JAVA_HOME}/jre/lib/amd64/server/"
PROVIDES_TYPE="JDK JRE"
PROVIDES_VERSION="1.7"
# Taken from sun.boot.class.path property
BOOTCLASSPATH="${JAVA_HOME}/jre/lib/resources.jar:${JAVA_HOME}/jre/lib/rt.jar:${JAVA_HOME}/jre/lib/jsse.jar:${JAVA_HOME}/jre/lib/jce.jar:${JAVA_HOME}/jre/lib/charsets.jar"
GENERATION="2"
ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH" |
_________________ http://proaudio.tuxfamily.org/wiki - pro-audio software overlay
|
|
Back to top |
|
|
loeb-it n00b
Joined: 15 May 2007 Posts: 37
|
Posted: Mon Nov 26, 2007 10:24 pm Post subject: icedtea |
|
|
Nicely done, gimpel.
And I learned a lot of the power of portage...
Well, have a nice glass of iced tea _________________ The box said 'Windows 2000 Server or better', so I installed Gentoo
Linux galadriel 4.12.12-gentoo #4 SMP PREEMPT Fri Nov 3 00:09:29 CET 2017 x86_64 Intel(R) Core(TM) i7-2860QM CPU @ 2.50GHz GenuineIntel GNU/Linux
Visit www.mygnu.de |
|
Back to top |
|
|
marschw n00b
Joined: 04 Jun 2003 Posts: 51
|
Posted: Wed Nov 28, 2007 8:05 pm Post subject: |
|
|
You might want to change the ewarn to:
Code: | ewarn "${P} is a binary package, and needs gcc-4.2 to be installed and"
ewarn "set as currently active compiler whenever you wish to use ${P}!" |
At first, I thought it meant only while running the emerge. |
|
Back to top |
|
|
gimpel Advocate
Joined: 15 Oct 2004 Posts: 2720 Location: Munich, Bavaria
|
Posted: Wed Nov 28, 2007 8:49 pm Post subject: |
|
|
marschw wrote: | You might want to change the ewarn to:
Code: | ewarn "${P} is a binary package, and needs gcc-4.2 to be installed and"
ewarn "set as currently active compiler whenever you wish to use ${P}!" |
At first, I thought it meant only while running the emerge. |
Okay, even better to put it to pkg_postinst() at the end of the emerge.
Done for the ebuild in my svn. _________________ http://proaudio.tuxfamily.org/wiki - pro-audio software overlay
|
|
Back to top |
|
|
Need4Speed Guru
Joined: 06 Jun 2004 Posts: 497
|
Posted: Sun Dec 02, 2007 7:29 pm Post subject: |
|
|
This is really awesome! Works great in 64bit firefox and loads faster than sun's java 32bit plugin. Hope it gets in portage soon. |
|
Back to top |
|
|
ronmon Veteran
Joined: 15 Apr 2002 Posts: 1043 Location: Key West, FL
|
Posted: Mon Dec 03, 2007 2:43 pm Post subject: |
|
|
Thanks guys. Nice job, it seems to work well. I'll be dumping firefox-bin pretty soon if this keeps working.
One thing I did notice was that most of the smaller fonts got jagged and ugly. I had to bump my minimum font size from 16 to 17 to fix it. I don't understand why a java change would affect normal content on non-java web pages. Huh, oh well. _________________ Ask Questions the Smart Way - by ESR |
|
Back to top |
|
|
LoSeR_5150 Guru
Joined: 20 Mar 2005 Posts: 455 Location: San Francisco, CA
|
Posted: Mon Dec 03, 2007 7:21 pm Post subject: |
|
|
Thanks for putting this ebuild together (and the quick and dirty guide before it) now I can use 64bit firefox again reliably... now just got to wait for the sound to get implemented. _________________ Opteron 1356@2.4Ghz
6GB DDR2 800Mhz
128MB Quadro NVS 210S
640GB Western Digital HD
*Gentoo-x86_64-2.6.30-r1
Opteron175@2.2GHz
2GB DDR 400MHz
256MB Quadro 1400 Go
(2) 80GB Segate HDs: RAID0
*Gentoo-x86_64-2.6.30-r1 |
|
Back to top |
|
|
loeb-it n00b
Joined: 15 May 2007 Posts: 37
|
Posted: Mon Dec 03, 2007 10:58 pm Post subject: |
|
|
Just for testing sound I tried this applet: http://www.pagetools.de/java-applets6/snakepit/snakepit.html and sound works. _________________ The box said 'Windows 2000 Server or better', so I installed Gentoo
Linux galadriel 4.12.12-gentoo #4 SMP PREEMPT Fri Nov 3 00:09:29 CET 2017 x86_64 Intel(R) Core(TM) i7-2860QM CPU @ 2.50GHz GenuineIntel GNU/Linux
Visit www.mygnu.de |
|
Back to top |
|
|
j79zlr Apprentice
Joined: 05 Dec 2004 Posts: 235 Location: Chicago, IL
|
Posted: Tue Dec 04, 2007 12:18 am Post subject: |
|
|
Seems to be working great when it does, but still doesn't load yahoo games applets or some browser based irc software. |
|
Back to top |
|
|
MalleRIM Guru
Joined: 23 Jul 2007 Posts: 563 Location: China
|
|
Back to top |
|
|
gimpel Advocate
Joined: 15 Oct 2004 Posts: 2720 Location: Munich, Bavaria
|
|
Back to top |
|
|
christophocles n00b
Joined: 27 Aug 2007 Posts: 4
|
Posted: Wed Dec 12, 2007 2:43 am Post subject: |
|
|
nice work... thanks for putting this together |
|
Back to top |
|
|
Belliash Advocate
Joined: 24 Nov 2004 Posts: 2503 Location: Wroclaw, Poland
|
|
Back to top |
|
|
|