Main menu:

Sponsoring

Please consider a small donation:

 

Also appreciated: support me by clicking the ads (costs nothing) :-)

 

Or you can donate bitcoin:

 

Thanks to TekLinks in Birmingham, AL, for providing colocation and bandwidth.

Page Rank

Fame

FOSS Force Best Blog--2013 Award

Recent posts

Recent comments

About this blog

I am Eric Hameleers, and this is where I think out loud.
More about me.

Search

My Favourites

Slackware

Calendar

July 2014
M T W T F S S
« Jun    
 123456
78910111213
14151617181920
21222324252627
28293031  

RSS Alien's Slackware packages

RSS Alien's unofficial KDE Slackware packages

RSS Alien's multilib packages

Meta

OpenJDK 7 update 3 available for Slackware 13.37

 The JDK and JRE packages in Slackware are severely outdated. In case you are not familiar with them, “JDK” is the Java Development Kit and “JRE” is the Java Runtime Engine. As stated in a previous post on this blog, Slackware (and with it all the other distros) is no longer allowed to distribute Java packages based on the official binaries released by Oracle. You as an end-user are still allowed to download and use those binaries; you are just not allowed to re-distribute them.

You can do two things: grab Oracle’s binary tarballs, and use the jdk.SlackBuild and jre.SlackBuild scripts of Slackware to create updated packages with which you can upgrade an existing Java on your computers. Or you grab the source code of OpenJDK and build your own re-distributable packages. This second option is hopefully what Slackware will pick for its future releases.

In the meantime, I produced packages for slackware-current back in January 2012, compiled from these OpenJDK sources with the use of the icedtea build harness. That was a first, and successful, attempt at creating new JDK and JRE that could be used in Slackware. I was targeting slackware-current in the hope that Pat Volkerding would use the SlackBuild scripts as-is. Unfortunately, Slackware’s development has stalled a bit, and the ChangeLog.txt has not seen Java updates yet.

So, when I noticed that there was a new release of IcedTea which would produce very up-to-date OpenJDK binaries, I decided to build this on Slackware 13.37 instead of slackware-current and add the resulting packages to my regular repository. This allows everyone who is running Slackware version 13.37 or -current to enjoy the new JDK and web plugin.

Pre-built packages:

Packages and sources can be found in the usual locations. There are more mirrors than I mention here of course. Note that you need a JDK or JRE package (based on your needs), the rhino package (which is the JavaScript engine) and optionally icedtea-web (the Java browser plugin):

Compiling:

I built these packages twice: the first time I “bootstrapped” using the gcc-java compiler. The second time, I had installed my fresh openjdk package and built a new copy against itself. The value of the “BOOTSTRAP” variable in the script determines the type of build. You can not build OpenJDK with the Oracle JDK.

If you want to do this compilation yourself, then follow the README.txt carefully! You will additionally need to install apache-ant, xalan and xerces packages, all of which you will find in my package repository. If you are not on slackware-current then you will have to make some small modifications to the installed gcc and seamonkey packages. When following directions in the README.txt this is a trivial task.

Web plugin:

You can check if your web plugin has been installed and is working correctly, by visiting this URL: http://java.com/en/download/installed.jsp?detect=jre&try=1 .

After I finished building my packages I visited the above URL and it looked OK. Then I loaded a java applet on another page (http://chemagic.com/web_molecules/) and it crashed so hard that it took the browser down along with it. Wtf???

I had originally used version 1.1.4 of the icedtea-web sources (since that used to work before) but it turns out that there was a change in Mozilla Firefox since version 10.0. The change uncovers a bug which makes the plugin crash with the error message “Assertion failure: rt->onOwnerThread(), at /tmp/mozilla-release/js/src/jsapi.cpp“. I tracked down the bug reports, https://bugzilla.mozilla.org/show_bug.cgi?id=704249 and http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=820, and eventually found a working patch on the mailing list. This patch could only be applied against the latest source code for icedtea-web, which is why you will find an icedtea-web package with version “20120225″ in my repository.

Good luck! Eric

 

Comments

Comment from Mike Langdon (mlangdn)
Posted: February 26, 2012 at 08:35

Hi Eric. Trying to download rhino gives me a 404. Searching the repository myself and rhino is not there.

Comment from John
Posted: February 26, 2012 at 13:18

Hey Eric!
I will definitely be jumping on this right after church today. Big day also plan to watch Danica Patrick in the Daytona 500.
Thanks for all your great work

Wanna-be-compiler
john

Comment from alienbob
Posted: February 26, 2012 at 13:31

Hi Mike

I forgot to upload the rhino package and sources… I fixed that now, thanks for the feedback.

I also took the opportunity to rename the packages for openjdk and icedtea-web, they were missing the “alien” tag.

Eric

Comment from mcnalu
Posted: February 26, 2012 at 15:18

Thanks Eric. This will be very useful.

Am I right in thinking that it’s best to remove slackware’s jre and jdk packages before installing these ones?

Andrew

Comment from alienbob
Posted: February 26, 2012 at 17:08

Of course you need to first “removepkg” any Oracle JRE or JDK you have installed! The two will not work at the same time.

Eric

Comment from Wild Wizard
Posted: February 28, 2012 at 10:28

Eric just got around to testing this out.

Playstation Media Player (PMS) fails with :-
./PMS.sh: line 52: /usr/lib64/java/bin/java: No such file or directory
./PMS.sh: line 52: exec: /usr/lib64/java/bin/java: cannot execute: No such file

I traced this back to a difference between your open package the the Sun package.

Sun package has all subdirs under /usr/lib64/java
Open package has all subdirs under /usr/lib64/java/jre

You can fix it either by change the dir layout to the same as the sun package or by changing the JAVA env variable to include the /jre on the end and adjusting the others to suit.

Comment from alienbob
Posted: February 28, 2012 at 13:33

Hi Wild Wizard

Did you try this _after_ logging out and logging in again?

Yes, the java binary is in a different directory but after logging out and back in your profile should have been updated with a different $PATH entry.

Eric

Comment from escaflown
Posted: February 29, 2012 at 01:37

Thanks Eric! Working fine here. I hope this will soon make ti to -current.

Comment from warhawk
Posted: February 29, 2012 at 04:41

Hi Eric,

I have a little question about multilib in Slackware 13.37: the 8 February Slackware 13.37 update include a glibc changes, is not necessary wait for new glibc for multilib 13.37 with this changes? the last multilib glibc include “11-11-11″ update from November 2011.

Thanks a lot and sorry for off-topic, greetings!

Comment from Wild Wizard
Posted: February 29, 2012 at 05:49

Yes Eric, the problem is not the path but the JAVA_HOME env variable which is used as the path to the java run-time, the PATH env variable is not used to find the java run-time at all.

See :-
http://tldp.org/HOWTO/Enterprise-Java-for-Linux-HOWTO-2.html

Note that the java binary is located at $JAVA_HOME/bin/java
Your package currently has it at $JAVA_HOME/jre/bin/java

Comment from alienbob
Posted: February 29, 2012 at 12:22

Hi Wild Wizard

Yes, I think you are (partly) right and I have to change the PATH value in the /etc/profile.d/openjre.* scripts.

As far as I understand it, the JAVA_HOME environment variable points to the location where a Java Development kit is installed. The JRE can be (but not necessarily so) in a subdirectory below ${JAVA_HOME}.

Using the JRE is done by calling the “java” or any of the other available binaries – as long as they are found in the $PATH, they will start, and will find their installed directory.

Correct me if this is wrong.

Eric

Comment from warhawk
Posted: March 1, 2012 at 00:15

I see that you update today multilib glibc for Slackware 13.37, thanks a lot Eric.

Comment from warhawk
Posted: March 2, 2012 at 02:47

Back to OpenJDK 7, In my case i make (as root):

ln -sf /usr/lib64/java/bin/jconsole /usr/bin/jconsole
ln -sf /usr/lib64/java/bin/policytool /usr/bin/policytool

to use jconsole and policytool on xfce 4.8 “development” menu that appears broken link to this binaries.

regards.

Comment from alienbob
Posted: March 2, 2012 at 12:50

Warhawk,

If you install the openjdk package you have to logout and login again before you can use it. The package installs a profile script which adds “/usr/lib64/java/bin” to your $PATH so that the symlinks you created are not necessary.

Eric

Comment from Jason
Posted: March 4, 2012 at 15:50

Eric,

I like letting java have access to the system clipboard. In the past I’ve just added this into /etc/java/java.policy

permission java.awt.AWTPermission “accessClipboard”;

Do you know if this is the best way to do this? Is there another way to allow java access to the system clipboard?

Pingback from Alien Pastures » OpenJDK 7 update 3 available for Slackware 13.37 | Linux Blog
Posted: March 5, 2012 at 20:46

[...] by Oracle. You as an end-user are still allowed to download and use … See more here: Alien Pastures » OpenJDK 7 update 3 available for Slackware 13.37 This entry was posted in Uncategorized and tagged binaries-released, longer-allowed, official, [...]

Comment from dolphin77
Posted: March 6, 2012 at 09:22

Hi, Eric.

Looking into changelog makes me think of you already received (or expecting to receive) Raspberry PI :))).

Something tasty is being cooked in your kitchen. Mmmm. I already smell taste of small piece of hardware running Slackware with all the benefits of open source. Good luck, Eric. And thank you for the very interesting projects you are working on.

