JDK-8060432 : tools/pack200/TestNormal.java fails on Windows with java.io.FileNotFoundException after JDK-8058854
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util.jar
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2014-10-14
  • Updated: 2016-05-12
  • Resolved: 2014-10-17
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 9
9 b37Fixed
Related Reports
Relates :  
Description
tools/pack200/TestNormal.java fails on Windows with java.io.FileNotFoundException after JDK-8058854.

----------System.err:(17/1084)*----------
java.io.FileNotFoundException: testdir\\D:\\Users\\aurora\\sandbox\\gresults\\testoutput\\jdk_tools\\JTwork\\classes\\tools\\pack200\\AttributeTests.class (The filename, directory name, or volume label syntax is incorrect)
	at java.io.FileOutputStream.open0(Native Method)
	at java.io.FileOutputStream.open(FileOutputStream.java:270)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
	at TestNormal.extractJar(TestNormal.java:119)
	at TestNormal.main(TestNormal.java:55)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:759)
	at java.lang.Thread.run(Thread.java:745)

JavaTest Message: Test threw exception: java.io.FileNotFoundException
JavaTest Message: shutting down test

result: Failed. Execution failed: `main' threw exception: java.io.FileNotFoundException: testdir\D:\Users\aurora\sandbox\gresults\testoutput\jdk_tools\JTwork\classes\tools\pack200\AttributeTests.class (The filename, directory name, or volume label syntax is incorrect)

Comments
JDK-8058854 introduced new issues, the created jar can't be handled by extractJar(JarFile jf, File where) on Windows. Re-think about this test, it try to test: compareJars(new JarFile("normalized.jar"), new JarFile("repacked.jar")); where the jar files (normalized.jar repacked.jar and original.jar) are created by "jar cnf" "jar cf" or "pack200 -r" extractJar(JarFile jf, File where) just try to provide some files for test to do "jar cnf" Actually, "jar cnf" can work on any files, test just need some files to jar with. Test can just simply create some files for that purpose.
14-10-2014

http://mail.openjdk.java.net/pipermail/core-libs-dev/2014-October/029129.html
14-10-2014