The proper way to start OC4J is sparsely documented by Oracle:
To start OC4J in a standalone environment, issue the following command from the j2ee/home/ directory:
java -jar oc4j.jar options
often be adequate for development or test purposes, but it never
is in a production environment.
Apparently Oracle’s documentation writers assume developers are
sufficiently familiar with the java command to know what extra options to use. But in my experience this is not always the case. What I suggest is this:
java -Xmx128M -server -jar oc4j.jar
- -Xmx128M: Sets
maximum memory to 128MB (substitute a suitable amount). This defaults to a
mere 64MB, which is almost never enough for a webapp that relies on
data from a database. Whithout this option, the applications
performance is likely to be seriously degraded, or worse, because of lack of
sufficient memory allocation. Use stress tests to establish an optimal setting.
- -server: This
flag activates server-mode optimization of the JVM. Server-mode
optimizes JVM perfomance for typical server runtime conditions, i.e.
longrunning processes and little or no use of graphical libraries of
the host OS. Without this flag, the JVM usually starts in
client-mode. In comparison, server-mode performance is slower at first,
but faster after a while.
For more, see the java tools documentation at http://java.sun.com/j2se/1.5.0/docs/tooldocs/index.html, or similar for your JDK version.