7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 4408526 6854795
27 * @summary Index the non-meta files in META-INF, such as META-INF/services.
28 */
29
30 import java.io.*;
31 import java.util.Arrays;
32 import java.util.jar.*;
33 import sun.tools.jar.Main;
34 import java.util.zip.ZipFile;
35
36 public class MetaInf {
37
38 static String jarName = "a.jar";
39 static String INDEX = "META-INF/INDEX.LIST";
40 static String SERVICES = "META-INF/services";
41 static String contents =
42 System.getProperty("test.src") + File.separatorChar + "jarcontents";
43
44 static void run(String ... args) {
45 if (! new Main(System.out, System.err, "jar").run(args))
46 throw new Error("jar failed: args=" + Arrays.toString(args));
|
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 4408526 6854795
27 * @modules jdk.jartool/sun.tools.jar
28 * @summary Index the non-meta files in META-INF, such as META-INF/services.
29 */
30
31 import java.io.*;
32 import java.util.Arrays;
33 import java.util.jar.*;
34 import sun.tools.jar.Main;
35 import java.util.zip.ZipFile;
36
37 public class MetaInf {
38
39 static String jarName = "a.jar";
40 static String INDEX = "META-INF/INDEX.LIST";
41 static String SERVICES = "META-INF/services";
42 static String contents =
43 System.getProperty("test.src") + File.separatorChar + "jarcontents";
44
45 static void run(String ... args) {
46 if (! new Main(System.out, System.err, "jar").run(args))
47 throw new Error("jar failed: args=" + Arrays.toString(args));
|