You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compiling from IntelliJ can cause UnsupportedClassVersionError using the preprocessor and using pre-JDK 17.
The problem appears to be that IntelliJ sets JPS thread pool thread context class loader, which is the thread the compiler executes in. This loader is full of IntelliJ jars including plugin jars, all compiled with JDK 17. None of these jars should be visible to the ServiceLoader when used from the compiler, including from compiler plugins like manifold, annotation processors, etc. If a call is made to ServiceLoader#hasNext() in this situation and the compiler is older than JDK 17, it will blow up with UnsupportedClassVersionError. But really, none of these service impls should be loaded anyway since they are specific to IntelliJ and not the compiling project.
The text was updated successfully, but these errors were encountered:
Compiling from IntelliJ can cause UnsupportedClassVersionError using the preprocessor and using pre-JDK 17.
The problem appears to be that IntelliJ sets JPS thread pool thread context class loader, which is the thread the compiler executes in. This loader is full of IntelliJ jars including plugin jars, all compiled with JDK 17. None of these jars should be visible to the
ServiceLoader
when used from the compiler, including from compiler plugins like manifold, annotation processors, etc. If a call is made toServiceLoader#hasNext()
in this situation and the compiler is older than JDK 17, it will blow up with UnsupportedClassVersionError. But really, none of these service impls should be loaded anyway since they are specific to IntelliJ and not the compiling project.The text was updated successfully, but these errors were encountered: