简体   繁体   中英

IntelliJ not letting me use JDK1.5

I need to compile an old project using JDK 1.5, but when I try to build it in InntelliJ it tells me:

Error:java: Target option 1.5 is no longer supported. Use 1.6 or later.
Error:java: Source option 5 is no longer supported. Use 6 or later.

I cannot use another IDE and I don't know how the project is building since I haven't worked in its development until now. Is there any way I can trick IntelliJ into letting me do this?

Ok, here's what I ended up doing: I set my project SDK and Module SDK to 1.6, but the project language level to 5. I configured my path to use Java 5, and confirmed this with java -version. Then, run my Tomcat, and it worked perfectly

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