Shell

Interactive command line tool to access a database using JDBC.

Methods
static void main(String[] args)
The command line interface for this tool.
void run(String[] args)
Run the shell tool with the given command line settings.
void setStreams(InputStream in, PrintStream out, PrintStream err)
Redirects the input and output.

static void main(String[] args) throws SQLException

The command line interface for this tool. The options must be split into strings like this: "-user", "sa",... Options are case sensitive. The following options are supported:
  • -help or -? (print the list of options)
  • -url jdbc:h2:... (database URL)
  • -user username
  • -password password
  • -driver driver the JDBC driver class name (not required for most databases)


Parameters:
args - the command line arguments
Throws:
SQLException

void run(String[] args) throws SQLException

Run the shell tool with the given command line settings.

Parameters:
args - the command line settings

void setStreams(InputStream in, PrintStream out, PrintStream err)

Redirects the input and output. By default, System.in, out and err are used.

Parameters:
in - the input stream to use
out - the output stream to use
err - the output error stream to use