equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
39 * {@code vm/runtime/defmeth/shared/retransform.mf} and classes from |
39 * {@code vm/runtime/defmeth/shared/retransform.mf} and classes from |
40 * {@code vm.runtime.defmeth.shared} package. |
40 * {@code vm.runtime.defmeth.shared} package. |
41 */ |
41 */ |
42 public class BuildJar { |
42 public class BuildJar { |
43 public static void main(String[] args) { |
43 public static void main(String[] args) { |
44 Path manifest = testRoot().resolve("vmTestbase") |
44 Path manifest = Paths.get(Utils.TEST_ROOT) |
45 .resolve("vm") |
45 .resolve("vmTestbase") |
46 .resolve("runtime") |
46 .resolve("vm") |
47 .resolve("defmeth") |
47 .resolve("runtime") |
48 .resolve("shared") |
48 .resolve("defmeth") |
49 .resolve("retransform.mf") |
49 .resolve("shared") |
50 .toAbsolutePath(); |
50 .resolve("retransform.mf") |
|
51 .toAbsolutePath(); |
51 if (Files.notExists(manifest)) { |
52 if (Files.notExists(manifest)) { |
52 throw new Error("can't find manifest file: " + manifest); |
53 throw new Error("can't find manifest file: " + manifest); |
53 } |
54 } |
54 |
55 |
55 Path file = foundInClassPath(Util.Transformer.class).toAbsolutePath(); |
56 Path file = foundInClassPath(Util.Transformer.class).toAbsolutePath(); |
88 return result; |
89 return result; |
89 } |
90 } |
90 } |
91 } |
91 throw new Error("can't find " + file + " in " + Utils.TEST_CLASS_PATH); |
92 throw new Error("can't find " + file + " in " + Utils.TEST_CLASS_PATH); |
92 } |
93 } |
93 |
|
94 private static Path testRoot() { |
|
95 Path p = Paths.get(Utils.TEST_SRC); |
|
96 while (!Files.exists(p.resolve("TEST.ROOT"))) { |
|
97 p = p.getParent(); |
|
98 } |
|
99 return p; |
|
100 } |
|
101 } |
94 } |
102 |
95 |