diff --git a/src/share/classes/sun/rmi/rmic/BatchEnvironment.java b/src/share/classes/sun/rmi/rmic/BatchEnvironment.java index 7e86857fb1d954cebc1351fe3a87048f51ce8b0d..7fb9119607b7852d67e49f2013958852262dc322 100644 --- a/src/share/classes/sun/rmi/rmic/BatchEnvironment.java +++ b/src/share/classes/sun/rmi/rmic/BatchEnvironment.java @@ -429,7 +429,7 @@ public class BatchEnvironment extends sun.tools.javac.BatchEnvironment { 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 --git a/test/sun/rmi/rmic/manifestClassPath/run.sh b/test/sun/rmi/rmic/manifestClassPath/run.sh index 7be3091f24e4da01633bf8719d90000da9237398..99130fcbe2c3d181834df3a3ba563f3f3584b711 100644 --- a/test/sun/rmi/rmic/manifestClassPath/run.sh +++ b/test/sun/rmi/rmic/manifestClassPath/run.sh @@ -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 @@ EOF 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 <