question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fix Java 19 MR-JAR compilation in IDEs

See original GitHub issue

Description

After merge of #912 when creating the Eclipse workspace files, it also adds the Java 19 part (core/src/java19), which fails to compile with JDK 11 or 17. I think the same will be happing with Intellij and others.

For exclipse we can exclude the source set, but this would mean you can’t edit the source files with syntax highlighting and compilation checks (but you still see them). For me this would be fine, when I need to touch the Java 19 imple, I can read the source folder to build path, so maybe excluding is the best option. On the other hand, the failing compilation does not hur functionality of Eclipse. If you don’t like it just right-click on the core/src/java19 folder and select “Build path -> Remove from build path”.

I have no idea about Intellij - @dweiss ?

What do other think? Just hide the source sets for Java 19 (and the ones for 20 and 21 coming later?).

Version and environment details

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
dweisscommented, Sep 27, 2022

(away until the next of the week, guys - out of reach). bb on sunday.

1reaction
rmuircommented, Sep 27, 2022

i tried wrestling with it, but i’m not sure i even held it properly. ultimately i was able to get it to work by setting entire project to java 19. this works for now, because “mr-jar” is not “really” used (there are no duplicate classes)

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Use Multi-release JARs To Target Multiple Java ...
And here's how to compile and package them into an MR-JAR: # compile code in `src/main/java` for Java 8 into `classes` $ javac...
Read more >
Creating Multi-Release JAR Files in IntelliJ IDEA
For many library developers, this means they are still compiled against Java 6 and cannot move to using Java 8 features like lambdas...
Read more >
Multi-release JARs - Good or bad idea? - The Gradle Blog
In a nutshell, multi-release jars allow you to package several versions of the same class, for consumption by different runtimes. For example, ...
Read more >
Multi-Release Jar Files - Baeldung
Cross-compilation is the feature in Java that can compile files for running on earlier versions. This means there is no need for us...
Read more >
Multi-Release JAR that contains Java 8 binaries + ... - GitHub
danieldietrich added this to the vavr-1.0.0 milestone on Mar 19, 2018 ... Basically, the module-info.java can't be compiled because the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found