Error
Answered
Hi, I'm new to programming/coding etc. I've installed everything required by the course I'm doing. I have Java 12.0.1 installed, but when I run a program it returns the error java:error:release version 13 not supported. Anyone who can help with how I can fix this?
Please sign in to leave a comment.
Hello,
Could you please add more information about your project? Do you use any build tool (Maven/Gradle)? Please check build target in "Setting | Build...| Compiler | Java Compiler".
Hi, I was using IntelliJ IDEA. Not sure if that helps?
Could you please attach screenshot from "Setting | Build...| Compiler | Java Compiler"? Is it a plain Java project?
I'm sorry, don't know where to find what you're asking. Simple project, output should be "Hello World!"
I found it
No idea what to change though
Could you please share files from .idea folder? Do you face the same issue with every new project?
First time I'm doing this. Doing an online intro course
https://codepen.io/Massyn/pen/BebMpq
What project type did you create? Could you please try to create new sample "Hello, World" project and check if the issue occurs there?
Hey Friend.
There's a lot of places you must check:
- File -> Project Structure
- Edit Configurations (in drop down near RUN button)
- File -> Settings -> search for SDK
But what really worked for me after set everything above to my correctly Java 11 version was change this setting:
File -> Settings -> Build, Execution, Deployment -> Compiler -> Java Copiler -> Project Bytecode Version
This setting was pointing to Java 13, so I changed to Java 11 and everything started to work as expected
Good luck