FTPClient Uploading File = SocketException: Connection reset
问题 I'm trying to upload a simple txt file via FTP using XAMPP and FileZilla. I'm using the Apache Commons Net 3.0.1 Library. This is my code, very basic things: FTPClient client = new FTPClient(); InputStream in = new ByteArrayInputStream("IT WORKS! :D".getBytes()); try { client.connect("localhost"); client.login("user", "password"); client.enterLocalPassiveMode(); client.storeFile("textfile.txt", in); } finally { try { in.close(); client.logout(); client.disconnect(); } catch (Exception e) { }