Please test the new ImageJ Launcher!

testing
launcher
crowd-source
Tags: #<Tag:0x00007fd5430373c8> #<Tag:0x00007fd543037260> #<Tag:0x00007fd5430370d0>

#1

There is now a new build of the ImageJ Launcher addressing issues with ImageJ + Java 9. (Big thanks to @stelfrich for his persistent efforts in making this possible! :trophy: )

I want to put this new version on the update site ASAP, but it needs some testing first, to ensure we don’t break anyone’s installation.

Do you have a moment to test it? If so, that would be very helpful!

Here are the steps:

  1. Back up the launcher(s) in your existing ImageJ.app or Fiji.app installation. Note that the procedure may only work with the Java 8 version of ImageJ/Fiji, not the old Java 6 version.
  2. Download the launcher(s) for your platform: win32, win64, macosx, linux64
  3. Replace the existing launcher(s) in your installation as follows:
    • imagej-launcher-*-win32.exe :arrow_right: ImageJ-win32.exe
    • imagej-launcher-*-win64.exe :arrow_right: ImageJ-win64.exe
    • imagej-launcher-*-macosx.exe :arrow_right: Contents/MacOS/ImageJ-macosx
    • imagej-launcher-*-linux64.exe :arrow_right: ImageJ-linux64
  4. On macOS and Linux, set the executable bit on the launcher! chmod 755 that sucker.
  5. Install the Java 9 JRE if you don’t already have it (or the Java 9 JDK if you are feeling techie—either way).
  6. Rename your installation’s existing java folder (if any) to java8.
  7. Launch your shiny new launcher!
    • Double-clicking is OK, and should work
    • If you are curious—and/or have problems with the double-click—you can also launch it from the console and take note of any error messages.
  8. Try out your favorite workflows in ImageJ with Java 9, and report back on what breaks.

Note that some non-fatal errors on the console are expected at the moment; see details below.

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.imagej.patcher.LegacyInjector (file:/Applications/Science/Fiji-Default.app/jars/ij1-patcher-0.12.6.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
java.lang.IllegalArgumentException: Cannot handle replace call to create in ij.gui.Toolbar's public void itemStateChanged(java.awt.event.ItemEvent e)
	at net.imagej.patcher.CodeHacker.replaceCallInMethod(CodeHacker.java:725)
	at net.imagej.patcher.CodeHacker.replaceCallInMethod(CodeHacker.java:650)
	at net.imagej.patcher.LegacyExtensions.addEditorExtensionPoints(LegacyExtensions.java:368)
	at net.imagej.patcher.LegacyExtensions.injectHooks(LegacyExtensions.java:289)
	at net.imagej.patcher.LegacyInjector.inject(LegacyInjector.java:308)
	at net.imagej.patcher.LegacyInjector.injectHooks(LegacyInjector.java:109)
	at net.imagej.patcher.LegacyEnvironment.initialize(LegacyEnvironment.java:101)
	at net.imagej.patcher.LegacyEnvironment.applyPatches(LegacyEnvironment.java:495)
	at net.imagej.patcher.LegacyInjector.preinit(LegacyInjector.java:397)
	at net.imagej.patcher.LegacyInjector.preinit(LegacyInjector.java:376)
	at net.imagej.legacy.LegacyService.<clinit>(LegacyService.java:132)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
	at java.base/java.lang.Class.newInstance(Class.java:558)
	at org.scijava.service.ServiceHelper.createServiceRecursively(ServiceHelper.java:303)
	at org.scijava.service.ServiceHelper.createExactService(ServiceHelper.java:270)
	at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:232)
	at org.scijava.service.ServiceHelper.createServiceRecursively(ServiceHelper.java:341)
	at org.scijava.service.ServiceHelper.createExactService(ServiceHelper.java:270)
	at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:232)
	at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:195)
	at org.scijava.service.ServiceHelper.loadServices(ServiceHelper.java:167)
	at org.scijava.Context.<init>(Context.java:280)
	at org.scijava.Context.<init>(Context.java:236)
	at org.scijava.Context.<init>(Context.java:176)
	at org.scijava.Context.<init>(Context.java:162)
	at net.imagej.ImageJ.<init>(ImageJ.java:77)
	at net.imagej.Main.main(Main.java:54)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at net.imagej.launcher.ClassLauncher.launch(ClassLauncher.java:279)
	at net.imagej.launcher.ClassLauncher.run(ClassLauncher.java:186)
	at net.imagej.launcher.ClassLauncher.main(ClassLauncher.java:77)
Caused by: javassist.CannotCompileException: No code replaced!
	at net.imagej.patcher.CodeHacker$EagerExprEditor.instrument(CodeHacker.java:1280)
	at net.imagej.patcher.CodeHacker.replaceCallInMethod(CodeHacker.java:722)
	... 36 more
java.lang.IllegalArgumentException: Cannot handle replace call to installFile in ij.Menus's void installStartupMacroSet()
	at net.imagej.patcher.CodeHacker.replaceCallInMethod(CodeHacker.java:725)
	at net.imagej.patcher.CodeHacker.replaceCallInMethod(CodeHacker.java:650)
	at net.imagej.patcher.LegacyExtensions.overrideStartupMacrosForFiji(LegacyExtensions.java:529)
	at net.imagej.patcher.LegacyExtensions.injectHooks(LegacyExtensions.java:293)
	at net.imagej.patcher.LegacyInjector.inject(LegacyInjector.java:308)
	at net.imagej.patcher.LegacyInjector.injectHooks(LegacyInjector.java:109)
	at net.imagej.patcher.LegacyEnvironment.initialize(LegacyEnvironment.java:101)
	at net.imagej.patcher.LegacyEnvironment.applyPatches(LegacyEnvironment.java:495)
	at net.imagej.patcher.LegacyInjector.preinit(LegacyInjector.java:397)
	at net.imagej.patcher.LegacyInjector.preinit(LegacyInjector.java:376)
	at net.imagej.legacy.LegacyService.<clinit>(LegacyService.java:132)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
	at java.base/java.lang.Class.newInstance(Class.java:558)
	at org.scijava.service.ServiceHelper.createServiceRecursively(ServiceHelper.java:303)
	at org.scijava.service.ServiceHelper.createExactService(ServiceHelper.java:270)
	at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:232)
	at org.scijava.service.ServiceHelper.createServiceRecursively(ServiceHelper.java:341)
	at org.scijava.service.ServiceHelper.createExactService(ServiceHelper.java:270)
	at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:232)
	at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:195)
	at org.scijava.service.ServiceHelper.loadServices(ServiceHelper.java:167)
	at org.scijava.Context.<init>(Context.java:280)
	at org.scijava.Context.<init>(Context.java:236)
	at org.scijava.Context.<init>(Context.java:176)
	at org.scijava.Context.<init>(Context.java:162)
	at net.imagej.ImageJ.<init>(ImageJ.java:77)
	at net.imagej.Main.main(Main.java:54)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at net.imagej.launcher.ClassLauncher.launch(ClassLauncher.java:279)
	at net.imagej.launcher.ClassLauncher.run(ClassLauncher.java:186)
	at net.imagej.launcher.ClassLauncher.main(ClassLauncher.java:77)
Caused by: javassist.CannotCompileException: No code replaced!
	at net.imagej.patcher.CodeHacker$EagerExprEditor.instrument(CodeHacker.java:1280)
	at net.imagej.patcher.CodeHacker.replaceCallInMethod(CodeHacker.java:722)
	... 36 more
[Mon Dec 11 21:47:14 CET 2017] [ERROR] [] Exception during event handling:
	[Event] org.scijava.service.event.ServicesLoadedEvent
	context = org.scijava.Context@794cfd06
	consumed = false
	[Subscriber] fiji.DefaultFijiService [priority = 0.0]
	[Method] protected void fiji.DefaultFijiService.onEvent(org.scijava.service.event.ServicesLoadedEvent)
java.lang.NoSuchMethodError: java.awt.MenuBar.getPeer()Ljava/awt/peer/MenuComponentPeer;
	at fiji.IJ_Alt_Key_Listener.getX11Opener(IJ_Alt_Key_Listener.java:98)
	at fiji.IJ_Alt_Key_Listener.getOpener(IJ_Alt_Key_Listener.java:87)
	at fiji.IJ_Alt_Key_Listener.<init>(IJ_Alt_Key_Listener.java:18)

Any and all feedback is much appreciated! If no one reports any show-stopping problems, I plan to upload the new binaries by end of Thursday.

P.S. If some enterprising young person would care to update this wiki page, especially the Download section, and add instructions for testing along the lines of what I wrote above… that would be amazing.


#2

Hi @ctrueden

I already know how awesome is the result. But on my side downloading the win-64 launcher and java9 jdk does not make appear the search bar.

Can someone confirm/infirm?


#3

@tinevez Sadly, the new search bar is not part of this update. It’s just the native launcher, to make Java 9 work. Before this update, ImageJ would not even start up when using a Java 9 VM. The goal of this update is to change that.

Trust me, I will certainly make another forum post as soon as the search bar is ready for user testing! :crazy_face:


#4

Aaaahhhhh. My bad.
Apparently java9 is not picked up by the launcher, which defaults to 1.8
I will investigate a bit.


#5

Did you rename any existing java folder in your installation? If the Java version reported by ImageJ is 1.8.0_66 then it is likely you did not.

In the meantime, you could launch from the CLI with --java-home C:\Program Files\Java\jdk9.0.1 or whatever your path is.


#6

Hey @ctrueden,

awesome to see the new launcher evolving. But, is it really necessary to install java9? I’m afraid everything else will break if I upgrade my Java now.
I renamed the java folder to java8 and the new launcher runs fine! Just on my Windows 10, the SmartScreen filter complains. This didn’t happend with the old launcher…

Cheers,
Robert


#7

Sorry for the confusion. No, you do not have to install Java 9 just to test out the new launcher. It is indeed helpful to know that the new launcher still works as before with Java 8.

However, since the main new feature of this new launcher is to work with Java 9—previous versions of the launcher crash on startup if your Java is Java 9—I am also looking for feedback on whether this version of the launcher is OK with Java 9.

You mean when downloading it? That’s probably because it is a bare EXE, whereas to download the old launcher you had to download a NAR file and then pull the launcher out of it. I wonder if it would help to change the packaging type to bin instead of exe


#8

It runs without any errors on my 64-bit W10.

image


#9

It launches on linux64 though the Fiji Logo isn’t displayed anymore during startup. Additionally to the expected errors you posted above I get this message:

Could not load Java library '/usr/lib/jvm/java-9-oracle/lib/amd64/server/libjvm.so': /usr/lib/jvm/java-9-oracle/lib/amd64/server/libjvm.so: cannot open shared object file: No such file or directory
Warning: falling back to System JVM

… the status bar says Java 9.0.1.


#10

Thanks @frauzufall. That error is actually quite serious: it means the launcher could not link to the Java shared library, and instead ended up launching Java by calling the java executable. Would you mind quickly checking /usr/lib/jvm/java-9-oracle/lib/amd64/ and seeing what is there? Which distro are you running? Where does your Java 9 installation live?


#11

I can corroborate that on 64-bit Win10 it runs smoothly.

grafik

  • I can confirm the complaint of the SmartScreen as stated by @haesleinhuepf when running the launcher the first time. Thereafter, it starts without any problems.

  • Also here, Fiji icon not showing up on startup (startup time is short as usual)

  • Just noticed that the main window shows up a little reduced in size initially, swallowing part of the toolbar icons


#12

I didn’t notice at first but the Fiji launch icon is missing on my system as well.


#13

I got the same error as @frauzufall, I am on fedora 27, with the oracle jdk9, there is no amd64 folder in the /lib/ folder anymore, I think this is related to oracle no longer releasing 32bit JDKs:


The libjvm.so file now in /usr/java/jdk-9.0.1/lib/server so the amd64 part is missing from the path.


#14

The new launcher works great for me on Ubuntu 17.10. Note that I didn’t test Java 9.


#15

Hi there!

Tested macosx launcher on both Java 8 (bundled and system) as well as Java 9. Java 8 works just fine - the Fiji logo is gone though. It seems to start a bit faster - but that might be just an impression - did not time it exactly. Java 9 launches, though it pops some UI-related exceptions - for example this one with Script Editor:

[ERROR] Exception during event handling:
	[Event] org.scijava.service.event.ServicesLoadedEvent
	context = org.scijava.Context@236717f0
	consumed = false
	[Subscriber] fiji.DefaultFijiService [priority = 0.0]
	[Method] protected void fiji.DefaultFijiService.onEvent(org.scijava.service.event.ServicesLoadedEvent)
java.lang.NoSuchMethodError: java.awt.MenuBar.getPeer()Ljava/awt/peer/MenuComponentPeer;
	at fiji.IJ_Alt_Key_Listener.getX11Opener(IJ_Alt_Key_Listener.java:98)
	at fiji.IJ_Alt_Key_Listener.getOpener(IJ_Alt_Key_Listener.java:87)
	at fiji.IJ_Alt_Key_Listener.<init>(IJ_Alt_Key_Listener.java:18)
	at fiji.DefaultFijiService.actuallyInitialize(DefaultFijiService.java:55)
	at fiji.DefaultFijiService.onEvent(DefaultFijiService.java:61)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at org.scijava.event.DefaultEventService$ProxySubscriber.onEvent(DefaultEventService.java:300)
	at org.scijava.event.DefaultEventService$ProxySubscriber.onEvent(DefaultEventService.java:274)
	at org.bushe.swing.event.ThreadSafeEventService.publish(ThreadSafeEventService.java:971)
	at org.scijava.event.DefaultEventBus.access$201(DefaultEventBus.java:56)
	at org.scijava.event.DefaultEventBus$2.run(DefaultEventBus.java:216)
	at org.scijava.thread.DefaultThreadService$2.run(DefaultThreadService.java:220)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.base/java.lang.Thread.run(Thread.java:844)
Caught and handled this exception :
java.lang.NumberFormatException: For input string: ""
	at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.base/java.lang.Integer.parseInt(Integer.java:662)
	at java.base/java.lang.Integer.parseInt(Integer.java:770)
	at com.github.jaiimageio.impl.common.ImageUtil.processOnRegistration(ImageUtil.java:1401)
	at com.github.jaiimageio.impl.plugins.wbmp.WBMPImageWriterSpi.onRegistration(WBMPImageWriterSpi.java:103)
	at java.desktop/javax.imageio.spi.SubRegistry.registerServiceProvider(ServiceRegistry.java:788)
	at java.desktop/javax.imageio.spi.ServiceRegistry.registerServiceProvider(ServiceRegistry.java:330)
	at java.desktop/javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(IIORegistry.java:212)
	at java.desktop/javax.imageio.spi.IIORegistry.<init>(IIORegistry.java:136)
	at java.desktop/javax.imageio.spi.IIORegistry.getDefaultInstance(IIORegistry.java:157)
	at java.desktop/javax.imageio.ImageIO.<clinit>(ImageIO.java:66)
	at org.fife.ui.rtextarea.IconGroup.getIconImpl(IconGroup.java:181)
	at org.fife.ui.rtextarea.IconGroup.getIcon(IconGroup.java:149)
	at org.scijava.ui.swing.script.EditorPane.wrappedInScrollbars(EditorPane.java:155)
	at org.scijava.ui.swing.script.TextEditorTab.<init>(TextEditorTab.java:158)
	at org.scijava.ui.swing.script.TextEditor.open(TextEditor.java:1368)
	at org.scijava.ui.swing.script.TextEditor.<init>(TextEditor.java:572)
	at net.imagej.legacy.plugin.DefaultLegacyEditor$1.<init>(DefaultLegacyEditor.java:64)
	at net.imagej.legacy.plugin.DefaultLegacyEditor.editor(DefaultLegacyEditor.java:64)
	at net.imagej.legacy.plugin.DefaultLegacyEditor.open(DefaultLegacyEditor.java:92)
	at net.imagej.legacy.DefaultLegacyHooks.openInEditor(DefaultLegacyHooks.java:302)
	at ij.io.Opener.open(Opener.java)
	at ij.RecentOpener.run(RecentOpener.java:19)
	at java.base/java.lang.Thread.run(Thread.java:844)
Caught and handled this exception :
java.lang.NumberFormatException: For input string: ""
	at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.base/java.lang.Integer.parseInt(Integer.java:662)
	at java.base/java.lang.Integer.parseInt(Integer.java:770)
	at com.github.jaiimageio.impl.common.ImageUtil.processOnRegistration(ImageUtil.java:1401)
	at com.github.jaiimageio.impl.plugins.bmp.BMPImageWriterSpi.onRegistration(BMPImageWriterSpi.java:105)
	at java.desktop/javax.imageio.spi.SubRegistry.registerServiceProvider(ServiceRegistry.java:788)
	at java.desktop/javax.imageio.spi.ServiceRegistry.registerServiceProvider(ServiceRegistry.java:330)
	at java.desktop/javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(IIORegistry.java:212)
	at java.desktop/javax.imageio.spi.IIORegistry.<init>(IIORegistry.java:136)
	at java.desktop/javax.imageio.spi.IIORegistry.getDefaultInstance(IIORegistry.java:157)
	at java.desktop/javax.imageio.ImageIO.<clinit>(ImageIO.java:66)
	at org.fife.ui.rtextarea.IconGroup.getIconImpl(IconGroup.java:181)
	at org.fife.ui.rtextarea.IconGroup.getIcon(IconGroup.java:149)
	at org.scijava.ui.swing.script.EditorPane.wrappedInScrollbars(EditorPane.java:155)
	at org.scijava.ui.swing.script.TextEditorTab.<init>(TextEditorTab.java:158)
	at org.scijava.ui.swing.script.TextEditor.open(TextEditor.java:1368)
	at org.scijava.ui.swing.script.TextEditor.<init>(TextEditor.java:572)
	at net.imagej.legacy.plugin.DefaultLegacyEditor$1.<init>(DefaultLegacyEditor.java:64)
	at net.imagej.legacy.plugin.DefaultLegacyEditor.editor(DefaultLegacyEditor.java:64)
	at net.imagej.legacy.plugin.DefaultLegacyEditor.open(DefaultLegacyEditor.java:92)
	at net.imagej.legacy.DefaultLegacyHooks.openInEditor(DefaultLegacyHooks.java:302)
	at ij.io.Opener.open(Opener.java)
	at ij.RecentOpener.run(RecentOpener.java:19)
	at java.base/java.lang.Thread.run(Thread.java:844)
Caught and handled this exception :
java.lang.NumberFormatException: For input string: ""
	at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.base/java.lang.Integer.parseInt(Integer.java:662)
	at java.base/java.lang.Integer.parseInt(Integer.java:770)
	at com.github.jaiimageio.impl.common.ImageUtil.processOnRegistration(ImageUtil.java:1401)
	at com.github.jaiimageio.impl.plugins.gif.GIFImageWriterSpi.onRegistration(GIFImageWriterSpi.java:140)
	at java.desktop/javax.imageio.spi.SubRegistry.registerServiceProvider(ServiceRegistry.java:788)
	at java.desktop/javax.imageio.spi.ServiceRegistry.registerServiceProvider(ServiceRegistry.java:330)
	at java.desktop/javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(IIORegistry.java:212)
	at java.desktop/javax.imageio.spi.IIORegistry.<init>(IIORegistry.java:136)
	at java.desktop/javax.imageio.spi.IIORegistry.getDefaultInstance(IIORegistry.java:157)
	at java.desktop/javax.imageio.ImageIO.<clinit>(ImageIO.java:66)
	at org.fife.ui.rtextarea.IconGroup.getIconImpl(IconGroup.java:181)
	at org.fife.ui.rtextarea.IconGroup.getIcon(IconGroup.java:149)
	at org.scijava.ui.swing.script.EditorPane.wrappedInScrollbars(EditorPane.java:155)
	at org.scijava.ui.swing.script.TextEditorTab.<init>(TextEditorTab.java:158)
	at org.scijava.ui.swing.script.TextEditor.open(TextEditor.java:1368)
	at org.scijava.ui.swing.script.TextEditor.<init>(TextEditor.java:572)
	at net.imagej.legacy.plugin.DefaultLegacyEditor$1.<init>(DefaultLegacyEditor.java:64)
	at net.imagej.legacy.plugin.DefaultLegacyEditor.editor(DefaultLegacyEditor.java:64)
	at net.imagej.legacy.plugin.DefaultLegacyEditor.open(DefaultLegacyEditor.java:92)
	at net.imagej.legacy.DefaultLegacyHooks.openInEditor(DefaultLegacyHooks.java:302)
	at ij.io.Opener.open(Opener.java)
	at ij.RecentOpener.run(RecentOpener.java:19)
	at java.base/java.lang.Thread.run(Thread.java:844)
Caught and handled this exception :
java.lang.NumberFormatException: For input string: ""
	at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.base/java.lang.Integer.parseInt(Integer.java:662)
	at java.base/java.lang.Integer.parseInt(Integer.java:770)
	at com.github.jaiimageio.impl.common.ImageUtil.processOnRegistration(ImageUtil.java:1401)
	at com.github.jaiimageio.impl.plugins.wbmp.WBMPImageReaderSpi.onRegistration(WBMPImageReaderSpi.java:96)
	at java.desktop/javax.imageio.spi.SubRegistry.registerServiceProvider(ServiceRegistry.java:788)
	at java.desktop/javax.imageio.spi.ServiceRegistry.registerServiceProvider(ServiceRegistry.java:330)
	at java.desktop/javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(IIORegistry.java:212)
	at java.desktop/javax.imageio.spi.IIORegistry.<init>(IIORegistry.java:136)
	at java.desktop/javax.imageio.spi.IIORegistry.getDefaultInstance(IIORegistry.java:157)
	at java.desktop/javax.imageio.ImageIO.<clinit>(ImageIO.java:66)
	at org.fife.ui.rtextarea.IconGroup.getIconImpl(IconGroup.java:181)
	at org.fife.ui.rtextarea.IconGroup.getIcon(IconGroup.java:149)
	at org.scijava.ui.swing.script.EditorPane.wrappedInScrollbars(EditorPane.java:155)
	at org.scijava.ui.swing.script.TextEditorTab.<init>(TextEditorTab.java:158)
	at org.scijava.ui.swing.script.TextEditor.open(TextEditor.java:1368)
	at org.scijava.ui.swing.script.TextEditor.<init>(TextEditor.java:572)
	at net.imagej.legacy.plugin.DefaultLegacyEditor$1.<init>(DefaultLegacyEditor.java:64)
	at net.imagej.legacy.plugin.DefaultLegacyEditor.editor(DefaultLegacyEditor.java:64)
	at net.imagej.legacy.plugin.DefaultLegacyEditor.open(DefaultLegacyEditor.java:92)
	at net.imagej.legacy.DefaultLegacyHooks.openInEditor(DefaultLegacyHooks.java:302)
	at ij.io.Opener.open(Opener.java)
	at ij.RecentOpener.run(RecentOpener.java:19)
	at java.base/java.lang.Thread.run(Thread.java:844)
Caught and handled this exception :
java.lang.NumberFormatException: For input string: ""
	at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.base/java.lang.Integer.parseInt(Integer.java:662)
	at java.base/java.lang.Integer.parseInt(Integer.java:770)
	at com.github.jaiimageio.impl.common.ImageUtil.processOnRegistration(ImageUtil.java:1401)
	at com.github.jaiimageio.impl.plugins.bmp.BMPImageReaderSpi.onRegistration(BMPImageReaderSpi.java:97)
	at java.desktop/javax.imageio.spi.SubRegistry.registerServiceProvider(ServiceRegistry.java:788)
	at java.desktop/javax.imageio.spi.ServiceRegistry.registerServiceProvider(ServiceRegistry.java:330)
	at java.desktop/javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(IIORegistry.java:212)
	at java.desktop/javax.imageio.spi.IIORegistry.<init>(IIORegistry.java:136)
	at java.desktop/javax.imageio.spi.IIORegistry.getDefaultInstance(IIORegistry.java:157)
	at java.desktop/javax.imageio.ImageIO.<clinit>(ImageIO.java:66)
	at org.fife.ui.rtextarea.IconGroup.getIconImpl(IconGroup.java:181)
	at org.fife.ui.rtextarea.IconGroup.getIcon(IconGroup.java:149)
	at org.scijava.ui.swing.script.EditorPane.wrappedInScrollbars(EditorPane.java:155)
	at org.scijava.ui.swing.script.TextEditorTab.<init>(TextEditorTab.java:158)
	at org.scijava.ui.swing.script.TextEditor.open(TextEditor.java:1368)
	at org.scijava.ui.swing.script.TextEditor.<init>(TextEditor.java:572)
	at net.imagej.legacy.plugin.DefaultLegacyEditor$1.<init>(DefaultLegacyEditor.java:64)
	at net.imagej.legacy.plugin.DefaultLegacyEditor.editor(DefaultLegacyEditor.java:64)
	at net.imagej.legacy.plugin.DefaultLegacyEditor.open(DefaultLegacyEditor.java:92)
	at net.imagej.legacy.DefaultLegacyHooks.openInEditor(DefaultLegacyHooks.java:302)
	at ij.io.Opener.open(Opener.java)
	at ij.RecentOpener.run(RecentOpener.java:19)
	at java.base/java.lang.Thread.run(Thread.java:844)

#16

Also, 3D viewer does not work with Java 9 and makes ImageJ crash with the following stack trace:

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGABRT)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000010
Exception Note:        EXC_CORPSE_NOTIFY

