12

I have installed openproj_1.4-2.deb on my ubuntu. and I'm getting the following err while openinig the same.

Your Java vendor is "Oracle Corporation". To run OpenProj, you need the Sun Java implementation.
The auto-detected Java Runtime used is..

I have tried to fix by editing $HOME/.openproj/run.conf file by updating JAVA_EXE variable. But it is not working. How can I run openproj on my Linux? Please help, Thanks in advance.

(sorry for unable to create a new tag, openproj)

3 Answers 3

36

Open $HOME/.openproj/run.conf and Change

JAVA_OPTS="-Xms128m -Xmx768m"

To

JAVA_OPTS="-Djava.vendor=Sun -Xms128m -Xmx768m"

then run it, It will work fine.

1
  • 1
    This saved my day. Thanks. It work on CentOS with openjdk 1.8 and openproj 1.4 Aug 27, 2018 at 13:32
1

I'm able to fix this by adding -Djava.vendor="Sun Microsystems Inc." for java command in run_openproj() of /usr/bin/openproj script.

here is the updated function after my change:

run_openproj() {

if [ "$LOG_LEVEL" ] && [ "x$LOG_LEVEL" = "xDEBUG" ]; then
    "$JAVA_EXE" $JAVA_OPTS -Djava.vendor="Sun Microsystems Inc."  -jar "$OPENPROJ_HOME/openproj.jar" $ARGS > "$LOG_FILE"
else
    "$JAVA_EXE" $JAVA_OPTS -Djava.vendor="Sun Microsystems Inc."  -jar "$OPENPROJ_HOME/openproj.jar" $ARGS > /dev/null 2>&1
fi
}
0

I solved it by installing IBM java version. Note the installation directory, by default it is: /opt/ibm/java-x86_64-80/.

Once IBM java is installed it should be configured to be used by OpenProj.

In order to do that run the following command (maybe the installation path should be updated, this is: /opt/ibm/java-x86_64-80/jre/bin/java):

sudo update-alternatives --install /usr/bin/java java /opt/ibm/java-x86_64-80/jre/bin/java 20000

Now check that the configuration has been saved properly, else set it manually with:

sudo update-alternatives --config java

Now check java version with:

java -version

You should get something similar to this:

java version "1.8.0_351"
Java(TM) SE Runtime Environment (build 8.0.7.20 - pxa6480sr7fp20-20221020_01(SR7 FP20))
IBM J9 VM (build 2.9, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20220929_37824 (JIT enabled, AOT enabled)
OpenJ9   - 02180fe
OMR      - 48fc32a
IBM      - bf759bf)
JCL - 20220922_01 based on Oracle jdk8u351-b10

Now, OpenProj can be executed properly.

If it fails again you may delete the configuration file:

rm ~/.openproj/run.conf

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.