# HG changeset patch # User jjg # Date 1274827178 25200 # Node ID 5c9695dc013a9f5b45e08ee7e9ff147e2945b223 # Parent 2a600d13659aabe5c89c63dd88978df5cebd61e7 6934615: Relative classpaths in jarfile manifests are handled inefficiently by rmic Reviewed-by: darcy diff -r 2a600d13659a -r 5c9695dc013a jdk/src/share/classes/sun/rmi/rmic/BatchEnvironment.java --- a/jdk/src/share/classes/sun/rmi/rmic/BatchEnvironment.java Tue May 25 18:20:54 2010 +0800 +++ b/jdk/src/share/classes/sun/rmi/rmic/BatchEnvironment.java Tue May 25 15:39:38 2010 -0700 @@ -429,7 +429,7 @@ st.hasMoreTokens();) { String elt = st.nextToken(); if (jarParent != null) - elt = new File(jarParent, elt).toString(); + elt = new File(jarParent, elt).getCanonicalPath(); addFile(elt, warn); } } finally { diff -r 2a600d13659a -r 5c9695dc013a jdk/test/sun/rmi/rmic/manifestClassPath/run.sh --- a/jdk/test/sun/rmi/rmic/manifestClassPath/run.sh Tue May 25 18:20:54 2010 +0800 +++ b/jdk/test/sun/rmi/rmic/manifestClassPath/run.sh Tue May 25 15:39:38 2010 -0700 @@ -23,7 +23,7 @@ #!/bin/sh # @test -# @bug 6473331 +# @bug 6473331 6485027 6934615 # @summary Test handling of the Class-Path attribute in jar file manifests # for the rmic tool # @author Andrey Ozerov @@ -65,26 +65,23 @@ Sys "$javac" pkg/A.java pkg/B.java -# NOTE: Certain lines below are commented out in order to work around -# bug 6485027, with alternative lines added as part of the workaround -# as indicated. In particular, the mutally referential JAR files are -# placed in the same directory instead of different directories, and -# javac is not expected to handle the extensions directories cases. +# NOTE: Previously, some lines were commented out and alternative lines +# provided, to work around javac bug 6485027. That bug, and related rmic +# bug 6934615 have now been fixed, so most of the workarounds have been +# removed. However, javac still does not evaluate jar class paths on +# the bootclasspath, including -extdirs. -#MkManifestWithClassPath "sub/B.zip" -MkManifestWithClassPath "B.zip" # 6485027 workaround +MkManifestWithClassPath "sub/B.zip" Sys "$jar" cmf MANIFEST.MF A.jar pkg/A.class -#MkManifestWithClassPath "../A.jar" -MkManifestWithClassPath "A.jar" # 6485027 workaround +MkManifestWithClassPath "../A.jar" Sys "$jar" cmf MANIFEST.MF B.zip pkg/B.class Sys rm -rf pkg Sys mkdir jars Sys mv A.jar jars/. -#Sys mkdir jars/sub -#Sys mv B.zip jars/sub/. -Sys mv B.zip jars/. # 6485027 workaround +Sys mkdir jars/sub +Sys mv B.zip jars/sub/. cat >MainI.java <