Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
959 views
in Technique[技术] by (71.8m points)

eclipse - Diamond operator(<>) not working in java 1.7

I have the following error for compiling a jsp file:

'<>' operator is not allowed for source level below 1.7

I'm using jdk 1.7.x and eclipse Kepler Also I have set 1.7 as compliance level in project preferences in Eclipse, still the code is not working

Should I add any other config?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Check the following areas within Eclipse:

  1. Right Click Project > Properties > Project Facets > Java > Version 1.7

  2. Right Click Project > Properties > Java Build Path > Libraries > JRE Library should be 1.7

  3. Right Click Project > Properties > Java Compiler > Compiler compliance level

  4. Window > Preferences > Server > Runtime Environment > Select the Server > Edit > Ensure JRE is set to 1.7


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...