title: How to use scala.collection.JavaConverters in intellij?
body: <p>I want to use java nio in scala,I try to convert this code to scala:</p>
  
  <pre><code>ServerSocketChannel ssChannel = ServerSocketChannel.open();
  int port = 9001;
  ssChannel.bind(new InetSocketAddress(port));
  Selector selector = Selector.open();
  
  ssChannel.configureBlocking(false);
  ssChannel.register(selector, SelectionKey.OP_ACCEPT); 
  
  while (true) {
  selector.select();
  Set&lt;SelectionKey&gt; keys = selector.selectedKeys();
  for (SelectionKey key : keys) {
    if (key.isAcceptable()) { 
      ServerSocketChannel ssc = (ServerSocketChannel) key
      .channel();
      SocketChannel sc = ssc.accept();
      sc.configureBlocking(false);
      sc.register(selector, SelectionKey.OP_READ); 
    }
    if(key.isReadable()){ 
      SocketChannel sc = (SocketChannel) key.channel();
      ByteBuffer buffer = ByteBuffer.allocate(1024);
      sc.read(buffer);
  
      buffer.flip();
      sc.write(buffer);
    }
  }
  keys.clear();
  }
  }
  </code></pre>
  
  <p>when I copy this code to intellij,intellij ask me if I want convert this code to scala,I agree.</p>
  
  <p>then intellij </p>
  
  <pre><code>import scala.collection.JavaConversions._,
  </code></pre>
  
  <p>and tell me a red error</p>
  
  <p>I use scala 2.12.7 in intellij,I check the scala api doc,JavaConversion has deprecated,so I </p>
  
  <pre><code>import scala.collection.JavaConverters._
  </code></pre>
  
  <p>but intellij tell me it's deprecated,let me use </p>
  
  <pre><code>scala.jdk.CollectionConverters
  </code></pre>
  
  <p>when I import this,there is still error in the line:</p>
  
  <pre><code>key.isAcceptable
  </code></pre>
  
  <p>so how to convert this code in intellij?Thanks!</p>
  
  <p>My intellij version is 2018.3.4 Community Edition</p>