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


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

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Reply via email to