Zipping a folder in remote machine running app server through J2EE app
I am working on a zipper J2EE application. This application requires the following:

The application has to zip a folder in remote machine where app server is running so that other applications can directly download this zipped folder instead of downloading each file one by one.

I am able to do this in my local machine using absolute path don't know how to go ahead with remote machine.  
Code i'm using for zipping in local machine:  
File file = new File(myFolderPath);    
  int index = myFolderPath.lastIndexOf("/");  
  String folderName =myFolderPath.substring(index);  
  String folderPath = myFolderPath.substring(0, index);  
  File outFolder = new File(folderPath + folderName + ".zip");  
  if (!outFolder.exists()) {  
   zip(file, outFolder);  
  }

Here myFolderPath is a string. But how should i go ahead if it is a URL?
Thanks in advance.
Zipping a folder in remote machine running app server through J2EE app
===

I am working on a zipper J2EE application. This application requires the following:

The application has to zip a folder in remote machine where app server is running so that other applications can directly download this zipped folder instead of downloading each file one by one.

I am able to do this in my local machine using absolute path don't know how to go ahead with remote machine.  
Code i'm using for zipping in local machine:  
File file = new File(myFolderPath);    
  int index = myFolderPath.lastIndexOf("/");  
  String folderName =myFolderPath.substring(index);  
  String folderPath = myFolderPath.substring(0, index);  
  File outFolder = new File(folderPath + folderName + ".zip");  
  if (!outFolder.exists()) {  
   zip(file, outFolder);  
  }

Here myFolderPath is a string. But how should i go ahead if it is a URL?
Thanks in advance.