How to find Java version of project
Answered
I am working on a plugin that doesn't work well with projects if java version of project is less than 8. How can I determine the java version that is being used for a project? AFAIK its different from the project sdk set in project structure, i.e, I can still clone and open a project written in java 7 and set the project sdk to java 17 - but my plugin won't work in this case.
So, any suggestion on how can I check java version used in a project from a plugin?
Please sign in to leave a comment.
Hi,
You can check the language level configured for a module:
It can be done with:
Or for file:
If you meant checking the current file's possible lowest language level, then there is no API to check it.