Skip to content
This repository has been archived by the owner on Jan 28, 2022. It is now read-only.

java_buildpack configuration for JRE version ignored #42

Open
gmuth opened this issue Aug 10, 2020 · 0 comments
Open

java_buildpack configuration for JRE version ignored #42

gmuth opened this issue Aug 10, 2020 · 0 comments

Comments

@gmuth
Copy link

gmuth commented Aug 10, 2020

local.yml:

applications:
  - name: myjavaapp
    buildpacks:
      - java_buildpack
    env:
      JBP_CONFIG_OPEN_JDK_JRE: "{ jre: { version: 11.+ }}"

stage java 11 application:

cf local stage myjavaapp -p target/myjavaapp.jar

Buildpack: will detect                                                         
-----> Java Buildpack v4.27 | https://github.com/cloudfoundry/java-buildpack.git#e06e00b
-----> Downloading Jvmkill Agent 1.16.0_RELEASE from https://java-buildpack.cloudfoundry.org/jvmkill/bionic/x86_64/jvmkill-1.16.0-RELEASE.so (found in cache)
-----> Downloading Open Jdk JRE 1.8.0_265 from https://java-buildpack.cloudfoundry.org/openjdk/bionic/x86_64/bellsoft-jre8u265%2B1-linux-amd64.tar.gz (found in cache)
       Expanding Open Jdk JRE to .java-buildpack/open_jdk_jre (1.0s)

The default JRE 1.8.x is used, not JRE 11.+ as requested. Consequently starting fails:

Running myjavaapp on port 55683...                                                  
JVM Memory Configuration: -Xmx424887K -Xss1M -XX:ReservedCodeCacheSize=240M -XX:MaxDirectMemorySize=10M -XX:MaxMetaspaceSize=111688K
Exception in thread "main" java.lang.UnsupportedClassVersionError: mypackage/MyJavaApplication has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant