I don't know if I should post here or in
java forum so I posted in both.
Now, I want to use it in java using Runtime.exec(), but it is not actually unloading the tar file into the directory, yet it prints the names of the files on the console.
Here's my java code: Note:uploadFle is the tarfile.tar
public boolean unloadTarFle(
String uploadFle){
boolean status = false;
int ch;
String changeDir = "tar -xvf /export/audio/work/isa001/"+uploadFle;
try{
Process myProcess = Runtime.getRuntime().exec(changeDir);
// Process myProcess = Runtime.getRuntime().exec(commands);
InputStreamReader myIStreamReader = new InputStreamReader
(myProcess.getInputStream());
while ((ch = myIStreamReader.read()) != -1)
{
System.out.print((char)ch);
}
}
catch(IOException anIOException) {
System.out.println(anIOException);
}
log.debug("MauFileUpdate::unloadTarFle()::Ended");
return status;
}