Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
2081a51b
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看板
提交
2081a51b
编写于
9月 03, 2010
作者:
L
lana
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
49afe9bc
2a1ed38c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
38 addition
and
12 deletion
+38
-12
src/windows/bin/java_md.c
src/windows/bin/java_md.c
+4
-3
test/tools/launcher/MiscTests.java
test/tools/launcher/MiscTests.java
+34
-9
未找到文件。
src/windows/bin/java_md.c
浏览文件 @
2081a51b
...
...
@@ -105,15 +105,15 @@ CreateExecutionEnvironment(int *pargc, char ***pargv,
exit
(
1
);
}
/* Do this before we read jvm.cfg */
EnsureJreInstallation
(
jrepath
);
/* Find out where the JRE is that we will be using. */
if
(
!
GetJREPath
(
jrepath
,
so_jrepath
))
{
JLI_ReportErrorMessage
(
JRE_ERROR1
);
exit
(
2
);
}
/* Do this before we read jvm.cfg and after jrepath is initialized */
EnsureJreInstallation
(
jrepath
);
/* Find the specified JVM type */
if
(
ReadKnownVMs
(
jrepath
,
(
char
*
)
GetArch
(),
JNI_FALSE
)
<
1
)
{
JLI_ReportErrorMessage
(
CFG_ERROR7
);
...
...
@@ -213,6 +213,7 @@ EnsureJreInstallation(const char* jrepath)
}
/* Does our bundle directory exist ? */
JLI_Snprintf
(
tmpbuf
,
sizeof
(
tmpbuf
),
"%s
\\
lib
\\
bundles"
,
jrepath
);
JLI_TraceLauncher
(
"EnsureJreInstallation: %s
\n
"
,
tmpbuf
);
if
(
stat
(
tmpbuf
,
&
s
)
!=
0
)
{
return
;
}
...
...
test/tools/launcher/
VerifyException
s.java
→
test/tools/launcher/
MiscTest
s.java
浏览文件 @
2081a51b
...
...
@@ -23,19 +23,22 @@
/*
* @test
* @bug 6856415
* @summary
Checks to ensure that proper exceptions are thrown by java
* @compile -XDignore.symbol.file
VerifyException
s.java TestHelper.java
* @run main
VerifyException
s
* @bug 6856415
6981001
* @summary
Miscellaneous tests, Exceptions, EnsureJRE etc.
* @compile -XDignore.symbol.file
MiscTest
s.java TestHelper.java
* @run main
MiscTest
s
*/
import
java.io.File
;
import
java.io.FileNotFoundException
;
import
java.util.HashMap
;
import
java.util.Map
;
public
class
VerifyException
s
{
public
class
MiscTest
s
{
// 6856415: Checks to ensure that proper exceptions are thrown by java
static
void
test6856415
()
{
// No pkcs library on win-x64, so we bail out.
if
(
TestHelper
.
is64Bit
&&
TestHelper
.
isWindows
)
{
...
...
@@ -53,13 +56,35 @@ public class VerifyExceptions {
}
catch
(
FileNotFoundException
fnfe
)
{
throw
new
RuntimeException
(
fnfe
);
}
TestHelper
.
TestResult
tr
=
TestHelper
.
doExec
(
TestHelper
.
java
c
Cmd
,
TestHelper
.
TestResult
tr
=
TestHelper
.
doExec
(
TestHelper
.
javaCmd
,
"-Djava.security.manager"
,
"-jar"
,
testJar
.
getName
(),
"foo.bak"
);
tr
.
checkNegative
();
tr
.
contains
(
"Exception in thread \"main\" java.security.AccessControlException: access denied (\"java.lang.RuntimePermission\" \"accessClassInPackage.sun.security.pkcs11\")\")"
);
for
(
String
s
:
tr
.
testOutput
)
{
System
.
out
.
println
(
s
);
}
if
(!
tr
.
contains
(
"java.security.AccessControlException:"
+
" access denied (\"java.lang.RuntimePermission\""
+
" \"accessClassInPackage.sun.security.pkcs11\")"
))
{
System
.
out
.
println
(
tr
.
status
);
}
}
// 6981001 : Check EnsureJreInstallation is ok, note we cannot
// thoroughly test this function, we simply do our best.
static
void
test6981001
()
{
if
(
TestHelper
.
is64Bit
||
!
TestHelper
.
isWindows
)
{
return
;
}
Map
<
String
,
String
>
env
=
new
HashMap
<
String
,
String
>();
env
.
put
(
"_JAVA_LAUNCHER_DEBUG"
,
"true"
);
TestHelper
.
TestResult
tr
=
TestHelper
.
doExec
(
env
,
TestHelper
.
javaCmd
);
if
(!
tr
.
contains
(
TestHelper
.
JAVAHOME
+
"\\lib\\bundles"
))
{
System
.
out
.
println
(
tr
.
status
);
}
}
public
static
void
main
(
String
...
args
)
{
test6856415
();
test6981001
();
if
(
TestHelper
.
testExitValue
!=
0
)
{
throw
new
Error
(
TestHelper
.
testExitValue
+
" tests failed"
);
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录