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.
Steps to reproduce: 1. Choose File > New Project > Samples > Web and then the first sample (JSTL Example). 2. Build the sample. Now the following error message is displayed: Compiling 22 source files to C:\Documents and Settings\geertjan\JSTLExample2\build\web\WEB-INF\classes C:\Documents and Settings\geertjan\JSTLExample2\src\org\apache\taglibs\standard\examples\startup\Init.java:161: as of release 1.5, 'enum' is a keyword, and may not be used as an identifier (try -source 1.4 or lower to use 'enum' as an identifier) Enumeration enum = numberMap.keys(); C:\Documents and Settings\geertjan\JSTLExample2\src\org\apache\taglibs\standard\examples\startup\Init.java:164: as of release 1.5, 'enum' is a keyword, and may not be used as an identifier (try -source 1.4 or lower to use 'enum' as an identifier) sce.getServletContext().setAttribute("enumeration", enum); 2 errors C:\Documents and Settings\geertjan\JSTLExample2\nbproject\build-impl.xml:183: The following error occurred while executing this line: C:\Documents and Settings\geertjan\JSTLExample2\nbproject\build-impl.xml:91: Compile failed; see the compiler error output for details. BUILD FAILED (total time: 0 seconds)
FYI, this issue is fixed in the current JSTL trunk, but the JSTL release does not contain this fix yet.
What about project properties -> compile sources -> add. compiler opts -> 'source=1.4'
Right, that's exactly the way I wanted to fix this for now in sample project.
Actually this doesn't work, as the value is overriden in build-impl.xml where default.jdk.source property is used. I'll have to figure out a different fix - I'll probably rename the enum to some other name.
Fixed in trunk: Checking in Init.java; /cvs/web/examples/jstl/src/org/apache/taglibs/standard/examples/startup/Init.java,v <-- Init.java new revision: 1.2; previous revision: 1.1 done
Should be fixed in Beta2 as well.
Additional fix: Checking in conditionals/FailureLocal.jsp; /cvs/web/examples/jstl/web/conditionals/FailureLocal.jsp,v <-- FailureLocal.jsp new revision: 1.2; previous revision: 1.1 done Processing log script arguments... More commits to come... Checking in format/Demo.jsp; /cvs/web/examples/jstl/web/format/Demo.jsp,v <-- Demo.jsp new revision: 1.2; previous revision: 1.1 done
Fixed in beta2 branch, too: Checking in web/format/Demo.jsp; /cvs/web/examples/jstl/web/format/Demo.jsp,v <-- Demo.jsp new revision: 1.1.14.1; previous revision: 1.1 done Processing log script arguments... More commits to come... Checking in web/conditionals/FailureLocal.jsp; /cvs/web/examples/jstl/web/conditionals/FailureLocal.jsp,v <-- FailureLocal.jsp new revision: 1.1.14.1; previous revision: 1.1 done Processing log script arguments... More commits to come... Checking in src/org/apache/taglibs/standard/examples/startup/Init.java; /cvs/web/examples/jstl/src/org/apache/taglibs/standard/examples/startup/Init.java,v <-- Init.java new revision: 1.1.14.1; previous revision: 1.1 done
Verified in build 200409160517 (pre-beta2).