Many third party products require a specific version of the JRE or JDK and many of our servers have multiple duties. Application teams argue they should not care where Java is installed. Most of the applications simply rely on environment variables (or whatever Java happens to be lying around) but those teams needing specific versions need to be told where to find their particular version. I don't like the fact that I can now not relocate a JVM without visiting all of the applications that may use it. The obvious answer is to create a program that hides the details from them and expose the location through an API. This solution would require every Java application be wrapped up in some script inquiring about the environment.
I don't like unnecessary complexity or reinventing the wheel. Is there some standard practice, feature built into Java, or obvious solution I am missing?
One I have thought of is for each application to manage a link in its path to point to the Java it wants but I would still need to tell them where it is.