My thoughts on Slackware, life and everything

Icedtea 3.0.0 brings Java 8 to Slackware

icedteaFinally! IcedTea 3.0.0 has been released and it compiles OpenJDK 8u77.

Java 8 has been available for considerable time, but I have been waiting for icedtea to support it before creating packages. According to release maintainer Andrew Hughes the main cause for this delay was having to start from scratch due to the new build system and basically lack of time.

I want to use IcedTea as a “build harness” for OpenJDK because it makes openjdk interoperate with the free icedtea-web browser plugin and adds support for Java Virtual Machines for other architectures than just x86 and x86_64 (CACAO and JamVM in addition to Hotspot). Note that in this initial release of the icedtea-built OpenJDK, the alternative Java VMs are crash-prone – only Hotspot works properly. This means that currently OpenJDK for the ARM platform will be pretty slow because Hotspot is a zero-assembler VM.

So, Slackers can now upgrade their machines to OpenJDK 8 “Update 77 Build 03“. The Slackware packages are openjdk-8u77_b03 and openjre-8u77_b03. Get them from a mirror location below.

No security fixes and CVE‘s to report this time, since this is a first release. An icedtea-3.0.1 release with security fixes is expected in two weeks.

Java 7

For those of you who are not ready to migrate to Java 8, I have renamed the previous openjdk/openjre 7 packages to “openjdk7” and “openjre7”. Please use openjdk7 instead of openjdk (likewise, use openjre7 instead of openjre) and be aware that the Java 7 and Java 8 packages (e.g. openjdk7 and openjdk) can not co-exist on your computer because they use the same installation directory. If you think that is an issue and you want – or need – to have both installed simultaneously, let me know in a comment to this article.

Note about usage:

Remember that I release packages for the JRE (runtime environment) and the JDK (development kit) simultaneously, but you only need to install one of the two. The JRE is sufficient if you only want to run Java programs (including Java web plugins). Only in case where you’d want to develop Java programs and need a Java compiler, you are in need of the JDK package.

The Java package (openjre as well as openjdk) has one dependency: rhino provides JavaScript support for OpenJDK. Rhino used to be an external dependency but since OpenJDK 8 it is internalized through the “nashorn” library.

Optionally: If you want to use Java in a web browser then you’ll have to install my icedtea-web package too. While Oracle’s JDK contains a browser plugin, that one is closed-source and therefore Icedtea offers an open source variant which does a decent job. Note that icedtea-web is a NPAPI plugin – this prevents use of Java in Chrome & Chromium because those browsers only support PPAPI plugins, but you’ll be OK with all Mozilla [-compatible] browsers of course.

Download locations:

Have fun! Eric

8 Comments

  1. Jen

    Awesome, thanks! 🙂

  2. Helios

    Then you very much.

    But I have tried pdfsam with this new java 8. It does not work, with error messages

    Exception in thread "main" java.lang.NoClassDefFoundError: javafx/application/Application
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at org.pdfsam.community.App.main(App.java:34)
    Caused by: java.lang.ClassNotFoundException: javafx.application.Application
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    … 13 more

    It works with Oracle jav4 1.8.0_72.

    Jedit works (did already with java 7).

  3. alienbob

    Helios – you work with the program, I just package it.
    Try to find the cause so that I might fix it in the package, you may find this faster than I can.
    Unless it is not a packaging issue in which case, file a bug against openjdk please.

  4. alienbob

    Well, I found the answer 10 seconds later:
    http://www.pdfsam.org/run-on-linux-with-openjdk/
    This is not something I can change in openjdk, you need an additional program, openjfx (to add the javafx which is not part of openjdk).

  5. Andrew Hughes

    Wow, you were quick at doing packages for this 🙂 Thanks!

    Note that Rhino is no longer needed for OpenJDK 8; it’s replaced by Nashorn which is part of OpenJDK itself. I imagine that might just be a copy and paste error from your standard 7 release notes.

    For ARM32, my plan is to introduce the output of the AArch32 project as an option in 3.1.0, expected in May/June. I considered adding it for 3.0.0 but didn’t want to delay things any longer. This will be an optional replacement HotSpot, so ARM users can try the more stable Zero build or the AArch32 port. At present, the AArch32 port is just a native interpreter, so it won’t be that much faster, but it’s intended to be a full JIT in time.

    I haven’t heard much from the CACAO and JamVM developers upstream, and the comment in the release notes was as much a "wake up and smell the coffee" for them as it was information for end users. I’d be interested to know on which architectures you feel they are still needed. With x86, x86_64, sparc, sparc64, ppc64, ppc64le and AArch64 all having JITs in 3.0.0, and AArch32 in the pipeline, we only have s390, s390x and ppc32 suffering with Zero at Red Hat and ppc32 is largely obsolete.

  6. alienbob

    Hi Andrew,

    Ah… "rhino" -> "nashorn", I should have seen the language reference when I updated the build script to add the nashorn tarball.
    I will update my notes for the package to indicate that rhino is no longer a dependency.
    Currently Slackware only has a 32bit ARM port so I will welcome a full JIT in future. None of us owns any 64bit ARM hardware and on top of that, time is very limited when in practice only one point two people are dealing with ARM here and there’s also many radically different things to keep up to date.

  7. Anon

    I was very happy to be able to finally upgrade to OpenJDK 8. The 64 bit version worked without issues for me. However, I had to do a small modification to get the 32 bit version to work. On my 32 bit machine, both "java" and "javac" complained there was no client JVM (there isn’t). I had to edit /etc/java/jvm.cfg to make the "server KNOWN" line the first non-commented line. After that it worked great. So if anyone else is having that problem, try that.

    Thank you for all your hard work.

  8. coffecoder

    nice article about java.
    There was something i didn’t know to startup openjdk.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

© 2024 Alien Pastures

Theme by Anders NorenUp ↑