FTP connection to a remote server with JAVA
<p>I trie to connect to a remote server with the FTP from Apache commons library. But i can't connect to this server..i got the exception:</p>

<blockquote>
  <p>java.net.ConnectException: Connection timed out: connect
      at java.net.DualStackPlainSocketImpl.connect0(Native Method)
      at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
      at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
      at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
      at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
      at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
      at java.net.Socket.connect(Socket.java:589)
      at org.apache.commons.net.SocketClient.connect(SocketClient.java:188)
      at org.apache.commons.net.SocketClient.connect(SocketClient.java:209)
      at de.download.Info4c.start(Info4c.java:95)
      at de.download.Info4c.main(Info4c.java:67)</p>
</blockquote>

<p>This is my code:</p>

<pre><code>FTPSClient client = new FTPSClient(false);
    client.connect("&lt;IP&gt;",990);     
    int reply =  client.getReplyCode();
    if (FTPReply.isPositiveCompletion(reply)) {
        if(client.login(user, pass)){
            // Set protection buffer size
            client.execPBSZ(0);
            // Set data channel protection to private
            client.execPROT("P");
            // Enter local passive mode
            client.enterLocalPassiveMode();
        }
    }
</code></pre>