Calling jar -xvf

Hi - I am trying to unjar a jar file by calling the jar command "jar -xvf". My code is calling the jar command but is not unjaring the jar file. This is my code:

try{

Runtime r = Runtime.getRuntime();

Process p = r.exec("jar -xvf " + jardirectory + jarfile);

}catch(Exception e){System.out.println(e);}

Why is it not unjarring the Jar file? The only way I got it to unjar by calling a batch file that calls the jar command. I really want to unjar the file through Java, and not through a batch file. Thank you.

Seigot

[567 byte] By [seigot] at [2007-9-26 4:19:34]
# 1
see documentation for java.util.jar.* , esp. java.util.jar.JarFile
iulian_musat at 2007-6-29 17:22:15 > top of Java-index,Desktop,Runtime Environment...