Go to %ORACLE10_HOME%\bin
and create the file run-oc4j.cmd
with the following contents:
set OC4J_JVM_ARGS=-javaagent:$AGENT_PATH_WIN %OC4J_JVM_ARGS% call "%~dp0\oc4j.cmd" %*
Use this command file instead of oc4j.cmd
if you want to run OC4J with JRebel.