public static Server startTcpServerMode ( String port , boolean doSSL , String tcpPassword , boolean ifExists , String baseDir ) throws SQLException { List < String > params = new ArrayList <> ( ) ; params . add ( "-tcpAllowOthers" ) ; params . add ( "-tcpPort" ) ; if ( port == null ) { port = "9123" ; } params . add ( port ) ; if ( doSSL ) { params . add ( "-tcpSSL" ) ; } if ( tcpPassword != null ) { params . add ( "-tcpPassword" ) ; params . add ( tcpPassword ) ; } if ( ifExists ) { params . add ( "-ifExists" ) ; } if ( baseDir != null ) { params . add ( "-baseDir" ) ; params . add ( baseDir ) ; } Server server = Server . createTcpServer ( params . toArray ( new String [ 0 ] ) ) . start ( ) ; return server ; }
Start the server mode .