VM Regions Near 0x10:
--> 
    __TEXT                 0000000107e8f000-0000000107ea3000 [   80K] r-x/rwx SM=COW  /Applications/Fiji.app/Contents/MacOS/ImageJ-macosx

Application Specific Information:
abort() called

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x00007fff62070e3e __pthread_kill + 10
1   libsystem_pthread.dylib       	0x00007fff621af150 pthread_kill + 333
2   libsystem_c.dylib             	0x00007fff61fcd312 abort + 127
3   libjvm.dylib                  	0x000000010a1baa72 os::abort(bool, void*, void const*) + 22
4   libjvm.dylib                  	0x000000010a30898e VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long) + 2386
5   libjvm.dylib                  	0x000000010a308027 VMError::report_and_die(Thread*, unsigned int, unsigned char*, void*, void*, char const*, ...) + 169
6   libjvm.dylib                  	0x000000010a3089db VMError::report_and_die(Thread*, unsigned int, unsigned char*, void*, void*) + 33
7   libjvm.dylib                  	0x000000010a1bf75d JVM_handle_bsd_signal + 848
8   libjvm.dylib                  	0x000000010a1bc5d9 signalHandler(int, __siginfo*, void*) + 45
9   libsystem_platform.dylib      	0x00007fff621a2f5a _sigtramp + 26
10  com.apple.Foundation          	0x00007fff3c79e21f -[NSRecursiveLock unlock] + 36
11  com.apple.AppKit              	0x00007fff37ca5d9d -[NSApplication run] + 812
12  libosxapp.dylib               	0x00000001385e0d3a +[NSApplicationAWT runAWTLoopWithApp:] + 157
13  libawt_lwawt.dylib            	0x00000001392bc544 +[AWTStarter starter:headless:] + 834
14  JavaNativeFoundation          	0x00007fff3e266f4a +[JNFRunLoop _performCopiedBlock:] + 17
15  com.apple.Foundation          	0x00007fff3c7f5125 __NSThreadPerformPerform + 334
16  com.apple.CoreFoundation      	0x00007fff3a6ec5a1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
17  com.apple.CoreFoundation      	0x00007fff3a7a635c __CFRunLoopDoSource0 + 108
18  com.apple.CoreFoundation      	0x00007fff3a6cf040 __CFRunLoopDoSources0 + 208
19  com.apple.CoreFoundation      	0x00007fff3a6ce4bd __CFRunLoopRun + 1293
20  com.apple.CoreFoundation      	0x00007fff3a6cdd23 CFRunLoopRunSpecific + 483
21  com.apple.CoreFoundation      	0x00007fff3a70c773 CFRunLoopRun + 99
22  org.fiji                      	0x0000000107e9b1ac start_ij_macosx + 476
23  org.fiji                      	0x0000000107e915ad main + 621
24  org.fiji                      	0x0000000107e8fe14 start + 52

Thread 1:
0   libsystem_kernel.dylib        	0x00007fff62070cee __psynch_cvwait + 10
1   libsystem_pthread.dylib       	0x00007fff621ad662 _pthread_cond_wait + 732
2   libjvm.dylib                  	0x000000010a1be127 os::PlatformEvent::park() + 179
3   libjvm.dylib                  	0x000000010a19b62f ParkCommon(ParkEvent*, long) + 39
4   libjvm.dylib                  	0x000000010a19b919 Monitor::IWait(Thread*, long) + 171
5   libjvm.dylib                  	0x000000010a19be1c Monitor::wait(bool, long, bool) + 240
6   libjvm.dylib                  	0x000000010a2c6bf4 Threads::destroy_vm() + 66
7   libjvm.dylib                  	0x0000000109fb246e jni_DestroyJavaVM + 254
8   org.fiji                      	0x0000000107e9047b start_ij + 1115
9   org.fiji                      	0x0000000107e9b1f1 start_ij_aux + 17
10  libsystem_pthread.dylib       	0x00007fff621ac6c1 _pthread_body + 340
11  libsystem_pthread.dylib       	0x00007fff621ac56d _pthread_start + 377
12  libsystem_pthread.dylib       	0x00007fff621abc5d thread_start + 13

#17

And when switching to IJ2 UI you get this exception:

