--- a/src/share/classes/sun/tools/jar/Main.java Tue Mar 10 09:04:32 2009 -0700
+++ b/src/share/classes/sun/tools/jar/Main.java Tue May 12 09:21:31 2009 -0400
@@ -845,6 +845,19 @@ class Main {
* Extracts specified entries from JAR file, via ZipFile.
*/
void extract(String fname, String files[]) throws IOException {
+ // Current working directory
+
+ cwd = System.getProperty("user.dir");
+ if (cwd == null) {
+ fatalError(getMsg("error.no.cwd"));
+ }
+ cwd = (new File(cwd)).getCanonicalPath();
+ if (!cwd.endsWith(File.separator)) {
+ cwd += File.separator;
+ }
+
+ // Extract the files
+
ZipFile zf = new ZipFile(fname);
Set<ZipEntry> dirs = newDirSet();
Enumeration<? extends ZipEntry> zes = zf.entries();