简体   繁体   中英

Java 1.7 or later is required to run Solr “4.10.2”, but java version “14.0.1” installed

I have to run solr server on Windows 10, and installed Java version "14.0.1" 2020-04-14.

But when i run it, this java error appear

Java 1.7 or later is required to run SOLR.

I have read the similar problem here , but decided to open a new question because the solution isn't clear enough (like what file i should edit on SOLR so i can use my SDK version of Java).

Status for now is:

  • I already set the env to be always run from the JDK version.
  • Java version that are found, with the detail: java version "14.0.1" 2020-04-14 Java(TM) SE Runtime Environment (build 14.0.1+7) Java HotSpot(TM) 64-Bit Server VM (build 14.0.1+7, mixed mode, sharing)

Thank you for your help.

That's a typical stupid programming error affecting numbers larger than 9. The programmer compares the version string as text instead of doing a numeric comparision.

So you need to use Java 7, 8 or 9.

According to the "Solr System Requirements" of the Apache Solr Reference Guide:

"Lucene/Solr 7.0 was the first version that successfully passed our tests using Java 9 and higher. You should avoid Java 9 or later for Lucene/Solr 6.x or earlier."

(Emphasis added)

Note that the Solr download page currently says that all versions of Solr prior to 7.7 are "end of life".

Version 4.10.1 was release in late 2014 and the last 4.10.x release was in March 2015. It is a long time past end-of-life. If you want to use a newer version of Java, you need to upgrade Solr.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM