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 247060 - auto-compile fails because of bug in jdk8_u20
Summary: auto-compile fails because of bug in jdk8_u20
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 8.0.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-12 07:32 UTC by johnbw
Modified: 2015-03-11 14:51 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description johnbw 2014-09-12 07:32:30 UTC
I discussed the topic on stackoverflow:

http://stackoverflow.com/questions/25782601/java-8-lambda-autoboxing-reduce-method

I had problems compiling this loc:

int sum = myIntegerList.stream().reduce(0, (a, b) -> a + b, (c, d) -> c + d);

Best answer on stackoverflow:

"This seems to be a bug in the jdk version 1.8.0u20 which has been fixed already in the early 1.8.0u40. However, Netbeans seems to have its own copy of the problematic compiler included which interferes when attempting to run the compiled code. So it’s not enough to change the project’s jdk and the Netbeans environment to a different jdk, the NullPointerException is still being reported.

The only solution is to disable the automatic compilation (Project Properties/Build/Compiling → Compile on Save) and do a clean build of the project. Then it should run without the “can’t find the main class” error. (The NullPointerException will still occur in the background from time to time but it doesn’t hinder compiling and running anymore)"

The work-around worked for me.
Comment 1 Dusan Balek 2015-03-11 14:51:55 UTC
Fixed in the current dev build.

http://hg.netbeans.org/jet-main/rev/3b78fae10f80