[ 
https://issues.apache.org/jira/browse/SOLR-12141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16415273#comment-16415273
 ] 

Uwe Schindler commented on SOLR-12141:
--------------------------------------

Here is the patch. I tested it on Windows and Linux with Java 7, Java 8, Java 
9, Java 9.0.4, Java 10 and Java 11-ea. It successfully starts for all versions, 
except Java 7 (as expected), printing the following error:

{noformat}
thetaphi@serv1:~/solr-7.3.0/bin$ ./solr start -e techproducts
Your current version of Java is too old to run this version of Solr.
We found major version 7, using command 
'/home/jenkins/tools/java/64bit/jdk1.7.0_80/bin/java -version', with response:
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)

Please install latest version of Java 8 or set JAVA_HOME properly.

Debug information:
JAVA_HOME: /home/jenkins/tools/java/64bit/jdk1.7.0_80
{noformat}

I will commit this later so we can respin the 7.3 release. Any comments or 
suggestions.

In future issues we should really get rid of the version parsing with shell 
magic, as this is likely to break. I will open a separate issue.

> Solr does not start on Windows with Java 10
> -------------------------------------------
>
>                 Key: SOLR-12141
>                 URL: https://issues.apache.org/jira/browse/SOLR-12141
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: scripts and tools
>    Affects Versions: 7.0, 7.1, 7.2, 7.3
>         Environment: Windows 10 with Java 10+
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>            Priority: Blocker
>             Fix For: 7.3
>
>         Attachments: SOLR-12141.patch, SOLR-12141.patch, SOLR-12141.patch, 
> SOLR-12141.patch, SOLR-12141.patch
>
>
> If you try to start Solr on Windows with Java 10, it fails with the following 
> message:
> {noformat}
> C:\Users\Uwe Schindler\Desktop\solr-7.3.0\bin>solr start -e techproducts
> ERROR: Java 1.8 or later is required to run Solr. Current Java version is: 10
> {noformat}
> Java 8 and Java 9 works. I did not try Linux, but the version parsing on 
> Windows is so braindead (i tried to fix it for Java 9 already). Windows CMD 
> shell does not know any numerical comparisons, so it fails as "10" is 
> alphabetically smaller "9".
> I hope this is better on Linux.
> Why do we have the version check at all? Wouldn't it be better to simply wait 
> for a useful message by the Java VM on startup because of wrong class file 
> format? This is too simply to break, especially as the output of "java 
> -version" is not standardized (and changes with Java 10 to also have a date 
> code,...). It also may contain "openjdk" instead of "java".
> So please please, let's get rid of the version check!



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to