# Could not find or load main class - openSuse

**URL:** <https://discuss.elastic.co/t/could-not-find-or-load-main-class-opensuse/132686>\
**Category:** Elasticsearch\
**Created:** [May 21, 2018, 5:52pm UTC](https://discuss.elastic.co/t/could-not-find-or-load-main-class-opensuse/132686 "2018-05-21T17:52:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![renatofritola](https://avatars.discourse-cdn.com/v4/letter/r/9dc877/32.png) [@renatofritola](https://discuss.elastic.co/u/renatofritola)\
**Post date:** [May 21, 2018, 5:52pm UTC](https://discuss.elastic.co/t/could-not-find-or-load-main-class-opensuse/132686/1 "2018-05-21T17:52:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 18, 2018, 5:52pm UTC](https://discuss.elastic.co/t/could-not-find-or-load-main-class-opensuse/132686/2 "2018-06-18T17:52:19Z")

</div>

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