OFBiz startup scripts must invoke the Java executable as part of its initiation process. If you are using one of the provided startup scripts and you can't start up OFBiz because the Java executable cannot be found (you will get an immediate error to this effect), you can easily add the necessary statement to the script to indicate the location of the Java executable.
Note: The scripts as they are distributed today assume that you have previously set the JAVA_HOME
environment variable using your computer's environment variable setting tools to the location of the Java runtime executable. This setting should be in the environment prior to invoking the OFBiz startup script. If this location has not been set or has been set incorrectly, you will not be able to start up OFBiz.
To set up JAVA_HOME
, you need to first perform the following steps:
startofbiz.bat
for Windows or startofbiz.sh
for Unix).
JAVA_HOME
can be set up in the following way:
of java executables"
as shown in the following snippet from the Unix startofbiz.sh
startup script shown here:# This is an example of setting the JAVA_HOME variable in the # UNIX startofbiz.sh script: JAVA_HOME=/bin/java export JAVA_HOME # location of java executables if [ -f "$JAVA_HOME/bin/java" ]; then JAVA="$JAVA_HOME/bin/java" else JAVA=java fi
The JAVA_HOME
environment variable sets the location of the Java executable relative to the hard drive and the file system of the host operating system so that the startup scripts know where to find it. In this way, you could have many Java versions installed on your computer and still tell OFBiz which installed version to use at any point in time.
Out-of-the-box OFBiz assumes that the JAVA_HOME
variable has been set prior to the invocation of the startup script. As an alternative to modifying startup scripts, you may also set JAVA_HOME
from the command line prior to invoking the startup script.
If you are starting up OFBiz from the command line and not using the startup scripts, you should set your JAVA_HOME
prior to invoking OFBiz. For example, if your Java executable is located in the /opt/java
directory (folder for Windows readers), and you are running a Unix system, then set the JAVA_HOME
environment variable as follows:
JAVA_HOME=/opt/java
export $JAVA_HOME
java jar ofbiz.jar
52.14.82.217