If your default environment does not point to the correct JRE, add the directory that contains the Java binary to the PATH environment variable in the Service section of the application profile. This adds the directory you specify to the beginning of your existing PATH environment variable.
In cases where you cannot guarantee that the PATH environment variable on a compute host:
You can configure your System PATH to point to the correct Java version, or set the path to the correct version of Java in the application profile.
If you set it in your application profile, the directory you specify is added to the beginning of your existing PATH environment variable.