title: "import javax.websocket.*;" showing error on android studio
body: <p>I'm trying to get some data from a trading platform (<a href="https://www.binary.com" rel="nofollow noreferrer">https://www.binary.com</a>). The code samples for getting data from them is provided at the developers' site (<a href="https://developers.binary.com/demos/" rel="nofollow noreferrer">https://developers.binary.com/demos/</a>).  </p>
  
  <p>Since I was using android studio, I opted for java, copied the code, created a new class, and pasted the code there.  </p>
  
  <p>Here's my code:  </p>
  
  <pre><code>package com.example.smijes.myapplication;  
  import java.net.URI;  
  import java.io.IOException;  
  import java.lang.InterruptedException;  
  import javax.websocket.*;
  
  @ClientEndpoint  
  public class WSClient  {
  
      @OnOpen
      public void onOpen(Session session) throws java.io.IOException {
          session.getBasicRemote().sendText("{\"ticks\": \"R_100\"}");
      }
  
      @OnMessage
      public void onMessage(String message) {
          System.out.println("ticks update: " + message);
      }
  
      public static void main(String[] args)
              throws IOException, DeploymentException, InterruptedException {
          WebSocketContainer container = ContainerProvider.getWebSocketContainer();
          URI apiUri = URI.create("wss://ws.binaryws.com/websockets/v3?app_id=1089");
          Session session = container.connectToServer(WSClient.class, apiUri);
          Thread.sleep(10000);
      }
  }
  </code></pre>
  
  <p>I noticed some errors, did some research then added a dependency to my app level build.gradle file:</p>
  
  <pre><code>implementation "org.java-websocket:Java-WebSocket:1.3.8
  </code></pre>
  
  <p>After synchronizing gradle, I noticed the error persisted.  </p>
  
  <p>Here is a screenshot to show the errors:</p>
  
  <p><a href="https://i.stack.imgur.com/XOXZe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XOXZe.png" alt="javax-websocket-error"></a></p>
  
  <p>I think the entire problem is from the <code>import javax.websocket.*;</code> line of code. I also think the dependency I added doesn't correspond. Can the dependency I added be for <code>java.websocket</code> rather than <code>javax.websocket</code>?  </p>
  
  <p>I'm using Android Studio 3.1.3.</p>