scenerygraphics / sciview

sciview is a tool for visualization and interaction with ND image and mesh data
BSD 2-Clause "Simplified" License
67 stars 17 forks source link

The same issue as #563 even I run Fiji with Java11 #609

Open thuzyp opened 2 days ago

thuzyp commented 2 days ago

I installed sciview in my Fiji Java8 and got the same error report as #563. So I followed a series of suggestions under that issue (and the related zulipchat) like installing a no-jre edition of Fiji, setting JVM as Java11 and using a launcher. But still, I got the same error report when starting Fiji:

[ERROR] Cannot create plugin: sc.iview.io.SMLMPointCloudIO
[ERROR] Cannot create plugin: sc.iview.io.N5IO
[ERROR] Cannot create plugin: sc.iview.io.OBJMeshIO
[ERROR] Cannot create plugin: sc.iview.io.SMLMPointCloudIO
[ERROR] Cannot create plugin: sc.iview.io.N5IO
[ERROR] Cannot create plugin: sc.iview.io.OBJMeshIO
[ERROR] Cannot create plugin: sc.iview.io.SMLMPointCloudIO
[ERROR] Cannot create plugin: sc.iview.io.N5IO
[ERROR] Cannot create plugin: sc.iview.io.OBJMeshIO

When I tried to run sciview, I got another report:

[ERROR] Cannot create plugin: sc.iview.ActiveSciViewPreprocessor
[ERROR] Cannot create plugin: sc.iview.ui.SwingGroupingInputHarvester
[ERROR] Cannot create module: sc.iview.commands.LaunchViewer
org.scijava.module.ModuleException: org.scijava.InstantiableException: Class not found: sc.iview.commands.LaunchViewer
    at org.scijava.command.CommandInfo.createModule(CommandInfo.java:316)
    at org.scijava.module.DefaultModuleService.createModule(DefaultModuleService.java:167)
    at org.scijava.module.DefaultModuleService.run(DefaultModuleService.java:206)
    at org.scijava.module.DefaultModuleService.run(DefaultModuleService.java:197)
    at org.scijava.module.DefaultModuleService.run(DefaultModuleService.java:182)
    at net.imagej.legacy.LegacyService.runLegacyCompatibleCommand(LegacyService.java:303)
    at net.imagej.legacy.DefaultLegacyHooks.interceptRunPlugIn(DefaultLegacyHooks.java:166)
    at ij.IJ.runPlugIn(IJ.java)
    at ij.Executer.runCommand(Executer.java:152)
    at ij.Executer.run(Executer.java:70)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.scijava.InstantiableException: Class not found: sc.iview.commands.LaunchViewer
    at org.scijava.plugin.PluginInfo.loadClass(PluginInfo.java:290)
    at org.scijava.command.CommandInfo.loadClass(CommandInfo.java:243)
    at org.scijava.command.CommandInfo.createModule(CommandInfo.java:310)
    ... 10 more
Caused by: java.lang.IllegalArgumentException: Cannot load class: sc.iview.commands.LaunchViewer
    at org.scijava.util.Types.iae(Types.java:977)
    at org.scijava.util.Types.load(Types.java:234)
    at org.scijava.plugin.PluginInfo.loadClass(PluginInfo.java:284)
    ... 12 more
Caused by: java.lang.UnsupportedClassVersionError: sc/iview/commands/LaunchViewer has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 55.0
    at java.base/java.lang.ClassLoader.defineClass1(Native Method)
    at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
    at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
    at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:555)
    at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
    at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    at org.scijava.util.Types.load(Types.java:226)
    ... 13 more

So I want to know any other solutions for this problem. Thanks!

thuzyp commented 2 days ago

OK, now I realize that maybe I should run Fiji with Java21 because the class file edition is 65.0? But setting JVM as Java21 made Fiji could not launch.

ctrueden commented 1 day ago

@thuzyp Here's the process I'm using currently to run sciview:

  1. Download and install Fiji.
  2. Install SciJava Ops as described in its documentation. This will get you switched over to Java 21 with Jaunch without needing to do it manually.
  3. Install sciview by enabling the sciview update site.

Sorry it's not easier yet, but I'm working on it!