src/main/java/org/thehecklers/websocketclient/MainMessage.java
/**
     * @param args the command line arguments
     */
@param args the command line arguments
@param args the command line arguments
public static void main(String[] args) {
        try {
            MessageEndpoint endpoint = new MessageEndpoint();
            WebSocketContainer container = ContainerProvider.getWebSocketContainer();
            container.connectToServer(endpoint, new URI("ws://localhost:8080/WebSocketServer/messages"));
            endpoint.SendMessage("Testing!");
        } catch (DeploymentException | IOException | URISyntaxException ex) {
            Logger.getLogger(MainMessage.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
public static void main ( String [ ] args ) { try { MessageEndpoint endpoint = new MessageEndpoint ( ) ; WebSocketContainer container = ContainerProvider . getWebSocketContainer ( ) ; container . connectToServer ( endpoint , new URI ( "ws://localhost:8080/WebSocketServer/messages" ) ) ; endpoint . SendMessage ( "Testing!" ) ; } catch ( DeploymentException | IOException | URISyntaxException ex ) { Logger . getLogger ( MainMessage . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; } }
@param args the command line arguments
@param args the command line arguments