title: How to connect to specific folder using Java Sockets?
body: <p>I am writing a simple app in Java using JFrame GUI. In GUI I have 2 fields (for ip and the folder) and 1 spinner for port number I want to connect to. I can connect to my server <a href="http://147.230.75.240:8080/" rel="nofollow">http://147.230.75.240:8080/</a>. But that path is completely empty and I need to go deeper to <a href="http://147.230.75.240:8080/sti" rel="nofollow">http://147.230.75.240:8080/sti</a>. But I don't know how to achieve that. As I said there are no folders in the default connection. How can I connect specifically to this part?
  You can see my code below:</p>
  
  <pre><code>private void connectButtonActionPerformed(java.awt.event.ActionEvent evt) {                                              
          Socket socket = null;
          String ip;
          int port;
          String folder;
  
          ip = ipField.getText();
          port = (int) portField.getValue();
          folder = folderField.getText();
  
          try {
              File[] files = new File(folder).listFiles();
              System.out.println(files);
              socket = new Socket(InetAddress.getByName(ip), port);
              connectionStatus.setText("Connected");
  
  
          } catch (IOException ex) {
              Logger.getLogger(ConnectForm.class.getName()).log(Level.SEVERE, null, ex);
          }
      }       
  </code></pre>
  
  <p>files in this case return null.</p>