January 17, 2018

Not able to change Java Version or Create a new buildpack

Hello -

  1. While I am trying to change the version of Java from 8 to 7 using the following command:

cf set-env roster JBP_CONFIG_OPEN_JDK_JRE '{ jre: { version: 1.7.0_+ } }'

I get the following error, and I assume because the default version of Java buildpack installed is v4.5 which has open JDK from 1.8 and above or is the error due to something different? (Now that Leads to another question posted below the error)

Java Buildpack v4.5 (offline) | https://github.com/cloudfoundry/java-buildpack.git#ffeefb9
   2018-01-17T04:52:46.95-0500 [STG/0] OUT -----> Downloading Jvmkill Agent 1.10.0_RELEASE from https://java-buildpack.cloudfoundry.org/jvmkill/trusty/x86_64/jvmkill-1.... (found in cache)
   2018-01-17T04:52:46.95-0500 [STG/0] ERR [Buildpack]                      ERROR Finalize failed with exception #<RuntimeError: Unable to find cached file for https://java-buildpack.cloudfoundry.org/openjdk/trusty/x86_64/openjdk-1....
   2018-01-17T04:52:46.95-0500 [STG/0] ERR Unable to find cached file for https://java-buildpack.cloudfoundry.org/openjdk/trusty/x86_64/openjdk-1....

   2018-01-17T04:52:46.95-0500 [STG/0] ERR Failed to compile droplet: Failed to run finalize script: exit status 1

   2.  I have tried to create a buildpack which has open JDK 7 using the command (cf create-buildpack java7_buildpack java-buildpack-v2.4.zip 11 --disable( Here I have downloaded the zip file from online onto my computer and is this the right command?)) and it say's I do not have permissions to do so, should I be contacting the CF vendor to get the required permissions and also, as a part of certification test to create a build pack or change the version of the Java can I access online to get the new buildpack or what are the options?

 

 3. Or apart from above 2 points is there a better way to change the version or create a buildpack?

Thank you!

Click Here!