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.

Improve behavior with Java 10

See original GitHub issue

ImageJ2 and Fiji work with Java 10 but there are some annoyances that need to be addressed.

  • The ImageJ launcher must be new enough to support it. The macOS version of Fiji already includes a new-enough launcher, but not yet for Windows and Linux. (If you want to try the latest version of the launcher, see this page.) We need to upgrade the launcher for all platforms.
  • There is a console message on startup WARNING: An illegal reflective access operation has occurred which can be safely ignored. Further investigation needed regarding how best to address this.
  • When starting up on macOS, there is a NoSuchMethodError thread dump on the console, and a NoClassDefFoundError thread dump in an Exception window. The former is due to Fiji attempting to patch the behavior of the Alt key. The latter is due to ImageJ1 attempting to add Mac-specific behavior using the obsolete com.apple.eawt API.
  • Also from ImageJ1, a dialog box appears stating that JavaScript is not available, and asking to download it. It is unclear why ImageJ1 concludes this when running as part of ImageJ2, but behaves different when running vanilla.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
BarchSteelcommented, Dec 16, 2020

This may be an old thread, but I tested today with OpenJDK-11.0.9.1+1 and OpenJDK-14.0.2+12 on Windows 10 x64 ImageJ seems to run fine from Eclipse. Apart from the log4j warning, only the following warnings appear when using JDK 11 or JDK 14 instead of JDK 8:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.imagej.patcher.LegacyInjector (file:/.m2/repository/net/imagej/ij1-patcher/1.1.0/ij1-patcher-1.1.0.jar) to method java.lang.ClassLoader.findLoadedClass(java.lang.String)
WARNING: Please consider reporting this to the maintainers of net.imagej.patcher.LegacyInjector
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

1reaction
aschaincommented, Mar 12, 2020

I found that the minimaven Java 10+ errors seemed to be specific to Windows for me. I was able to run scripts on Fiji running on Java 13 with this change to org.scijava.minimaven: https://github.com/aschain/minimaven/commit/4a0139982ef9bb89398448d44eaa54b5990bb5fe It doesn’t seem to effect other systems (not linux at least), or when using Java 1.8. However, it’s a bit of a cludge to get it working. I did not figure out why the Coordinate in the MavenProject had malformed Strings.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Improve the Performance of Java Applications in 10 ...
How to improve Java application performance – 10 Steps · 1. Perform profiling and load testing · 2. Clean up code and revise...
Read more >
Java 8, 9, 10 and 19 new key features and enhancements
Unlike Java 9, Java 10 is a minor upgrade. It only has a couple of super cool features we will discuss here. The...
Read more >
JDK 10 Release Notes - java - Oracle
Behavioral : Behavioral compatibility includes the semantics of the code that is executed at runtime.
Read more >
Security level settings in the Java Control Panel
In the Java Control Panel, click on the Security tab. Select the desired Security level. Click Apply. Click OK to save changes made...
Read more >
Different behavior of WeekFields on JVM 8 and JVM 10
Such week fields are highly localized, and hence dependent on the localized resources of the underlying JVM which can change from one ...
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