java.lang.reflect.InvocationTargetException
	java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1328)
	java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1303)
	java.desktop/javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1475)
	net.imagej.legacy.SwitchToModernMode.run(SwitchToModernMode.java:75)
	ij.IJ.runUserPlugIn(IJ.java:221)
	ij.IJ.runPlugIn(IJ.java:185)
	ij.Executer.runCommand(Executer.java:137)
	ij.Executer.run(Executer.java:66)
	java.base/java.lang.Thread.run(Thread.java:844)

	at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1328)
	at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1303)
	at java.desktop/javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1475)
	at net.imagej.legacy.SwitchToModernMode.run(SwitchToModernMode.java:75)
	at ij.IJ.runUserPlugIn(IJ.java:221)
	at ij.IJ.runPlugIn(IJ.java:185)
	at ij.Executer.runCommand(Executer.java:137)
	at ij.Executer.run(Executer.java:66)
	at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.util.ConcurrentModificationException
	at java.base/java.util.WeakHashMap$HashIterator.nextEntry(WeakHashMap.java:807)
	at java.base/java.util.WeakHashMap$KeyIterator.next(WeakHashMap.java:840)
	at net.imagej.legacy.LegacyImageMap.toggleLegacyMode(LegacyImageMap.java:319)
	at net.imagej.legacy.LegacyService.toggleLegacyMode(LegacyService.java:427)
	at net.imagej.legacy.LegacyService.toggleLegacyMode(LegacyService.java:361)
	at net.imagej.legacy.SwitchToModernMode$1.run(SwitchToModernMode.java:95)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:303)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
	at java.desktop/java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:717)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:711)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:89)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:199)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

#18

Testing results on Linux and Windows:

System:

  • Linux (Ubuntu 17.10 amd64)

  • OpenJDK8,

  • OpenJDK9 (default)

    % ./linux64
    Could not load Java library ‘/usr/lib/jvm/java-9-openjdk-amd64/lib/amd64/server/libjvm.so’: /usr/lib/jvm/java-9-openjdk-amd64/lib/amd64/server/libjvm.so: cannot open shared object file: No such file or directory
    Warning: falling back to System JVM

I think that was already reported. It’s /usr/lib/jvm/java-9-openjdk-amd64/lib/server/libjvm.so (no amd64 for java9).

System:

  • Windows 7 x64
  • Java 1.8u151 x64
  • Java 9 x64 (default)

ImageJ with existing launcher:

*does not launch by default with ImageJ[-win64].exe:
Error: Could not create the Java Virtual Machine
Error: A fatal exception has occurred. Program will exit.

ImageJ with new launcher:

  • launches with 5.0.0-snapshot imagej-launcher-5.0.0-20171215.134542-44-win64.exe
    BUT it’s using Java 1.8.0_151 rather than Java9.
  • If Java 8 is removed, it then starts up with Java 9.

Fiji with existing launcher:

  • starts by default with Java 8 [not tested with Java9 only]

Fiji with new launcher:

  • launches with 5.0.0-snapshot imagej-launcher-5.0.0-20171215.134542-44-win64.exe
    but it’s using Java 1.8.0_151 rather than Java9.
  • If Java 8 is removed, it then starts up with Java 9.

So the new launcher is working in all cases, but I’m not sure why it’s defaulting to Java 8 when Java 9 is present. Is that an intentional design choice, or something system-specific? The Java preferences show only Java 9 in the list of available JVMs.


#19

I’ve put some preliminary (CLI-based) testing results from within Docker on https://github.com/imagej/imagej/pull/182


#20

Hi Curtis,

The win32 and linux64 links are broken.

Also, the similar win32 and linux64 links in the launcher readme file
are also broken. They are:

http://maven.imagej.net/service/local/artifact/maven/redirect?r=snapshots&g=net.imagej&a=imagej-launcher&v=LATEST&e=exe&c=win32
and
http://maven.imagej.net/service/local/artifact/maven/redirect?r=snapshots&g=net.imagej&a=imagej-launcher&v=LATEST&e=exe&c=linux64

Both of the broken linux64 links (from your post and from the
readme file) give this 404 error:

404 - Not Found
Path /net/imagej/imagej-launcher/5.0.0-SNAPSHOT/imagej-launcher-5.0.0-20180119.054334-54-linux64.exe not found in local storage of repository “Snapshots” [id=snapshots]

(The broken win32 links give analogous 404 errors.)

(For what it’s worth, the readme links are http links, while the links
in your post are https links.)

Thanks, mm