< prev index next >
test/hotspot/jtreg/runtime/LoadClass/LongBCP.java
Print this page
rev 56594 : 8232168: Fix non wide char canonicalization on Windows
Reviewed-by:
@@ -126,10 +126,26 @@
output = new OutputAnalyzer(pb.start());
output.shouldContain("Hello World")
.shouldHaveExitValue(0);
+ // Test a relative path for a jar file < MAX_PATH, but where the
+ // absolute path is > MAX_PATH.
+ Path jarDir = Paths.get(".");
+ for (int i = 0; i < 21; ++i) {
+ jarDir = jarDir.resolve("0123456789");
+ }
+ Files.createDirectories(jarDir);
+ Path jarPath = jarDir.resolve("hello.jar");
+ Files.copy(Paths.get(helloJar), jarPath);
+ bootCP = "-Xbootclasspath/a:" + jarPath.toString();
+ pb = ProcessTools.createJavaProcessBuilder(bootCP, "Hello");
+
+ output = new OutputAnalyzer(pb.start());
+ output.shouldContain("Hello World")
+ .shouldHaveExitValue(0);
+
// total relative path length exceeds MAX_PATH
destDir = Paths.get(destDir.toString(), "yyyyyyyy");
CompilerUtils.compile(sourceDir, destDir);
< prev index next >