Skip to content

Java 9 Support #38

Closed
Closed

Description

@clehene

Java 9 release is imminent (currently this is set for July 27)

For reference here's the Java 9 migration guide
http://docs.oracle.com/javase/9/migrate/toc.htm#JSMIG-GUID-5657F44A-B2D7-4FB6-AAD7-295AC4533ABC

Activity

  1. sergiofigueras commented on Jul 1, 2017

    @sergiofigueras

    +1

  2. loia commented on Sep 22, 2017

    @loia

    +1 Java 9 is out!

  3. sabareeshkkanan commented on Sep 25, 2017

    @sabareeshkkanan

    +1 I tried to install java 9 in alpine but no luck, i tried, jdk, jre and even server jre but i got same exact message . I didnt even try to minify it

    /tmp/jdk-9/bin # ./java -version
    #
    A fatal error has been detected by the Java Runtime Environment:
    #
    #  SIGSEGV (0xb) at pc=0x00007f496de04907, pid=50, tid=51
    #
    # JRE version:  (9.0+181) (build )
    # Java VM: Java HotSpot(TM) 64-Bit Server VM (9+181, mixed mode, aot, tiered, compressed oops, g1 gc, linux-amd64)
    # Problematic frame:
    # V  [libjvm.so+0xced907]  Threads::create_vm(JavaVMInitArgs*, bool*)+0x267
    #
    # Core dump will be written. Default location: /tmp/jdk-9/bin/core
    #
    # An error report file with more information is saved as:
    # /tmp/jdk-9/bin/hs_err_pid50.log
    #
    # If you would like to submit a bug report, please visit:
    #   http://bugreport.java.com/bugreport/crash.jsp
    #
    
  4. anapsix commented on Sep 25, 2017

    @anapsix
    Owner

    Yep @sabareeshkkanan, I've encountered same exact issue

  5. msvab commented on Sep 26, 2017

    @msvab

    Looks like there is early preview for Alpine Linux http://jdk.java.net/9/ea. No idea how stable it is though, but it's good to see native musl branch.

  6. anapsix commented on Sep 26, 2017

    @anapsix
    Owner

    @msvab sweet.. gotta try using that

  7. mattnelson commented on Sep 26, 2017

    @mattnelson

    I tested the JDK9-ea179 alpine distribution a few weeks back. I ran a few containers from this image. I didn't notice any immediate issues, other than needing to add a few exports commands due to the default exported modules. I did try using alpine-3.6 as well, but unfortunately a non passive change was introduced when upgrading busy box that no longer recognizes non-POSIX environment variables.

    gliderlabs/docker-alpine#290

    FROM alpine:3.5
    
    ENV JAVA_HOME=/opt/jdk \
        PATH=${PATH}:/opt/jdk/bin \
        LANG=C.UTF-8
    
    RUN set -ex && \
        apk add --no-cache bash && \
        wget http://download.java.net/java/jdk9-alpine/archive/179/binaries/jdk-9-ea+179_linux-x64-musl_bin.tar.gz -O jdk.tar.gz && \
        mkdir -p /opt/jdk && \
        tar zxvf jdk.tar.gz -C /opt/jdk --strip-components=1 && \
        rm jdk.tar.gz && \
        rm /opt/jdk/lib/src.zip
    
  8. xingxiuyi commented on Oct 1, 2017

    @xingxiuyi

    JDK9 has musl version.

    download serverjre-9-ea+181_linux-x64-musl_bin.tar.gz from jdk.java.net

    java -version:
    
    java version "9-ea"
    Java(TM) SE Runtime Environment (build 9-ea+181-alpine-nightly-h6744-20170807)
    Java HotSpot(TM) 64-Bit Server VM (build 9-ea+181-alpine-nightly-h6744-20170807, mixed mode)
    
    
  9. clehene commented on Oct 4, 2017

    @clehene
    Author

    I've adapted the current Docker but there's more work needed for a good setup.
    I worked through:

    • Alpine JDK build
    • Locale
    • DNS caching
    • JCE / crypto (not necessary anymore)
    • nsswitch

    I have the cli history, but it includes all the failed attempts too.

    Questions:

    • Not clear how musl changes things - I'm guessing some things may require glibc?
    • Not yet clear how the modularized JDK aspect would come into play yet.

    Related stuff:
    https://blogs.oracle.com/developers/official-docker-image-for-oracle-java-and-the-openjdk-roadmap-for-containers

  10. rvillane commented on Nov 16, 2017

    @rvillane

    +1

  11. bastelfreak commented on Nov 26, 2017

    @bastelfreak

    Hi people, I would love to see an alpine image with java9. Was there any progress in the past month? Can we help somehow?

  12. sabareeshkkanan commented on Nov 26, 2017

    @sabareeshkkanan

    you can try to build using this early access http://jdk.java.net/9/ea

  13. anapsix commented on Dec 11, 2017

    @anapsix
    Owner

    added MUSL anapsix/alpine-java:9 and anapsix/alpine-java:9_jdk image tags (see java9 branch)

  14. Sineaggi commented on Jan 9, 2018

    @Sineaggi

    @anapsix I appreciate the branch as well as the updated images, but I believe you've mixed up the jdk_9 and 9 builds, the 9 are the ones with the jdk and jdk_9 is just the jre 😄

  15. anapsix commented on Jan 12, 2018

    @anapsix
    Owner

    @Sineaggi yeup.. thx, fixed

  16. mattnelson commented on Apr 27, 2018

    @mattnelson

    I did try using alpine-3.6 as well, but unfortunately a non passive change was introduced when upgrading busy box that no longer recognizes non-POSIX environment variables.

    Found a work around for this issue. docker-library/openjdk#135 (comment)
    Which worked nicely since bash is already provided by this image.

    # Use a bash shell instead of the default sh shell to support non-POSIX environment variables
    ENTRYPOINT ["/bin/bash", "-c", "java $JAVA_OPTS -jar myservice.jar"]
    
  17. mattnelson commented on Apr 27, 2018

    @mattnelson

    Also looks like the 9-musl image is no longer buildable, until portola is GA is may be difficult to keep up as the only musl download currently available is for 11.

    wget http://download.java.net/java/jdk9-alpine/archive/181/binaries/serverjre-9-ea+181_linux-x64-musl_bin.sha256
    --2018-04-27 13:02:34--  http://download.java.net/java/jdk9-alpine/archive/181/binaries/serverjre-9-ea+181_linux-x64-musl_bin.sha256
    Resolving download.java.net (download.java.net)... 23.40.20.195
    Connecting to download.java.net (download.java.net)|23.40.20.195|:80... connected.
    HTTP request sent, awaiting response... 301 Moved Permanently
    Location: https://download.java.net/java/jdk9-alpine/archive/181/binaries/serverjre-9-ea+181_linux-x64-musl_bin.sha256 [following]
    --2018-04-27 13:02:34--  https://download.java.net/java/jdk9-alpine/archive/181/binaries/serverjre-9-ea+181_linux-x64-musl_bin.sha256
    Connecting to download.java.net (download.java.net)|23.40.20.195|:443... connected.
    HTTP request sent, awaiting response... 404 Not Found
    2018-04-27 13:02:35 ERROR 404: Not Found.
    
  18. Sineaggi commented on Apr 27, 2018

    @Sineaggi

    jdk10 has been released, but there haven't been any musl builds for alpine linux. http://www.oracle.com/technetwork/java/javase/downloads/jdk10-downloads-4416644.html
    However, jdk11 has alpine linux builds with musl support. http://jdk.java.net/11/
    EDIT: these are jdk11 early-access builds.

  19. anapsix commented on Apr 27, 2018

    @anapsix
    Owner

    Perhaps, the route to take with Java 9, 10, and 11 is to go with glibc versions for a while

  20. mattnelson commented on May 1, 2018

    @mattnelson

    Perhaps, the route to take with Java 9, 10, and 11 is to go with glibc versions for a while

    I agree. Would still like to have additional musl images available for those that want to experiment.

  21. anapsix commented on Jul 15, 2019

    @anapsix
    Owner

    this is unlikely to happen with current Oracle Java licensing terms (see #82)

  22. clehene commented on Jul 17, 2019

    @clehene
    Author

    @anapsix thank you for maintaining this, it was useful!
    Looking at zulu / adopt alpine images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions