diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/TestJarsInJar/ClassInJar0.java | 17 | ||||
-rw-r--r-- | test/TestJarsInJar/ClassInJar1.java | 10 | ||||
-rw-r--r-- | test/TestJarsInJar/ClassInJar2.java | 10 | ||||
-rw-r--r-- | test/TestJarsInJar/MANIFEST.MF | 4 | ||||
-rw-r--r-- | test/TestJarsInJar/make.sh | 16 |
5 files changed, 57 insertions, 0 deletions
diff --git a/test/TestJarsInJar/ClassInJar0.java b/test/TestJarsInJar/ClassInJar0.java new file mode 100644 index 0000000..426f412 --- /dev/null +++ b/test/TestJarsInJar/ClassInJar0.java @@ -0,0 +1,17 @@ + +public class ClassInJar0 { + static { + System.err.println("ClassInJar0.init<>"); + } + + public static void ping() { + System.err.println("ClassInJar0.ping()"); + } + + public static void main(String args[]) { + System.err.println("ClassInJar0.main() start"); + // ClassInJar1.ping(); + // ClassInJar2.ping(); + System.err.println("ClassInJar0.main() end"); + } +} diff --git a/test/TestJarsInJar/ClassInJar1.java b/test/TestJarsInJar/ClassInJar1.java new file mode 100644 index 0000000..ff104c1 --- /dev/null +++ b/test/TestJarsInJar/ClassInJar1.java @@ -0,0 +1,10 @@ + +public class ClassInJar1 { + static { + System.err.println("ClassInJar1.init<>"); + } + + public static void ping() { + System.err.println("ClassInJar1.ping()"); + } +} diff --git a/test/TestJarsInJar/ClassInJar2.java b/test/TestJarsInJar/ClassInJar2.java new file mode 100644 index 0000000..2205533 --- /dev/null +++ b/test/TestJarsInJar/ClassInJar2.java @@ -0,0 +1,10 @@ + +public class ClassInJar2 { + static { + System.err.println("ClassInJar2.init<>"); + } + + public static void ping() { + System.err.println("ClassInJar2.ping()"); + } +} diff --git a/test/TestJarsInJar/MANIFEST.MF b/test/TestJarsInJar/MANIFEST.MF new file mode 100644 index 0000000..a592879 --- /dev/null +++ b/test/TestJarsInJar/MANIFEST.MF @@ -0,0 +1,4 @@ +Manifest-Version: 1.0
+Rsrc-Class-Path: ClassInJar1.jar sub/ClassInJar2.jar
+Main-Class: ClassInJar0
+
diff --git a/test/TestJarsInJar/make.sh b/test/TestJarsInJar/make.sh new file mode 100644 index 0000000..2860603 --- /dev/null +++ b/test/TestJarsInJar/make.sh @@ -0,0 +1,16 @@ +rm -rf classes +rm -rf TestJarsInJar.jar +mkdir classes +mkdir classes/sub + +javac -d classes *.java + +cd classes +jar cf ClassInJar1.jar ClassInJar1.class +jar cf sub/ClassInJar2.jar ClassInJar2.class +jar cmf ../MANIFEST.MF ../TestJarsInJar.jar ClassInJar0.class ClassInJar1.jar sub/ClassInJar2.jar +#jar cf ../TestJarsInJar.jar ClassInJar0.class ClassInJar1.jar sub/ClassInJar2.jar +cd .. +rm -rf classes + +jar tf TestJarsInJar.jar |