bsideup / jabel

Jabel - unlock Javac 9+ syntax when targeting Java 8
Apache License 2.0
802 stars 47 forks source link

Jabel for using java 11 project library in java 8 project. #185

Open 313hemant313 opened 9 months ago

313hemant313 commented 9 months ago

Able to generate a Jar with the pom changes mentioned in the readme, but when trying to add this dependency in Java8 project then getting below error on file classes of java11Project lib.

Error:
XYZ.class uses preview features of Java SE 11 (use --enable-preview)

Also just wanted to confirm that while doing package or install of Java11Lib which jdk should i use ? jdk 8 or jdk 11 ?

Got this error when using jdk8 in both the projects:

class file has wrong version 55.65535, should be 52.0

UPDATE

Had to remove some code like List.of, but got it working with var keywords.

Can someone please confirm how to know which code needs to be changed ?

313hemant313 commented 8 months ago

@bsideup Can you please guide.