8030795: java/nio/file/Files/probeContentType/ForceLoad.java failing with ServiceConfigurationError without jtreg -agentvm option
Alan Bateman
Alan.Bateman at oracle.com
Thu Jan 30 09:31:29 PST 2014
This test fails when run in jtreg othervm mode because there is a
service configuration file in the directory that lists a
FileTypeDetector that isn't compiled by the test.
There are many ways to fix this, the simplest is to just add @build tag
to compile the dependency. I've also changed it to run in othervm mode
because the test is to ensure that the underlying native code can be
loaded before any other parts of the API are used.
The proposed changed is below.
-Alan
diff --git a/test/java/nio/file/Files/probeContentType/ForceLoad.java
b/test/java/nio/file/Files/probeContentType/ForceLoad.java
--- a/test/java/nio/file/Files/probeContentType/ForceLoad.java
+++ b/test/java/nio/file/Files/probeContentType/ForceLoad.java
@@ -25,6 +25,8 @@
* @bug 4313887
* @summary Test library dependencies by invoking Files.probeContentType
* before other methods that would cause nio.dll to be loaded.
+ * @build ForceLoad SimpleFileTypeDetector
+ * @run main/othervm ForceLoad
*/
More information about the nio-dev
mailing list