Again: delete the gradle.properties, start gradlew and be happy. No need to install JDK 19 or set any env var. It just works™.
Eclipse IDE will also work fine (it will hide the classes). Idea is under investigation. In worst case disable compilation of the problematic core/src/java19 folder in the project. Am 27. September 2022 21:34:33 MESZ schrieb Uwe Schindler <u...@thetaphi.de>: >You just need to recreate Gradle properties, e.g. by deleting the old file. > >If you do not change anything Gradle will just work. On first build it will >autoprovision JDK 19 like any other dependency into the Gradle cache like >Maven artifacts and use it to compile the java 19 specific classes. The java >home should still point to java 17 or java 11. > >The environment var is just needed if you have JDK 19 at a non standard >location AND you don't want Gradle to download it automatically (Robert did >not want). > >Uwe > >P.S.: It will also check before downloading of you have a version of 19 >installed in the OS dependent Standard locations (Ubuntu,...) Or from windows >registry or MacOS installer. > >Am 27. September 2022 19:48:05 MESZ schrieb David Smiley <dsmi...@apache.org>: >>> If you do not want Gradle to auto-provision the Java 19 for compilation >>of those Preview classes, pass environment variable >>JAVA19_HOME=/path/to/jdk19 to your build! >> >>That seems inverted; maybe I misunderstand? If say we're working locally >>without Java 19 and don't want to bother it during dev, we should still >>have an env variable pointing to it? >> >>~ David Smiley >>Apache Lucene/Solr Search Developer >>http://www.linkedin.com/in/davidwsmiley >> >> >>On Mon, Sep 26, 2022 at 9:57 AM Uwe Schindler <u...@thetaphi.de> wrote: >> >>> Hi, >>> >>> with deleting the file, I meant the "gradle.properties" in the lucene >>> checkout. >>> >>> Uwe >>> Am 26.09.2022 um 15:44 schrieb Uwe Schindler: >>> >>> Hey, >>> >>> after merge of Java 19 support to main, 9.x and to-be-released 9.4, there >>> is a small change needed in your gradle.properties file. In earlier version >>> we disabled auto-provisioning of JDK releases for compilation, but now it >>> is required. >>> >>> If your build hangs at :lucene:core:compileMain19Java saying that theres >>> no release of Java 19 available, please change your gradle.properties in >>> your home folder to enable this feature: >>> >>> org.gradle.java.installations.auto-download=true >>> >>> If you delete the file and let the build system regenerate it, all will >>> work out of box. So you have the choice: Delete the file to regenerate >>> defaults or modify above property! >>> >>> Please also not that depending on your build system, the classes in >>> lucene/core/src/java19 may not compile (e.g. in Eclipse). I will work on >>> this in the following weeks. For now just ignore the compilation unit or >>> delete it from your IDE config. I may do something automatically using our >>> IDE autoconfiguration. >>> >>> If you do not want Gradle to auto-provision the Java 19 for compilation of >>> those Preview classes, pass environment variable JAVA19_HOME=/path/to/jdk19 >>> to your build! >>> >>> To actually test the new code: Build the Lucene JAR and run the test suite >>> with RUNTIME_JAVA_HOME=/path/to/jdk19; alternatively compile your >>> application and pass "--enable-preview" to the Java command line! >>> >>> Thanks, >>> >>> Uwe >>> >>> -- >>> Uwe Schindler >>> Achterdiek 19, D-28357 Bremenhttps://www.thetaphi.de >>> eMail: u...@thetaphi.de >>> >>> -- >>> Uwe Schindler >>> Achterdiek 19, D-28357 Bremenhttps://www.thetaphi.de >>> eMail: u...@thetaphi.de >>> >>> > >-- >Uwe Schindler >Achterdiek 19, 28357 Bremen >https://www.thetaphi.de -- Uwe Schindler Achterdiek 19, 28357 Bremen https://www.thetaphi.de