< prev index next >

## src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Main.java

Print this page

      43 import java.util.function.Function;
      44 import jdk.internal.jline.console.completer.Completer;
      45 import jdk.internal.jline.console.UserInterruptException;
      46 import jdk.nashorn.api.scripting.NashornException;
      47 import jdk.nashorn.internal.objects.Global;
      48 import jdk.nashorn.internal.objects.NativeJava;
      49 import jdk.nashorn.internal.runtime.Context;
      50 import jdk.nashorn.internal.runtime.NativeJavaPackage;
      51 import jdk.nashorn.internal.runtime.Property;
      52 import jdk.nashorn.internal.runtime.ScriptEnvironment;
      53 import jdk.nashorn.internal.runtime.ScriptFunction;
      54 import jdk.nashorn.internal.runtime.ScriptingFunctions;
      55 import jdk.nashorn.internal.runtime.ScriptObject;
      56 import jdk.nashorn.internal.runtime.ScriptRuntime;
      57 import jdk.nashorn.internal.runtime.Source;
      58 import jdk.nashorn.tools.Shell;
      59
      60 /**
      61  * Interactive command line Shell for Nashorn.
      62  */

      63 public final class Main extends Shell {
      64     private Main() {}
      65
      66     private static final String DOC_PROPERTY_NAME = "__doc__";
      67
      68     static final boolean DEBUG = Boolean.getBoolean("nashorn.jjs.debug");
      69
      70     // file where history is persisted.
      71     private static final File HIST_FILE = new File(new File(System.getProperty("user.home")), ".jjs.history");
      72
      73     /**
      74      * Main entry point with the default input, output and error streams.
      75      *
      76      * @param args The command line arguments
      77      */
      78     public static void main(final String[] args) {
      79         try {
      80             final int exitCode = main(System.in, System.out, System.err, args);
      81             if (exitCode != SUCCESS) {
      82                 System.exit(exitCode);
      43 import java.util.function.Function;
      44 import jdk.internal.jline.console.completer.Completer;
      45 import jdk.internal.jline.console.UserInterruptException;
      46 import jdk.nashorn.api.scripting.NashornException;
      47 import jdk.nashorn.internal.objects.Global;
      48 import jdk.nashorn.internal.objects.NativeJava;
      49 import jdk.nashorn.internal.runtime.Context;
      50 import jdk.nashorn.internal.runtime.NativeJavaPackage;
      51 import jdk.nashorn.internal.runtime.Property;
      52 import jdk.nashorn.internal.runtime.ScriptEnvironment;
      53 import jdk.nashorn.internal.runtime.ScriptFunction;
      54 import jdk.nashorn.internal.runtime.ScriptingFunctions;
      55 import jdk.nashorn.internal.runtime.ScriptObject;
      56 import jdk.nashorn.internal.runtime.ScriptRuntime;
      57 import jdk.nashorn.internal.runtime.Source;
      58 import jdk.nashorn.tools.Shell;
      59
      60 /**
      61  * Interactive command line Shell for Nashorn.
      62  */
      63 @Deprecated(since="11", forRemoval=true)
      64 public final class Main extends Shell {
      65     private Main() {}
      66
      67     private static final String DOC_PROPERTY_NAME = "__doc__";
      68
      69     static final boolean DEBUG = Boolean.getBoolean("nashorn.jjs.debug");
      70
      71     // file where history is persisted.
      72     private static final File HIST_FILE = new File(new File(System.getProperty("user.home")), ".jjs.history");
      73
      74     /**
      75      * Main entry point with the default input, output and error streams.
      76      *
      77      * @param args The command line arguments
      78      */
      79     public static void main(final String[] args) {
      80         try {
      81             final int exitCode = main(System.in, System.out, System.err, args);
      82             if (exitCode != SUCCESS) {
      83                 System.exit(exitCode);

< prev index next >