Asking for Java 7 or higher on Mac

ian25078 years ago

Im trying to install Traccar on my MacBook air and I'm getting the following error / Issue

Last login: Mon May  8 22:21:56 on ttys000
Ians-MacBook-Air:~ ianweatherhead$ /Users/ianweatherhead/Desktop/traccar-macos-3/traccar.run 
Verifying archive integrity... All good.
Uncompressing traccar  100%  
Java 7 or higher required
Ians-MacBook-Air:~ ianweatherhead$ 

I already have Java 8 installed Version 8 - update 131

What Am I doing wrong?

Anton Tananaev8 years ago

Check the output of the following command:

java -version
ian25078 years ago
Last login: Mon May  8 22:33:59 on ttys000
Ians-MacBook-Air:~ ianweatherhead$ java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-468-11M4833)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-468, mixed mode)
Ians-MacBook-Air:~ ianweatherhead$
ian25078 years ago

How do i update the java?

Anton Tananaev8 years ago

The output says that you have Java version 6, which is lower than required version 7.

ian25078 years ago

yeh but I've updated Java to Version 8, can you advise how to update as when I go to system preferences and load java app it shows version 8?

Anton Tananaev8 years ago

I suspect that you have two version of Java installed, so you have to configure environment variable to point to the correct one.

ian25078 years ago

cheers for this where is that located?

Anton Tananaev8 years ago

I'm not sure. You should probably Google for more details.

Alexey7 years ago
MacBook-Air-Alexey-2:traccar AlexeyAnna$ sudo ./traccar.run
Creating directory out
Verifying archive integrity...  100%   All good.
Uncompressing traccar  100%  
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
    at Test.main(Test.java:3)
Java 7 or higher is required
MacBook-Air-Alexey-2:traccar AlexeyAnna$ sudo /opt/traccar/bin/startDaemon.sh
sudo: /opt/traccar/bin/startDaemon.sh: command not found
MacBook-Air-Alexey-2:traccar AlexeyAnna$ java -version
java version "9"
Java(TM) SE Runtime Environment (build 9+181)
Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)