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.

Bug 226579 - Exception trying to use JDK8 with NetBeans Module Projects (ANT)
Summary: Exception trying to use JDK8 with NetBeans Module Projects (ANT)
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Harness (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P4 normal (vote)
Assignee: Martin Kozeny
URL:
Keywords: JDK_8
Depends on:
Blocks:
 
Reported: 2013-02-23 13:38 UTC by sreimers
Modified: 2013-09-17 13:40 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Stacktrace of exception (1.80 KB, text/plain)
2013-02-23 13:38 UTC, sreimers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sreimers 2013-02-23 13:38:33 UTC
Created attachment 131775 [details]
Stacktrace of exception

Trying the latest nightly builds with JDK8 and NetBeans Module Projects I get the attached exception during run/debug without clean and build first.

I manually changed the property javac.source to 1.8 to allow for lambda goodness.
Comment 1 Jaroslav Tulach 2013-02-26 07:42:25 UTC
Sven, what makes you belive this is P2 bug?
Comment 2 Jaroslav Tulach 2013-02-26 07:43:59 UTC
Moreover, as the error comes from org.apache.tools.ant.taskdefs.optional.depend.AntAnalyzer, I would consider reporting this bug to Ant guys.
Comment 3 sreimers 2013-02-26 07:58:04 UTC
Well, it stops me from using jdk8 (in an efficient way) for NetBeans Module Development (but I am fine with P4 for now)

BTW Is there a roadmap for supporting this?

Shall I switch to maven? 
Write my own gradle based support? 
Will ant be fixed so NetBeans can support jdk8?

Thanks
Comment 4 Martin Kozeny 2013-09-16 13:46:01 UTC
I've created ant NetBeans Module project on:

Product Version: NetBeans IDE Dev (Build 201308042300)
Updates: Updates available
Java: 1.8.0-ea; Java HotSpot(TM) 64-Bit Server VM 25.0-b48
Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b106
System: Linux version 3.5.0-37-generic running on amd64; UTF-8; en_US (nb)

and everything works fine for me. Please try latest build (http://bits.netbeans.org/download/trunk/nightly/latest/) whether it works. Thanks.
Comment 5 Martin Kozeny 2013-09-17 13:40:48 UTC
I've found that it is similar to https://issues.apache.org/bugzilla/show_bug.cgi?id=54090. Problem is, that JDK8 javac is generating new types of records to the constant pool so every library, which wants to analyze classfiles have to adapt. In our case it is ant library, so you can try using new ant 1.9.2  library- works for me but 1.8.2 not.