This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error compiling program in NetBeans

 
Scott Updike
Ranch Hand
Posts: 92
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm in the process of migrating my struts-based web application to a project in NetBeans5.5 and when I try and compile my code, I get the following error:
C:\Java Code\Struts\ProjectX.1\src\com\product\dao\EmployeeDAOMySQLImp.java:380: for-each loops are not supported in -source 1.4

(try -source 1.5 to enable for-each loops)
for (String token:result) {


I'm not sure what that means or where to change this. Is this related to my JDK version? When I look at my NetBeans configuration, I am using the JDK 1.5 default. Prior to migrating to NetBeans5.5, I wrote and compiled everything manually without any issues.

Does anyone have any ideas or recommend any resources to get me past this error?

Thanks in advance.
Scott
 
Scott Updike
Ranch Hand
Posts: 92
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd like to follow up with more information. When I go to Project Properties (by right clicking on the Libraries folder) and select the 'Run' category, I see the following:

Server: Bundled Tomcat 5.5.17
JavaEE Version: J2EE 1.4

Could the Java EE version be my issue?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic