Running Sitecore 9 requires SOLR 6.6.2/6.6.3. Even if the SOLR documentation says that SOLR 6.6.x is compatible with Java 8 and later. Java 10 (announced in march 2018) has no mileage with that SOLR code base. For many different reasons, some Sitecore developers have both or more Java versions running side by side in the same local development workstation.
By default the script will use JAVA_HOME to determine which java to use. When your JAVA_HOME is pointing a recent Java version. You may have this kind of error. (ERROR: Java 1.8 or later is required to run Solr).
Some people suggest to play with the script’s version compare string condition to fix this kind of issue, as 10.0.2 is later than 1.8. Then Disable GC_LOG_OPTS which is not supported for Java 9 and later.
I strongly recommend to stick with Java 8 to run correctly your Sitecore SOLR 6.6.2/6.6.3 instances without surprises.
Instead of setting JAVA_HOME variables, you can use SOLR_JAVA_HOME variable in Solr’s bin\solr.in.cmd for Windows without affecting other Java applications on your server/workstation.
REM By default the script will use JAVA_HOME to determine which java REM to use, but you can set a specific path for Solr to use without REM affecting other Java applications on your server/workstation. set SOLR_JAVA_HOME=C:\Program Files\Java\jre1.8.0_181