public static final void main ( String [ ] args ) { if ( args . length != 1 ) { System . err . println ( "A single argument -- a port -- is required" ) ; System . exit ( 1 ) ; } int port = Integer . valueOf ( args [ 0 ] ) . intValue ( ) ; System . out . println ( Version . VERSION ) ; try { new Server ( port ) ; } catch ( Exception e ) { System . err . println ( "Failed to start server" ) ; e . printStackTrace ( System . err ) ; } }
Gozirra is probably not the best choice for a stand - alone server . If you are tempted to use it as such you might want to look at ActiveMQ which is a feature - rich MOM solution . Gozirra is intended primarily to be an ultra - light embedded messaging library .