I know WildFly cartridge doesn't have JDK support, but can I somehow install Java 8 at experimental DIY cartridge? java-1.7.0 is the latest version available at /usr/lib .
If you want an specific JDK version you can download it and set the environment variables:
cd $OPENSHIFT_DATA_DIR
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u5-b13/jdk-8u5-linux-x64.tar.gz
tar -zxf jdk-8u5-linux-x64.tar.gz
export PATH=$OPENSHIFT_DATA_DIR/jdk1.8.0_05/bin:$PATH
export JAVA_HOME="$OPENSHIFT_DATA_DIR/jdk/jdk1.8.0_05"
Thanks to this cartridge.
As @youssef points out, you should also add this lines to .openshift/action_hooks/start:
export JAVA_HOME="$OPENSHIFT_DATA_DIR/jdk/jdk1.8.0_05"
export PATH=$OPENSHIFT_DATA_DIR/jdk1.8.0_05/bin:$PATH
UPDATE: now OpenShift has added alternative runtimes, you can skip downloading your own:
export JAVA_HOME=/etc/alternatives/java_sdk_1.8.0
export PATH=$JAVA_HOME/bin:$PATH
Java 8 is now available by default with DIY. You just need to set PATH as given below in your /.openshift/action_hooks/start.sh
export JAVA_HOME=/etc/alternatives/java_sdk_1.8.0
export PATH=$JAVA_HOME/bin:$PATH
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With