Custom JAVA Path for Openhab

I have installed Openhab on a server which already has an application (Openremote) which requires Java 1.6. I have found that the myopenhab functionality does not seem to work with that version.

I know I can install 2 versions of Java but I need to point Openhab to the latest using the JAVA_HOME variable which is already being used by Openremote.

Any ideas?

Which operating system?

windows 10

Problem solved I managed to change the environment variable for the other Java app.