Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.7k views
in Java FTP by
Platform: Intermec CK31 running Win CE .NET 4.2
JVM: Creme 3.27 (corresponds to 1.1.8)

Code:

FTPClient ftp = new FTPClient();

try
{
System.out.println("before setRemoteHost");
ftp.setRemoteHost("x.x.x.x");

System.out.println("before setConnectMode");
ftp.setConnectMode(FTPConnectMode.PASV);


System.out.println("before connect");
ftp.connect();

System.out.println("before login");
ftp.login("user","pass");

System.out.println("before setType");
ftp.setType(FTPTransferType.BINARY);

}
catch (Exception e)
{
System.out.println("Connection error " + e.toString());
}

IP address replaced with x's to protect our customer.

This code works on a laptop running a standard Sun 1.1.8 JVM, but on the CK31 I get this error:

java.io.UnsupportedEncodingException
at sun.io.ByteToCharConverter.getConverter()
at java.io.InputStreamReader.<init>()
at com.enterprisedt.net.ftp.FTPControlSocket.initStreams()
at com.enterprisedt.net.ftp.FTPControlSocket.<init>()
at com.enterprisedt.net.ftp.FTPControlSocket.<init>()
at com.enterprisedt.net.ftp.FTPClient.connect()

Through doing a search I saw that this error has been posted before and even saw the post about modifying some of the source files, but I don't feel that brave.

Have there been any other patches or work-arounds made available for this problem?

This library perfectly fits our requirements and we are in a bind and facing a customer deadline, so any ideas or suggestions would be greatly appreciated.

Thanks,
Adam

1 Answer

0 votes
by
I have some additional information (if it helps).

The sun.io libraries are contained in the following file in the Creme installation on the CK31:

\Windows\CrEme\lib\pvmclasses.zip

Looking through this file it DOES contain a ByteToCharConverter.class

Thanks,
Adam

Categories

...