Just out of curious it’s what ant version is in use? Is it compatible with java 11?
I seem to recall at some point, the JDK made it where release would only be compatible with a subset of (I believe) source/target previous versions. Could this be coming in to play? Eric Bresie [email protected] (mailto:[email protected]) > On March 22, 2021 at 5:21:28 PM CDT, Mark Eggers > <[email protected] (mailto:[email protected])> wrote: > On 3/22/2021 11:54 AM, Matthias Bläsing wrote: > > Hi, > > > > Am Sonntag, den 21.03.2021, 18:52 +0100 schrieb Karl Tauber: > > > Hi, > > > > > > I'm having a problem to build current master (fd26cb26) on Windows 10, > > > which fails compiling openide.util.lookup with following message: > > > > > > Compiling 31 source files to ... > > > Ignoring source, target and bootclasspath as release has been set > > > error: release version 8 not supported > > > Usage: javac <options> <source files> > > > > > > > > > Have a fresh install of NetBeans 12.3 (NOT imported settings from 12.2) > > > running on OpenJDK 11.0.2. > > > nbjdk.home (in user.build.properties) points to the same JDK. > > > No other stuff in user.build.properties. > > > Removed "nbbuild\build" before building. > > > > > > > > > Doing "Build IDE (No ZIP)" on "NetBeans Build System" project ends with: > > > > > > platform/openide.util.lookup.build-init: > > > Created dir: D:\Java\netbeans-apache\nbbuild\build\public-package-jars > > > Warning: module.javadoc.packages was already set to > > > org.openide.util,org.openide.util.lookup > > > Loading module list from > > > C:\Users\charly\AppData\Local\Temp\nb-scan-cache-99a91e93-full.ser > > > platform/openide.util.lookup.init: > > > Created dir: > > > D:\Java\netbeans-apache\platform\openide.util.lookup\build\classes\META-INF > > > All tests passed > > > platform/openide.util.lookup.up-to-date: > > > Compiling 31 source files to > > > D:\Java\netbeans-apache\platform\openide.util.lookup\build\classes > > > Ignoring source, target and bootclasspath as release has been set > > > error: release version 8 not supported > > > Usage: javac <options> <source files> > > > use --help for a list of possible options > > > Failed to build target: all-openide.util.lookup > > > D:\Java\netbeans-apache\nbbuild\build.xml:639: The following error > > > occurred while executing this line: > > > D:\Java\netbeans-apache\nbbuild\build.xml:634: The following error > > > occurred while executing this line: > > > D:\Java\netbeans-apache\nbbuild\build.xml:669: The following error > > > occurred while executing this line: > > > D:\Java\netbeans-apache\nbbuild\build.xml:652: The following error > > > occurred while executing this line: > > > D:\Java\netbeans-apache\nbbuild\build.xml:634: The following error > > > occurred while executing this line: > > > D:\Java\netbeans-apache\nbbuild\build.xml:669: The following error > > > occurred while executing this line: > > > D:\Java\netbeans-apache\nbbuild\build.xml:652: The following error > > > occurred while executing this line: > > > D:\Java\netbeans-apache\nbbuild\build.xml:634: The following error > > > occurred while executing this line: > > > D:\Java\netbeans-apache\nbbuild\build.xml:681: The following error > > > occurred while executing this line: > > > D:\Java\netbeans-apache\nbbuild\templates\common.xml:207: Compile > > > failed; see the compiler error output for details. > > > BUILD FAILED (total time: 10 seconds) > > > > > > > > > If I do a build on "Lookup API" project, it looks similar: > > > > > > ant -f D:\\Java\\netbeans-apache\\platform\\openide.util.lookup > > > -Dcontinue.after.failing.tests=true build > > > init-tasks: > > > default.init: > > > Updating property file: > > > D:\Java\netbeans-apache\nbbuild\netbeans\moduleCluster.properties > > > common-init: > > > basic-init: > > > projectized-common.-release.files: > > > projectized-common.files-init: > > > files-init: > > > jdk-8-check: > > > Build number : 20210321-fd26cb26e237 > > > set-buildnumber: > > > build-init: > > > Warning: module.javadoc.packages was already set to > > > org.openide.util,org.openide.util.lookup > > > Loading module list from > > > C:\Users\charly\AppData\Local\Temp\nb-scan-cache-99a91e93-full.ser > > > init: > > > All tests passed > > > up-to-date: > > > Compiling 31 source files to > > > D:\Java\netbeans-apache\platform\openide.util.lookup\build\classes > > > Ignoring source, target and bootclasspath as release has been set > > > error: release version 8 not supported > > > Usage: javac <options> <source files> > > > use --help for a list of possible options > > > D:\Java\netbeans-apache\nbbuild\templates\common.xml:207: Compile > > > failed; see the compiler error output for details. > > > BUILD FAILED (total time: 0 seconds) > > > > > > > > > Same problem occurs when setting nbjdk.home to JDK 8 > > > or when building in NB 12.2. > > > > > > > > > Since building NB on GitHub Actions seems to work, there is probably > > > something wrong on my system. > > > > > > > please check the JDK that is reached via path and/or JAVA_HOME. I never > > set nbjdk and successfully build NetBeans. > > > > You can trivially switch JDKs by updating PATH and JAVA_HOME to point > > to the right JDK. For example I normally run the following two commands > > together. This is linux, but switching export to set and the variable > > replacement logic to windows style ($var -> %var%) does the same > > there): > > > > export JAVA_HOME=/home/matthias/bin/jdk-8 > > export PATH=$JAVA_HOME/bin:$PATH > > > > HTH > > > > Matthias > > I've put together a PowerShell module that facilitate switching between > Java 8 and Java 11. It's a bit of a hack, makes use of two extra > environment variables, and requires another PowerShell module (EnvPaths). > > However, if you place the PowerShells in the correct path, then you can > call switchJava-11-8 or switchJava-8-11 to switch Java versions along > with the appropriate environment variables. This only impacts your > current PowerShell window, and not other open PowerShell windows nor the > system environment as a whole. > > This seems to work for me. If people are interested I can post the > scripts, etc. I am a reluctant Windows user, so caveat emptor and all > that . . . > > . . . just my two cents > /mde/ > > OpenPGP_signature505 bytes (#attachment-0)
