Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

File download from Unix server with password  RSS feed

Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am having some problem to get file from URL (of a unix server) with password.
I keep on getting this error: "FileNotFoundException"
However, if I enter the url in the Internet Explorer,
I am able to access the file.

My code is as follow:

BufferedInputStream input = null;
BufferedOutputStream output = null;

try {

String address = "ftp://username";
URL url = new URL(address);
URLConnection conn = url.openConnection();

//I got the ERROR at this code below
input = new BufferedInputStream(conn.getInputStream());


What could be the possible problem?
Thanks in advance for your advise.

Best regards
[ September 10, 2007: Message edited by: harry flower ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!