Hii I have been facing error while building the project in IntelliJ. My laptop is MacBook M1 Pro. My Java version is "11.0.14" and my language level is 11. When I build this in intellij it fails with this error saying "java: package com.sun.javadoc does not exist". But while building in maven on the terminal i.e, on the command line with the same java version and language level it works fine and it builds successfully.
Any help for resolving this error. Thanks.
When Java version problems occur try checking out 3 things:
After all try restarting IDE.