This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
It is impossible to build the NB with jdk1.8. I'm seeing two different failures, one when JAVA_HOME is jdk1.7, the other JAVA_HOME is jdk1.8. Why/how does JAVA_HOME affect the result of the build? In other words, what does "nbjdk.home" do? Given: $ cat nbbuild/user.build.properties cluster.config=basic nbjdk.home=C:/b/j/Java/jdk1.8.0_40 permit.jdk8.builds=true === JAVA_HOME JDK1.8 FAILURE === (note: this is the same failure as in issue #250848) [nb-javac] C:\f\repos\main-silver\javascript2.editor\src\org\netbeans\modules\javascript2\editor\model\impl\PathNodeVisitor.java:84: error: constructor NodeVisitor in class NodeVisitor<T> cannot be applied to given types; [nb-javac] public class PathNodeVisitor extends NodeVisitor { [nb-javac] ^ [nb-javac] required: LexicalContext [nb-javac] found: no arguments [nb-javac] reason: actual and formal argument lists differ in length [nb-javac] where T is a type-variable: [nb-javac] T extends LexicalContext declared in class NodeVisitor [nb-javac] C:\f\repos\main-silver\javascript2.editor\src\org\netbeans\modules\javascript2\editor\model\impl\PathNodeVisitor.java:99: error: method does not override or implement a method from a supertype === JAVA_HOME JDK1.7 FAILURE === (note: this fails much faster than when JAVA_HOME is 1.8) (note: every compile gets the "major version 52 is newer than 51' error) compile: [mkdir] Created dir: C:\f\repos\main-silver\api.search\build\classes [nb-javac] Compiling 122 source files to C:\f\repos\main-silver\api.search\build\classes [repeat] warning: C:\b\j\Java\latest\jre\lib\rt.jar(java/util/regex/Pattern.class): major version 52 is newer than 51, the highest major version supported by this compiler. [repeat] It is recommended that the compiler be upgraded. ... [repeat] C:\f\repos\main-silver\api.search\src\org\netbeans\modules\search\ArraySet.java:74: error: name clash: spliterator() in ArrayList and spliterator() in Set have the same erasure, yet neither overrides the other [repeat] public class ArraySet<E extends Comparable<E>> [repeat] ^ [repeat] where E#1,E#2 are type-variables: [repeat] E#1 extends Object declared in class ArrayList [repeat] E#2 extends Object declared in interface Set [repeat] Note: Some input files additionally use or override a deprecated API. [repeat] 1 error [repeat] 100 warnings [nbmerge] Failed to build target: all-api.search
Make sure to also have the JDK8 javac on PATH and it works.
(In reply to Antonin Nebuzelsky from comment #1) > Make sure to also have the JDK8 javac on PATH and it works. Would you clarify as to why this is required? And why isn't it a WONTFIX rather than WORKSFORME?
I added javac to the path, still fails. $ uname -a CYGWIN_NT-6.1 spirit 1.7.30(0.272/5/3) 2014-05-23 10:36 x86_64 Cygwin $ echo $JAVA_HOME /b/j/Java/latest $ which javac /b/j/Java/latest/bin/javac $ ls -l /b/j/Java/latest lrwxrwxrwx 1 err None 11 Mar 13 08:24 /b/j/Java/latest -> jdk1.8.0_40 $ echo $PATH /err/bin:/usr/local/bin:/usr/bin:/cygdrive/c/ProgramData/Oracle/Java/javapath:/pf/Windows Resource Kits/Tools:.......:/pf/TortoiseHg:/pf/Skype/Phone:/usr/lib/lapack:/b/j/Java/latest/bin $ cat nbbuild/user.build.properties cluster.config=basic nbjdk.home=C:/b/j/Java/latest permit.jdk8.builds=true BTW, the page http://wiki.netbeans.org/WorkingWithNetBeansSources makes no mention of this requirement.
(In reply to err from comment #3) > I added javac to the path, still fails. Did you "ant clean" before retrying "ant build"?
(In reply to Antonin Nebuzelsky from comment #4) > (In reply to err from comment #3) > > I added javac to the path, still fails. > > Did you "ant clean" before retrying "ant build"? Yes. I just tried again, with JAVA_HOME both ways. It fails as in the initial report.
I can build main-silver with jdk8 on our linux build machine without problems. The issue is very likely related to the reporter's local JDK setup. I will try to reproduce the issue on Windows.
hi, I try it on fedora linux 22 and windows with same ant 1.9.4 jdk 7_80 and jdk 8_60 running on jdk7 -> targeting 1.7 windows and linux build OK targeting 1.8 both build fail on the erasure issue running on jdk8 -> targeting 1.8 linux pass windows on error because of nashhorn. PS on fedora default ant install some libs are missing (need a full ant)
Created attachment 156590 [details] fix for the build on windows The project properties were not compatible with windows build. I put same configuration as in other modules using ${nb_all} and ${path.separator} Regards
Since the problem is NOT "related to the reporter's local JDK setup" as suggested in comment #6, and further analysis done by @skygo shows a possible fix, setting the priority back to 2.
See bug # 250848, this bug /may/ be a dup of that one, or depend on it or something.
Solved during on jdk9 branch bootstrap path could not be build nevertheless java_home settings due to usage of linux specific path separator jet-main#75112bea32f9