Class Main

java.lang.Object
org.metricshub.jawk.Main

public final class Main extends Object
Entry point into the parsing, analysis, and execution/compilation of a Jawk script. This entry point is used when Jawk is executed as a stand-alone application. If you want to use Jawk as a library, please use .
Author:
Danny Daglas
  • Method Details

    • create

      public static Main create(String[] args, InputStream is, PrintStream os, PrintStream es) throws Exception
      Factory method to support the JSR 223 scripting interface already provided by Java SE 6.
      Parameters:
      args - String arguments from the command-line.
      is - The input stream to use as stdin.
      os - The output stream to use as stdout.
      es - The output stream to use as stderr.
      Returns:
      a new Main instance that executed the specified script
      Throws:
      Exception - enables exceptions to propagate to the callee.
    • main

      public static void main(String[] args)
      The entry point to Jawk for the VM.

      The main method is a simple call to the invoke method. The current implementation is basically as follows:

       System.exit(invoke(args));
       
      Parameters:
      args - Command line arguments to the VM.