If I put in ORACLE_HOME just C:\oc4j_extended_101350 only OC4J will work BUT if I change it for C:\oraclexe\app\oracle\product\11.2.0\serve just APEX will work.How do you run your OC4J? If you start it on demand, create a wrapper batch script to reset ORACLE_HOME for that start only, don't touch the global environment variable for your database, e. g.
What should I do ? I am using Windows 7, Oracle Database 11g Express Edition !
If you start it as windows service, try to create a separate account for it and set a user specific ORACLE_HOME instead of a global one.
SET JAVA_HOME=C:\Program Files\Java\jdk1.7.0_01 SET ORACLE_HOME=C:\oc4j_extended_101350 "%ORACLE_HOME%"\bin\oc4j.cmd -start
I run OC4J manually.Okay, so the supplied snippet should be all you need.
Witch one is correct ?None. Setting the environment variable ORACLE_HOME and starting OC4J with reference to that variable are two separate, successive steps. My snippet above shows three lines. You need all three in appropriate order in your batch file to get your oc4j started properly.
1 SET ORACLE_HOME=C:\oc4j_extended_101350"%ORACLE_HOME%"\bin\oc4j.cmd -start
2 SET ORACLE_HOME=C:\oc4j_extended_101350%ORACLE_HOME%\bin\oc4j.cmd -start
3 SET ORACLE_HOME=C:\oc4j_extended_101350 %ORACLE_HOME%\bin\oc4j.cmd -start