Testing java code sample
Hello, i'm new in this comunitty and working on WebSockets but i've got some experience working on java, so i wanted totest the java sample code to develop my own app, but when i run the code i get the following error:
Exception in thread "main" java.lang.RuntimeException: Could not find an implementation class.
at javax.websocket.ContainerProvider.getWebSocketContainer(ContainerProvider.java:73)
at main.WSClient.main(WSClient.java:25)
what am i doing wrong?
thank you
Comments
Hi there,
I'm using a ClientManager myself (since that allows me to set a ReconnectHandler). Quick example:
I'm using Tyrus as websocket client/server, so the pom-file will look like this:
The similar problem here. I try to use your code snippet but there is another error message "App id is mandatory to access our api. Please register your application."
I make an API Token and added it to the request
Session session = clientManager.connectToServer(webSocketClient, URI.create("wss://ws.binaryws.com/websockets/v3?app_id=2ay9VE55........"));
But still not work. Need some help to esatblished a stable web connection with java.
Thank you
@Frika you need to register app to access our api. Please check this https://binary.vanillacommunity.com/discussion/281/apps-without-app-id-are-blocked-now#latest