Here's how to change the Java version of Bluemix from 7 to 8. There are two settings, the Runtime that runs the app and the DevOps Service, which is a CI tool. I don't think this article will be valid for a long time, as the default will be Java 8 in the meantime, but I'm a little troubled with using it, so I'll share it.
As of January 2017, the default Java version seems to be 7.
However, Liberty Buildpack Updates: Java 8, Java EE 7 updates, and more! --Bluemix Blog As you can see in -java-ee-7-updates /), Java 8 can be used from May 2015, isn't it?
In the above link, the method to set using the cf
command was posted. Specifically, it is a method like cf set-env myApp JBP_CONFIG_IBMJDK" version: 1.8. + "
.
Of course, the above method is fine, but I don't usually use cf
, so I will use the method of setting from the GUI.
Select Runtime from the application dashboard and select the ʻEnvironment variables` tab.
After that, in NAME
of ʻUser defined, in
JBP_CONFIG_IBMJDK,
VALUE Specify
version: 1.8. +`.
If you save after specifying, the reflection is completed. Please note that the application will be restarted as soon as this SAVE is executed.
I remember it used to be called Delivery Pipeline. In short, it's a CI tool. The value specified as the environment variable of the above application is not shared by the CI tool, so it must be specified separately here as well.
Select Configure Stage
for Build State.
Then put ʻexport JAVA_HOME = ~ / java8;in
Build Shell Command. In the case of my example, when using the build tool Gradle, extra description is added, but basically, what was originally written (the part that does not start with
#, starts with
#" Is a comment), just add ʻexport JAVA_HOME = ~ / java8;
.
In this environment (shell), ;
is a delimiter, so don't forget to add it.
This will also be reflected if you save it.
That's all for the settings. There is nothing to know, but it's surprisingly troublesome to find out. I hope the default version goes up soon.
Thank you until the end.
Recommended Posts