Package server

Source Code of server.HSQLDBStandAloneServer

/**
*     This file is part of eCommerceHSQLDBServer.
*
*    Foobar is free software; you can redistribute it and/or modify
*   it under the terms of the GNU General Public License as published by
*    the Free Software Foundation; either version 2 of the License, or
*    (at your option) any later version.
*
*    Foobar is distributed in the hope that it will be useful,
*    but WITHOUT ANY WARRANTY; without even the implied warranty of
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*    GNU General Public License for more details.
*
*    You should have received a copy of the GNU General Public License
*    along with Foobar; if not, write to the Free Software
*    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*
*    2007 Matej Hausenblas matej.hausenblas@gmail.com
*
*/
package server;

import java.io.File;
import java.io.PrintWriter;

import org.hsqldb.Server;


/**
*
*/
public class HSQLDBStandAloneServer{
 
 

  /**
   * @param args
   */
  public static void main(String[] args) {
   
    String dbName = "eCommerceDB";
   
    Server server = new Server();
    System.out.println("Starting the Database server");
    server.setDatabaseName(0, dbName);
    server.setDatabasePath(0, "file:data"+File.separatorChar+"ecommercedb;sql.enforce_strict_size=true");
        //0, "mem:eCommerceDB;sql.enforce_strict_size=true");
    server.setLogWriter(new PrintWriter(System.out));
    server.setErrWriter(new PrintWriter(System.err));
    server.start();
   
   

  }

}
TOP

Related Classes of server.HSQLDBStandAloneServer

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.