JDK-4650689 : RFE: Java needs public API for FTP
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 1.4.0,1.4.2
  • Priority: P4
  • Status: Resolved
  • Resolution: Won't Fix
  • OS: windows_nt,windows_2000
  • CPU: x86,itanium
  • Submitted: 2002-03-11
  • Updated: 2017-05-19
  • Resolved: 2012-10-16
Related Reports
Duplicate :  
Relates :  

Name: rmT116609			Date: 03/11/2002

java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)


I request that Java include classes to support FTP in its public API. This support should include something similar to what is currently available in ORO NetComponents (http://www.savarese.org/). There is an obvious need for this functionality in the Java community, and we have been waiting for this for quite some time. If you don't believe me see bug id: 4049732, or do a search for "ftp" through all of the Sun Java forums, etc. and see what pops up. Now factor in that most people probably just go straight to sourceforge or NetComponents and never post anything on this site.

Personally our company has has a need for a FTP utils API to get lists of files on an FTP server and to move files, etc. via FTP. We've been using ORO NetComponents, but its design needs much improvement. If FTP and other mainstream internet protocols were part of Sun's (public) Java API, I would think that more developers would be interested it Java.

Please don't just close this "bug" like you did for bug id: 4049732. There should be some way for users to vote for it, so that Sun can see how important this is to our community. Also, we're looking for feedback as to what version of Java this functionality will be incorporated into.

Use ORO NetComponents or some other FTP utils, although none are as good as would be a public Sun Java API for FTP and other internet protocols besides just HTTP.
(Review ID: 144015) 

ftp is a legacy and insecure protocol. It's pointless adding an API for this now. It would be much better to consider including protocol handlers for secure protocols such as ftp.

EVALUATION Such an API is already present, to an extent, in the form of URL & URLConnection. One can do many FTP operations, like getting a file, listing files in a directory or puting a file, using the proper URL form. It would somewhat useful, albeit marginaly, to have a more flexible and specific API in the future, but this should be considered low priority. ###@###.### 2002-11-26

WORK AROUND The ftp protocol handler underlying URLConnection already has support for RFC 1738 so it's possible to encode the ftp commands in the URL as specified in the RFC. For example type=d indicates a directory listing. ###@###.### 2002-04-04