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 223808

Summary: "Clean and build" fails on OpenJDK8
Product: javaee Reporter: everflux <everflux>
Component: Web ProjectAssignee: David Konecny <dkonecny>
Status: RESOLVED DUPLICATE    
Severity: normal CC: pjiricka
Priority: P3 Keywords: JDK_8
Version: 7.3   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: Debug output openjdk8, java language level set to 6 in project

Description everflux 2012-12-13 21:26:35 UTC
[ BUILD # : 201212130001 ]
[ JDK VERSION : 1.7.0_09 ]

I have created a new web project.
Right click on the project "clean and build" results in an error:

ant -f /home/tkruse/arbeit/jug/devs/Thymeleaf -DforceRedeploy=false clean dist
init:
undeploy-clean:
deps-clean:
do-clean:
Deleting directory /home/tkruse/arbeit/jug/devs/Thymeleaf/build
check-clean:
clean:
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
Created dir: /home/tkruse/arbeit/jug/devs/Thymeleaf/build/web/WEB-INF/classes
Created dir: /home/tkruse/arbeit/jug/devs/Thymeleaf/build/web/META-INF
Copying 1 file to /home/tkruse/arbeit/jug/devs/Thymeleaf/build/web/META-INF
Copying 2 files to /home/tkruse/arbeit/jug/devs/Thymeleaf/build/web
library-inclusion-in-archive:
Copying 1 file to /home/tkruse/arbeit/jug/devs/Thymeleaf/build/web/WEB-INF/lib
Copying 1 file to /home/tkruse/arbeit/jug/devs/Thymeleaf/build/web/WEB-INF/lib
Copying 1 file to /home/tkruse/arbeit/jug/devs/Thymeleaf/build/web/WEB-INF/lib
Copying 1 file to /home/tkruse/arbeit/jug/devs/Thymeleaf/build/web/WEB-INF/lib
Copying 1 file to /home/tkruse/arbeit/jug/devs/Thymeleaf/build/web/WEB-INF/lib
library-inclusion-in-manifest:
Created dir: /home/tkruse/arbeit/jug/devs/Thymeleaf/build/empty
Created dir:
/home/tkruse/arbeit/jug/devs/Thymeleaf/build/generated-sources/ap-source-output
/home/tkruse/arbeit/jug/devs/Thymeleaf/nbproject/build-impl.xml:862: The
following error occurred while executing this line:
/home/tkruse/arbeit/jug/devs/Thymeleaf/nbproject/build-impl.xml:284: Class not
found: javac1.8
BUILD FAILED (total time: 0 seconds)

The java source version is configured to Java 6:

nbproject/project.properties:javac.source=1.6
nbproject/project.properties:javac.target=1.6

Running "ant clean dist" in the project directory works as expected.

I noticed that the single class file I have has a warning on the package line,
expanding to 

"IOException.class: major version 52 is newer than 51, the highest major
version supported by this compiler.
  It is recommended that the compiler be upgraded.

Date.class: major version 52 is newer than 51, the highest major version
supported by this compiler.
  It is recommended that the compiler be upgraded.

SimpleDateFormat.class: major version 52 is newer than 51, the highest major
version supported by this compiler.
  It is recommended that the compiler be upgraded.

Calendar.class: major version 52 is newer than 51, the highest major version
supported by this compiler.
  It is recommended that the compiler be upgraded.

Object.class: major version 52 is newer than 51, the highest major version
supported by this compiler.
  It is recommended that the compiler be upgraded.
....."

I have no idea where that originates but it might be related.
Comment 1 David Konecny 2012-12-16 20:33:24 UTC
In the Output window there is an icon at the left named "Ant Settings" - could you open it please and change "Verbosity Level" to "Debug" and rebuild the project and attach new output (could you please do both "clean and build" and also "clean and dist")? That should help us figure out what's wrong. Thanks.
Comment 2 everflux 2012-12-20 20:29:16 UTC
Problem was caused by using OpenJDK8 to run netbeans by accident, I assume.
I added the debug output from netbeans.

Nevertheless I believe using Java 8 should work.
Comment 3 everflux 2012-12-20 20:29:56 UTC
Created attachment 129595 [details]
Debug output openjdk8, java language level set to 6 in project
Comment 4 David Konecny 2012-12-20 20:53:07 UTC
Will investigate after Christmas break.
Comment 5 Petr Jiricka 2013-01-02 15:09:28 UTC
Would be nice if this worked, but JDK 8 is not officially supported by NB 7.3 => adding NO73 keyword.
Comment 6 David Konecny 2013-07-24 03:15:27 UTC
This is an issue in Ant 1.8.x which has been resolved by upgrade of Ant bundled with the IDE to 1.9.x

*** This bug has been marked as a duplicate of bug 213403 ***