Thanks, Uwe! I knew about that for javac but didn't make the connection to running java in single source mode!
On Thu, Apr 2, 2020 at 11:45 AM Uwe Schindler <u...@thetaphi.de> wrote: > I made a comment as review. > > > > The Java 8 issue can be solved very elegant. Problem is that Java 8 tries > to load the file as a class, because it cannot directly run source files. > This is some semi-automatism by Java 11, where java compiles the file if > its not a class. This is not supported by Java 8. > > > > This can be bypassed by specifiying the “--source 11” parameter before the > java file. This is an unknown option in Java 8 and produces a more useful > error: > > > > >java --source 11 test\foo.java > > Unrecognized option: --source > > Error: Could not create the Java Virtual Machine. > > Error: A fatal exception has occurred. Program will exit. > > > > In addition, adding the source parameter makes the java source file format > of the parameter explicit, like with Javac you should always supply the > target java version when compiling something.. > > > > Uwe > > > > ----- > > Uwe Schindler > > Achterdiek 19, D-28357 Bremen > > https://www.thetaphi.de > > eMail: u...@thetaphi.de > > > > *From:* Mike Drob <md...@apache.org> > *Sent:* Thursday, April 2, 2020 6:29 PM > *To:* dev@lucene.apache.org > *Subject:* Gradle Wrapper Changes > > > > Devs, > > > > I'll be committing a set of changes for LUCENE-9266 shortly, PR can be > found at https://github.com/apache/lucene-solr/pull/1390 > > > > We've tested this on Windows, Mac OS, and Ubuntu, so I'm fairly confident > in what we're doing here, but because this has the potential to be an > intrusive change I'm sending out an extra note to the mailing list. > > > > If you happen to see an error like the following: > > > > Error: Could not find or load main class > buildSrc.src.main.java.org.apache.lucene.gradle.WrapperDownloader.java > > > > Then check to make sure that your currently selected java executable is at > least version 11. This is already a requirement for the master branch, but > folks that work on multiple branches may get tripped up on this. > > > > The cosmetics of this will likely improve over time, but the current goal > is to make forward progress on nightly smoke testing. > > > > Thanks, > > Mike >