Comment from alienbob
Posted: March 7, 2012 at 11:32

Well I am expecting to receive a Raspberry Pi, but looking at the distribution issues these guys are experiencing (due to the massive demand – I mean, they built 10,000 devices and got 3,000,000 orders) it may take a while before I actually see it arriving on my doorstep.

Eric

Pingback from Problem with openJDK7
Posted: March 18, 2012 at 16:28

[...] Where did you get your openjdk? Are you using Alien Bob's packages? They are for 13.37 or -current. http://alien.slackbook.org/blog/open…ackware-13-37/ [...]

Pingback from jre update?
Posted: April 20, 2012 at 10:24

[...] Vulnerable? – Yes,to the point that Firefox now checks the version and will disable Java. Why? – Because Oracle now forbids redistribution by third parties. Options – http://alien.slackbook.org/blog/open…ackware-13-37/ [...]

Comment from Aaron Hsu
Posted: May 21, 2012 at 21:15

This is really nice. I would appreciate it if you could post some instructions on how to use your build to track the latest OpenJDK updates. A recent 7u4 was released, and I would like to upgrade, but your source directory in the build differs from the .zip distribution that is released in the notices. It would be nice to have a simple checklist for building newer versions. Or you could just build them for us, but that’s less fun. :-)

Comment from alienbob
Posted: May 22, 2012 at 11:12

Hi Aaron

The way OpenJDK is commonly built these days, using the IcedTea build harness, does not allow for a compilation of a OpenJDK version of your choice. Every IcedTea release builds exactly one OpenJDK version.
If you read http://blog.fuseyism.com/index.php/2012/02/15/icedtea-2-1-released-openjdk7-u3-release/ then you’ll see that my openjdk package “7u3″ already contains several fixes which were scheduled for “7u4″. Also, a more recent article on that blog gives a hint that IcedTea 2.2 is around the corner – that will be the release which builds openjdk 7u4.

You can of course compile openjdk without using icedtea at all (in fact my first non-public builds were done that way) but then you lose the ability to add the Java browser plugin (icedtea-web) which requires that openjdk was built with icedtea.
That is why I decided to do what every other distro does too, and that is to use icedtea and the plethora of patches that it applies to openjdk when compiling.

Eric

Comment from Aaron Hsu
Posted: May 22, 2012 at 18:15

Thank you for clarifying the situation with OpenJDK and how it relates to IcedTea. I find this to be a really complicated way of doing things! I am considering using the JVM as a base for a language that I am writing, but the complexity keeps getting me every time!

Pingback from Was the status of the continued usage of Java on Slackware ever decided?
Posted: June 6, 2012 at 09:02

[...] You might want to read this: http://alien.slackbook.org/blog/open…ackware-13-37/ [...]

Comment from Francisco Neto
Posted: July 2, 2012 at 13:14

Hello Eric

JRE is working fine at my Slackware64-current now !!

Thanks for your effort.

Franco

Comment from Dan Herkes
Posted: November 2, 2012 at 10:51

Eric, the chrome binary stopped working after I installed the openjre, rhino, and icedtea packages. I’m getting an error message to the effect that an open session of chrome exists, and that I risk corruption of my user profile. No chrome process is active though. Chrome worked again after I removed the three new packages. Slack 14, Chrome Version 21.0.1180.90 (156592)

Thank you

Comment from Daniel Herkes
Posted: November 2, 2012 at 11:23

Hi, Here’s the precise error message.

chrome
[2269:2269:155845386:ERROR:process_singleton_linux.cc(907)] Failed to create socket directory.
[2269:2269:155845656:ERROR:chrome_browser_main.cc(1552)] Failed to create a ProcessSingleton for your profile directory. This means that running multiple instances would start multiple browser processes rather than opening a new window in the existing process. Aborting now to avoid profile corruption.

Comment from alienbob
Posted: November 2, 2012 at 21:38

Hi, it really would have been better if you posted this in the most recent openjdk thread on my blog.
We are at Update 9 now, and your posting in a eight-month old thread does make me wonder if you are trying the old Update 3 package instead of my latest openjdk-7u9_b30-x86_64-1alien package.

I have that openjdk installed on this multilib Slackware 14 desktop, along with rhino and icedtea-web. I also have google-chrome-21.0.1180.89-x86_64-1 as packaged from Slackware’s /extra directory and it has never given me a problem.

Further discussions I would like to see in the most recent post about openjdk please.

Eric

Comment from Dan Herkes
Posted: November 2, 2012 at 21:53

Hi Eric,

Sorry about that! I posted to the wrong forum thread. I’ll try the newer packages this weekend.

Write a comment