Author
Eclipse : Java Compliance Level 5.0
Vinod Vinu
Ranch Hand
Joined: Aug 30, 2009
Posts: 217
what is the significance of Java Compliance Level : 1.5/5.0 in eclipse ?
What if i set this to 1.5 and not 5.0 ?
thanks in advance....
Vinod Kumar Nair
"Any fool can write code that a computer can understan. Good programmers write code that humans can understand."
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14685
Same result. 5.0 is a synonym of 1.5.
[My Blog]
All roads lead to JavaRanch
Vinod Vinu
Ranch Hand
Joined: Aug 30, 2009
Posts: 217
Same result. 5.0 is a synonym of 1.5.
I think, you didn't understand my question. i'm asking why the compiler throughs error sometimes if i use generics, etc if i do not switched to 5.0 from 1.5 in eclipse?
Is there anything related to JDK ?
Peter Johnson
author
Bartender
Joined: May 14, 2008
Posts: 5579
posted Sep 15, 2010 15:00:07
0
If the Compiler Compliance Level is not at 1.5 or later, then 1.5-level features get flagged as errors. And for me the Compiler Compliance Level drop-down offers the choices of 1.6, 1.5, 1.4, and 1.3 (5.0 is not an option). So where are you seeing the 5.0?
What version of Eclipse are you running?
JBoss In Action
Vinod Vinu
Ranch Hand
Joined: Aug 30, 2009
Posts: 217
thanks for your response but there are other options such as 5.0, 6.0 etc. See the atachment for more understanding.
Filename: 1.bmp
Description: compliance level screenshot
File size:
832 Kbytes
Download
Peter Johnson
author
Bartender
Joined: May 14, 2008
Posts: 5579
posted Sep 19, 2010 08:34:47
0
Which version of Eclipse are you running? I looked in 3.5 and 3.6 and in both the compiler compliance levels are 1.3, 1.4, 1.5 and 1.6.
Vinod Vinu
Ranch Hand
Joined: Aug 30, 2009
Posts: 217
its eclipse 3.2 version
Peter Johnson
author
Bartender
Joined: May 14, 2008
Posts: 5579
posted Sep 23, 2010 10:50:19
0
That would explain it. You might consider upgrading to a more recent version of Eclipse.
subject: Eclipse : Java Compliance Level 5.0