Error: Could not find or load main class org.elasticsearch.tools.JavaVersionChecker

same issue in 5.4.0 aswell:

7-05-05T01:48:39,567][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:127) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:114) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:67) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.cli.Command.main(Command.java:88) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) ~[elasticsearch-5.4.0.jar:5.4.0]
Caused by: java.lang.RuntimeException: can not run elasticsearch as root
at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:106) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:204) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:360) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123) ~[elasticsearch-5.4.0.jar:5.4.0]
... 6 more
[root@kfos-vmelk-1 bin]# su siva
[siva@kfos-vmelk-1 bin]$ pwd
/root/elk/5.4/elasticsearch-5.4.0/bin
[siva@kfos-vmelk-1 bin]$ ./elasticsearch
Error: Could not find or load main class org.elasticsearch.tools.JavaVersionChecker
Elasticsearch requires at least Java 8 but your Java version from /bin/java does not meet this requirement

root@kfos-vmelk-1 elasticsearch-5.4.0]# cd lib/
[root@kfos-vmelk-1 lib]# ls
elasticsearch-5.4.0.jar jackson-dataformat-yaml-2.8.6.jar log4j-1.2-api-2.8.2.jar lucene-grouping-6.5.0.jar lucene-queryparser-6.5.0.jar securesm-1.1.jar
HdrHistogram-2.1.9.jar java-version-checker-5.4.0.jar log4j-api-2.8.2.jar lucene-highlighter-6.5.0.jar lucene-sandbox-6.5.0.jar snakeyaml-1.15.jar
hppc-0.7.1.jar jna-4.4.0.jar log4j-core-2.8.2.jar lucene-join-6.5.0.jar lucene-spatial3d-6.5.0.jar spatial4j-0.6.jar
jackson-core-2.8.6.jar joda-time-2.9.5.jar lucene-analyzers-common-6.5.0.jar lucene-memory-6.5.0.jar lucene-spatial-6.5.0.jar t-digest-3.0.jar
jackson-dataformat-cbor-2.8.6.jar jopt-simple-5.0.2.jar lucene-backward-codecs-6.5.0.jar lucene-misc-6.5.0.jar lucene-spatial-extras-6.5.0.jar
jackson-dataformat-smile-2.8.6.jar jts-1.13.jar lucene-core-6.5.0.jar lucene-queries-6.5.0.jar lucene-suggest-6.5.0.jar