Java runtime required on CentOS 7

Alex7 years ago

I installed Java on my CentOS 7 server:

[root@gps bin]# echo $JAVA_HOME
/usr/lib/jvm/java-1.8.0-openjdk/bin/java
[root@gps bin]# echo $JRE_HOME
/usr/lib/jvm/java-1.8.0-openjdk/jre/bin/java

But when i try to run traccar.run is says:

Creating directory out
Verifying archive integrity...  100%   All good.
Uncompressing traccar  100%
Java runtime is required

No matter what i try, it keeps saying that. How can i fix this? All the binaries are located on those locations

Anton Tananaev7 years ago

How did you install it?

Alex7 years ago

With yum install java-1.8.0-openjdk.x86_64 java-1.8.0-openjdk-devel.x86_64

Anton Tananaev7 years ago

Then it should work. Here is the script that runs during installation:

https://github.com/tananaev/traccar/blob/master/setup/setup.sh

Alex7 years ago

It even didn't made mkdir -p /opt/traccar. The /opt dir is empty

[root@gps ~]# java -version
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
Alex7 years ago

Ok, did by hand the scipt and this is the result

[root@gps bin]# ./installDaemon.sh
++++++++++ YAJSW SET ENV ++++++++++
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
wrapper home : /opt/traccar
configuration: /opt/traccar/conf/wrapper.conf
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
---------- YAJSW SET ENV ----------
++++++++++ YAJSW SET ENV ++++++++++
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
wrapper home : /opt/traccar
configuration: /opt/traccar/conf/wrapper.conf
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
---------- YAJSW SET ENV ----------
INFO: lib not found: /opt/traccar/lib/extended/glazedlists/glazedlists-1.8.0_java15.jar
INFO: lib not found: /opt/traccar/lib/extended/glazedlists/commons-beanutils-1.8.2.jar
INFO: lib not found: /opt/traccar/lib/extended/glazedlists/commons-beanutils-1.8.2.jar
INFO: lib not found: /opt/traccar/lib/extended/glazedlists/glazedlists-1.8.0_java15.jar
YAJSW: yajsw-stable-12.09
OS   : Linux/2.6.32-042stab120.5/amd64
JVM  : Oracle Corporation/1.8.0_151//usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.el7_4.x86_64/jre/64
Nov 22, 2017 11:49:40 AM org.apache.commons.vfs2.VfsLog info
INFO: Using "/tmp/vfs_cache" as temporary files store.
************* INSTALLING traccar ***********************

Nov 22, 2017 11:49:40 AM org.rzo.yajsw.os.posix.PosixService getPid
INFO: wrapper pid file: /run/wrapper.traccar.pid
Nov 22, 2017 11:49:41 AM org.rzo.yajsw.os.posix.PosixService install
WARNING: created daemon script: /etc/rc.d/init.d/traccar
Nov 22, 2017 11:49:41 AM org.rzo.yajsw.os.posix.PosixService install
INFO: created link : /etc/rc2.d/S20traccar
Nov 22, 2017 11:49:41 AM org.rzo.yajsw.os.posix.PosixService install
INFO: created link : /etc/rc3.d/S20traccar
Nov 22, 2017 11:49:41 AM org.rzo.yajsw.os.posix.PosixService install
INFO: created link : /etc/rc5.d/S20traccar
Nov 22, 2017 11:49:41 AM org.rzo.yajsw.os.posix.PosixService install
INFO: created link : /etc/rc4.d/S20traccar
Nov 22, 2017 11:49:41 AM org.rzo.yajsw.os.posix.PosixService install
INFO: created link : /etc/rc6.d/K20traccar
Nov 22, 2017 11:49:41 AM org.rzo.yajsw.os.posix.PosixService install
INFO: created link : /etc/rc0.d/K20traccar
Nov 22, 2017 11:49:41 AM org.rzo.yajsw.os.posix.PosixService install
INFO: created link : /etc/rc1.d/K20traccar
Service traccar installed