sinchan banerje

Greenhorn
+ Follow
since Dec 14, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by sinchan banerje

Please find the below code:

import org.apache.commons.net.ftp.FTPClient;
import java.io.IOException;
import java.io.FileOutputStream;
import java.net.SocketException;
public class ftpTest {
public static void main(String[] args) throws SocketException, IOException {
FTPClient client = new FTPClient();
FileOutputStream fos = null;
fos = new FileOutputStream("D:/myfile.pdf");
String hostfilename = "/home/injm1/XLMP";
client.connect("nmfinccmdev", 22);
client.login("xxx", "xxx");
client.retrieveFile(hostfilename, fos);
fos.close();
client.disconnect();
}
}

But soon after connect i get an following exception

Exception in thread "main" org.apache.commons.net.MalformedServerReplyException: Could not parse response code.
Server Reply: SSH-1.99-OpenSSH_5.0
at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:270)
at org.apache.commons.net.ftp.FTP._connectAction_(FTP.java:321)
at org.apache.commons.net.ftp.FTPClient._connectAction_(FTPClient.java:522)
at org.apache.commons.net.SocketClient.connect(SocketClient.java:162)
at ftpTest.main(ftpTest.java:12)


13 years ago
yes. In my environment this code is working properly while the server is linux and client is windows.

ut it is causing some problem in other environment. Is there a chance that such a thing can happen due to some environment specific problem. If yes, what they may be?
13 years ago
13 years ago
I will suggest you the version 6.0 exam.( not the upgrade one but the general ocjp exam).
SCJP/OCJP is a life time certificaion. It is valid for your whole life. However, you can apply for upgrade exam i.e. suppose you had done a SCJP in version 5 you can write an upgrade exam for version 6.

And yes OCJP version 6 is the latest since JDK version 7 is not yet officially released. It is in its beta phase now.
Hi,

From the code that you have written it is clear you need to add values to a Map if the keyLength is equal to AccountOpeningConstants.TWO_CHAR_LEN and return a sorted Map of the key value pairs.

I dont think there is a problem with your sortByComparator() method bcause it is outside the while loop . However, the code of while seems an overhead.

the code could be:
13 years ago

Here a is HashMap1 and b is HashMap2 , the elements displaced are keys of common values depending upon the input given...
13 years ago