Could not find or load main class - openSuse

Elasticsearch version (bin/elasticsearch --version):

Elasticsearch 5.6.3

JVM version (java -version):

java version "1.8.0_172"
Java(TM) SE Runtime Environment (build 1.8.0_172-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.172-b11, mixed mode)

OS version (uname -a if on a Unix-like system):

Linux srv-devops 3.16.7-53-desktop #1 SMP PREEMPT Fri Dec 2 13:19:28 UTC 2016 (7b4a1f9) x86_64 x86_64 x86_64 GNU/Linux

NAME=openSUSE
VERSION="13.2 (Harlequin)"
VERSION_ID="13.2"
PRETTY_NAME="openSUSE 13.2 (Harlequin) (x86_64)"

Description of the problem including expected versus actual behavior:

When you start elasticsearch through sonarqube, it can not read the installed java version.

The environment variable is configured, and I am not using the root user.

I have already checked other people pages that have had similar problems but they have not solved my problem.

Steps to reproduce:

I just execute ./bin/elasticsearch

Provide logs (if relevant):

sonar@srv-devops:/opt/sonarqube/elasticsearch/bin> ./elasticsearch
./elasticsearch: line 48: grep: command not found
./elasticsearch: line 108: dirname: command not found
./elasticsearch: line 142: dirname: command not found
Error: Could not find or load main class org.elasticsearch.tools.JavaVersionChecker
Elasticsearch requires at least Java 8 but your Java version from /usr/lib/jdk-oracle/bin/java does not meet this requirement

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.