org.h2.tools
Class Console

java.lang.Object
  extended by org.h2.util.Tool
      extended by org.h2.tools.Console
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.MouseListener, java.awt.event.WindowListener, java.util.EventListener, ShutdownHandler

public class Console
extends Tool
implements java.awt.event.ActionListener, java.awt.event.MouseListener, java.awt.event.WindowListener, ShutdownHandler

Starts the H2 Console (web-) server, as well as the TCP and PG server.

H2.resource:

Field Summary
 
Fields inherited from class org.h2.util.Tool
out
 
Constructor Summary
Console()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          INTERNAL
static void main(java.lang.String... args)
          When running without options, -tcp, -web, -browser and -pg are started.
 void mouseClicked(java.awt.event.MouseEvent e)
          INTERNAL
 void mouseEntered(java.awt.event.MouseEvent e)
          INTERNAL
 void mouseExited(java.awt.event.MouseEvent e)
          INTERNAL
 void mousePressed(java.awt.event.MouseEvent e)
          INTERNAL
 void mouseReleased(java.awt.event.MouseEvent e)
          INTERNAL
 void runTool(java.lang.String... args)
          This tool starts the H2 Console (web-) server, as well as the TCP and PG server.
 void shutdown()
          INTERNAL
 void windowActivated(java.awt.event.WindowEvent e)
          INTERNAL
 void windowClosed(java.awt.event.WindowEvent e)
          INTERNAL
 void windowClosing(java.awt.event.WindowEvent e)
          INTERNAL
 void windowDeactivated(java.awt.event.WindowEvent e)
          INTERNAL
 void windowDeiconified(java.awt.event.WindowEvent e)
          INTERNAL
 void windowIconified(java.awt.event.WindowEvent e)
          INTERNAL
 void windowOpened(java.awt.event.WindowEvent e)
          INTERNAL
 
Methods inherited from class org.h2.util.Tool
printNoDatabaseFilesFound, setOut, showUsage, throwUnsupportedOption
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Console

public Console()
Method Detail

main

public static void main(java.lang.String... args)
                 throws java.sql.SQLException
When running without options, -tcp, -web, -browser and -pg are started.
Options are case sensitive. Supported options are:
[-help] or [-?] Print the list of options
[-web] Start the web server with the H2 Console
[-tool] Start the icon or window that allows to start a browser
[-browser] Start a browser connecting to the web server
[-tcp] Start the TCP server
[-pg] Start the PG server
For each Server, additional options are available; for details, see the Server tool.
If a service can not be started, the program terminates with an exit code of 1.

Parameters:
args - the command line arguments
Throws:
java.sql.SQLException
H2.resource:

runTool

public void runTool(java.lang.String... args)
             throws java.sql.SQLException
This tool starts the H2 Console (web-) server, as well as the TCP and PG server. For JDK 1.6, a system tray icon is created, for platforms that support it. Otherwise, a small window opens.

Specified by:
runTool in class Tool
Parameters:
args - the command line arguments
Throws:
java.sql.SQLException

shutdown

public void shutdown()
INTERNAL

Specified by:
shutdown in interface ShutdownHandler

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
INTERNAL

Specified by:
actionPerformed in interface java.awt.event.ActionListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
INTERNAL

Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
INTERNAL

Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
INTERNAL

Specified by:
mouseExited in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
INTERNAL

Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
INTERNAL

Specified by:
mouseReleased in interface java.awt.event.MouseListener

windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
INTERNAL

Specified by:
windowClosing in interface java.awt.event.WindowListener

windowActivated

public void windowActivated(java.awt.event.WindowEvent e)
INTERNAL

Specified by:
windowActivated in interface java.awt.event.WindowListener

windowClosed

public void windowClosed(java.awt.event.WindowEvent e)
INTERNAL

Specified by:
windowClosed in interface java.awt.event.WindowListener

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent e)
INTERNAL

Specified by:
windowDeactivated in interface java.awt.event.WindowListener

windowDeiconified

public void windowDeiconified(java.awt.event.WindowEvent e)
INTERNAL

Specified by:
windowDeiconified in interface java.awt.event.WindowListener

windowIconified

public void windowIconified(java.awt.event.WindowEvent e)
INTERNAL

Specified by:
windowIconified in interface java.awt.event.WindowListener

windowOpened

public void windowOpened(java.awt.event.WindowEvent e)
INTERNAL

Specified by:
windowOpened in interface java.awt.event.WindowListener