[comixed-dev] Re: Error compiling comixed on Mac w/ OpenJDK 16

  • From: "Darryl L. Pierce" <mcpierce@xxxxxxxxx>
  • To: comixed-dev@xxxxxxxxxxxxx
  • Date: Tue, 8 Jun 2021 14:28:34 -0400

Following up on this: on a lark today while working I thought I'd tinker
with building using JDK16 on a Linux machine (Fedora 34 64-bit with OpenJDK
16.0.1). So to set a baseline I checked out the latest on develop and did a
compile.

It compiled just fine, and ran like expected.

Is this issue a MacOS JDK issue, an Oracle JDK issue, or something else?

On Mon, Jun 7, 2021 at 11:22 AM Darryl L. Pierce <mcpierce@xxxxxxxxx> wrote:

Sweet, thanks for finding that!

(tests)

I modified both the maven-compiler-plugin dependency and also the
project-level dependency to use 1.18.20 and compiling worked. However, when
I run the unit tests I'm seeing exceptions that are ultimately caused by:

Caused by: java.lang.IllegalArgumentException: Unsupported class file
major version 60

I did some googling on this and it seems to be an issue still in other
projects. Is this a Maven build issue or a JDK issue? It seems Gradle has
fixed this problem.

On Mon, Jun 7, 2021 at 10:30 AM Frédéric Fouret <fouretfrederic@xxxxxxxxx>
wrote:

I was looking for a solution to this problem this morning and came on
this lin : https://github.com/projectlombok/lombok/issues/2681
There should be an official patch to lombok (1.18.20)

Le lun. 7 juin 2021 à 15:19, Darryl L. Pierce <mcpierce@xxxxxxxxx> a
écrit :

You shouldn't have to use Oracle's JDK, no. I do my primary development
on two Macs, both with Oracle JDK12, without issue. That said, I just put
Oracle JDK16 on my mini and am seeing the same error. I tested the fix on a
Fedora machine with JDK 14 (the main reason I ended up looking into fixing
this issue) and it worked. I also tested it with JetBrains' JDK16 bundle
and it worked. So I'm guessing there's a setting that's needed in the Maven
file to force OpenJDK 16 to target JDK 11 output.

I'll look into it. Would you be willing to try out any fixes I put up as
PRs to verify they work?

On Sun, Jun 6, 2021 at 10:58 PM Jonathan Fine <
dmarc-noreply@xxxxxxxxxxxxx> wrote:

Hello, I tried compiling the develop branch of ComiXed on a Mac w/
OpenJDK 16 and I'm getting this error from Lombok:

"Fatal error compiling: java.lang.IllegalAccessError: class
lombok.javac.apt.LombokProcessor (in unnamed module @0x3a6409ec) cannot
access class com.sun.tools.javac.processing.JavacProcessingEnvironment
(in module jdk.compiler) because module jdk.compiler does not export
com.sun.tools.javac.processing to unnamed module @0x3a6409ec"

Do I need to use Oracle's JDK for this?  Below is a screenshot of my
mvn compile followed by my java --version:

[image: Screen Shot 2021-06-06 at 22.45.10 PM.png]




--
Darryl L. Pierce <mcpierce@xxxxxxxxx>
"Le centre du monde est partout." - Blaise Pascal
"Let's try and find some point of transcendence and leap together." -
Gord Downie



--
Darryl L. Pierce <mcpierce@xxxxxxxxx>
"Le centre du monde est partout." - Blaise Pascal
"Let's try and find some point of transcendence and leap together." - Gord
Downie



-- 
Darryl L. Pierce <mcpierce@xxxxxxxxx>
"Le centre du monde est partout." - Blaise Pascal
"Let's try and find some point of transcendence and leap together." - Gord
Downie

PNG image

Other related posts: