imagej / imagej-launcher

The ImageJ native launcher
https://imagej.net/learn/launcher
BSD 2-Clause "Simplified" License
21 stars 23 forks source link

Parse command line options before java detection #39

Closed hinerm closed 8 years ago

hinerm commented 8 years ago

Currently the command line options are parsed AFTER java detection, which means that any debugging output during java detection is always skipped, even if setting the debug flag.

ctrueden commented 8 years ago

As a workaround, I added explicit early parsing of the DEBUG environment variable: 533cf8cb6526b6b1a6678e80b4fdc0dc90e58cbb.

So you can now write:

DEBUG=1 /Applications/Fiji.app/Contents/MacOS/ImageJ-macosx

And you'll see all the debugging output, including early output.

ctrueden commented 8 years ago

I think this workaround is good enough, since changing the order of CLI parsing might have all sorts of ramifications on backwards compatibility.

hinerm commented 8 years ago

:+1: