< prev index next >
jdk/src/jdk.jline/share/classes/jdk/internal/jline/console/internal/ConsoleRunner.java
Print this page
*** 4,20 ****
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
* http://www.opensource.org/licenses/bsd-license.php
*/
! package jline.console.internal;
! import jline.console.ConsoleReader;
! import jline.console.completer.ArgumentCompleter;
! import jline.console.completer.Completer;
! import jline.console.history.FileHistory;
! import jline.internal.Configuration;
import java.io.File;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
--- 4,20 ----
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
* http://www.opensource.org/licenses/bsd-license.php
*/
! package jdk.internal.jline.console.internal;
! import jdk.internal.jline.console.ConsoleReader;
! import jdk.internal.jline.console.completer.ArgumentCompleter;
! import jdk.internal.jline.console.completer.Completer;
! import jdk.internal.jline.console.history.FileHistory;
! import jdk.internal.jline.internal.Configuration;
import java.io.File;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
*** 35,45 ****
public static final String property = "jline.history";
// FIXME: This is really ugly... re-write this
public static void main(final String[] args) throws Exception {
! List<String> argList = new ArrayList(Arrays.asList(args));
if (argList.size() == 0) {
usage();
return;
}
--- 35,45 ----
public static final String property = "jline.history";
// FIXME: This is really ugly... re-write this
public static void main(final String[] args) throws Exception {
! List<String> argList = new ArrayList<String>(Arrays.asList(args));
if (argList.size() == 0) {
usage();
return;
}
*** 70,81 ****
}
ConsoleReaderInputStream.setIn(reader);
try {
! Class type = Class.forName(mainClass);
! Method method = type.getMethod("main", new Class[]{String[].class});
method.invoke(null);
}
finally {
// just in case this main method is called from another program
ConsoleReaderInputStream.restoreIn();
--- 70,81 ----
}
ConsoleReaderInputStream.setIn(reader);
try {
! Class<?> type = Class.forName(mainClass);
! Method method = type.getMethod("main", String[].class);
method.invoke(null);
}
finally {
// just in case this main method is called from another program
ConsoleReaderInputStream.restoreIn();
< prev index next >