• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error compiling program in NetBeans

 
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
reply
    Bookmark Topic Watch Topic
  • New Topic