Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
35679bbf
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
35679bbf
编写于
5月 25, 2010
作者:
J
jjg
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6934615: Relative classpaths in jarfile manifests are handled inefficiently by rmic
Reviewed-by: darcy
上级
6d672e40
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
19 addition
and
26 deletion
+19
-26
src/share/classes/sun/rmi/rmic/BatchEnvironment.java
src/share/classes/sun/rmi/rmic/BatchEnvironment.java
+1
-1
test/sun/rmi/rmic/manifestClassPath/run.sh
test/sun/rmi/rmic/manifestClassPath/run.sh
+18
-25
未找到文件。
src/share/classes/sun/rmi/rmic/BatchEnvironment.java
浏览文件 @
35679bbf
...
...
@@ -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
{
...
...
test/sun/rmi/rmic/manifestClassPath/run.sh
浏览文件 @
35679bbf
...
...
@@ -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 case
s.
# 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 -extdir
s.
#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
<<
EOF
import pkg.*;
...
...
@@ -121,26 +118,22 @@ Success "$java" -classpath "jars/A.jar${PS}." Main
Sys
rm
-f
Main.class MainI.class Main_Stub.class
#Success "$javac" -classpath "jars/sub/B.zip" Main.java MainI.java
#Success "$rmic" -classpath "jars/sub/B.zip${PS}." Main
#Success "$java" -classpath "jars/sub/B.zip${PS}." Main
Success
"
$javac
"
-classpath
"jars/B.zip"
\
Main.java MainI.java
# 6485027 workaround
Success
"
$rmic
"
-classpath
"jars/B.zip
${
PS
}
."
Main
# 6485027 workaround
Success
"
$java
"
-classpath
"jars/B.zip
${
PS
}
."
Main
# 6485027 workaround
Success
"
$javac
"
-classpath
"jars/sub/B.zip"
Main.java MainI.java
Success
"
$rmic
"
-classpath
"jars/sub/B.zip
${
PS
}
."
Main
Success
"
$java
"
-classpath
"jars/sub/B.zip
${
PS
}
."
Main
#Sys rm -f Main.class MainI.class Main_Stub.class
Sys
rm
-f
Main_Stub.class
#
6485027
workaround
Sys
rm
-f
Main_Stub.class
#
javac -extdirs
workaround
#Success "$javac" -extdirs "jars" -classpath None Main.java MainI.java
Success
"
$rmic
"
-extdirs
"jars"
-classpath
.
Main
Success
"
$java
"
-Djava
.ext.dirs
=
"jars"
-cp
.
Main
#
Sys rm -f Main_Stub.class
#
Sys
rm
-f
Main_Stub.class
#Success "$javac" -extdirs "jars/sub" -classpath None Main.java MainI.java
#
Success "$rmic" -extdirs "jars/sub" -classpath . Main
#
Success "$java" -Djava.ext.dirs="jars/sub" -cp . Main
Success
"
$rmic
"
-extdirs
"jars/sub"
-classpath
.
Main
Success
"
$java
"
-Djava
.ext.dirs
=
"jars/sub"
-cp
.
Main
Cleanup
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录