net.imagej.launcher
Class ClassLauncher

java.lang.Object
  extended by net.imagej.launcher.ClassLauncher
Direct Known Subclasses:
ClassLauncher

public class ClassLauncher
extends Object

This class is the central entry point into Java from the ImageJ launcher.

Except for ImageJ 1.x, for backwards-compatibility, the ImageJ launcher calls all Java main classes through this class, to be able to generate appropriate class paths using the platform-independent convenience provided by Java's class library.

Author:
Johannes Schindelin

Field Summary
protected static boolean debug
           
protected static String[] originalArguments
           
 
Constructor Summary
ClassLauncher()
           
 
Method Summary
protected static void launch(ClassLoader classLoader, String className, String[] arguments)
           
static void main(String[] arguments)
          Patch ij.jar and launch the class given as first argument passing on the remaining arguments
protected static void patchIJ1(ClassLoader classLoader)
           
protected static String[] prepend(String[] array, String... before)
           
static void restart()
           
protected static void run(String[] arguments)
           
protected static String[] slice(String[] array, int from)
           
protected static String[] slice(String[] array, int from, int to)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

protected static boolean debug

originalArguments

protected static String[] originalArguments
Constructor Detail

ClassLauncher

public ClassLauncher()
Method Detail

main

public static void main(String[] arguments)
Patch ij.jar and launch the class given as first argument passing on the remaining arguments

Parameters:
arguments - A list containing the name of the class whose main() method is to be called with the remaining arguments.

restart

public static void restart()

run

protected static void run(String[] arguments)

patchIJ1

protected static void patchIJ1(ClassLoader classLoader)
                        throws ClassNotFoundException,
                               IllegalAccessException,
                               InstantiationException
Throws:
ClassNotFoundException
IllegalAccessException
InstantiationException

slice

protected static String[] slice(String[] array,
                                int from)

slice

protected static String[] slice(String[] array,
                                int from,
                                int to)

prepend

protected static String[] prepend(String[] array,
                                  String... before)

launch

protected static void launch(ClassLoader classLoader,
                             String className,
                             String[] arguments)


Copyright © 2009–2016 ImageJ. All rights reserved.