Package org.jruby

Class Main

java.lang.Object
org.jruby.Main
Direct Known Subclasses:
PrebootMain

public class Main extends Object
Class used to launch the interpreter. This is the main class as defined in the jruby.mf manifest. It is very basic and does not support yet the same array of switches as the C interpreter. Usage: java -jar jruby.jar [switches] [rubyfile.rb] [arguments] -e 'command' one line of script. Several -e's allowed. Omit [programfile]
Author:
jpetersen
  • Constructor Details Link icon

  • Method Details Link icon

    • processDotfile Link icon

      public static void processDotfile()
    • main Link icon

      public static void main(String[] args)
      This is the command-line entry point for JRuby, and should ONLY be used by Java when starting up JRuby from a command-line. Use other mechanisms when embedding JRuby into another application.
      Parameters:
      args - command-line args, provided by the JVM.
    • run Link icon

      public Main.Status run(String[] args)
    • run Link icon

      @Deprecated public Main.Status run()
      Deprecated.
    • handleRaiseException Link icon

      protected static int handleRaiseException(RaiseException ex)
      This is only used from the main(String[]) path, in which case the err for this run should be System.err. In order to avoid the Ruby err being closed and unable to write, we use System.err unconditionally.
      Parameters:
      ex -
      Returns: