I am new to Openshift and i have created a server instance using Tomcat 7 (JBoss EWS 2.0) cartridge for my spring boot web application.
Initially, web application was using JDK7 and was working fine on Openshift. Now for some enhancement we have to switch to JDK8.
I tried searching on Google about changing JAVA_HOME
to JDK8 and i tried most of the solutions but i can not make it work.
Tried Solution 1: Created
start
file underapp-root/runtime/repo/.openshift/action_hooks/
with below content.#!/bin/bash export JAVA_HOME=/etc/alternatives/java_sdk_1.8.0 export PATH=$JAVA_HOME:$PATH
Also, the file has
+x
permission.Tried Solution 2: Created
java8
marker underapp-root/runtime/repo/.openshift/markers
andjbossews/template/.openshift/markers
.
The above solutions don't work. Other option is DIY
cartridge which may work but i don't want to create new application and move everything there.
EDIT
Below is the directory structure
Please note that i have created this application using open shift UI and not using rhc
command.
Please guide me.
Thanks
Sounds like bad planning: You're supposed to that your platform supports Java-8 before writing code that requires it. From the Openshift documentation: