• Post Reply Bookmark Topic Watch Topic
  • New Topic

sun net ftp FtpInputStream.class missing in j2sdk1.4.0_01 rt.jar  RSS feed

 
tien liu
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can someone give me some pointers on the problem below?
1. The following code ran fine when I used jdk1.3.0_02 because the sun/net/ftp/FtpInputStream.class is in the rt.jar of jdk1.3.0_02:
FtpInputStream is =(FtpInputStream) ftp.get(sourceFile);
FileOutputStream os = new FileOutputStream (file_out);
while((c= is.read(bytes))!=-1) {
total_bytes +=c;
os.write(bytes,0,c);
}
2. When I switched to j2sdk1.4.0_02, the code failed because the sun/net/ftp/FtpInputStream.class has been removed from the rt.jar of j2sdk1.4.0_02.
Any ideas on how to fix that?
Thanks in advance.
 
Juanjo Bazan
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From SUN website:
The sun.* packages are not part of the supported, public interface.
A Java program that directly calls into sun.* packages is not guaranteed to work on all Java-compatible platforms. In fact, such a program is not guaranteed to work even in future versions on the same platform.

You should read this: Why Developers Should Not Write Programs That Call 'sun' Packages
HTH
[ April 17, 2003: Message edited by: Juanjo Bazan ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!