From b109f4d62b99a1fe76af53c1489ec0ddc66a8b42 Mon Sep 17 00:00:00 2001
From: Christoph Hellwig <hch@cloudius-systems.com>
Date: Thu, 24 Jan 2013 11:39:01 +0100
Subject: [PATCH] move Hello.class out of /tests

The test code assumes /tests contains shared objects.
---
 bootfs.manifest | 2 +-
 fs/vfs/main.c   | 1 +
 java.cc         | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/bootfs.manifest b/bootfs.manifest
index e6de628a5..9c865743b 100644
--- a/bootfs.manifest
+++ b/bootfs.manifest
@@ -16,6 +16,6 @@
 /tests/tst-pthread.so: ./tests/tst-pthread.so
 /tests/tst-malloc.so: ../../external/glibc-testsuite/build/debug/malloc/tst-malloc.so
 /tests/tst-getcwd.so: ../../external/glibc-testsuite/build/debug/io/tst-getcwd.so
-/tests/Hello.class: ./tests/hello/Hello.class
+/java/Hello.class: ./tests/hello/Hello.class
 /java.so: java.so
 #/tests/read01.so: ../../external/ltp/build/debug/syscalls/read/read01.so
diff --git a/fs/vfs/main.c b/fs/vfs/main.c
index a9897cba6..47b8f09c9 100755
--- a/fs/vfs/main.c
+++ b/fs/vfs/main.c
@@ -973,6 +973,7 @@ void unpack_bootfs(void)
 		"/usr/lib/jvm/jre/lib",
 		"/usr/lib/jvm/jre/lib/amd64",
 		"/usr/lib/jvm/jre/lib/amd64/server",
+		"/java",
 		"/tests",
 		NULL,
 	};
diff --git a/java.cc b/java.cc
index b90f0eff4..5d2edffb1 100644
--- a/java.cc
+++ b/java.cc
@@ -23,7 +23,7 @@ int main(int ac, char **av)
     vm_args.version = JNI_VERSION_1_6;
     JNI_GetDefaultJavaVMInitArgs(&vm_args);
     std::vector<JavaVMOption> options;
-    options.push_back(mkoption("-Djava.class.path=/tests"));
+    options.push_back(mkoption("-Djava.class.path=/java"));
     while (ac > 0 && av[0][0] == '-') {
         options.push_back(mkoption(av[0]));
         ++av, --ac;
-- 
GitLab