So, we are running hadoop on a Power PC machine (64 bit). It runs using the IBM JDK. However, within that hadoop map reduce program, different processes are spawned (using the ProcessBuilder class) which execute jar programs. The problem is that those programs have problem running with IBM JDK's virtual machine and therefore require Open JDK. Likewise hadoop has problem running with the OpenJDK on the Power PC. So I was wondering, if its possible to execute a jar file using a different version of java. So, for example, in this case, the hadoop uses the IBM JDK and the jar files that are executed within the map reduce program use Open JDK. Basically, we need to use different java virtual machines for programs running simultaneously.
You gave the most important bits of information in your comment - the spawning via the ProcessBuilder
class. This class makes calls on OS level, so you can start any process with this, and they are completely separate from the Java process that started them. So the general answer is "yes, this is possible". Just make sure the ProcessBuilder
calls a different Java installation.