title: Java SxS (side by side) configuration
body: <p>I am facing a very obscure issue, while I am trying to run a java app in Windows, Side by Side (SxS).</p>
  
  <p>I have done all the preparation creating the java.exe.config and java.exe.manifest files, which I have in the same folder with the JRE. </p>
  
  <p>The application runs normally when I invoke it from the command line (by starting a .bat file). The .bat file uses the SxS configured Java (which is the only one in the box I am running the application)</p>
  
  <p>However, when I try to invoke it from inside another Java process (using <code>Runtime.getRuntime.exec()</code>) or <code>ProcessBuilder</code> it seems that it totally ignores the SxS configuration and the child Java process is complaining it cannot find the COM libraries, which were the reason I had to do SxS. I have to add that the parent Java process is also launched by the Java.exe that is configured for SxS. Thus, I would assume that the "<code>Runtime.getRuntime(), ProcessBuilder()</code>" would give me the Java SxS loaded environment.</p>
  
  <p>Doing some further debugging using some windows tools (procexp.exe, procmon.exe) i found out the following: When i start the application from the .bat file the .manifest file is normally read by crss.exe (as it supposed to be). However, when another process is spawned by Java the .manifest file is NOT taken into consideration at all. One possible problem i could think of is that the current directory of the Java.exe which starts the process is not the same as the java.exe.manifest file is located.</p>
  
  <p>The only thing i can think of is a bug/problem (or maybe they call it a feature) in the java launcher.</p>
  
  <p>Does anyone had a similar problem? Could anyone shed any light on the above? Much appreciated.</p>
  
  <p>So far i had tried the following:</p>
  
  <ul>
  <li>Run the java process from inside a .bat file. <b>WORKED</b></li>
  <li>Invoked the java process from a parent Java process using <code>Runtime.getRuntime().exec(). <b>DID NOT WORK</b></li>
  <li>Invoked the .bat file from a parent Java process using Runtime.getRuntime().exec()</code>. <b>DID NOT WORK</b></li>
  <li>Used ProcessBuilder setting the current directory where the .manifest file is. <b>DID NOT WORK</b></li>
  </ul>