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
local.yml:
stage java 11 application:
The default JRE 1.8.x is used, not JRE 11.+ as requested. Consequently starting fails: