简体   繁体   中英

Trying to set java compiler to compliance level to 5.0

I'm trying to compile some facebook sample code in eclipse and it says I need compliance level 5.0 or 6.0. I tried to set the compliance level by:

  1. right clicking on project name b. clicked on properties -> java compiler

on the drop down for compliance level, it had 1.3, 1.4, 1.5, 1.6 and 1.7 but did not have 5.0.

Java versioning is somewhat odd and annoying. 1.6 and 1.7 are well-known examples but generally you can get away with using 1.X for X . Here you'd use 1.5 .

The trick is that 5.0 is the same as 1.5. Since java 1.5, the names are denoted without a leading 1. source

Java 1.5 is 5.0. You can read about this here :

J2SE 5.0 (September 30, 2004)

Codename Tiger . Originally numbered 1.5, which is still used as the internal version number. This version was developed under JSR 176.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM