title: ORACLE_HOME environment variable causing confusion between Oracle Database and Oracle OC4J
body: <p>I'm having some Oracle trouble ...</p>
  
  <p>I installed Oracle 11g Express Edition to here:</p>
  
  <p><code>C:\oraclexe\app\oracle\product\11.2.0\server</code> .. so that there are folders such as:</p>
  
  <p><code>C:\oraclexe\app\oracle\product\11.2.0\server\bin</code>
  <code>C:\oraclexe\app\oracle\product\11.2.0\server\config</code>
  <code>C:\oraclexe\app\oracle\product\11.2.0\server\database</code>
  <code>C:\oraclexe\app\oracle\product\11.2.0\server\lib</code></p>
  
  <p>and so on ... and the database is working fine ..</p>
  
  <p>I now install OC4J to <code>C:\oc4j_extended_101350</code> .. so that there are folders such as:</p>
  
  <p><code>C:\oc4j_extended_101350\bin</code></p>
  
  <p><code>C:\oc4j_extended_101350\j2ee</code></p>
  
  <p><code>C:\oc4j_extended_101350\webservices</code></p>
  
  <p>and so on ..</p>
  
  <p>Now OC4J requires me to define the environment variable <code>ORACLE_HOME</code>, which should be set to <code>C:\oc4j_extended_101350</code> in order for OC4J to work .. However, if I do this, the Oracle Database stops working ... and if I delete the <code>ORACLE_HOME</code> environment variable, or set it to where Oracle Database is installed, OC4J stops working ..</p>
  
  <p>So is there any solution for this ? So that both OC4J and Oracle Database work ?</p>
  
  <p>My system is Windows 7 64-bit, in case this matters ..</p>
  
  <p>EDIT:</p>
  
  <p>Also, I need BOTH to work together simultaneously with each other, so I'm not sure if a script solution will work or not ..</p>