JDK-8181635 : sun/net/www/protocol/jar/B6449504.java fails at Windows platform (after JDK-8181414)
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 10
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2017-06-06
  • Updated: 2023-08-16
  • Resolved: 2017-06-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10 JDK 8
10 b11Fixed 8u401Fixed
Related Reports
Relates :  
Description
sun/net/www/protocol/jar/B6449504.java

After test was refactored in JDK-8181414, it fails (reproducible) at Windows platform:

----------System.err:(20/1464)*----------
java.nio.file.FileSystemException: C:\\jenkins\\workspace\\jdk10-jdk10\\testresults\\windows-x64\\jdk_test.tier2\\jtreg\\JTwork\\classes\\2\\sun\\net\\www\\protocol\\jar\\bar.jar: The process cannot access the file because it is being used by another process.

	at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:92)
	at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
	at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
	at java.base/sun.nio.fs.WindowsFileCopy.copy(WindowsFileCopy.java:164)
	at java.base/sun.nio.fs.WindowsFileSystemProvider.copy(WindowsFileSystemProvider.java:279)
	at java.base/java.nio.file.Files.copy(Files.java:1287)
	at B6449504.setup(B6449504.java:91)
	at B6449504.main(B6449504.java:44)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:563)
	at com.sun.javatest.regtest.agent.MainActionHelper$SameVMRunnable.run(MainActionHelper.java:230)
	at java.base/java.lang.Thread.run(Thread.java:844)


Comments
URL: http://hg.openjdk.java.net/jdk10/jdk10/jdk/rev/ecdb7c08efac User: xiaofeya Date: 2017-06-06 08:52:38 +0000
06-06-2017

Jar connections are not closed in agentvm mode. It is necessary to use othervm mode.
06-06-2017