| 815 | } |
| 816 | |
| 817 | @AstroImageJ(reason = "Run AIJ startup; Load on EventQueue", modified = true) |
| 818 | public static void main(String args[]) { |
| 819 | if (!IJ.isMacOSX()) { |
| 820 | try { |
| 821 | main0(args); |
| 822 | } catch (Exception e) { |
| 823 | e.printStackTrace(); |
| 824 | throw new RuntimeException(e); |
| 825 | } |
| 826 | return; |
| 827 | } |
| 828 | try { |
| 829 | SwingUtilities.invokeAndWait(() -> { |
| 830 | main0(args); |
| 831 | }); |
| 832 | } catch (InterruptedException | InvocationTargetException e) { |
| 833 | e.printStackTrace(); |
| 834 | throw new RuntimeException(e); |
| 835 | } |
| 836 | } |
| 837 | |
| 838 | @AstroImageJ(reason = "Copy main method out to allow threading; Allow inputing a folder to open", modified = false) |
| 839 | private static void main0(String... args) { |