Jvm.cfg on mac osx

I have a question about this jvm.cfg capability. I saw this on a page


on the Fiji site, but have not been able to verify that it actually works. I was going to turn down the log level to “WARN” for example, just to see how well it worked. I also tried to establish a debug port, but could not see that happening, either.

Of these two, I would really like to be able to debug the running plugin within Fiji. Could anyone tell me how to get this capability working inside Mac OS X? Or, if jvm.cfg is not going to work, any other way to get java command line parameters into Fiji?

Here is what I tried to do. Note where the jvm.cfg is situated.

$ ls -1 /Applications/Fiji.app/Contents/MacOS
ImageJ-macosx
ImageJ-macosx.old
ImageJ-tiger
jvm.cfg

Thanks

You can pass parameters to the Java virtual machine as follows:

Fiji.app/Contents/MacOS/ImageJ-macosx -Xmx1g -Dmy.prop.key=value --

This works because the -- acts as a separator between JVM arguments and ImageJ arguments (i.e., arguments passed to the Java main program).

The information about jvm.cfg is rather old. While the code to parse that file is still technically present in the launcher, it looks as though:

  1. Naming the file ImageJ.cfg is now preferred; and:
  2. The code to read the config file is not run on OS X.

So as things stand, you cannot use jvm.cfg on OS X—only on Windows and Linux.

We are planning to retire the ImageJ launcher within the next few months, at which point the jvm.cfg capabilities will totally disappear regardless of platform. So I would not use this method.

Use -Dscijava.log.level=warn. See the Logging page.

Use --debugger=8000. See the Debugging page.

1 Like

Thanks. It’s all good. I tried most of this last Friday, and it all worked.

1 Like