I wanted to zip a file on my local system, then I have to upload the file on server and finally i have to unzip the file on server. I have written code to zip the file on my local system and upload the file through FTP on server and it was working. Now i wanted to unzip the file on a remote unix server and if there is some exception while unzipping the file, i wanted to say to the client system. I know how to unzip a file on my local system but i do not know how to implement on server side from client machine.
Can any one please tell me how to unzip the file on a remote unix server using java from client system. Is there any API available to unzip a file on server side from client system.?
Please help me on this
Thanks in advance [ July 01, 2008: Message edited by: Jobin Babu ]
Java cannot magically unzip a file on a remote system, to which it does not have direct filesystem access. And I presume you do not have such access, or you would not have used FTP to upload the file.
Unix machines have various facilities for allowing remote systems to execute commands. For instance, "rsh". However, these are often disabled, due to the security risk.
Alternatively, if you can install software on the remote Unix system, you could install a Java program whose job is to do unzipping. You could send requests to it via a TCP socket (possibly via higher-level protocol like RMI, CORBA, Web service...).
If there's no built-in and enabled remote-execution service on the Unix machine, and you can't install your own on it, you're stuck.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Can we able connect the unix server through telnet using java and unzip the file on the server. Unzipping a file works on unix server using unzip command. Can you please tell me how to make a connection through telnet using java and execute a command through telnet?