Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
efdc7738
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看板
提交
efdc7738
编写于
1月 22, 2010
作者:
L
lana
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
b0f5fe3f
f76ac514
变更
205
隐藏空白更改
内联
并排
Showing
205 changed file
with
2657 addition
and
882 deletion
+2657
-882
make/com/sun/crypto/provider/Makefile
make/com/sun/crypto/provider/Makefile
+1
-1
make/com/sun/java/pack/Makefile
make/com/sun/java/pack/Makefile
+6
-1
make/com/sun/java/pack/prop/Makefile
make/com/sun/java/pack/prop/Makefile
+1
-0
make/com/sun/jndi/cosnaming/Makefile
make/com/sun/jndi/cosnaming/Makefile
+1
-0
make/com/sun/jndi/dns/Makefile
make/com/sun/jndi/dns/Makefile
+1
-0
make/com/sun/jndi/ldap/Makefile
make/com/sun/jndi/ldap/Makefile
+1
-0
make/com/sun/jndi/rmi/registry/Makefile
make/com/sun/jndi/rmi/registry/Makefile
+1
-0
make/com/sun/nio/sctp/FILES_java.gmk
make/com/sun/nio/sctp/FILES_java.gmk
+1
-2
make/com/sun/nio/sctp/Makefile
make/com/sun/nio/sctp/Makefile
+1
-0
make/com/sun/nio/sctp/mapfile-vers
make/com/sun/nio/sctp/mapfile-vers
+5
-0
make/com/sun/org/apache/xml/Makefile
make/com/sun/org/apache/xml/Makefile
+1
-0
make/com/sun/rowset/Makefile
make/com/sun/rowset/Makefile
+1
-0
make/com/sun/script/Makefile
make/com/sun/script/Makefile
+1
-0
make/com/sun/security/auth/module/Makefile
make/com/sun/security/auth/module/Makefile
+1
-0
make/com/sun/servicetag/Makefile
make/com/sun/servicetag/Makefile
+2
-1
make/com/sun/tools/attach/Makefile
make/com/sun/tools/attach/Makefile
+2
-0
make/common/Defs.gmk
make/common/Defs.gmk
+99
-7
make/common/Demo.gmk
make/common/Demo.gmk
+2
-0
make/common/Library.gmk
make/common/Library.gmk
+12
-0
make/common/Modules.gmk
make/common/Modules.gmk
+48
-9
make/common/Program.gmk
make/common/Program.gmk
+3
-16
make/common/internal/BinaryPlugs.gmk
make/common/internal/BinaryPlugs.gmk
+2
-2
make/common/internal/Resources.gmk
make/common/internal/Resources.gmk
+1
-1
make/common/shared/Sanity.gmk
make/common/shared/Sanity.gmk
+2
-2
make/java/awt/Makefile
make/java/awt/Makefile
+1
-0
make/java/fdlibm/Makefile
make/java/fdlibm/Makefile
+1
-0
make/java/hpi/native/Makefile
make/java/hpi/native/Makefile
+1
-0
make/java/hpi/windows/Makefile
make/java/hpi/windows/Makefile
+3
-2
make/java/instrument/Makefile
make/java/instrument/Makefile
+1
-0
make/java/java/Makefile
make/java/java/Makefile
+6
-4
make/java/java_crw_demo/Makefile
make/java/java_crw_demo/Makefile
+2
-0
make/java/java_hprof_demo/Makefile
make/java/java_hprof_demo/Makefile
+1
-0
make/java/jli/Makefile
make/java/jli/Makefile
+1
-0
make/java/jvm/Makefile
make/java/jvm/Makefile
+19
-3
make/java/logging/Makefile
make/java/logging/Makefile
+1
-0
make/java/main/java/Makefile
make/java/main/java/Makefile
+1
-0
make/java/main/javaw/Makefile
make/java/main/javaw/Makefile
+1
-0
make/java/management/Makefile
make/java/management/Makefile
+2
-1
make/java/net/Makefile
make/java/net/Makefile
+2
-2
make/java/nio/Makefile
make/java/nio/Makefile
+2
-1
make/java/npt/Makefile
make/java/npt/Makefile
+3
-0
make/java/redist/Makefile
make/java/redist/Makefile
+16
-91
make/java/redist/fonts/Makefile
make/java/redist/fonts/Makefile
+56
-1
make/java/redist/sajdi/Makefile
make/java/redist/sajdi/Makefile
+87
-0
make/java/security/Makefile
make/java/security/Makefile
+3
-12
make/java/sql/Makefile
make/java/sql/Makefile
+1
-0
make/java/text/Makefile
make/java/text/Makefile
+1
-1
make/java/verify/Makefile
make/java/verify/Makefile
+1
-0
make/java/zip/Makefile
make/java/zip/Makefile
+1
-0
make/javax/crypto/Makefile
make/javax/crypto/Makefile
+19
-6
make/javax/imageio/Makefile
make/javax/imageio/Makefile
+1
-0
make/javax/print/Makefile
make/javax/print/Makefile
+1
-0
make/javax/sound/Makefile
make/javax/sound/Makefile
+1
-0
make/javax/sound/jsoundalsa/Makefile
make/javax/sound/jsoundalsa/Makefile
+1
-0
make/javax/sound/jsoundds/Makefile
make/javax/sound/jsoundds/Makefile
+1
-0
make/javax/sql/Makefile
make/javax/sql/Makefile
+1
-0
make/javax/swing/Makefile
make/javax/swing/Makefile
+1
-0
make/javax/swing/plaf/Makefile
make/javax/swing/plaf/Makefile
+1
-0
make/jpda/back/Makefile
make/jpda/back/Makefile
+1
-0
make/jpda/transport/Makefile
make/jpda/transport/Makefile
+1
-0
make/jpda/transport/shmem/Makefile
make/jpda/transport/shmem/Makefile
+1
-0
make/jpda/transport/socket/Makefile
make/jpda/transport/socket/Makefile
+1
-0
make/jpda/tty/Makefile
make/jpda/tty/Makefile
+1
-0
make/launchers/Makefile
make/launchers/Makefile
+18
-35
make/mkdemo/jvmti/Makefile
make/mkdemo/jvmti/Makefile
+1
-0
make/mkdemo/management/Makefile
make/mkdemo/management/Makefile
+1
-0
make/mksample/dtrace/Makefile
make/mksample/dtrace/Makefile
+1
-0
make/mksample/jmx/jmx-scandir/Makefile
make/mksample/jmx/jmx-scandir/Makefile
+1
-0
make/mksample/nbproject/Makefile
make/mksample/nbproject/Makefile
+1
-0
make/mksample/nio/file/Makefile
make/mksample/nio/file/Makefile
+1
-0
make/mksample/nio/multicast/Makefile
make/mksample/nio/multicast/Makefile
+1
-0
make/mksample/nio/server/Makefile
make/mksample/nio/server/Makefile
+1
-0
make/mksample/scripting/scriptpad/Makefile
make/mksample/scripting/scriptpad/Makefile
+1
-0
make/mksample/webservices/EbayClient/Makefile
make/mksample/webservices/EbayClient/Makefile
+1
-0
make/mksample/webservices/EbayServer/Makefile
make/mksample/webservices/EbayServer/Makefile
+1
-0
make/modules/Makefile
make/modules/Makefile
+72
-83
make/modules/modules.config
make/modules/modules.config
+104
-33
make/modules/optional.depconfig
make/modules/optional.depconfig
+25
-0
make/modules/tools/Makefile
make/modules/tools/Makefile
+99
-29
make/modules/tools/build.xml
make/modules/tools/build.xml
+20
-24
make/modules/tools/nbproject/project.properties
make/modules/tools/nbproject/project.properties
+17
-23
make/modules/tools/nbproject/project.xml
make/modules/tools/nbproject/project.xml
+23
-29
make/modules/tools/src/com/sun/classanalyzer/Module.java
make/modules/tools/src/com/sun/classanalyzer/Module.java
+3
-3
make/sun/applet/Makefile
make/sun/applet/Makefile
+1
-0
make/sun/awt/Makefile
make/sun/awt/Makefile
+6
-4
make/sun/cmm/Makefile
make/sun/cmm/Makefile
+11
-20
make/sun/cmm/kcms/Makefile
make/sun/cmm/kcms/Makefile
+1
-0
make/sun/cmm/lcms/Makefile
make/sun/cmm/lcms/Makefile
+1
-0
make/sun/dcpr/Makefile
make/sun/dcpr/Makefile
+1
-0
make/sun/font/Makefile
make/sun/font/Makefile
+11
-6
make/sun/font/t2k/Makefile
make/sun/font/t2k/Makefile
+1
-0
make/sun/headless/Makefile
make/sun/headless/Makefile
+1
-0
make/sun/image/generic/Makefile
make/sun/image/generic/Makefile
+1
-0
make/sun/image/vis/Makefile
make/sun/image/vis/Makefile
+1
-0
make/sun/jar/Makefile
make/sun/jar/Makefile
+1
-0
make/sun/javazic/Makefile
make/sun/javazic/Makefile
+2
-0
make/sun/jawt/Makefile
make/sun/jawt/Makefile
+1
-0
make/sun/jconsole/Makefile
make/sun/jconsole/Makefile
+2
-1
make/sun/jdbc/Makefile
make/sun/jdbc/Makefile
+1
-0
make/sun/jdga/Makefile
make/sun/jdga/Makefile
+1
-0
make/sun/jkernel/Makefile
make/sun/jkernel/Makefile
+1
-0
make/sun/jpeg/Makefile
make/sun/jpeg/Makefile
+1
-0
make/sun/launcher/Makefile
make/sun/launcher/Makefile
+1
-0
make/sun/management/Makefile
make/sun/management/Makefile
+6
-4
make/sun/native2ascii/Makefile
make/sun/native2ascii/Makefile
+1
-0
make/sun/net/others/Makefile
make/sun/net/others/Makefile
+1
-0
make/sun/net/spi/nameservice/dns/Makefile
make/sun/net/spi/nameservice/dns/Makefile
+3
-0
make/sun/nio/Makefile
make/sun/nio/Makefile
+4
-80
make/sun/nio/cs/FILES_java.gmk
make/sun/nio/cs/FILES_java.gmk
+0
-0
make/sun/nio/cs/Makefile
make/sun/nio/cs/Makefile
+112
-0
make/sun/org/mozilla/javascript/Makefile
make/sun/org/mozilla/javascript/Makefile
+1
-0
make/sun/pisces/Makefile
make/sun/pisces/Makefile
+1
-0
make/sun/rmi/cgi/Makefile
make/sun/rmi/cgi/Makefile
+2
-0
make/sun/rmi/oldtools/Makefile
make/sun/rmi/oldtools/Makefile
+1
-0
make/sun/rmi/registry/Makefile
make/sun/rmi/registry/Makefile
+5
-0
make/sun/rmi/rmi/Makefile
make/sun/rmi/rmi/Makefile
+2
-1
make/sun/rmi/rmic/Makefile
make/sun/rmi/rmic/Makefile
+1
-0
make/sun/rmi/rmid/Makefile
make/sun/rmi/rmid/Makefile
+4
-2
make/sun/security/ec/Makefile
make/sun/security/ec/Makefile
+2
-1
make/sun/security/jgss/wrapper/Makefile
make/sun/security/jgss/wrapper/Makefile
+1
-0
make/sun/security/krb5/Makefile
make/sun/security/krb5/Makefile
+8
-0
make/sun/security/mscapi/Makefile
make/sun/security/mscapi/Makefile
+2
-1
make/sun/security/pkcs11/Makefile
make/sun/security/pkcs11/Makefile
+20
-3
make/sun/security/smartcardio/Makefile
make/sun/security/smartcardio/Makefile
+1
-0
make/sun/security/tools/Makefile
make/sun/security/tools/Makefile
+5
-0
make/sun/serialver/Makefile
make/sun/serialver/Makefile
+1
-0
make/sun/splashscreen/Makefile
make/sun/splashscreen/Makefile
+1
-0
make/sun/text/Makefile
make/sun/text/Makefile
+1
-0
make/sun/tools/Makefile
make/sun/tools/Makefile
+1
-0
make/sun/tracing/dtrace/Makefile
make/sun/tracing/dtrace/Makefile
+1
-0
make/sun/xawt/Makefile
make/sun/xawt/Makefile
+1
-0
src/share/classes/java/lang/Deprecated.java
src/share/classes/java/lang/Deprecated.java
+2
-0
src/share/classes/java/lang/Error.java
src/share/classes/java/lang/Error.java
+11
-7
src/share/classes/java/lang/Exception.java
src/share/classes/java/lang/Exception.java
+12
-4
src/share/classes/java/lang/RuntimeException.java
src/share/classes/java/lang/RuntimeException.java
+9
-7
src/share/classes/java/lang/SuppressWarnings.java
src/share/classes/java/lang/SuppressWarnings.java
+1
-2
src/share/classes/java/lang/Throwable.java
src/share/classes/java/lang/Throwable.java
+6
-0
src/share/classes/java/util/NavigableMap.java
src/share/classes/java/util/NavigableMap.java
+1
-1
src/share/classes/java/util/NavigableSet.java
src/share/classes/java/util/NavigableSet.java
+1
-1
src/share/classes/sun/nio/fs/AbstractPath.java
src/share/classes/sun/nio/fs/AbstractPath.java
+18
-6
src/share/classes/sun/nio/fs/AbstractWatchKey.java
src/share/classes/sun/nio/fs/AbstractWatchKey.java
+15
-17
src/share/classes/sun/security/krb5/internal/ktab/KeyTabEntry.java
.../classes/sun/security/krb5/internal/ktab/KeyTabEntry.java
+1
-1
src/share/classes/sun/security/provider/certpath/OCSPResponse.java
.../classes/sun/security/provider/certpath/OCSPResponse.java
+9
-1
src/solaris/classes/sun/nio/ch/SctpChannelImpl.java
src/solaris/classes/sun/nio/ch/SctpChannelImpl.java
+19
-22
src/solaris/classes/sun/nio/ch/SctpMultiChannelImpl.java
src/solaris/classes/sun/nio/ch/SctpMultiChannelImpl.java
+17
-18
src/solaris/classes/sun/nio/ch/SctpNet.java
src/solaris/classes/sun/nio/ch/SctpNet.java
+38
-1
src/solaris/classes/sun/nio/ch/SctpServerChannelImpl.java
src/solaris/classes/sun/nio/ch/SctpServerChannelImpl.java
+5
-10
src/solaris/native/sun/nio/ch/SctpNet.c
src/solaris/native/sun/nio/ch/SctpNet.c
+124
-2
src/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java
...lasses/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java
+19
-30
src/windows/native/sun/nio/ch/WindowsAsynchronousFileChannelImpl.c
...ws/native/sun/nio/ch/WindowsAsynchronousFileChannelImpl.c
+6
-8
test/com/sun/jdi/ProcessAttachTest.sh
test/com/sun/jdi/ProcessAttachTest.sh
+20
-9
test/com/sun/jdi/connect/spi/JdiLoadedByCustomLoader.sh
test/com/sun/jdi/connect/spi/JdiLoadedByCustomLoader.sh
+2
-2
test/com/sun/nio/sctp/SctpChannel/Connect.java
test/com/sun/nio/sctp/SctpChannel/Connect.java
+12
-0
test/com/sun/nio/sctp/SctpChannel/Send.java
test/com/sun/nio/sctp/SctpChannel/Send.java
+47
-3
test/com/sun/nio/sctp/SctpChannel/SocketOptionTests.java
test/com/sun/nio/sctp/SctpChannel/SocketOptionTests.java
+2
-0
test/com/sun/nio/sctp/SctpMultiChannel/Send.java
test/com/sun/nio/sctp/SctpMultiChannel/Send.java
+45
-0
test/com/sun/tools/attach/ApplicationSetup.sh
test/com/sun/tools/attach/ApplicationSetup.sh
+6
-2
test/com/sun/tools/attach/BasicTests.sh
test/com/sun/tools/attach/BasicTests.sh
+1
-1
test/com/sun/tools/attach/CommonSetup.sh
test/com/sun/tools/attach/CommonSetup.sh
+6
-0
test/com/sun/tools/attach/PermissionTests.sh
test/com/sun/tools/attach/PermissionTests.sh
+2
-2
test/com/sun/tools/attach/ProviderTests.sh
test/com/sun/tools/attach/ProviderTests.sh
+1
-1
test/java/beans/Introspector/Test5102804.java
test/java/beans/Introspector/Test5102804.java
+1
-0
test/java/io/File/Basic.java
test/java/io/File/Basic.java
+2
-2
test/java/io/File/basic.sh
test/java/io/File/basic.sh
+2
-2
test/java/io/Serializable/evolution/RenamePackage/run.sh
test/java/io/Serializable/evolution/RenamePackage/run.sh
+5
-5
test/java/io/Serializable/serialver/classpath/run.sh
test/java/io/Serializable/serialver/classpath/run.sh
+1
-1
test/java/io/Serializable/serialver/nested/run.sh
test/java/io/Serializable/serialver/nested/run.sh
+1
-1
test/java/lang/ClassLoader/deadlock/TestOneWayDelegate.sh
test/java/lang/ClassLoader/deadlock/TestOneWayDelegate.sh
+1
-1
test/java/lang/StringCoding/CheckEncodings.sh
test/java/lang/StringCoding/CheckEncodings.sh
+1
-1
test/java/lang/System/finalization/FinExit.sh
test/java/lang/System/finalization/FinExit.sh
+3
-1
test/java/lang/annotation/loaderLeak/LoaderLeak.sh
test/java/lang/annotation/loaderLeak/LoaderLeak.sh
+5
-0
test/java/lang/instrument/appendToClassLoaderSearch/CommonSetup.sh
.../lang/instrument/appendToClassLoaderSearch/CommonSetup.sh
+7
-1
test/java/nio/channels/AsynchronousFileChannel/LotsOfWrites.java
...va/nio/channels/AsynchronousFileChannel/LotsOfWrites.java
+162
-0
test/java/nio/channels/Selector/lots_of_updates.sh
test/java/nio/channels/Selector/lots_of_updates.sh
+1
-1
test/java/nio/channels/spi/AsynchronousChannelProvider/custom_provider.sh
...annels/spi/AsynchronousChannelProvider/custom_provider.sh
+1
-1
test/java/nio/file/Files/walk_file_tree.sh
test/java/nio/file/Files/walk_file_tree.sh
+1
-1
test/java/nio/file/Path/CopyAndMove.java
test/java/nio/file/Path/CopyAndMove.java
+139
-117
test/java/nio/file/Path/PassThroughFileSystem.java
test/java/nio/file/Path/PassThroughFileSystem.java
+554
-0
test/java/nio/file/Path/delete_on_close.sh
test/java/nio/file/Path/delete_on_close.sh
+1
-1
test/java/nio/file/TestUtil.java
test/java/nio/file/TestUtil.java
+7
-4
test/java/nio/file/WatchService/OverflowEventIsLoner.java
test/java/nio/file/WatchService/OverflowEventIsLoner.java
+122
-0
test/java/security/Provider/Turkish.java
test/java/security/Provider/Turkish.java
+1
-0
test/java/util/Currency/PropertiesTest.sh
test/java/util/Currency/PropertiesTest.sh
+1
-1
test/java/util/PluggableLocale/ExecTest.sh
test/java/util/PluggableLocale/ExecTest.sh
+1
-1
test/java/util/ResourceBundle/Bug6299235Test.sh
test/java/util/ResourceBundle/Bug6299235Test.sh
+2
-2
test/java/util/ResourceBundle/Control/ExpirationTest.sh
test/java/util/ResourceBundle/Control/ExpirationTest.sh
+1
-1
test/java/util/ServiceLoader/basic.sh
test/java/util/ServiceLoader/basic.sh
+3
-3
test/javax/imageio/stream/StreamCloserLeak/run_test.sh
test/javax/imageio/stream/StreamCloserLeak/run_test.sh
+1
-1
test/javax/script/CommonSetup.sh
test/javax/script/CommonSetup.sh
+6
-0
test/javax/script/ProviderTest.sh
test/javax/script/ProviderTest.sh
+1
-1
test/sun/jvmstat/testlibrary/utils.sh
test/sun/jvmstat/testlibrary/utils.sh
+2
-2
test/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh
...anagement/jmxremote/bootstrap/GeneratePropertyPassword.sh
+1
-1
test/sun/misc/URLClassPath/ClassnameCharTest.sh
test/sun/misc/URLClassPath/ClassnameCharTest.sh
+2
-2
test/sun/security/krb5/ktab/KeyString.java
test/sun/security/krb5/ktab/KeyString.java
+39
-0
test/sun/tools/common/ApplicationSetup.sh
test/sun/tools/common/ApplicationSetup.sh
+5
-1
test/sun/tools/common/CommonSetup.sh
test/sun/tools/common/CommonSetup.sh
+5
-0
test/sun/tools/jps/jps-help.sh
test/sun/tools/jps/jps-help.sh
+2
-2
test/sun/tools/jstat/jstatHelp.sh
test/sun/tools/jstat/jstatHelp.sh
+2
-2
test/sun/tools/jstat/jstatOptions1.sh
test/sun/tools/jstat/jstatOptions1.sh
+1
-1
test/sun/tools/jstatd/jstatdUsage1.sh
test/sun/tools/jstatd/jstatdUsage1.sh
+2
-2
test/sun/tools/native2ascii/Native2AsciiTests.sh
test/sun/tools/native2ascii/Native2AsciiTests.sh
+6
-4
test/tools/launcher/ChangeDataModel.sh
test/tools/launcher/ChangeDataModel.sh
+9
-6
test/tools/launcher/ClassPathWildCard.sh
test/tools/launcher/ClassPathWildCard.sh
+1
-1
test/tools/launcher/DefaultLocaleTest.sh
test/tools/launcher/DefaultLocaleTest.sh
+17
-1
test/tools/launcher/UnicodeTest.sh
test/tools/launcher/UnicodeTest.sh
+1
-1
未找到文件。
make/com/sun/crypto/provider/Makefile
浏览文件 @
efdc7738
...
@@ -249,7 +249,7 @@ $(JAR_DESTFILE): $(UNSIGNED_DIR)/sunjce_provider.jar
...
@@ -249,7 +249,7 @@ $(JAR_DESTFILE): $(UNSIGNED_DIR)/sunjce_provider.jar
else
else
$(JAR_DESTFILE)
:
$(SIGNED_DIR)/sunjce_provider.jar
$(JAR_DESTFILE)
:
$(SIGNED_DIR)/sunjce_provider.jar
endif
endif
$
(
install-file
)
$
(
install-
non-module-
file
)
ifndef
OPENJDK
ifndef
OPENJDK
install-prebuilt
:
install-prebuilt
:
...
...
make/com/sun/java/pack/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../../../..
BUILDDIR
=
../../../..
MODULE
=
pack200
PACKAGE
=
com.sun.java.util.jar.pack
PACKAGE
=
com.sun.java.util.jar.pack
LIBRARY
=
unpack
LIBRARY
=
unpack
PRODUCT
=
sun
PRODUCT
=
sun
...
@@ -123,11 +124,14 @@ COBJDIR = $(strip $(subst unpack,unpack-cmd,$(OBJDIR)))
...
@@ -123,11 +124,14 @@ COBJDIR = $(strip $(subst unpack,unpack-cmd,$(OBJDIR)))
all
:
build
all
:
build
build
:
prop
build
:
prop
pack200-tool
prop
:
prop
:
$(MAKE)
-C
prop
$(MAKE)
-C
prop
pack200-tool
:
$(
call
make-launcher, pack200, com.sun.java.util.jar.pack.Driver, ,
--pack
)
unpacker
:
unpacker
:
$(MAKE)
$(UNPACK_EXE)
STANDALONE
=
true
LDMAPFLAGS_OPT
=
LDMAPFLAGS_DBG
=
$(MAKE)
$(UNPACK_EXE)
STANDALONE
=
true
LDMAPFLAGS_OPT
=
LDMAPFLAGS_DBG
=
...
@@ -151,6 +155,7 @@ ifdef MT
...
@@ -151,6 +155,7 @@ ifdef MT
$(MT)
/manifest
$(TEMPDIR)
/unpack200
$(EXE_SUFFIX)
.manifest /outputresource:
$(TEMPDIR)
/unpack200
$(EXE_SUFFIX)
;
#1
$(MT)
/manifest
$(TEMPDIR)
/unpack200
$(EXE_SUFFIX)
.manifest /outputresource:
$(TEMPDIR)
/unpack200
$(EXE_SUFFIX)
;
#1
endif
endif
$(CP)
$(TEMPDIR)
/unpack200
$(EXE_SUFFIX)
$(UNPACK_EXE)
$(CP)
$(TEMPDIR)
/unpack200
$(EXE_SUFFIX)
$(UNPACK_EXE)
$
(
install-module-file
)
ifeq
($(PLATFORM), windows)
ifeq
($(PLATFORM), windows)
$(RES)
::
$(VERSIONINFO_RESOURCE)
$(RES)
::
$(VERSIONINFO_RESOURCE)
...
...
make/com/sun/java/pack/prop/Makefile
浏览文件 @
efdc7738
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
# to a collision of rules with Classes.gmk and Library.gmk
# to a collision of rules with Classes.gmk and Library.gmk
BUILDDIR
=
../../../../..
BUILDDIR
=
../../../../..
MODULE
=
pack200
PACKAGE
=
com.sun.java.util.jar.pack
PACKAGE
=
com.sun.java.util.jar.pack
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/com/sun/jndi/cosnaming/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../../../..
BUILDDIR
=
../../../..
MODULE
=
jndi-cosnaming
PACKAGE
=
com.sun.jndi.cosnaming
PACKAGE
=
com.sun.jndi.cosnaming
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/com/sun/jndi/dns/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../../../..
BUILDDIR
=
../../../..
MODULE
=
jndi-dns
PACKAGE
=
com.sun.jndi.dns
PACKAGE
=
com.sun.jndi.dns
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/com/sun/jndi/ldap/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../../../..
BUILDDIR
=
../../../..
MODULE
=
jndi-ldap
PACKAGE
=
com.sun.jndi.ldap
PACKAGE
=
com.sun.jndi.ldap
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/com/sun/jndi/rmi/registry/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../../../../..
BUILDDIR
=
../../../../..
MODULE
=
jndi-rmiregistry
PACKAGE
=
com.sun.jndi.rmi.registry
PACKAGE
=
com.sun.jndi.rmi.registry
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/com/sun/nio/sctp/FILES_java.gmk
浏览文件 @
efdc7738
...
@@ -57,8 +57,7 @@ FILES_java += \
...
@@ -57,8 +57,7 @@ FILES_java += \
sun/nio/ch/SctpResultContainer.java \
sun/nio/ch/SctpResultContainer.java \
sun/nio/ch/SctpSendFailed.java \
sun/nio/ch/SctpSendFailed.java \
sun/nio/ch/SctpServerChannelImpl.java \
sun/nio/ch/SctpServerChannelImpl.java \
sun/nio/ch/SctpShutdown.java \
sun/nio/ch/SctpShutdown.java
sun/nio/ch/SctpSocketDispatcher.java
else
else
FILES_java += \
FILES_java += \
sun/nio/ch/SctpChannelImpl.java \
sun/nio/ch/SctpChannelImpl.java \
...
...
make/com/sun/nio/sctp/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../../../..
BUILDDIR
=
../../../..
MODULE
=
sctp
PACKAGE
=
com.sun.nio.sctp
PACKAGE
=
com.sun.nio.sctp
LIBRARY
=
sctp
LIBRARY
=
sctp
PRODUCT
=
sun
PRODUCT
=
sun
...
...
make/com/sun/nio/sctp/mapfile-vers
浏览文件 @
efdc7738
...
@@ -25,9 +25,14 @@
...
@@ -25,9 +25,14 @@
SUNWprivate_1.1 {
SUNWprivate_1.1 {
global:
global:
Java_sun_nio_ch_SctpNet_init;
Java_sun_nio_ch_SctpNet_socket0;
Java_sun_nio_ch_SctpNet_socket0;
Java_sun_nio_ch_SctpNet_bindx;
Java_sun_nio_ch_SctpNet_bindx;
Java_sun_nio_ch_SctpNet_branch0;
Java_sun_nio_ch_SctpNet_branch0;
Java_sun_nio_ch_SctpNet_listen0;
Java_sun_nio_ch_SctpNet_connect0;
Java_sun_nio_ch_SctpNet_close0;
Java_sun_nio_ch_SctpNet_preClose0;
Java_sun_nio_ch_SctpNet_getLocalAddresses0;
Java_sun_nio_ch_SctpNet_getLocalAddresses0;
Java_sun_nio_ch_SctpNet_getRemoteAddresses0;
Java_sun_nio_ch_SctpNet_getRemoteAddresses0;
Java_sun_nio_ch_SctpNet_getPrimAddrOption0;
Java_sun_nio_ch_SctpNet_getPrimAddrOption0;
...
...
make/com/sun/org/apache/xml/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../../../../..
BUILDDIR
=
../../../../..
MODULE
=
security-xmldsig
PACKAGE
=
com.sun.org.apache.xml
PACKAGE
=
com.sun.org.apache.xml
PRODUCT
=
xml
PRODUCT
=
xml
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/com/sun/rowset/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
jdbc-enterprise
PACKAGE
=
com.sun.rowset
PACKAGE
=
com.sun.rowset
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/com/sun/script/Makefile
浏览文件 @
efdc7738
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
scripting-rhino
PACKAGE
=
com.sun.script
PACKAGE
=
com.sun.script
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/com/sun/security/auth/module/Makefile
浏览文件 @
efdc7738
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
# Makefile for building auth modules.
# Makefile for building auth modules.
BUILDDIR
=
../../../../..
BUILDDIR
=
../../../../..
MODULE
=
security-auth
PACKAGE
=
com.sun.security.auth.module
PACKAGE
=
com.sun.security.auth.module
PRODUCT
=
sun
PRODUCT
=
sun
...
...
make/com/sun/servicetag/Makefile
浏览文件 @
efdc7738
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
# have any questions.
# have any questions.
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
servicetag
PACKAGE
=
com.sun.servicetag
PACKAGE
=
com.sun.servicetag
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
@@ -68,7 +69,7 @@ $(CLASSBINDIR)/%: $(SHARE_SRC)/classes/%
...
@@ -68,7 +69,7 @@ $(CLASSBINDIR)/%: $(SHARE_SRC)/classes/%
$(SERVICETAG_LIBDIR)/jdk_header.png
:
$(SHARE_SRC)/classes/com/sun/servicetag/resources/jdk_header.png
$(SERVICETAG_LIBDIR)/jdk_header.png
:
$(SHARE_SRC)/classes/com/sun/servicetag/resources/jdk_header.png
$
(
install-file
)
$
(
install-file
)
$(
CHMOD)
444
$@
$(
call
chmod-file, 444
)
install-servicetag-lib
:
install-servicetag-lib
:
@
$(RM)
-rf
$(SERVICETAG_LIBDIR)
@
$(RM)
-rf
$(SERVICETAG_LIBDIR)
...
...
make/com/sun/tools/attach/Makefile
浏览文件 @
efdc7738
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
BUILDDIR
=
../../../..
BUILDDIR
=
../../../..
MODULE
=
attach
PACKAGE
=
com.sun.tools.attach
PACKAGE
=
com.sun.tools.attach
LIBRARY
=
attach
LIBRARY
=
attach
PRODUCT
=
sun
PRODUCT
=
sun
...
@@ -65,6 +66,7 @@ $(SERVICEDIR)/%: $(SHARE_SRC)/classes/sun/tools/attach/META-INF/services/%
...
@@ -65,6 +66,7 @@ $(SERVICEDIR)/%: $(SHARE_SRC)/classes/sun/tools/attach/META-INF/services/%
@
$(MKDIR)
-p
$
(
@D
)
@
$(MKDIR)
-p
$
(
@D
)
@
$(RM)
$@
@
$(RM)
$@
@
$(CAT)
$<
|
$(SED)
-e
"s/^#
\[
$(PLATFORM)
\]
//"
>
$@
@
$(CAT)
$<
|
$(SED)
-e
"s/^#
\[
$(PLATFORM)
\]
//"
>
$@
@
$
(
install-module-file
)
.PHONY
:
copy-files
.PHONY
:
copy-files
...
...
make/common/Defs.gmk
浏览文件 @
efdc7738
...
@@ -225,12 +225,6 @@ DEVTOOLS_FT_DIR_EXISTS = $(shell \
...
@@ -225,12 +225,6 @@ DEVTOOLS_FT_DIR_EXISTS = $(shell \
endif
endif
endif
endif
ifeq ($(PLATFORM), windows)
FREETYPE_LIB = $(FREETYPE_LIB_PATH)/freetype.lib
else
FREETYPE_LIB = -L$(FREETYPE_LIB_PATH) -lfreetype
endif
ifdef ALT_FREETYPE_HEADERS_PATH
ifdef ALT_FREETYPE_HEADERS_PATH
FREETYPE_HEADERS_PATH = $(ALT_FREETYPE_HEADERS_PATH)
FREETYPE_HEADERS_PATH = $(ALT_FREETYPE_HEADERS_PATH)
else
else
...
@@ -313,6 +307,9 @@ INCLUDEDIR = $(OUTPUTDIR)/include
...
@@ -313,6 +307,9 @@ INCLUDEDIR = $(OUTPUTDIR)/include
# for generated class files
# for generated class files
CLASSBINDIR = $(OUTPUTDIR)/classes
CLASSBINDIR = $(OUTPUTDIR)/classes
DEMOCLASSDIR = $(OUTPUTDIR)/democlasses
DEMOCLASSDIR = $(OUTPUTDIR)/democlasses
# for modules
MODULES_DIR = $(OUTPUTDIR)/modules
ABS_MODULES_DIR = $(ABS_OUTPUTDIR)/modules
# for generated tool class files
# for generated tool class files
BUILDTOOLCLASSDIR = $(OUTPUTDIR)/btclasses
BUILDTOOLCLASSDIR = $(OUTPUTDIR)/btclasses
# for build tool jar files
# for build tool jar files
...
@@ -388,6 +385,22 @@ ifneq ($(THREADDIR),)
...
@@ -388,6 +385,22 @@ ifneq ($(THREADDIR),)
UNIQUE_LOCATION_STRING += /$(THREADDIR)
UNIQUE_LOCATION_STRING += /$(THREADDIR)
endif
endif
#
# Build units may or may not define MODULE. Default to "other".
#
# MODULE variable defines the lowest-level module name that
# might or might not be the name of the modules created in
# the modules build (see make/modules/modules.config and
# modules.group).
#
MODULES_TEMPDIR = $(OUTPUTDIR)/tmp/modules
ABS_MODULES_TEMPDIR = $(ABS_OUTPUTDIR)/tmp/modules
ifndef MODULE
MODULE = other
endif
override MODULE_DEST_DIR = $(MODULES_TEMPDIR)/$(MODULE)
# the use of += above makes a space separated list which we need to
# the use of += above makes a space separated list which we need to
# remove for filespecs.
# remove for filespecs.
#
#
...
@@ -497,6 +510,58 @@ PKGDIR = $(subst .,/,$(PACKAGE))
...
@@ -497,6 +510,58 @@ PKGDIR = $(subst .,/,$(PACKAGE))
#
#
include $(JDK_MAKE_SHARED_DIR)/Defs-java.gmk
include $(JDK_MAKE_SHARED_DIR)/Defs-java.gmk
#
# Macros to find the module that $@ belongs to
#
UNIQUE_PATH_PATTERN = $(subst /,.,$(UNIQUE_PATH))
MODULE_PATH_PATTERN = -e 's%.*\/classes\/%classes\/%' \
-e 's%.*\/$(UNIQUE_PATH_PATTERN)\/%classes\/%' \
-e 's%.*\/lib\/%lib\/%' \
-e 's%.*\/bin\/%bin\/%' \
-e 's%.*\/include\/%include\/%' \
-e 's%.*\/demo\/%demo\/%' \
-e 's%.*\/sample\/%sample\/%'
# Install a file to its module
define install-module-file
dest=`echo $(@D)/ | $(SED) $(MODULE_PATH_PATTERN)` ; \
$(MKDIR) -p $(MODULE_DEST_DIR)/$$dest; \
$(CP) -f $@ $(MODULE_DEST_DIR)/$$dest
endef
# Install all files from the directory to its module
define install-module-dir
dest=`echo $(@D)/ | $(SED) $(MODULE_PATH_PATTERN)` ; \
$(MKDIR) -p $(MODULE_DEST_DIR)/$$dest; \
$(CP) -rf $(@D)/* $(MODULE_DEST_DIR)/$$dest
endef
# chmod the file in its module
define chmod-module-file
dest=`echo $@ | $(SED) $(MODULE_PATH_PATTERN)` ; \
$(CHMOD) $1 $(MODULE_DEST_DIR)/$$dest
endef
# install a sym link in its module
define install-module-sym-link
dest=`echo $@ | $(SED) $(MODULE_PATH_PATTERN)` ; \
$(LN) -sf $1 $(MODULE_DEST_DIR)/$$dest
endef
# Run MAKE $@ for a launcher:
# $(call make-launcher, name, mainclass, java-args, main-args)
define make-launcher
$(CD) $(BUILDDIR)/launchers && \
$(MAKE) -f Makefile.launcher \
MODULE=$(MODULE) \
PROGRAM=$(strip $1) \
MAIN_CLASS=$(strip $2) \
MAIN_JAVA_ARGS="$(strip $3)" \
MAIN_ARGS="$(strip $4)"
endef
#
#
# Convenient macros
# Convenient macros
#
#
...
@@ -511,6 +576,28 @@ endef
...
@@ -511,6 +576,28 @@ endef
define install-file
define install-file
$(prep-target)
$(prep-target)
$(CP) $< $@
$(CP) $< $@
$(install-module-file)
endef
define chmod-file
$(CHMOD) $1 $@
$(call chmod-module-file, $1)
endef
define install-sym-link
$(LN) -s $1 $@
$(call install-module-sym-link, $1)
endef
#
# Marcos for files not belonging to any module
define install-non-module-file
$(prep-target)
$(CP) $< $@
endef
define install-manifest-file
$(install-non-module-file)
endef
endef
# Cleanup rule for after debug java run (hotspot.log file is left around)
# Cleanup rule for after debug java run (hotspot.log file is left around)
...
@@ -712,7 +799,7 @@ else
...
@@ -712,7 +799,7 @@ else
endif
endif
# Install of imported file (JDK_IMPORT_PATH, or some other external location)
# Install of imported file (JDK_IMPORT_PATH, or some other external location)
define install-import-file
define install-import
only
-file
@$(ECHO) "ASSEMBLY_IMPORT: $@"
@$(ECHO) "ASSEMBLY_IMPORT: $@"
$(prep-target)
$(prep-target)
$(CP) $< $@
$(CP) $< $@
...
@@ -730,4 +817,9 @@ $(CP) $< $@
...
@@ -730,4 +817,9 @@ $(CP) $< $@
fi
fi
endef
endef
define install-import-file
$(install-importonly-file)
$(install-module-file)
endef
.PHONY: all build clean clobber
.PHONY: all build clean clobber
make/common/Demo.gmk
浏览文件 @
efdc7738
...
@@ -25,6 +25,8 @@
...
@@ -25,6 +25,8 @@
# JDK Demo building jar file.
# JDK Demo building jar file.
MODULE = demos
# Some names are defined with LIBRARY inside the Defs.gmk file
# Some names are defined with LIBRARY inside the Defs.gmk file
LIBRARY=$(DEMONAME)
LIBRARY=$(DEMONAME)
OBJDIR=$(TEMPDIR)/$(DEMONAME)
OBJDIR=$(TEMPDIR)/$(DEMONAME)
...
...
make/common/Library.gmk
浏览文件 @
efdc7738
...
@@ -193,9 +193,18 @@ ifdef MT
...
@@ -193,9 +193,18 @@ ifdef MT
$(MT) /manifest $(OBJDIR)/$(@F).manifest /outputresource:$(OBJDIR)/$(@F);#2
$(MT) /manifest $(OBJDIR)/$(@F).manifest /outputresource:$(OBJDIR)/$(@F);#2
endif
endif
$(CP) $(OBJDIR)/$(@F) $@
$(CP) $(OBJDIR)/$(@F) $@
$(install-module-file)
$(CP) $(OBJDIR)/$(LIBRARY).map $(@D)
$(CP) $(OBJDIR)/$(LIBRARY).map $(@D)
$(CP) $(OBJDIR)/$(LIBRARY).pdb $(@D)
$(CP) $(OBJDIR)/$(LIBRARY).pdb $(@D)
$(ACTUAL_LIBRARY):: $(ACTUAL_LIBRARY_DIR)/$(LIBRARY).map $(ACTUAL_LIBRARY_DIR)/$(LIBRARY).pdb
$(ACTUAL_LIBRARY_DIR)/%.map: FORCE
$(install-module-file)
$(ACTUAL_LIBRARY_DIR)/%.pdb: FORCE
$(install-module-file)
endif # LIBRARY
endif # LIBRARY
$(OBJDIR)/$(LIBRARY).lcf: $(OBJDIR)/$(LIBRARY).res $(COMPILE_FILES_o) $(FILES_m)
$(OBJDIR)/$(LIBRARY).lcf: $(OBJDIR)/$(LIBRARY).res $(COMPILE_FILES_o) $(FILES_m)
...
@@ -250,6 +259,7 @@ ifeq ($(LIBRARY), fdlibm)
...
@@ -250,6 +259,7 @@ ifeq ($(LIBRARY), fdlibm)
$(AR) -r $@ $(FILES_o)
$(AR) -r $@ $(FILES_o)
else # LIBRARY
else # LIBRARY
$(LINKER) $(SHARED_LIBRARY_FLAG) -o $@ $(FILES_o) $(LDLIBS)
$(LINKER) $(SHARED_LIBRARY_FLAG) -o $@ $(FILES_o) $(LDLIBS)
$(install-module-file)
ifeq ($(WRITE_LIBVERSION),true)
ifeq ($(WRITE_LIBVERSION),true)
$(MCS) -d -a "$(FULL_VERSION)" $@
$(MCS) -d -a "$(FULL_VERSION)" $@
endif # WRITE_LIBVERSION
endif # WRITE_LIBVERSION
...
@@ -353,5 +363,7 @@ fastdebug:
...
@@ -353,5 +363,7 @@ fastdebug:
openjdk:
openjdk:
$(MAKE) OPENJDK=true build
$(MAKE) OPENJDK=true build
FORCE:
.PHONY: all build debug fastdebug
.PHONY: all build debug fastdebug
make/common/Modules.gmk
浏览文件 @
efdc7738
...
@@ -34,12 +34,10 @@ JRE_MODULE_IMAGE_DIR = $(ABS_OUTPUTDIR)/jre-module-image
...
@@ -34,12 +34,10 @@ JRE_MODULE_IMAGE_DIR = $(ABS_OUTPUTDIR)/jre-module-image
#
#
# Open issues that need further investigation:
# Open issues that need further investigation:
# 1. Classes in jre/lib/ext/dnsns.jar are currently put in jre/lib/jndi-dns
# 1. Classes in jre/lib/ext/dnsns.jar are currently put in jre/lib/jndi-dns
# module.
# module.
META-INF/services file is not installed.
# 2. Signed jars
# 2. Signed jars
# For JDK build, signed jars are copied to the build.
# For JDK build, signed jars are copied to the build.
# All jars in the module image are unsigned.
# All jars in the module image are unsigned.
# 3. jre/lib/security/US_export_policy.jar and local_policy.jar
# are not included in the module image yet.
MODULE_IMAGEBINDIR = bin
MODULE_IMAGEBINDIR = bin
...
@@ -63,7 +61,8 @@ process-module-image-jre process-module-image-jdk ::
...
@@ -63,7 +61,8 @@ process-module-image-jre process-module-image-jdk ::
@$(ECHO) ">>>Making "$@" @ `$(DATE)` ..."
@$(ECHO) ">>>Making "$@" @ `$(DATE)` ..."
# Order is important here, trim jre after jdk image is created
# Order is important here, trim jre after jdk image is created
modules:: sanity-module-images post-sanity-module-images \
modules:: gen-modules \
sanity-module-images post-sanity-module-images \
$(INITIAL_MODULE_IMAGE_JRE) $(INITIAL_MODULE_IMAGE_JDK) \
$(INITIAL_MODULE_IMAGE_JRE) $(INITIAL_MODULE_IMAGE_JDK) \
trim-module-image-jre trim-module-image-jdk \
trim-module-image-jre trim-module-image-jdk \
process-module-image-jre process-module-image-jdk
process-module-image-jre process-module-image-jdk
...
@@ -122,8 +121,33 @@ endif
...
@@ -122,8 +121,33 @@ endif
# JRE Image
# JRE Image
######################################################
######################################################
MODULES_TEMPDIR=$(ABS_TEMPDIR)/modules
MODULES_LIST = $(MODULES_TEMPDIR)/classlist/modules.list
MODULES_LIB = $(ABS_OUTPUTDIR)/modules
# Modules in the jre/lib/security directory
POLICY_MODULES = US_export_policy local_policy
# Modules in the modules/ext directory
EXT_MODULES = localedata security-sunec security-sunjce
# Build PKCS#11 on all platforms except 64-bit Windows.
PKCS11 = security-sunpkcs11
ifeq ($(ARCH_DATA_MODEL), 64)
ifeq ($(PLATFORM), windows)
PKCS11 =
endif
endif
EXT_MODULES += $(PKCS11)
# Build Microsoft CryptoAPI provider only on (non-64-bit) Windows platform.
ifeq ($(PLATFORM), windows)
ifneq ($(ARCH_DATA_MODEL), 64)
EXT_MODULES += security-sunmscapi
endif
endif
# Modules for JDK only
JDK_MODULES = tools
gen-modules:
gen-modules:
$(CD) modules; $(MAKE) all
$(CD) modules; $(MAKE) all
...
@@ -151,7 +175,6 @@ initial-module-image-jre-sol64:: initial-module-image-jre-setup \
...
@@ -151,7 +175,6 @@ initial-module-image-jre-sol64:: initial-module-image-jre-setup \
# Construct an initial jre image (initial jdk jre) no trimming or stripping
# Construct an initial jre image (initial jdk jre) no trimming or stripping
initial-module-image-jre:: initial-module-image-jre-setup \
initial-module-image-jre:: initial-module-image-jre-setup \
$(JRE_LICENSES) $(JRE_MODULE_DOCFILES) \
$(JRE_LICENSES) $(JRE_MODULE_DOCFILES) \
gen-modules \
$(BUILDMETAINDEX_JARFILE)
$(BUILDMETAINDEX_JARFILE)
@# Copy in bin directory
@# Copy in bin directory
$(CD) $(OUTPUTDIR) && $(FIND) bin -depth | $(CPIO) -pdum $(JRE_MODULE_IMAGE_DIR)
$(CD) $(OUTPUTDIR) && $(FIND) bin -depth | $(CPIO) -pdum $(JRE_MODULE_IMAGE_DIR)
...
@@ -162,7 +185,21 @@ initial-module-image-jre:: initial-module-image-jre-setup \
...
@@ -162,7 +185,21 @@ initial-module-image-jre:: initial-module-image-jre-setup \
@#
@#
@# copy modules to jre/lib
@# copy modules to jre/lib
@#
@#
$(CP) -rf $(MODULES_LIB)/jre/lib/* $(JRE_MODULE_IMAGE_DIR)/lib
for m in `$(NAWK) '{print $$1}' $(MODULES_LIST)` ; do \
$(CP) $(MODULES_DIR)/$$m/lib/$$m.jar $(JRE_MODULE_IMAGE_DIR)/lib ; \
done
$(MKDIR) -p $(JRE_MODULE_IMAGE_DIR)/lib/ext
for m in $(EXT_MODULES) ; do \
$(MV) $(JRE_MODULE_IMAGE_DIR)/lib/$$m.jar $(JRE_MODULE_IMAGE_DIR)/lib/ext ; \
done
for m in $(POLICY_MODULES) ; do \
$(MV) $(JRE_MODULE_IMAGE_DIR)/lib/$$m.jar $(JRE_MODULE_IMAGE_DIR)/lib/security; \
done
@# Remove jdk modules
for m in $(JDK_MODULES) ; do \
$(RM) $(JRE_MODULE_IMAGE_DIR)/lib/$$m.jar ; \
done
@# Make sure all directories are read/execute for everyone
@# Make sure all directories are read/execute for everyone
$(CHMOD) a+rx `$(FIND) $(JRE_MODULE_IMAGE_DIR) -type d`
$(CHMOD) a+rx `$(FIND) $(JRE_MODULE_IMAGE_DIR) -type d`
@# Remove some files from the jre area
@# Remove some files from the jre area
...
@@ -304,7 +341,9 @@ initial-module-image-jdk:: initial-module-image-jdk-setup \
...
@@ -304,7 +341,9 @@ initial-module-image-jdk:: initial-module-image-jdk-setup \
@# copy jdk modules to jdk/lib
@# copy jdk modules to jdk/lib
@#
@#
$(MKDIR) -p $(JDK_MODULE_IMAGE_DIR)/lib
$(MKDIR) -p $(JDK_MODULE_IMAGE_DIR)/lib
$(CP) -rf $(MODULES_LIB)/lib/* $(JDK_MODULE_IMAGE_DIR)/lib
for m in $(JDK_MODULES) ; do \
$(CP) $(MODULES_DIR)/$$m/lib/$$m.jar $(JDK_MODULE_IMAGE_DIR)/lib ; \
done
ifeq ($(PLATFORM), windows)
ifeq ($(PLATFORM), windows)
@#
@#
@# lib/
@# lib/
...
...
make/common/Program.gmk
浏览文件 @
efdc7738
...
@@ -50,8 +50,6 @@ ACTUAL_PROGRAM_NAME = $(PROGRAM)$(EXE_SUFFIX)
...
@@ -50,8 +50,6 @@ ACTUAL_PROGRAM_NAME = $(PROGRAM)$(EXE_SUFFIX)
ACTUAL_PROGRAM_DIR = $(BINDIR)
ACTUAL_PROGRAM_DIR = $(BINDIR)
ACTUAL_PROGRAM = $(ACTUAL_PROGRAM_DIR)/$(ACTUAL_PROGRAM_NAME)
ACTUAL_PROGRAM = $(ACTUAL_PROGRAM_DIR)/$(ACTUAL_PROGRAM_NAME)
JVMCFG = $(LIBDIR)/$(LIBARCH)/jvm.cfg
# Make sure the default rule is all
# Make sure the default rule is all
program_default_rule: all
program_default_rule: all
...
@@ -116,7 +114,7 @@ endif
...
@@ -116,7 +114,7 @@ endif
ifeq ($(COMPILE_IT),true)
ifeq ($(COMPILE_IT),true)
$(ACTUAL_PROGRAM):: classes $(
JVMCFG) $(
INIT)
$(ACTUAL_PROGRAM):: classes $(INIT)
#
#
# Windows only
# Windows only
...
@@ -190,12 +188,13 @@ $(ACTUAL_PROGRAM):: $(FILES_o)
...
@@ -190,12 +188,13 @@ $(ACTUAL_PROGRAM):: $(FILES_o)
@$(MKDIR) -p $(TEMPDIR)
@$(MKDIR) -p $(TEMPDIR)
$(LINK_PRE_CMD) $(CC) $(CC_OBJECT_OUTPUT_FLAG)$@ $(LDFLAGS) \
$(LINK_PRE_CMD) $(CC) $(CC_OBJECT_OUTPUT_FLAG)$@ $(LDFLAGS) \
$(FILES_o) $(THREADLIBS) $(LDLIBS)
$(FILES_o) $(THREADLIBS) $(LDLIBS)
$(install-module-file)
endif # PLATFORM
endif # PLATFORM
else # COMPILE_IT
else # COMPILE_IT
$(ACTUAL_PROGRAM)::
$(JVMCFG)
$(ACTUAL_PROGRAM)::
# Copies in the file from the JDK_IMPORT_PATH area
# Copies in the file from the JDK_IMPORT_PATH area
$(ACTUAL_PROGRAM_DIR)/%: $(JDK_IMPORT_PATH)/jre/bin/%
$(ACTUAL_PROGRAM_DIR)/%: $(JDK_IMPORT_PATH)/jre/bin/%
...
@@ -271,18 +270,6 @@ $(OBJDIR)/main.$(OBJECT_SUFFIX): $(LAUNCHER_SHARE_SRC)/bin/main.c
...
@@ -271,18 +270,6 @@ $(OBJDIR)/main.$(OBJECT_SUFFIX): $(LAUNCHER_SHARE_SRC)/bin/main.c
$(COMPILE.c) $(CC_OBJECT_OUTPUT_FLAG)$(OBJDIR)/main.$(OBJECT_SUFFIX) \
$(COMPILE.c) $(CC_OBJECT_OUTPUT_FLAG)$(OBJDIR)/main.$(OBJECT_SUFFIX) \
$(VERSION_DEFINES) $<
$(VERSION_DEFINES) $<
#
# How to install jvm.cfg.
#
ifeq ($(ZERO_BUILD), true)
JVMCFG_ARCH = zero
else
JVMCFG_ARCH = $(ARCH)
endif
$(JVMCFG): $(LAUNCHER_PLATFORM_SRC)/bin/$(JVMCFG_ARCH)/jvm.cfg
$(install-file)
#
#
# Default dependencies
# Default dependencies
#
#
...
...
make/common/internal/BinaryPlugs.gmk
浏览文件 @
efdc7738
...
@@ -116,7 +116,7 @@ PLUG_IMPORT_JARFILE=$(BINARY_PLUGS_JARFILE)
...
@@ -116,7 +116,7 @@ PLUG_IMPORT_JARFILE=$(BINARY_PLUGS_JARFILE)
define import-binary-plug-file
define import-binary-plug-file
@$(ECHO) "PLUG IMPORT: $(@F)"
@$(ECHO) "PLUG IMPORT: $(@F)"
$(install-file)
$(install-
non-module-
file)
endef # import-binary-plug-file
endef # import-binary-plug-file
# Import classes command
# Import classes command
...
@@ -184,7 +184,7 @@ PLUG_EXPORT_JARFILE=$(PLUG_EXPORT_DIR)/jre/lib/$(BINARY_PLUGS_JARNAME)
...
@@ -184,7 +184,7 @@ PLUG_EXPORT_JARFILE=$(PLUG_EXPORT_DIR)/jre/lib/$(BINARY_PLUGS_JARNAME)
define export-binary-plug-file
define export-binary-plug-file
@$(ECHO) "PLUG EXPORT: $(@F)"
@$(ECHO) "PLUG EXPORT: $(@F)"
$(install-file)
$(install-
non-module-
file)
endef # export-binary-plug-file
endef # export-binary-plug-file
# OpenJDK Binary Plug License
# OpenJDK Binary Plug License
...
...
make/common/internal/Resources.gmk
浏览文件 @
efdc7738
...
@@ -139,7 +139,7 @@ STRIP_PROP_FILES = $(PROPERTIES_FILES:%=$(CLASSDESTDIR)/%)
...
@@ -139,7 +139,7 @@ STRIP_PROP_FILES = $(PROPERTIES_FILES:%=$(CLASSDESTDIR)/%)
STRIP_PROP_options=$(TEMPDIR)/strip_prop_options
STRIP_PROP_options=$(TEMPDIR)/strip_prop_options
define install-properties-file
define install-properties-file
$(install-file)
$(install-file)
$(
CHMOD) a+rw $@
$(
call chmod-file, a+rw)
@$(ECHO) "# Adding to strip properties list: $@"
@$(ECHO) "# Adding to strip properties list: $@"
$(ECHO) "$@" >> $(STRIP_PROP_options)
$(ECHO) "$@" >> $(STRIP_PROP_options)
endef
endef
...
...
make/common/shared/Sanity.gmk
浏览文件 @
efdc7738
...
@@ -1117,7 +1117,7 @@ TMP_SDK_INCLUDE_GET_FULL_VERSION= $(TMP_SDK_INCLUDE_FIND_VERSION) | \
...
@@ -1117,7 +1117,7 @@ TMP_SDK_INCLUDE_GET_FULL_VERSION= $(TMP_SDK_INCLUDE_FIND_VERSION) | \
# be checked when this represents a full control build (i.e. the
# be checked when this represents a full control build (i.e. the
# HOTSPOT_IMPORT_PATH includes these files in it's 'include' directory).
# HOTSPOT_IMPORT_PATH includes these files in it's 'include' directory).
$(TEMPDIR)/%.h: $(SHARE_SRC)/javavm/export/%.h
$(TEMPDIR)/%.h: $(SHARE_SRC)/javavm/export/%.h
@$(install-file)
@$(install-
non-module-
file)
@$(RM) $@.IMPORT
@$(RM) $@.IMPORT
@if [ -r $(HOTSPOT_IMPORT_PATH)/include/$(@F) ]; then \
@if [ -r $(HOTSPOT_IMPORT_PATH)/include/$(@F) ]; then \
$(CP) $(HOTSPOT_IMPORT_PATH)/include/$(@F) $@.IMPORT ; \
$(CP) $(HOTSPOT_IMPORT_PATH)/include/$(@F) $@.IMPORT ; \
...
@@ -1131,7 +1131,7 @@ $(TEMPDIR)/%.h: $(SHARE_SRC)/javavm/export/%.h
...
@@ -1131,7 +1131,7 @@ $(TEMPDIR)/%.h: $(SHARE_SRC)/javavm/export/%.h
fi
fi
$(TEMPDIR)/%.h: $(PLATFORM_SRC)/javavm/export/%.h
$(TEMPDIR)/%.h: $(PLATFORM_SRC)/javavm/export/%.h
@$(install-file)
@$(install-
non-module-
file)
@$(RM) $@.IMPORT
@$(RM) $@.IMPORT
@if [ -r $(HOTSPOT_IMPORT_PATH)/include/$(PLATFORM_INCLUDE_NAME)/$(@F) ]; then \
@if [ -r $(HOTSPOT_IMPORT_PATH)/include/$(PLATFORM_INCLUDE_NAME)/$(@F) ]; then \
$(CP) $(HOTSPOT_IMPORT_PATH)/include/$(PLATFORM_INCLUDE_NAME)/$(@F) $@.IMPORT ; \
$(CP) $(HOTSPOT_IMPORT_PATH)/include/$(PLATFORM_INCLUDE_NAME)/$(@F) $@.IMPORT ; \
...
...
make/java/awt/Makefile
浏览文件 @
efdc7738
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
awt
PACKAGE
=
java.awt
PACKAGE
=
java.awt
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/java/fdlibm/Makefile
浏览文件 @
efdc7738
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
base
LIBRARY
=
fdlibm
LIBRARY
=
fdlibm
PRODUCT
=
java
PRODUCT
=
java
...
...
make/java/hpi/native/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
base
LIBRARY
=
hpi
LIBRARY
=
hpi
PRODUCT
=
java
PRODUCT
=
java
THREADDIR
=
native_threads
THREADDIR
=
native_threads
...
...
make/java/hpi/windows/Makefile
浏览文件 @
efdc7738
...
@@ -26,8 +26,9 @@
...
@@ -26,8 +26,9 @@
#
#
# Makefile for Windows HPI DLL
# Makefile for Windows HPI DLL
#
#
BUILDDIR
=
../../..
BUILDDIR
=
../../..
LIBRARY
=
hpi
MODULE
=
base
LIBRARY
=
hpi
PRODUCT
=
java
PRODUCT
=
java
THREADDIR
=
windows_threads
THREADDIR
=
windows_threads
LIB_LOCATION
=
$(BINDIR)
LIB_LOCATION
=
$(BINDIR)
...
...
make/java/instrument/Makefile
浏览文件 @
efdc7738
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
# agent, supporting java.lang.instrument
# agent, supporting java.lang.instrument
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
instrument
PACKAGE
=
sun.instrument
PACKAGE
=
sun.instrument
LIBRARY
=
instrument
LIBRARY
=
instrument
PRODUCT
=
sun
PRODUCT
=
sun
...
...
make/java/java/Makefile
浏览文件 @
efdc7738
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
base
PACKAGE
=
java.lang
PACKAGE
=
java.lang
LIBRARY
=
java
LIBRARY
=
java
PRODUCT
=
java
PRODUCT
=
java
...
@@ -241,7 +242,7 @@ ifneq ($(PLATFORM),windows)
...
@@ -241,7 +242,7 @@ ifneq ($(PLATFORM),windows)
$(GENSRCDIR)/java/lang/UNIXProcess.java
:
\
$(GENSRCDIR)/java/lang/UNIXProcess.java
:
\
$(PLATFORM_SRC)/classes/java/lang/UNIXProcess.java.$(PLATFORM)
$(PLATFORM_SRC)/classes/java/lang/UNIXProcess.java.$(PLATFORM)
$
(
install-file
)
$
(
install-
non-module-
file
)
clean
::
clean
::
$(RM)
$(GENSRCDIR)
/java/lang/UNIXProcess.java
$(RM)
$(GENSRCDIR)
/java/lang/UNIXProcess.java
...
@@ -285,7 +286,7 @@ TZMAPFILE = $(PLATFORM_SRC)/lib/tzmappings
...
@@ -285,7 +286,7 @@ TZMAPFILE = $(PLATFORM_SRC)/lib/tzmappings
$(TZMAP)
:
$(TZMAPFILE)
$(TZMAP)
:
$(TZMAPFILE)
$
(
install-file
)
$
(
install-file
)
$(
CHMOD)
444
$@
$(
call
chmod-file, 444
)
endif
endif
build
:
$(LIBDIR)/$(PROPS) $(LIBDIR)/$(CAL_PROPS) $(TZMAP)
build
:
$(LIBDIR)/$(PROPS) $(LIBDIR)/$(CAL_PROPS) $(TZMAP)
...
@@ -315,7 +316,8 @@ $(CURDATA): \
...
@@ -315,7 +316,8 @@ $(CURDATA): \
$(BOOT_JAVA_CMD)
-jar
$(GENERATECURRENCYDATA_JARFILE)
-o
$@
.temp
\
$(BOOT_JAVA_CMD)
-jar
$(GENERATECURRENCYDATA_JARFILE)
-o
$@
.temp
\
<
$(SHARE_SRC)
/classes/java/util/CurrencyData.properties
<
$(SHARE_SRC)
/classes/java/util/CurrencyData.properties
$(MV)
$@
.temp
$@
$(MV)
$@
.temp
$@
$(CHMOD)
444
$@
$
(
install-module-file
)
$(
call
chmod-file, 444
)
clean
::
clean
::
$(RM)
$(CURDATA)
$(RM)
$(CURDATA)
...
@@ -369,7 +371,7 @@ $(GENSRCDIR)/java/lang/CharacterDataLatin1.java \
...
@@ -369,7 +371,7 @@ $(GENSRCDIR)/java/lang/CharacterDataLatin1.java \
-usecharforbyte
11 4 1
-usecharforbyte
11 4 1
$(GENSRCDIR)/java/lang/%.java
:
$(CHARACTERDATA)/%.java.template
$(GENSRCDIR)/java/lang/%.java
:
$(CHARACTERDATA)/%.java.template
$
(
install-file
)
$
(
install-
non-module-
file
)
clean
::
clean
::
$(RM)
$(GENSRCDIR)
/java/lang/CharacterDataLatin1.java
$(RM)
$(GENSRCDIR)
/java/lang/CharacterDataLatin1.java
...
...
make/java/java_crw_demo/Makefile
浏览文件 @
efdc7738
...
@@ -24,6 +24,8 @@
...
@@ -24,6 +24,8 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
demos
LIBRARY
=
java_crw_demo
LIBRARY
=
java_crw_demo
PRODUCT
=
sun
PRODUCT
=
sun
LIBRARY_OUTPUT
=
java_crw_demo
LIBRARY_OUTPUT
=
java_crw_demo
...
...
make/java/java_hprof_demo/Makefile
浏览文件 @
efdc7738
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
instrument
LIBRARY
=
hprof
LIBRARY
=
hprof
PRODUCT
=
sun
PRODUCT
=
sun
LIBRARY_OUTPUT
=
hprof_jvmti
LIBRARY_OUTPUT
=
hprof_jvmti
...
...
make/java/jli/Makefile
浏览文件 @
efdc7738
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
# its manifestations (java, javaw, javac, ...).
# its manifestations (java, javaw, javac, ...).
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
base
LIBRARY
=
jli
LIBRARY
=
jli
PRODUCT
=
java
PRODUCT
=
java
...
...
make/java/jvm/Makefile
浏览文件 @
efdc7738
...
@@ -24,6 +24,8 @@
...
@@ -24,6 +24,8 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
base
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
#
#
...
@@ -36,15 +38,29 @@ FILES_h = $(INCLUDEDIR)/jni.h \
...
@@ -36,15 +38,29 @@ FILES_h = $(INCLUDEDIR)/jni.h \
$(INCLUDEDIR)
/classfile_constants.h
$(INCLUDEDIR)
/classfile_constants.h
$(INCLUDEDIR)/%.h
:
$(SHARE_SRC)/javavm/export/%.h
$(INCLUDEDIR)/%.h
:
$(SHARE_SRC)/javavm/export/%.h
$
(
install-file
)
$
(
install-
non-module-
file
)
$(PLATFORM_INCLUDE)/%.h
:
$(PLATFORM_SRC)/javavm/export/%.h
$(PLATFORM_INCLUDE)/%.h
:
$(PLATFORM_SRC)/javavm/export/%.h
$
(
install-non-module-file
)
JVMCFG
=
$(LIBDIR)
/
$(LIBARCH)
/jvm.cfg
#
# How to install jvm.cfg.
#
ifeq
($(ZERO_BUILD), true)
JVMCFG_ARCH
=
zero
else
JVMCFG_ARCH
=
$(ARCH)
endif
$(JVMCFG)
:
$(PLATFORM_SRC)/bin/$(JVMCFG_ARCH)/jvm.cfg
$
(
install-file
)
$
(
install-file
)
all
:
build
all
:
build
build
:
$(FILES_h)
build
:
$(FILES_h)
$(JVMCFG)
clean clobber
::
clean clobber
::
$(RM)
$(FILES_h)
$(RM)
$(FILES_h)
$(JVMCFG)
make/java/logging/Makefile
浏览文件 @
efdc7738
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
logging
PACKAGE
=
java.util.logging
PACKAGE
=
java.util.logging
PRODUCT
=
java
PRODUCT
=
java
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/java/main/java/Makefile
浏览文件 @
efdc7738
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#
#
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
base
PROGRAM
=
java
PROGRAM
=
java
PRODUCT
=
java
PRODUCT
=
java
...
...
make/java/main/javaw/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
base
PROGRAM
=
javaw
PROGRAM
=
javaw
PRODUCT
=
java
PRODUCT
=
java
...
...
make/java/management/Makefile
浏览文件 @
efdc7738
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
management
PACKAGE
=
java.lang.management
PACKAGE
=
java.lang.management
LIBRARY
=
management
LIBRARY
=
management
PRODUCT
=
java
PRODUCT
=
java
...
@@ -99,7 +100,7 @@ $(AGENTJAR): $(LIBDIR) $(TEMPDIR)/manifest
...
@@ -99,7 +100,7 @@ $(AGENTJAR): $(LIBDIR) $(TEMPDIR)/manifest
@
$
(
java-vm-cleanup
)
@
$
(
java-vm-cleanup
)
$(TEMPDIR)/manifest
:
$(MANIFEST)
$(TEMPDIR)/manifest
:
$(MANIFEST)
$
(
install-file
)
$
(
install-
manifest-
file
)
build
:
$(AGENTJAR)
build
:
$(AGENTJAR)
...
...
make/java/net/Makefile
浏览文件 @
efdc7738
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
base
PACKAGE
=
java.net
PACKAGE
=
java.net
LIBRARY
=
net
LIBRARY
=
net
PRODUCT
=
sun
PRODUCT
=
sun
...
@@ -111,8 +112,7 @@ LOCALE_SET_DEFINITION = jre
...
@@ -111,8 +112,7 @@ LOCALE_SET_DEFINITION = jre
MISC_FILES
=
$(LIBDIR)
$(LIBDIR)
/net.properties
MISC_FILES
=
$(LIBDIR)
$(LIBDIR)
/net.properties
$(LIBDIR)/net.properties
:
$(SHARE_SRC)/lib/net.properties
$(LIBDIR)/net.properties
:
$(SHARE_SRC)/lib/net.properties
@
$(RM)
$@
$
(
install-file
)
$(CP)
$<
$@
#
#
# SDP configuration template
# SDP configuration template
...
...
make/java/nio/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
nio
PACKAGE
=
java.nio
PACKAGE
=
java.nio
LIBRARY
=
nio
LIBRARY
=
nio
PRODUCT
=
java
PRODUCT
=
java
...
@@ -816,7 +817,7 @@ SOR_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSOR_SRC) | \
...
@@ -816,7 +817,7 @@ SOR_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSOR_SRC) | \
$(NAWK)
'/^.*Copyright.*Sun/ { print $$3
}
'
)
$(NAWK)
'/^.*Copyright.*Sun/ { print $$3
}
'
)
$(TEMPDIR)/$(GENSOR_SRC)
:
$(GENSOR_SRC)
$(TEMPDIR)/$(GENSOR_SRC)
:
$(GENSOR_SRC)
$
(
install-file
)
$
(
install-
non-module-
file
)
$(GENSOR_EXE)
:
$(TEMPDIR)/$(GENSOR_SRC)
$(GENSOR_EXE)
:
$(TEMPDIR)/$(GENSOR_SRC)
$
(
prep-target
)
$
(
prep-target
)
...
...
make/java/npt/Makefile
浏览文件 @
efdc7738
...
@@ -24,6 +24,9 @@
...
@@ -24,6 +24,9 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
# It's currently used by jpda and hprof. Put it in base module for now.
MODULE
=
base
LIBRARY
=
npt
LIBRARY
=
npt
PRODUCT
=
sun
PRODUCT
=
sun
LIBRARY_OUTPUT
=
npt
LIBRARY_OUTPUT
=
npt
...
...
make/java/redist/Makefile
浏览文件 @
efdc7738
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
base
PRODUCT
=
java
PRODUCT
=
java
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
@@ -61,7 +62,11 @@ CLASSSHARINGDATA_DIR = $(BUILDDIR)/tools/sharing
...
@@ -61,7 +62,11 @@ CLASSSHARINGDATA_DIR = $(BUILDDIR)/tools/sharing
# Needed to do file copy
# Needed to do file copy
ABS_BUILDDIR
:=
$(
call
FullPath,
$(BUILDDIR)
)
ABS_BUILDDIR
:=
$(
call
FullPath,
$(BUILDDIR)
)
all
:
build
SUBDIRS
=
fonts sajdi
all clean clobber
::
$
(
SUBDIRS-loop
)
all
::
build
# List of files created here or coming from BUILDDIR area (this workspace)
# List of files created here or coming from BUILDDIR area (this workspace)
INTERNAL_IMPORT_LIST
=
$(LIBDIR)
/classlist
INTERNAL_IMPORT_LIST
=
$(LIBDIR)
/classlist
...
@@ -70,30 +75,6 @@ INTERNAL_IMPORT_LIST = $(LIBDIR)/classlist
...
@@ -70,30 +75,6 @@ INTERNAL_IMPORT_LIST = $(LIBDIR)/classlist
IMPORT_LIST
=
$(LIB_LOCATION)
/
$(SERVER_LOCATION)
/
$(JVM_NAME)
\
IMPORT_LIST
=
$(LIB_LOCATION)
/
$(SERVER_LOCATION)
/
$(JVM_NAME)
\
$(LIB_LOCATION)
/
$(SERVER_LOCATION)
/Xusage.txt
$(LIB_LOCATION)
/
$(SERVER_LOCATION)
/Xusage.txt
# INCLUDE_SA is false on platforms where SA is not supported.
# On platforms where it is supported, we want to allow it to
# not be present, at least temporarily. So,
# if the SA files (well, just sa-jdi.jar) do not exist
# in the HOTSPOT_IMPORT_PATH, then we won't build SA.
SA_EXISTS
:=
$(
shell
if
[
-r
$(HOTSPOT_IMPORT_PATH)
/lib/sa-jdi.jar
]
;
then
\
$(ECHO)
true
;
\
else
\
$(ECHO)
false
;
\
fi
)
ifeq
($(SA_EXISTS), false)
INCLUDE_SA
:=
false
endif
ifeq
($(INCLUDE_SA), true)
IMPORT_LIST
+=
$(LIBDIR)
/sa-jdi.jar
\
$(LIB_LOCATION)
/
$(SALIB_NAME)
ifeq
($(PLATFORM), windows)
IMPORT_LIST
+=
$(LIB_LOCATION)
/
$(SAMAP_NAME)
\
$(LIB_LOCATION)
/
$(SAPDB_NAME)
endif
endif
# INCLUDE_SA
# Hotspot client is only available on 32-bit non-Zero builds
# Hotspot client is only available on 32-bit non-Zero builds
ifneq
($(ZERO_BUILD), true)
ifneq
($(ZERO_BUILD), true)
ifeq
($(ARCH_DATA_MODEL), 32)
ifeq
($(ARCH_DATA_MODEL), 32)
...
@@ -110,10 +91,10 @@ IMPORT_LIST += $(MS_RUNTIME_LIBRARIES:%=$(BINDIR)/%)
...
@@ -110,10 +91,10 @@ IMPORT_LIST += $(MS_RUNTIME_LIBRARIES:%=$(BINDIR)/%)
# NOTE: These might actually come from BUILDDIR, depends on the settings.
# NOTE: These might actually come from BUILDDIR, depends on the settings.
$(BINDIR)/msvcrt.dll
:
$(MSVCRT_DLL_PATH)/msvcrt.dll
$(BINDIR)/msvcrt.dll
:
$(MSVCRT_DLL_PATH)/msvcrt.dll
$
(
install-import-file
)
$
(
install-import-file
)
$(
CHMOD)
a+x
$@
$(
call
chmod-file, a+x
)
$(BINDIR)/$(MSVCRNN_DLL)
:
$(MSVCRNN_DLL_PATH)/$(MSVCRNN_DLL)
$(BINDIR)/$(MSVCRNN_DLL)
:
$(MSVCRNN_DLL_PATH)/$(MSVCRNN_DLL)
$
(
install-import-file
)
$
(
install-import-file
)
$(
CHMOD)
a+x
$@
$(
call
chmod-file, a+x
)
# Get the hotspot .map and .pdb files for client and server
# Get the hotspot .map and .pdb files for client and server
IMPORT_LIST
+=
\
IMPORT_LIST
+=
\
...
@@ -140,26 +121,32 @@ $(LIBDIR)/$(JVMLIB_NAME): $(HOTSPOT_LIB_PATH)/$(JVMLIB_NAME)
...
@@ -140,26 +121,32 @@ $(LIBDIR)/$(JVMLIB_NAME): $(HOTSPOT_LIB_PATH)/$(JVMLIB_NAME)
$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMMAP_NAME)
:
$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMMAP_NAME)
:
@
$
(
prep-target
)
@
$
(
prep-target
)
-
$(CP)
$(HOTSPOT_CLIENT_PATH)
/
$(JVMMAP_NAME)
$@
-
$(CP)
$(HOTSPOT_CLIENT_PATH)
/
$(JVMMAP_NAME)
$@
@
$
(
install-module-file
)
$(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMMAP_NAME)
:
$(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMMAP_NAME)
:
@
$
(
prep-target
)
@
$
(
prep-target
)
-
$(CP)
$(HOTSPOT_KERNEL_PATH)
/
$(JVMMAP_NAME)
$@
-
$(CP)
$(HOTSPOT_KERNEL_PATH)
/
$(JVMMAP_NAME)
$@
@
$
(
install-module-file
)
$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMMAP_NAME)
:
$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMMAP_NAME)
:
@
$
(
prep-target
)
@
$
(
prep-target
)
-
$(CP)
$(HOTSPOT_SERVER_PATH)
/
$(JVMMAP_NAME)
$@
-
$(CP)
$(HOTSPOT_SERVER_PATH)
/
$(JVMMAP_NAME)
$@
@
$
(
install-module-file
)
$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMPDB_NAME)
:
$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMPDB_NAME)
:
@
$
(
prep-target
)
@
$
(
prep-target
)
-
$(CP)
$(HOTSPOT_CLIENT_PATH)
/
$(JVMPDB_NAME)
$@
-
$(CP)
$(HOTSPOT_CLIENT_PATH)
/
$(JVMPDB_NAME)
$@
@
$
(
install-module-file
)
$(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMPDB_NAME)
:
$(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMPDB_NAME)
:
@
$
(
prep-target
)
@
$
(
prep-target
)
-
$(CP)
$(HOTSPOT_KERNEL_PATH)
/
$(JVMPDB_NAME)
$@
-
$(CP)
$(HOTSPOT_KERNEL_PATH)
/
$(JVMPDB_NAME)
$@
@
$
(
install-module-file
)
$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMPDB_NAME)
:
$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMPDB_NAME)
:
@
$
(
prep-target
)
@
$
(
prep-target
)
-
$(CP)
$(HOTSPOT_SERVER_PATH)
/
$(JVMPDB_NAME)
$@
-
$(CP)
$(HOTSPOT_SERVER_PATH)
/
$(JVMPDB_NAME)
$@
@
$
(
install-module-file
)
# Windows ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Windows
# Windows ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Windows
else
# PLATFORM
else
# PLATFORM
...
@@ -220,7 +207,7 @@ $(LIB_LOCATION)/$(LIBJSIG_NAME): $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJ
...
@@ -220,7 +207,7 @@ $(LIB_LOCATION)/$(LIBJSIG_NAME): $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJ
$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME)
\
$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME)
\
$(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME)
:
$(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME)
:
@
$
(
prep-target
)
@
$
(
prep-target
)
$(
LN)
-s
../
$(LIBJSIG_NAME)
$@
$(
call
install-sym-link, ../
$(LIBJSIG_NAME)
)
$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_NAME)
:
$(HOTSPOT_CLIENT_PATH)/$(JVMDB_NAME)
$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_NAME)
:
$(HOTSPOT_CLIENT_PATH)/$(JVMDB_NAME)
$
(
install-import-file
)
$
(
install-import-file
)
...
@@ -246,28 +233,6 @@ $(LIB_LOCATION)/$(CLIENT_LOCATION)/Xusage.txt : $(HOTSPOT_CLIENT_PATH)/Xusage.tx
...
@@ -246,28 +233,6 @@ $(LIB_LOCATION)/$(CLIENT_LOCATION)/Xusage.txt : $(HOTSPOT_CLIENT_PATH)/Xusage.tx
$(LIB_LOCATION)/$(KERNEL_LOCATION)/Xusage.txt
:
$(HOTSPOT_KERNEL_PATH)/Xusage.txt
$(LIB_LOCATION)/$(KERNEL_LOCATION)/Xusage.txt
:
$(HOTSPOT_KERNEL_PATH)/Xusage.txt
$
(
install-file
)
$
(
install-file
)
ifeq
($(INCLUDE_SA), true)
# The Serviceability Agent is built in the Hotspot workspace.
# It contains two files:
# - sa-jdi.jar: This goes into the same dir as tools.jar.
# - a shared library: sawindbg.dll on windows / libproc.sa on unix
# This goes into the same dir as the other
# shared libs, eg. libjdwp.so.
$(LIBDIR)/sa-jdi.jar
:
$(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar
$
(
install-import-file
)
$(LIB_LOCATION)/$(SALIB_NAME)
:
$(HOTSPOT_SALIB_PATH)/$(SALIB_NAME)
$
(
install-import-file
)
ifeq
($(PLATFORM), windows)
$(LIB_LOCATION)/$(SAPDB_NAME)
:
$(HOTSPOT_SALIB_PATH)/$(SAPDB_NAME)
$
(
install-import-file
)
$(LIB_LOCATION)/$(SAMAP_NAME)
:
$(HOTSPOT_SALIB_PATH)/$(SAMAP_NAME)
$
(
install-import-file
)
endif
# windows
endif
# INCLUDE_SA
#
#
# Specific to OpenJDK building
# Specific to OpenJDK building
#
#
...
@@ -288,7 +253,7 @@ INTERNAL_IMPORT_LIST += \
...
@@ -288,7 +253,7 @@ INTERNAL_IMPORT_LIST += \
$(LIBDIR)/jce.jar
:
\
$(LIBDIR)/jce.jar
:
\
$(BUILDDIR)/closed/tools/crypto/jce/jce.jar
$(BUILDDIR)/closed/tools/crypto/jce/jce.jar
$
(
install-file
)
$
(
install-
non-module-
file
)
$(LIBDIR)/security/US_export_policy.jar
:
\
$(LIBDIR)/security/US_export_policy.jar
:
\
$(BUILDDIR)/closed/tools/crypto/jce/US_export_policy.jar
$(BUILDDIR)/closed/tools/crypto/jce/US_export_policy.jar
$
(
install-file
)
$
(
install-file
)
...
@@ -310,46 +275,6 @@ $(LIBDIR)/classlist: \
...
@@ -310,46 +275,6 @@ $(LIBDIR)/classlist: \
$(CLASSSHARINGDATA_DIR)
/classlist.
$(PLATFORM)
$@
.temp
$(CLASSSHARINGDATA_DIR)
/classlist.
$(PLATFORM)
$@
.temp
$(MV)
$@
.temp
$@
$(MV)
$@
.temp
$@
ifndef
OPENJDK
# Lucida font files are not included in the OpenJDK distribution.
# Get names of font files
include
FILES.gmk
# Copy font files into OUTPUTDIR area
FONTFILES
=
$(SHARED_FONTFILES)
FONTSDIR
=
$(LIBDIR)
/fonts
FONTSDIRFILE
=
$(FONTSDIR)
/fonts.dir
INTERNAL_IMPORT_LIST
+=
$(FONTFILES)
ifneq
($(PLATFORM), windows)
INTERNAL_IMPORT_LIST
+=
$(FONTSDIRFILE)
endif
$(LIBDIR)/fonts/%.ttf
:
$(CLOSED_SRC)/share/lib/fonts/%.ttf
$
(
install-file
)
$(FONTSDIRFILE)
:
$(PLATFORM_SRC)/classes/sun/awt/motif/java.fonts.dir
$
(
install-file
)
ifeq
($(PLATFORM), linux)
# The oblique fonts are only needed/wanted on Linux.
OBLFONTSDIR
=
$(LIBDIR)
/oblique-fonts
OBLFONTSDIRFILE
=
$(OBLFONTSDIR)
/fonts.dir
INTERNAL_IMPORT_LIST
+=
$(OBLIQUE_FONTFILES)
$(OBLFONTSDIRFILE)
$(LIBDIR)/oblique-fonts/%.ttf
:
$(CLOSED_SRC)/share/lib/fonts/oblique/%.ttf
$
(
install-file
)
$(OBLFONTSDIRFILE)
:
$(PLATFORM_SRC)/classes/sun/awt/motif/java.oblique-fonts.dir
$
(
install-file
)
endif
# linux
endif
# !OPENJDK
# Import internal files (ones that are stashed in this source tree)
# Import internal files (ones that are stashed in this source tree)
import_internal_files
:
$(INTERNAL_IMPORT_LIST)
import_internal_files
:
$(INTERNAL_IMPORT_LIST)
...
...
make/java/redist/
FILES.gmk
→
make/java/redist/
fonts/Makefile
浏览文件 @
efdc7738
#
#
# Copyright
1998-2003
Sun Microsystems, Inc. All Rights Reserved.
# Copyright
2009
Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
#
# This code is free software; you can redistribute it and/or modify it
# This code is free software; you can redistribute it and/or modify it
...
@@ -23,6 +23,12 @@
...
@@ -23,6 +23,12 @@
# have any questions.
# have any questions.
#
#
BUILDDIR
=
../../..
MODULE
=
font
PRODUCT
=
java
include
$(BUILDDIR)/common/Defs.gmk
#
#
# List of lucida font files that we redistribute.
# List of lucida font files that we redistribute.
#
#
...
@@ -54,3 +60,52 @@ OBLIQUE_FONTFILES = \
...
@@ -54,3 +60,52 @@ OBLIQUE_FONTFILES = \
$(LIBDIR)
/oblique-fonts/LucidaSansDemiOblique.ttf
\
$(LIBDIR)
/oblique-fonts/LucidaSansDemiOblique.ttf
\
endif
endif
ifndef
OPENJDK
# Lucida font files are not included in the OpenJDK distribution.
# Get names of font files
# Copy font files into OUTPUTDIR area
FONTFILES
=
$(SHARED_FONTFILES)
FONTSDIR
=
$(LIBDIR)
/fonts
FONTSDIRFILE
=
$(FONTSDIR)
/fonts.dir
INTERNAL_IMPORT_LIST
=
$(FONTFILES)
ifneq
($(PLATFORM), windows)
INTERNAL_IMPORT_LIST
+=
$(FONTSDIRFILE)
endif
$(LIBDIR)/fonts/%.ttf
:
$(CLOSED_SRC)/share/lib/fonts/%.ttf
$
(
install-file
)
$(FONTSDIRFILE)
:
$(PLATFORM_SRC)/classes/sun/awt/motif/java.fonts.dir
$
(
install-file
)
ifeq
($(PLATFORM), linux)
# The oblique fonts are only needed/wanted on Linux.
OBLFONTSDIR
=
$(LIBDIR)
/oblique-fonts
OBLFONTSDIRFILE
=
$(OBLFONTSDIR)
/fonts.dir
INTERNAL_IMPORT_LIST
+=
$(OBLIQUE_FONTFILES)
$(OBLFONTSDIRFILE)
$(LIBDIR)/oblique-fonts/%.ttf
:
$(CLOSED_SRC)/share/lib/fonts/oblique/%.ttf
$
(
install-file
)
$(OBLFONTSDIRFILE)
:
$(PLATFORM_SRC)/classes/sun/awt/motif/java.oblique-fonts.dir
$
(
install-file
)
endif
# linux
all build
:
$(INTERNAL_IMPORT_LIST)
clean clobber
::
$(RM)
$(INTERNAL_IMPORT_LIST)
else
all build clean clobber
:
endif
# !OPENJDK
make/java/redist/sajdi/Makefile
0 → 100644
浏览文件 @
efdc7738
#
# Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Sun designates this
# particular file as subject to the "Classpath" exception as provided
# by Sun in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
BUILDDIR
=
../../..
MODULE
=
sajdi
PRODUCT
=
java
include
$(BUILDDIR)/common/Defs.gmk
ifeq
($(PLATFORM), windows)
LIB_LOCATION
=
$(BINDIR)
else
LIB_LOCATION
=
$(LIBDIR)
/
$(LIBARCH)
endif
# INCLUDE_SA is false on platforms where SA is not supported.
# On platforms where it is supported, we want to allow it to
# not be present, at least temporarily. So,
# if the SA files (well, just sa-jdi.jar) do not exist
# in the HOTSPOT_IMPORT_PATH, then we won't build SA.
SA_EXISTS
:=
$(
shell
if
[
-r
$(HOTSPOT_IMPORT_PATH)
/lib/sa-jdi.jar
]
;
then
\
$(ECHO)
true
;
\
else
\
$(ECHO)
false
;
\
fi
)
ifeq
($(SA_EXISTS), false)
INCLUDE_SA
:=
false
endif
IMPORT_LIST
=
ifeq
($(INCLUDE_SA), true)
IMPORT_LIST
+=
$(LIBDIR)
/sa-jdi.jar
\
$(LIB_LOCATION)
/
$(SALIB_NAME)
ifeq
($(PLATFORM), windows)
IMPORT_LIST
+=
$(LIB_LOCATION)
/
$(SAMAP_NAME)
\
$(LIB_LOCATION)
/
$(SAPDB_NAME)
endif
endif
# INCLUDE_SA
ifeq
($(INCLUDE_SA), true)
# The Serviceability Agent is built in the Hotspot workspace.
# It contains two files:
# - sa-jdi.jar: This goes into the same dir as tools.jar.
# - a shared library: sawindbg.dll on windows / libproc.sa on unix
# This goes into the same dir as the other
# shared libs, eg. libjdwp.so.
$(LIBDIR)/sa-jdi.jar
:
$(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar
$
(
install-importonly-file
)
$(LIB_LOCATION)/$(SALIB_NAME)
:
$(HOTSPOT_SALIB_PATH)/$(SALIB_NAME)
$
(
install-import-file
)
ifeq
($(PLATFORM), windows)
$(LIB_LOCATION)/$(SAPDB_NAME)
:
$(HOTSPOT_SALIB_PATH)/$(SAPDB_NAME)
$
(
install-import-file
)
$(LIB_LOCATION)/$(SAMAP_NAME)
:
$(HOTSPOT_SALIB_PATH)/$(SAMAP_NAME)
$
(
install-import-file
)
endif
# windows
endif
# INCLUDE_SA
all
:
$(IMPORT_LIST)
clean clobber
::
make/java/security/Makefile
浏览文件 @
efdc7738
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
base
PACKAGE
=
java.security
PACKAGE
=
java.security
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
@@ -38,11 +39,9 @@ AUTO_FILES_JAVA_DIRS = java/security
...
@@ -38,11 +39,9 @@ AUTO_FILES_JAVA_DIRS = java/security
#
#
PROPS_SRC
=
$(TOPDIR)
/src/share/lib/security/java.security
PROPS_SRC
=
$(TOPDIR)
/src/share/lib/security/java.security
SUNPKCS11
=
ifeq
($(PLATFORM), solaris)
ifeq
($(PLATFORM), solaris)
PROPS_SRC
=
$(TOPDIR)
/src/share/lib/security/java.security-solaris
PROPS_SRC
=
$(TOPDIR)
/src/share/lib/security/java.security-solaris
SUNPKCS11
=
sunpkcs11
else
# PLATFORM
else
# PLATFORM
...
@@ -57,9 +56,6 @@ endif # PLATFORM
...
@@ -57,9 +56,6 @@ endif # PLATFORM
PROPS_BUILD
=
$(LIBDIR)
/security/java.security
PROPS_BUILD
=
$(LIBDIR)
/security/java.security
SUNPKCS11_SRC
=
$(TOPDIR)
/src/share/lib/security/sunpkcs11-solaris.cfg
SUNPKCS11_BUILD
=
$(LIBDIR)
/security/sunpkcs11-solaris.cfg
POLICY_SRC
=
$(TOPDIR)
/src/share/lib/security/java.policy
POLICY_SRC
=
$(TOPDIR)
/src/share/lib/security/java.policy
POLICY_BUILD
=
$(LIBDIR)
/security/java.policy
POLICY_BUILD
=
$(LIBDIR)
/security/java.policy
...
@@ -73,14 +69,12 @@ FILES_class = $(FILES_java:%.java=$(CLASSBINDIR)/%.class)
...
@@ -73,14 +69,12 @@ FILES_class = $(FILES_java:%.java=$(CLASSBINDIR)/%.class)
#
#
include
$(BUILDDIR)/common/Rules.gmk
include
$(BUILDDIR)/common/Rules.gmk
build
:
properties
$(SUNPKCS11)
policy cacerts
build
:
properties policy cacerts
install
:
all
install
:
all
properties
:
classes $(PROPS_BUILD)
properties
:
classes $(PROPS_BUILD)
sunpkcs11
:
classes $(SUNPKCS11_BUILD)
policy
:
classes $(POLICY_BUILD)
policy
:
classes $(POLICY_BUILD)
cacerts
:
classes $(CACERTS_BUILD)
cacerts
:
classes $(CACERTS_BUILD)
...
@@ -88,9 +82,6 @@ cacerts: classes $(CACERTS_BUILD)
...
@@ -88,9 +82,6 @@ cacerts: classes $(CACERTS_BUILD)
$(PROPS_BUILD)
:
$(PROPS_SRC)
$(PROPS_BUILD)
:
$(PROPS_SRC)
$
(
install-file
)
$
(
install-file
)
$(SUNPKCS11_BUILD)
:
$(SUNPKCS11_SRC)
$
(
install-file
)
$(POLICY_BUILD)
:
$(POLICY_SRC)
$(POLICY_BUILD)
:
$(POLICY_SRC)
$
(
install-file
)
$
(
install-file
)
...
@@ -99,7 +90,7 @@ $(CACERTS_BUILD): $(CACERTS_SRC)
...
@@ -99,7 +90,7 @@ $(CACERTS_BUILD): $(CACERTS_SRC)
clean clobber
::
.delete.classlist
clean clobber
::
.delete.classlist
$(RM)
-r
$(CLASSBINDIR)
/java/security
$(RM)
-r
$(CLASSBINDIR)
/java/security
$(RM)
$(PROPS_BUILD)
$(POLICY_BUILD)
$(CACERTS_BUILD)
$(SUNPKCS11_BUILD)
$(RM)
$(PROPS_BUILD)
$(POLICY_BUILD)
$(CACERTS_BUILD)
# Additional Rule for building sun.security.util
# Additional Rule for building sun.security.util
$(CLASSBINDIR)/%.class
:
$(SHARE_SRC)/sun/%.java
$(CLASSBINDIR)/%.class
:
$(SHARE_SRC)/sun/%.java
...
...
make/java/sql/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
jdbc-base
PACKAGE
=
java.sql
PACKAGE
=
java.sql
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/java/text/Makefile
浏览文件 @
efdc7738
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
base
PACKAGE
=
java.text
PACKAGE
=
java.text
PRODUCT
=
sun
PRODUCT
=
sun
...
...
make/java/verify/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
base
PRODUCT
=
java
PRODUCT
=
java
LIBRARY
=
verify
LIBRARY
=
verify
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/java/zip/Makefile
浏览文件 @
efdc7738
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
base
PACKAGE
=
java.util.zip
PACKAGE
=
java.util.zip
LIBRARY
=
zip
LIBRARY
=
zip
PRODUCT
=
sun
PRODUCT
=
sun
...
...
make/javax/crypto/Makefile
浏览文件 @
efdc7738
...
@@ -108,6 +108,7 @@
...
@@ -108,6 +108,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
base
PACKAGE
=
javax.crypto
PACKAGE
=
javax.crypto
PRODUCT
=
sun
PRODUCT
=
sun
...
@@ -293,7 +294,7 @@ limited: \
...
@@ -293,7 +294,7 @@ limited: \
$(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar
:
\
$(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar
:
\
$(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar
$(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar
$
(
install-file
)
$
(
install-
non-module-
file
)
$(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar
:
\
$(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar
:
\
policy/limited/default_local.policy
\
policy/limited/default_local.policy
\
...
@@ -414,7 +415,7 @@ $(JAR_DESTFILE): $(UNSIGNED_DIR)/jce.jar
...
@@ -414,7 +415,7 @@ $(JAR_DESTFILE): $(UNSIGNED_DIR)/jce.jar
else
else
$(JAR_DESTFILE)
:
$(SIGNED_DIR)/jce.jar
$(JAR_DESTFILE)
:
$(SIGNED_DIR)/jce.jar
endif
endif
$
(
install-file
)
$
(
install-
non-module-
file
)
#
#
# Install the appropriate policy file, depending on the type of build.
# Install the appropriate policy file, depending on the type of build.
...
@@ -425,7 +426,7 @@ else
...
@@ -425,7 +426,7 @@ else
INSTALL_POLICYDIR
=
$(SIGNED_POLICY_BUILDDIR)
INSTALL_POLICYDIR
=
$(SIGNED_POLICY_BUILDDIR)
endif
endif
install-limited
:
\
install-limited
-jars
:
\
$(INSTALL_POLICYDIR)/limited/US_export_policy.jar
\
$(INSTALL_POLICYDIR)/limited/US_export_policy.jar
\
$(INSTALL_POLICYDIR)/limited/local_policy.jar
$(INSTALL_POLICYDIR)/limited/local_policy.jar
$(MKDIR)
-p
$(POLICY_DESTDIR)
$(MKDIR)
-p
$(POLICY_DESTDIR)
...
@@ -433,24 +434,28 @@ install-limited: \
...
@@ -433,24 +434,28 @@ install-limited: \
$(POLICY_DESTDIR)
/US_export_policy.jar
\
$(POLICY_DESTDIR)
/US_export_policy.jar
\
$(POLICY_DESTDIR)
/local_policy.jar
$(POLICY_DESTDIR)
/local_policy.jar
$(CP)
$^
$(POLICY_DESTDIR)
$(CP)
$^
$(POLICY_DESTDIR)
install-limited
:
install-limited-jars install-module-files
ifndef
OPENJDK
ifndef
OPENJDK
$
(
release-warning
)
$
(
release-warning
)
endif
endif
install-unlimited
:
\
install-unlimited
-jars
:
\
$(INSTALL_POLICYDIR)/unlimited/US_export_policy.jar
\
$(INSTALL_POLICYDIR)/unlimited/US_export_policy.jar
\
$(INSTALL_POLICYDIR)/unlimited/local_policy.jar
$(INSTALL_POLICYDIR)/unlimited/local_policy.jar
$(MKDIR)
-p
$(POLICY_DESTDIR)
$(MKDIR)
-p
$(POLICY_DESTDIR)
$(RM)
\
$(RM)
\
$(POLICY_DESTDIR)
/US_export_policy.jar
\
$(POLICY_DESTDIR)
/US_export_policy.jar
\
$(POLICY_DESTDIR)
/local_policy.jar
$(POLICY_DESTDIR)
/local_policy.jar
$(CP)
$^
$(POLICY_DESTDIR)
$(CP)
$^
$(POLICY_DESTDIR)
install-unlimited
:
install-unlimited-jars install-module-files
ifndef
OPENJDK
ifndef
OPENJDK
$
(
release-warning
)
$
(
release-warning
)
endif
endif
ifndef
OPENJDK
ifndef
OPENJDK
install-prebuilt
:
install-prebuilt
-jars
:
@
$(ECHO)
"
\n
>>>Installing prebuilt JCE framework..."
@
$(ECHO)
"
\n
>>>Installing prebuilt JCE framework..."
$(RM)
$(JAR_DESTFILE)
\
$(RM)
$(JAR_DESTFILE)
\
$(POLICY_DESTDIR)
/US_export_policy.jar
\
$(POLICY_DESTDIR)
/US_export_policy.jar
\
...
@@ -460,8 +465,16 @@ install-prebuilt:
...
@@ -460,8 +465,16 @@ install-prebuilt:
$(PREBUILT_DIR)
/jce/US_export_policy.jar
\
$(PREBUILT_DIR)
/jce/US_export_policy.jar
\
$(PREBUILT_DIR)
/jce/local_policy.jar
\
$(PREBUILT_DIR)
/jce/local_policy.jar
\
$(POLICY_DESTDIR)
$(POLICY_DESTDIR)
install-prebuilt
:
install-prebuilt-jars install-module-files
endif
endif
install-module-files
:
\
$(POLICY_DESTDIR)/US_export_policy.jar
\
$(POLICY_DESTDIR)/local_policy.jar
$(POLICY_DESTDIR)/%.jar
:
$
(
install-module-file
)
# =====================================================
# =====================================================
# Support routines.
# Support routines.
...
...
make/javax/imageio/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
imageio
PACKAGE
=
javax.imageio
PACKAGE
=
javax.imageio
PRODUCT
=
jiio
PRODUCT
=
jiio
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/javax/print/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
print
PACKAGE
=
javax.print
PACKAGE
=
javax.print
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/javax/sound/Makefile
浏览文件 @
efdc7738
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
# WARNING: Make sure the OPENJDK plugs are up-to-date, see make/common/internal/BinaryPlugs.gmk
# WARNING: Make sure the OPENJDK plugs are up-to-date, see make/common/internal/BinaryPlugs.gmk
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
sound
PACKAGE
=
javax.sound
PACKAGE
=
javax.sound
LIBRARY
=
jsound
LIBRARY
=
jsound
PRODUCT
=
sun
PRODUCT
=
sun
...
...
make/javax/sound/jsoundalsa/Makefile
浏览文件 @
efdc7738
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#
#
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
sound
PACKAGE
=
javax.sound
PACKAGE
=
javax.sound
LIBRARY
=
jsoundalsa
LIBRARY
=
jsoundalsa
PRODUCT
=
sun
PRODUCT
=
sun
...
...
make/javax/sound/jsoundds/Makefile
浏览文件 @
efdc7738
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#
#
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
sound
PACKAGE
=
javax.sound
PACKAGE
=
javax.sound
LIBRARY
=
jsoundds
LIBRARY
=
jsoundds
PRODUCT
=
sun
PRODUCT
=
sun
...
...
make/javax/sql/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
jdbc-enterprise
PACKAGE
=
javax.sql
PACKAGE
=
javax.sql
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/javax/swing/Makefile
浏览文件 @
efdc7738
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
swing
PACKAGE
=
javax.swing
PACKAGE
=
javax.swing
PRODUCT
=
com
PRODUCT
=
com
SWING_SRC
=
$(SHARE_SRC)
/classes/javax/swing
SWING_SRC
=
$(SHARE_SRC)
/classes/javax/swing
...
...
make/javax/swing/plaf/Makefile
浏览文件 @
efdc7738
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#
#
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
swing
PACKAGE
=
javax.swing.plaf
PACKAGE
=
javax.swing.plaf
PRODUCT
=
com
PRODUCT
=
com
SWING_SRC
=
$(SHARE_SRC)
/classes/javax/swing
SWING_SRC
=
$(SHARE_SRC)
/classes/javax/swing
...
...
make/jpda/back/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
debugging
LIBRARY
=
jdwp
LIBRARY
=
jdwp
PRODUCT
=
jpda
PRODUCT
=
jpda
...
...
make/jpda/transport/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
debugging
PRODUCT
=
jpda
PRODUCT
=
jpda
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/jpda/transport/shmem/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
debugging
LIBRARY
=
dt_shmem
LIBRARY
=
dt_shmem
PRODUCT
=
jbug
PRODUCT
=
jbug
...
...
make/jpda/transport/socket/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
debugging
LIBRARY
=
dt_socket
LIBRARY
=
dt_socket
PRODUCT
=
jbug
PRODUCT
=
jbug
...
...
make/jpda/tty/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
jdb
PACKAGE
=
com.sun.tools.example.debug.tty
PACKAGE
=
com.sun.tools.example.debug.tty
PRODUCT
=
jpda
PRODUCT
=
jpda
PROGRAM
=
jdb
PROGRAM
=
jdb
...
...
make/launchers/Makefile
浏览文件 @
efdc7738
...
@@ -28,33 +28,23 @@
...
@@ -28,33 +28,23 @@
#
#
BUILDDIR
=
..
BUILDDIR
=
..
MODULE
=
tools
PACKAGE
=
launchers
PACKAGE
=
launchers
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
# Run MAKE $@ for a launcher
:
# Run MAKE $@ for a launcher
for the corba module:
# $(call make-launcher, name, mainclass, java-args, main-args)
# $(call make-launcher, name, mainclass, java-args, main-args)
define
make-launcher
define
make-corba-launcher
$(CD)
$(BUILDDIR)/launchers
&&
\
$(MAKE)
-f
Makefile.launcher
\
$(MAKE)
-f
Makefile.launcher
\
PROGRAM
=
$(
strip
$1
)
\
MODULE
=
corba
\
MAIN_CLASS
=
$(
strip
$2
)
\
PROGRAM
=
$(
strip
$1
)
\
MAIN_JAVA_ARGS
=
"
$(
strip
$3
)
"
\
MAIN_CLASS
=
$(
strip
$2
)
\
MAIN_ARGS
=
"
$(
strip
$4
)
"
$@
MAIN_JAVA_ARGS
=
"
$(
strip
$3
)
"
\
MAIN_ARGS
=
"
$(
strip
$4
)
"
endef
endef
# Run MAKE $@ for all launchers
ifeq
($(PLATFORM),windows)
# Run MAKE $@ for all platform specific launchers
define
make-platform-specific-launchers
$(call
make-launcher,
kinit,
sun.security.krb5.internal.tools.Kinit,
,
)
$(call
make-launcher,
klist,
sun.security.krb5.internal.tools.Klist,
,
)
$(call
make-launcher,
ktab,
sun.security.krb5.internal.tools.Ktab,
,
)
endef
else
# Run MAKE $@ for all platform specific launchers
define
make-platform-specific-launchers
endef
endif
# Run MAKE $@ for all generic launchers
# Run MAKE $@ for all generic launchers
define
make-all-launchers
define
make-all-launchers
$(call
make-launcher,
appletviewer,
sun.applet.Main,
,
)
$(call
make-launcher,
appletviewer,
sun.applet.Main,
,
)
...
@@ -85,36 +75,29 @@ $(call make-launcher, jstack, sun.tools.jstack.JStack, \
...
@@ -85,36 +75,29 @@ $(call make-launcher, jstack, sun.tools.jstack.JStack, \
-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger,
)
-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger,
)
$(call
make-launcher,
jstat,
sun.tools.jstat.Jstat,
,
)
$(call
make-launcher,
jstat,
sun.tools.jstat.Jstat,
,
)
$(call
make-launcher,
jstatd,
sun.tools.jstatd.Jstatd,
,
)
$(call
make-launcher,
jstatd,
sun.tools.jstatd.Jstatd,
,
)
$(call
make-launcher,
keytool,
sun.security.tools.KeyTool,
,
)
$(call
make-launcher,
native2ascii,
sun.tools.native2ascii.Main,
,
)
$(call
make-launcher,
native2ascii,
sun.tools.native2ascii.Main,
,
)
$(call
make-launcher,
orbd,
com.sun.corba.se.impl.activation.ORBD,
\
-J-Dcom.sun.CORBA.activation.DbDir
=
./orb.db
\
-J-Dcom
.sun.CORBA.activation.Port
=
1049
\
-J-Dcom
.sun.CORBA.POA.ORBServerId
=
1,
)
$(call
make-launcher,
pack200,
com.sun.java.util.jar.pack.Driver,
,
--pack)
$(call
make-launcher,
policytool,
sun.security.tools.PolicyTool,
,
)
$(call
make-launcher,
rmic,
sun.rmi.rmic.Main,
,
)
$(call
make-launcher,
rmic,
sun.rmi.rmic.Main,
,
)
$(call
make-launcher,
rmid,
sun.rmi.server.Activation,
,
)
$(call
make-launcher,
rmiregistry,
sun.rmi.registry.RegistryImpl,
,
)
$(call
make-launcher,
schemagen,
com.sun.tools.internal.jxc.SchemaGenerator,
,
)
$(call
make-launcher,
schemagen,
com.sun.tools.internal.jxc.SchemaGenerator,
,
)
$(call
make-launcher,
serialver,
sun.tools.serialver.SerialVer,
,
)
$(call
make-launcher,
serialver,
sun.tools.serialver.SerialVer,
,
)
$(call
make-launcher,
servertool,
com.sun.corba.se.impl.activation.ServerTool,
,
)
$(call
make-launcher,
xjc,
com.sun.tools.internal.xjc.Driver,
,
)
$(call
make-launcher,
tnameserv,
com.sun.corba.se.impl.naming.cosnaming.TransientNameServer,
\
$(call
make-launcher,
wsgen,
com.sun.tools.internal.ws.WsGen,
,
)
$(call
make-launcher,
wsimport,
com.sun.tools.internal.ws.WsImport,
,
)
$(call
make-corba-launcher,
orbd,
com.sun.corba.se.impl.activation.ORBD,
\
-J-Dcom.sun.CORBA.activation.DbDir
=
./orb.db
\
-J-Dcom
.sun.CORBA.activation.Port
=
1049
\
-J-Dcom
.sun.CORBA.POA.ORBServerId
=
1,
)
$(call
make-corba-launcher,
servertool,
com.sun.corba.se.impl.activation.ServerTool,
,
)
$(call
make-corba-launcher,
tnameserv,
com.sun.corba.se.impl.naming.cosnaming.TransientNameServer,
\
-J-Dcom.sun.CORBA.activation.DbDir
=
./orb.db
\
-J-Dcom.sun.CORBA.activation.DbDir
=
./orb.db
\
-J-Djava
.util.logging.LoggingPermission
=
contol
\
-J-Djava
.util.logging.LoggingPermission
=
contol
\
-J-Dcom
.sun.CORBA.POA.ORBServerId
=
1,
)
-J-Dcom
.sun.CORBA.POA.ORBServerId
=
1,
)
$(call
make-launcher,
wsgen,
com.sun.tools.internal.ws.WsGen,
,
)
$(call
make-launcher,
wsimport,
com.sun.tools.internal.ws.WsImport,
,
)
$(call
make-launcher,
xjc,
com.sun.tools.internal.xjc.Driver,
,
)
endef
endef
build
:
build
:
$
(
make-all-launchers
)
$
(
make-all-launchers
)
$
(
make-platform-specific-launchers
)
clean clobber
::
clean clobber
::
$
(
make-all-launchers
)
$
(
make-all-launchers
)
$
(
make-platform-specific-launchers
)
include
$(BUILDDIR)/common/Rules.gmk
include
$(BUILDDIR)/common/Rules.gmk
make/mkdemo/jvmti/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
demos
PRODUCT
=
demos
PRODUCT
=
demos
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/mkdemo/management/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
demos
PRODUCT
=
demos
PRODUCT
=
demos
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/mksample/dtrace/Makefile
浏览文件 @
efdc7738
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
samples
PRODUCT
=
java
PRODUCT
=
java
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/mksample/jmx/jmx-scandir/Makefile
浏览文件 @
efdc7738
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
samples
PRODUCT
=
java
PRODUCT
=
java
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/mksample/nbproject/Makefile
浏览文件 @
efdc7738
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
samples
PRODUCT
=
java
PRODUCT
=
java
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/mksample/nio/file/Makefile
浏览文件 @
efdc7738
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
samples
PRODUCT
=
java
PRODUCT
=
java
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/mksample/nio/multicast/Makefile
浏览文件 @
efdc7738
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
samples
PRODUCT
=
java
PRODUCT
=
java
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/mksample/nio/server/Makefile
浏览文件 @
efdc7738
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
samples
PRODUCT
=
java
PRODUCT
=
java
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/mksample/scripting/scriptpad/Makefile
浏览文件 @
efdc7738
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
samples
PRODUCT
=
java
PRODUCT
=
java
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/mksample/webservices/EbayClient/Makefile
浏览文件 @
efdc7738
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
samples
PRODUCT
=
java
PRODUCT
=
java
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/mksample/webservices/EbayServer/Makefile
浏览文件 @
efdc7738
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
samples
PRODUCT
=
java
PRODUCT
=
java
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/modules/Makefile
浏览文件 @
efdc7738
...
@@ -23,115 +23,106 @@
...
@@ -23,115 +23,106 @@
# have any questions.
# have any questions.
#
#
BUILDDIR
=
..
include
$(BUILDDIR)/common/Defs.gmk
#
#
# Modularizing the JDK
# Modularizing the JDK
# - Post jdk build process until the source tree is restructured
# for modules build
# - <outputdir>/modules/<module> will be created for each module.
#
#
# Steps:
# 0. During jdk build before this makefile is invoked, classes,
# resource files, and other non-class files such as native libraries,
# properties file, images, etc are created.
#
# Non-class files are copied to <outputdir>/tmp/modules/<MODULE>
# directory in this step to prepare for the post-build modularization.
#
# The MODULE variable defined in other makefiles specifies
# the lowest-level module that the non-class files belong to.
# The name might or might not be the same as the name of the modules
# in the resulting <outputdir>/modules directory.
#
# 1. Unpack all jars in the <builddir>/lib directory to a temporary
# location (<outputdir>/tmp/modules/classes) to prepare for modules
# creation.
#
# 2. Run ClassAnalyzer tool to analyze all jdk classes and generate
# class list for all modules and also perform dependency analysis.
#
# Input configuration files :-
#
# modules.config : defines the low-level modules and specifies
# what classes and resource files each module includes.
# modules.group : defines the module groups and its members.
# jdk7.depconfig : lists the dynamic dependencies including
# use of reflection Class.forName and JNI FindClass and
# service provider.
# optional.depconfig : lists the optional dependencies
#
# 3. Create one directory for each module (<outputdir>/modules/<module>)
# based on the output files from (2).
#
# modules.list lists the modules to be created for the modules
# build and its members. For each module (m) in modules.list,
# a. create $m/lib/$m.jar with all classes and resource files
# listed in $m.classlist and $m.resources respectively.
# b. copy all non-class files from its members to
# <outputdir>/modules/$m.
BUILDDIR
=
..
include
$(BUILDDIR)/common/Defs.gmk
CLASSANALYZER_JAR
=
$(BUILDTOOLJARDIR)
/classanalyzer.jar
JAVA_FLAGS
=
$(JAVA_TOOLS_FLAGS)
-Xbootclasspath
:
$(CLASSBINDIR)
MODULE_LIB
=
$(ABS_OUTPUTDIR)
/modules
MAINMANIFEST
=
$(JDK_TOPDIR)
/make/tools/manifest.mf
MAINMANIFEST
=
$(JDK_TOPDIR)
/make/tools/manifest.mf
MODULE_JAR_MANIFEST_FILE
=
$(ABS_TEMPDIR)
/manifest.tmp
MODULE_JAR_MANIFEST_FILE
=
$(ABS_TEMPDIR)
/manifest.tmp
TMP
=
$(ABS_TEMPDIR)
/modules
TMP
=
$(ABS_MODULES_TEMPDIR)
MODULE_CLASSLIST
=
$(TMP)
/classlist
MODULE_CLASSLIST
=
$(ABS_MODULES_TEMPDIR)
/classlist
MODULE_CLASSES
=
$(TMP)
/classes
MODULE_CLASSES
=
$(ABS_MODULES_TEMPDIR)
/classes
MODULE_LIST
=
$(MODULE_CLASSLIST)
/modules.list
MODULES_LIST
=
$(MODULE_CLASSLIST)
/modules.list
# Modules in the modules/ext directory
EXT_MODULES
=
localedata security-sunec security-sunjce
# Build PKCS#11 on all platforms except 64-bit Windows.
# We exclude windows-amd64 because we don't have any
# 64-bit PKCS#11 implementations to test with on that platform.
PKCS11
=
security-sunpkcs11
ifeq
($(ARCH_DATA_MODEL), 64)
ifeq
($(PLATFORM), windows)
PKCS11
=
endif
endif
EXT_MODULES
+=
$(PKCS11)
# Build Microsoft CryptoAPI provider only on (non-64-bit) Windows platform.
ifeq
($(PLATFORM), windows)
ifneq
($(ARCH_DATA_MODEL), 64)
EXT_MODULES
+=
security-sunmscapi
endif
endif
JDK_MODULES
=
tools
SUBDIRS
=
tools
all build clean clobber
::
$
(
SUBDIRS-loop
)
all
::
unpack-jars gen-classlist modularize
all
::
unpack-jars gen-classlist modularize
$(CLASSANALYZER_JAR)
:
JAR_LIST
:=
$(
shell
$(FIND)
$(ABS_OUTPUTDIR)
/lib
-name
\*
.jar
-print
)
$(CD)
tools
&&
$(MAKE)
all
JAR_LIST
:=
$(
shell
$(FIND)
$(ABS_OUTPUTDIR)
/lib
-name
\*
.jar
-depth
)
unpack-jars
:
unpack-jars
:
@
$(ECHO)
">>>Making "
$@
" @
`
$(DATE)
`
..."
$(RM)
-rf
$(MODULE_CLASSES)
$(RM)
-rf
$(MODULE_CLASSES)
$(MKDIR)
-p
$(MODULE_CLASSES)
$(MKDIR)
-p
$(MODULE_CLASSES)
$(CP)
-rf
$(CLASSBINDIR)
/
*
$(MODULE_CLASSES)
$(CP)
-rf
$(CLASSBINDIR)
/
*
$(MODULE_CLASSES)
for
jf
in
$(JAR_LIST)
;
do
\
@
for
jf
in
$(JAR_LIST)
;
do
\
$(CD)
$(MODULE_CLASSES)
&&
$(BOOT_JAR_CMD)
xf
$$
jf
$(BOOT_JAR_JFLAGS)
;
\
$(CD)
$(MODULE_CLASSES)
&&
$(BOOT_JAR_CMD)
xf
$$
jf
$(BOOT_JAR_JFLAGS)
;
\
done
done
gen-classlist
:
$(CLASSANALYZER_JAR)
@
$(ECHO)
">>>Making "
$@
" @
`
$(DATE)
`
..."
@
$(RM)
-rf
$(MODULE_CLASSLIST)
@
$(MKDIR)
-p
$(MODULE_CLASSLIST)
@
# Use java in the default tool directory.
@
# OUTPUTDIR for solaris 64-bit doesn't have the tools.
$(JAVA_TOOLS_DIR)/java
$(JAVA_FLAGS)
\
-Dclassanalyzer.debug
\
-jar
$(CLASSANALYZER_JAR)
\
-jdkhome
$(OUTPUTDIR)
\
-config
modules.config
\
-config
modules.group
\
-depconfig
jdk7.depconfig
\
-depconfig
optional.depconfig
\
-showdynamic
\
-output
$(MODULE_CLASSLIST)
@
$(ECHO)
">>>Finished making "
$@
" @
`
$(DATE)
`
..."
@
$(ECHO)
">>>Finished making "
$@
" @
`
$(DATE)
`
..."
gen-classlist
:
$(CD)
tools
&&
$(MAKE)
all
modularize
:
$(MODULE_JAR_MANIFEST_FILE)
modularize
:
$(MODULE_JAR_MANIFEST_FILE)
@
$(ECHO)
">>>Making "
$@
" @
`
$(DATE)
`
..."
@
$(ECHO)
">>>Making "
$@
" @
`
$(DATE)
`
..."
@
$(RM)
-rf
$(MODULE_LIB)
@
$(RM)
-rf
$(MODULES_DIR)
@
$(MKDIR)
-p
$(MODULE_LIB)
/lib
@
$(MKDIR)
-p
$(MODULE_LIB)
/jre/lib/ext
@
# create modules
@
# create jar file for modules and
for
m
in
`$(NAWK)
'{print $$1}'
$(MODULE_LIST)`
;
do
\
@
# copy other files from all members of this module
for
m
in
`$(NAWK)
'{print $$1}'
$(MODULES_LIST)`
;
do
\
$(ECHO)
"Creating module $$m"
;
\
$(ECHO)
"Creating module $$m"
;
\
$(SED)
-e
's%\\%\/%g'
<
$(MODULE_CLASSLIST)/$$m.classlist
>
$(TMP)/tmp.cf
;
\
$(SED)
-e
's%\\%\/%g'
<
$(MODULE_CLASSLIST)/$$m.classlist
>
$(TMP)/tmp.cf
;
\
if
[
-f
$(MODULE_CLASSLIST)/$$m.resources
]
;
then
\
if
[
-f
$(MODULE_CLASSLIST)/$$m.resources
]
;
then
\
$(SED)
-e
's%\\%\/%g'
<
$(MODULE_CLASSLIST)/$$m.resources
>>
$(TMP)/tmp.cf
;
\
$(SED)
-e
's%\\%\/%g'
<
$(MODULE_CLASSLIST)/$$m.resources
>>
$(TMP)/tmp.cf
;
\
fi
;
\
fi
;
\
$(MKDIR)
-p
$(ABS_MODULES_DIR)/$$m/lib;
\
$(CD)
$(MODULE_CLASSES)
&&
\
$(CD)
$(MODULE_CLASSES)
&&
\
$(BOOT_JAR_CMD)
c0mf
$(MODULE_JAR_MANIFEST_FILE)
\
$(BOOT_JAR_CMD)
c0mf
$(MODULE_JAR_MANIFEST_FILE)
\
$(MODULE_LIB)/$$m.jar
\
$(ABS_MODULES_DIR)/$$m/lib/$$m.jar
\
@$(TMP)/tmp.cf
\
@$(TMP)/tmp.cf
\
$(BOOT_JAR_JFLAGS)
;
\
$(BOOT_JAR_JFLAGS);
\
done
for
s
in
`$(GREP)
"^$$m"
$(MODULES_LIST)`
;
do
\
if
[
-d
$(TMP)/$$s
]
;
then
\
$(CP)
-rf
$(TMP)/$$s/*
$(ABS_MODULES_DIR)/$$m;
\
$(RM)
-rf
$(ABS_MODULES_DIR)/$$m/classes;
\
fi
\
done
\
done
@$(CD)
$(MODULE_CLASSES)
&&
$(java-vm-cleanup)
@$(CD)
$(MODULE_CLASSES)
&&
$(java-vm-cleanup)
@
# move modules to lib, jre/lib, or jre/lib/ext
for
m
in
$(EXT_MODULES)
;
do
\
$(MV)
$(MODULE_LIB)/$$m.jar
$(MODULE_LIB)/jre/lib/ext
;
\
done
for
m
in
$(JDK_MODULES)
;
do
\
$(MV)
$(MODULE_LIB)/$$m.jar
$(MODULE_LIB)/lib
;
\
done
$(MV)
$(MODULE_LIB)/*.jar
$(MODULE_LIB)/jre/lib
@$(ECHO)
">>>Finished making "
$@
" @ `$(DATE)` ..."
@$(ECHO)
">>>Finished making "
$@
" @ `$(DATE)` ..."
$(MODULE_JAR_MANIFEST_FILE)
:
$(MODULE_JAR_MANIFEST_FILE)
:
...
@@ -139,7 +130,5 @@ $(MODULE_JAR_MANIFEST_FILE):
...
@@ -139,7 +130,5 @@ $(MODULE_JAR_MANIFEST_FILE):
clean clobber
::
clean clobber
::
$(RM)
-rf
$(MODULE_CLASSLIST)
$(RM)
-rf
$(MODULE_CLASSLIST)
$(RM)
-rf
$(MODULE_LIB)
$(RM)
-rf
$(MODULES_DIR)
$(RM)
-f
$(MODULE_JAR_MANIFEST_FILE)
$(RM)
$(MODULE_JAR_MANIFEST_FILE)
$(RM)
-f
$(CLASSANALYZER_JAR)
make/modules/modules.config
浏览文件 @
efdc7738
...
@@ -372,15 +372,19 @@ module management {
...
@@ -372,15 +372,19 @@ module management {
/**************************************************************************/
/**************************************************************************/
module
tracing
{
//
tracing
include
com
.
sun
.
tracing
.**,
sun
.
tracing
.**;
}
module
instrument
{
module
instrument
{
//
java
.
lang
.
instrument
//
java
.
lang
.
instrument
include
java
.
lang
.
instrument
.*,
sun
.
instrument
.*;
include
java
.
lang
.
instrument
.*,
sun
.
instrument
.*;
//
tracing
include
com
.
sun
.
tracing
.**,
sun
.
tracing
.**;
//
HPROF
support
//
HPROF
support
include
com
.
sun
.
demo
.
jvmti
.
hprof
.*;
include
com
.
sun
.
demo
.
jvmti
.
hprof
.*;
include
tracing
;
}
}
/**************************************************************************/
/**************************************************************************/
...
@@ -391,15 +395,17 @@ module rmi-activation {
...
@@ -391,15 +395,17 @@ module rmi-activation {
sun
.
rmi
.
server
.
InactiveGroupException
;
sun
.
rmi
.
server
.
InactiveGroupException
;
}
}
module
rmic
{
//
rmic
is
included
in
tools
include
sun
.
rmi
.
rmic
.**;
}
module
rmi
{
module
rmi
{
include
java
.
rmi
.**,
sun
.
rmi
.**,
com
.
sun
.
rmi
.**;
include
java
.
rmi
.**,
sun
.
rmi
.**,
com
.
sun
.
rmi
.**;
//
SSL
factories
are
in
rmi
//
SSL
factories
are
in
rmi
include
javax
.
rmi
.
ssl
.**;
include
javax
.
rmi
.
ssl
.**;
//
rmic
is
in
tools
exclude
sun
.
rmi
.
rmic
.**;
//
supporting
classes
in
sun
.
misc
and
dependencies
//
supporting
classes
in
sun
.
misc
and
dependencies
include
sun
.
misc
.
GC
;
include
sun
.
misc
.
GC
;
}
}
...
@@ -468,9 +474,14 @@ module security-smartcardio {
...
@@ -468,9 +474,14 @@ module security-smartcardio {
include
javax
.
smartcardio
.**,
sun
.
security
.
smartcardio
.**;
include
javax
.
smartcardio
.**,
sun
.
security
.
smartcardio
.**;
}
}
module
security
-
auth
{
include
com
.
sun
.
security
.
auth
.**,
sun
.
security
.
util
.
AuthResources_
*;
}
module
security
-
misc
{
module
security
-
misc
{
include
com
.
sun
.
security
.
auth
.**,
sun
.
security
.
util
.
AuthResources_
*,
include
security
-
auth
;
sun
.
security
.
pkcs
.*,
include
sun
.
security
.
pkcs
.*,
sun
.
security
.
pkcs12
.*;
sun
.
security
.
pkcs12
.*;
//
this
class
is
a
candidate
to
be
removed
.
//
this
class
is
a
candidate
to
be
removed
.
...
@@ -500,9 +511,8 @@ module jndi-rmiregistry {
...
@@ -500,9 +511,8 @@ module jndi-rmiregistry {
}
}
module
jndi
-
dns
{
module
jndi
-
dns
{
include
net
-
dns
;
include
com
.
sun
.
jndi
.
dns
.**,
com
.
sun
.
jndi
.
url
.
dns
.**;
include
com
.
sun
.
jndi
.
dns
.**,
com
.
sun
.
jndi
.
url
.
dns
.**;
include
sun
.
net
.
dns
.**; //
to
access
DNS
config
.
include
sun
.
net
.
spi
.
nameservice
.
dns
.**; //
for
DNS
-
only
name
service
.
}
}
module
jndi
-
cosnaming
{
module
jndi
-
cosnaming
{
...
@@ -677,31 +687,69 @@ module corba {
...
@@ -677,31 +687,69 @@ module corba {
/**************************************************************************/
/**************************************************************************/
module
clien
t
{
module
apple
t
{
include
java
.
applet
.**,
include
java
.
applet
.**,
java
.
awt
.**,
sun
.
applet
.**;
javax
.
accessibility
.*,
}
javax
.
imageio
.**,
javax
.
print
.**,
module
awt
{
javax
.
sound
.**,
include
java
.
awt
.**,
javax
.
swing
.**,
sun
.
applet
.**,
sun
.
audio
.**,
sun
.
awt
.**,
sun
.
awt
.**,
sun
.
dc
.**,
com
.
sun
.
awt
.**;
sun
.
font
.**,
}
module
font
{
include
sun
.
font
.**;
}
module
imageio
{
include
javax
.
imageio
.**,
com
.
sun
.
imageio
.**;
}
module
java2d
{
include
sun
.
dc
.**,
sun
.
java2d
.**,
sun
.
java2d
.**,
sun
.
print
.**,
com
.
sun
.
image
.**;
}
module
media
{
include
com
.
sun
.
media
.**;
}
module
print
{
include
javax
.
print
.**,
sun
.
print
.**;
}
module
sound
{
include
javax
.
sound
.**;
}
module
swing
{
include
javax
.
swing
.**,
sun
.
swing
.**,
sun
.
swing
.**,
com
.
sun
.
accessibility
.**,
//
sajdi
also
contains
classes
in
subpackages
of
com
.
sun
.
java
.
swing
;
com
.
sun
.
awt
.**,
//
so
use
'*'
instead
of
'**'
com
.
sun
.
image
.**,
com
.
sun
.
java
.
swing
.*,
com
.
sun
.
imageio
.**,
com
.
sun
.
java
.
swing
.*, //
sajdi
also
contains
classes
in
a
subpackage
;
//
so
use
'*'
instead
of
'**'
com
.
sun
.
java
.
swing
.
plaf
.**,
com
.
sun
.
java
.
swing
.
plaf
.**,
com
.
sun
.
media
.**,
com
.
sun
.
swing
.**;
com
.
sun
.
swing
.**;
}
module
client
{
include
applet
,
awt
,
font
,
imageio
,
java2d
,
media
,
print
,
sound
,
swing
;
include
javax
.
accessibility
.*,
sun
.
audio
.**,
com
.
sun
.
accessibility
.**;
//
Bidi
class
in
client
module
for
now
//
Bidi
class
in
client
module
for
now
include
java
.
text
.
Bidi
,
sun
.
text
.
bidi
.*;
include
java
.
text
.
Bidi
,
sun
.
text
.
bidi
.*;
...
@@ -723,7 +771,13 @@ module client {
...
@@ -723,7 +771,13 @@ module client {
/**************************************************************************/
/**************************************************************************/
module
jkernel
{
include
sun
.
jkernel
.*;
}
module
deploy
{
module
deploy
{
include
jkernel
;
//
For
now
,
all
plugin
and
JNLP
//
For
now
,
all
plugin
and
JNLP
include
com
.
sun
.
java
.
browser
.**,
include
com
.
sun
.
java
.
browser
.**,
netscape
.**,
netscape
.**,
...
@@ -732,8 +786,7 @@ module deploy {
...
@@ -732,8 +786,7 @@ module deploy {
com
.
sun
.
deploy
.**,
com
.
sun
.
deploy
.**,
com
.
sun
.
javaws
.**,
com
.
sun
.
javaws
.**,
javax
.
jnlp
.*,
javax
.
jnlp
.*,
com
.
sun
.
jnlp
.*,
com
.
sun
.
jnlp
.*;
sun
.
jkernel
.*;
//
Hook
for
http
authentication
//
Hook
for
http
authentication
include
sun
.
net
.
www
.
protocol
.
http
.
AuthCacheBridge
;
include
sun
.
net
.
www
.
protocol
.
http
.
AuthCacheBridge
;
...
@@ -741,6 +794,11 @@ module deploy {
...
@@ -741,6 +794,11 @@ module deploy {
/**************************************************************************/
/**************************************************************************/
module
net
-
dns
{
include
sun
.
net
.
dns
.**; //
to
access
DNS
config
.
include
sun
.
net
.
spi
.
nameservice
.
dns
.**; //
for
DNS
-
only
name
service
.
}
module
net
-
compat
{
module
net
-
compat
{
//
NTLM
authentication
support
//
NTLM
authentication
support
include
sun
.
net
.
www
.
protocol
.
http
.
ntlm
.*;
include
sun
.
net
.
www
.
protocol
.
http
.
ntlm
.*;
...
@@ -824,6 +882,7 @@ module tools {
...
@@ -824,6 +882,7 @@ module tools {
debugging
,
debugging
,
jaxws
-
tools
,
jaxws
-
tools
,
jdb
,
jdb
,
rmic
,
sajdi
;
sajdi
;
//
include
gui
-
tools
in
tools
module
unless
the
tool
binaries
//
include
gui
-
tools
in
tools
module
unless
the
tool
binaries
...
@@ -834,8 +893,7 @@ module tools {
...
@@ -834,8 +893,7 @@ module tools {
com
.
sun
.
jarsigner
.**,
com
.
sun
.
jarsigner
.**,
com
.
sun
.
javac
.**,
com
.
sun
.
javac
.**,
com
.
sun
.
javadoc
.**,
com
.
sun
.
source
.**,
com
.
sun
.
javadoc
.**,
com
.
sun
.
source
.**,
sun
.
jvmstat
.**,
sun
.
jvmstat
.**;
sun
.
rmi
.
rmic
.**;
}
}
/**************************************************************************/
/**************************************************************************/
...
@@ -853,6 +911,19 @@ module inputmethods-ext {
...
@@ -853,6 +911,19 @@ module inputmethods-ext {
/**************************************************************************/
/**************************************************************************/
//
Workaround
for
US
export
and
local
policy
files
//
They
are
currently
in
signed
jars
under
the
jre
/
lib
/
security
directory
module
US_export_policy
{
include
default_US_export
.
policy
;
}
module
local_policy
{
include
default_local
.
policy
,
exempt_local
.
policy
;
}
/**************************************************************************/
module
other
{
module
other
{
include
**;
include
**;
}
}
make/modules/optional.depconfig
浏览文件 @
efdc7738
#
# Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Sun designates this
# particular file as subject to the "Classpath" exception as provided
# by Sun in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
# public final java.nio.channels.SocketChannel getChannel()
# public final java.nio.channels.SocketChannel getChannel()
@Optional
@Optional
sun.security.ssl.BaseSSLSocketImpl -> java.nio.channels.SocketChannel
sun.security.ssl.BaseSSLSocketImpl -> java.nio.channels.SocketChannel
...
...
make/modules/tools/Makefile
浏览文件 @
efdc7738
...
@@ -28,58 +28,128 @@
...
@@ -28,58 +28,128 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
PACKAGE
=
com.sun.classanalyzer
PRODUCT
=
tools
PROGRAM
=
classanalyzer
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
PKGDIR
=
com/sun/classanalyzer
BUILDTOOL_SOURCE_ROOT
=
src
BUILDTOOL_SOURCE_ROOT
=
src
BUILDTOOL_MAIN
=
$(PKGDIR)
/ClassAnalyzer.java
BUILDTOOL_MAIN
=
$(PKGDIR)
/ClassAnalyzer.java
BUILTTOOL_MAINCLASS
=
$(
subst
/,.,
$(BUILDTOOL_MAIN:%.java=%)
)
BUILTTOOL_MAINCLASS
=
$(
subst
/,.,
$(BUILDTOOL_MAIN:%.java=%)
)
BUILDTOOL_MAIN_SOURCE_FILE
=
$(BUILDTOOL_SOURCE_ROOT)
/
$(BUILDTOOL_MAIN)
BUILDTOOL_MAIN_SOURCE_FILE
=
$(BUILDTOOL_SOURCE_ROOT)
/
$(BUILDTOOL_MAIN)
BUILDTOOL_MANIFEST_FILE
=
$(BUILDTOOLCLASSDIR)
/
$(PROGRAM)
_manifest.mf
BUILDTOOL_MANIFEST_FILE
=
$(BUILDTOOLCLASSDIR)
/classanalyzer_manifest.mf
BUILDTOOL_JAR_FILE
=
$(BUILDTOOLJARDIR)
/
$(PROGRAM)
.jar
FILES_java
:=
$(
shell
$(CD)
$(BUILDTOOL_SOURCE_ROOT)
\
FILES_java
:=
$(
shell
$(CD)
$(BUILDTOOL_SOURCE_ROOT)
\
&&
$(FIND)
$(PKGDIR)
$(SCM_DIRS_prune)
-o
-type
f
-print
)
&&
$(FIND)
$(PKGDIR)
-type
f
-print
)
FILES_class
=
$
(
FILES_java:%.java
=
$(BUILDTOOLCLASSDIR)
/%.class
)
FILES_class
=
$
(
FILES_java:%.java
=
$(BUILDTOOLCLASSDIR)
/%.class
)
all build
:
$(BUILDTOOL_JAR_FILE) tool_info
CLASSANALYZER_JAR_FILE
=
$(BUILDTOOLJARDIR)
/classanalyzer.jar
#
# ClassAnalyzer depends on the com.sun.tools.classfile API.
# The tool is compiled with the latest version of the classfile
# library in the langtools repo to make sure that synchronized
# change is made if the classfile API is changed.
#
# If langtools repo exists, build its own copy of the
# classfile library and use it for compile time and runtime.
# If not exist (the top level repo is not a forest), use
# the built jdk tools that imports tools.jar from the latest
# promoted build.
#
# If the classfile API is changed but not yet in a promoted build,
# the build might fail and the tool would need the langtools repo
# to build in that case.
#
ifndef
LANGTOOLS_TOPDIR
LANGTOOLS_TOPDIR
=
$(JDK_TOPDIR)
/../langtools
endif
LANGTOOLS_TOPDIR_EXISTS
:=
$(
shell
\
if
[
-d
$(LANGTOOLS_TOPDIR)
]
;
then
\
echo true
;
\
else
\
echo false
;
\
fi
)
CLASSFILE_SRC
=
$(LANGTOOLS_TOPDIR)
/src/share/classes
CLASSFILE_PKGDIR
=
com/sun/tools/classfile
ifeq
($(LANGTOOLS_TOPDIR_EXISTS), true)
FILES_classfile_java
:=
$(
shell
\
$(CD)
$(CLASSFILE_SRC)
&&
\
$(FIND)
$(CLASSFILE_PKGDIR)
-name
'*.java'
-print
)
FILES_classfile_class
=
$
(
FILES_classfile_java:%.java
=
$(BUILDTOOLCLASSDIR)
/%.class
)
CLASSFILE_JAR_FILE
=
$(BUILDTOOLJARDIR)
/classfile.jar
BUILDTOOL_JAVAC
=
$(BOOT_JAVAC_CMD)
$(JAVAC_JVM_FLAGS)
\
$(BOOT_JAVACFLAGS)
-classpath
$(CLASSFILE_JAR_FILE)
BUILDTOOL_JAVA
=
$(BOOT_JAVA_CMD)
$(JAVA_TOOLS_FLAGS)
\
-Xbootclasspath
/p:
$(CLASSFILE_JAR_FILE)
else
# if langtools doesn't exist, use tools from the built jdk
BUILDTOOL_JAVAC
=
$(BINDIR)
/javac
$(JAVAC_JVM_FLAGS)
\
$(BOOT_JAVACFLAGS)
BUILDTOOL_JAVA
=
$(BINDIR)
/java
$(JAVA_TOOLS_FLAGS)
endif
# Location of the output modules.list, <module>.classlist
# and other output files generated by the class analyzer tool.
#
MODULE_CLASSLIST
=
$(MODULES_TEMPDIR)
/classlist
all build
:
classanalyzer gen-classlist
classanalyzer
:
$(CLASSFILE_JAR_FILE) $(CLASSANALYZER_JAR_FILE)
gen-classlist
:
@
$(ECHO)
">>>Making "
$@
" @
`
$(DATE)
`
..."
@
$(RM)
-rf
$(MODULE_CLASSLIST)
@
$(MKDIR)
-p
$(MODULE_CLASSLIST)
$(BUILDTOOL_JAVA)
\
-Dclassanalyzer
.debug
\
-jar
$(CLASSANALYZER_JAR_FILE)
\
-jdkhome
$(OUTPUTDIR)
\
-config
../modules.config
\
-config
../modules.group
\
-depconfig
../jdk7.depconfig
\
-depconfig
../optional.depconfig
\
-showdynamic
\
-output
$(MODULE_CLASSLIST)
@
$(ECHO)
">>>Finished making "
$@
" @
`
$(DATE)
`
..."
$(BUILDTOOL_MANIFEST_FILE)
:
$(BUILDTOOL_MAIN_SOURCE_FILE)
$(BUILDTOOL_MANIFEST_FILE)
:
$(BUILDTOOL_MAIN_SOURCE_FILE)
@
$
(
prep-target
)
@
$
(
prep-target
)
$(ECHO)
"Main-Class:
$(BUILTTOOL_MAINCLASS)
"
>
$@
$(ECHO)
"Main-Class:
$(BUILTTOOL_MAINCLASS)
"
>
$@
$(BUILDTOOLCLASSDIR)/$(CLASSFILE_PKGDIR)/%.class
:
$(CLASSFILE_SRC)/$(CLASSFILE_PKGDIR)/%.java
@
$
(
prep-target
)
@
$(BUILDTOOL_JAVAC)
\
-sourcepath
$(CLASSFILE_SRC)
\
-d
$(BUILDTOOLCLASSDIR)
$<
$(BUILDTOOLCLASSDIR)/%.class
:
$(BUILDTOOL_SOURCE_ROOT)/%.java
$(BUILDTOOLCLASSDIR)/%.class
:
$(BUILDTOOL_SOURCE_ROOT)/%.java
@
$
(
prep-target
)
@
$
(
prep-target
)
$(
JAVAC_CMD
)
\
$(
BUILDTOOL_JAVAC
)
\
-sourcepath
$(BUILDTOOL_SOURCE_ROOT)
\
-sourcepath
$(BUILDTOOL_SOURCE_ROOT)
\
-d
$(BUILDTOOLCLASSDIR)
$<
-d
$(BUILDTOOLCLASSDIR)
$<
$(BUILDTOOL_JAR_FILE)
:
$(BUILDTOOL_MANIFEST_FILE) $(FILES_class)
$(CLASSANALYZER_JAR_FILE)
:
$(BUILDTOOL_MANIFEST_FILE) $(FILES_class)
@
$
(
prep-target
)
$(CD)
$(BUILDTOOLCLASSDIR)
&&
\
$(BOOT_JAR_CMD)
cfm
$@
$(BUILDTOOL_MANIFEST_FILE)
\
$(PKGDIR)
$(BOOT_JAR_JFLAGS)
||
$(RM)
$@
@
$
(
java-vm-cleanup
)
$(BUILDTOOLJARDIR)/classfile.jar
:
$(FILES_classfile_class)
@
$
(
prep-target
)
@
$
(
prep-target
)
$(BOOT_JAR_CMD)
cfm
$@
$(BUILDTOOL_MANIFEST_FILE)
\
$(CD)
$(BUILDTOOLCLASSDIR)
&&
\
-C
$(BUILDTOOLCLASSDIR)
$(PKGDIR)
\
$(BOOT_JAR_CMD)
cf
$@
\
$(BOOT_JAR_JFLAGS)
||
$(RM)
$@
$(CLASSFILE_PKGDIR)
$(BOOT_JAR_JFLAGS)
||
$(RM)
$@
$
(
java-vm-cleanup
)
@
$
(
java-vm-cleanup
)
# Printing out a build tool information line
define
printBuildToolSetting
if [ "$2" != "" ] ; then $(PRINTF) "%-25s %s\n" "$1
:
" "$2"; fi
endef
# Print out the build tool information
tool_info
:
@
$(ECHO)
"========================================================="
@
$(
call
printBuildToolSetting,BUILDTOOL,
$(PROGRAM)
)
@
$(
call
printBuildToolSetting,PACKAGE,
$(PACKAGE)
)
@
$(
call
printBuildToolSetting,BUILDTOOL_SOURCE_ROOT,
$(BUILDTOOL_SOURCE_ROOT)
)
@
$(
call
printBuildToolSetting,BUILTTOOL_MAINCLASS,
$(BUILTTOOL_MAINCLASS)
)
@
$(
call
printBuildToolSetting,BUILDTOOL_JAR_FILE,
$(BUILDTOOL_JAR_FILE)
)
@
$(ECHO)
"========================================================="
clean clobber
::
clean clobber
::
@
$(RM)
-rf
$(BUILDTOOLCLASSDIR)
/
$(PKGDIR)
@
$(RM)
-rf
$(BUILDTOOLCLASSDIR)
/
$(PKGDIR)
@
$(RM)
-rf
$(BUILDTOOLCLASSDIR)
/
$(CLASSFILE_PKGDIR)
@
$(RM)
$(BUILDTOOL_MANIFEST_FILE)
@
$(RM)
$(BUILDTOOL_MANIFEST_FILE)
@
$(RM)
$(BUILDTOOL_JAR_FILE)
@
$(RM)
$(CLASSANALYZER_JAR_FILE)
@
$(RM)
$(CLASSFILE_JAR_FILE)
make/modules/tools/build.xml
浏览文件 @
efdc7738
<!--
<?xml version="1.0" encoding="UTF-8"?>
Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
Redistribution and use in source and binary forms, with or without
<!--
modification, are permitted provided that the following conditions
Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
are met:
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- Redistributions of source code must retain the above copyright
This code is free software; you can redistribute it and/or modify it
notice, this list of conditions and the following disclaimer.
under the terms of the GNU General Public License version 2 only, as
published by the Free Software Foundation. Sun designates this
particular file as subject to the "Classpath" exception as provided
by Sun in the LICENSE file that accompanied this code.
- Redistributions in binary form must reproduce the above copyright
This code is distributed in the hope that it will be useful, but WITHOUT
notice, this list of conditions and the following disclaimer in the
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
documentation and/or other materials provided with the distribution.
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
version 2 for more details (a copy is included in the LICENSE file that
accompanied this code).
- Neither the name of Sun Microsystems nor the names of its
You should have received a copy of the GNU General Public License version
contributors may be used to endorse or promote products derived
2 along with this work; if not, write to the Free Software Foundation,
from this software without specific prior written permission
.
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
CA 95054 USA or visit www.sun.com if you need additional information or
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
have any questions.
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
-->
<project
name=
"classanalyzer"
default=
"build"
basedir=
"."
>
<project
name=
"classanalyzer"
default=
"build"
basedir=
"."
>
...
...
make/modules/tools/nbproject/project.properties
浏览文件 @
efdc7738
#
#
# Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
# Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
#
# Redistribution and use in source and binary forms, with or without
# This code is free software; you can redistribute it and/or modify it
# modification, are permitted provided that the following conditions
# under the terms of the GNU General Public License version 2 only, as
# are met:
# published by the Free Software Foundation. Sun designates this
# particular file as subject to the "Classpath" exception as provided
# by Sun in the LICENSE file that accompanied this code.
#
#
# - Redistributions of source code must retain the above copyright
# This code is distributed in the hope that it will be useful, but WITHOUT
# notice, this list of conditions and the following disclaimer.
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
#
#
- Redistributions in binary form must reproduce the above copyright
#
You should have received a copy of the GNU General Public License version
#
notice, this list of conditions and the following disclaimer in the
#
2 along with this work; if not, write to the Free Software Foundation,
#
documentation and/or other materials provided with the distribution
.
#
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
.
#
#
# - Neither the name of Sun Microsystems nor the names of its
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
# contributors may be used to endorse or promote products derived
# CA 95054 USA or visit www.sun.com if you need additional information or
# from this software without specific prior written permission.
# have any questions.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#
application.title
=
classanalyzer
application.title
=
classanalyzer
...
...
make/modules/tools/nbproject/project.xml
浏览文件 @
efdc7738
<?xml version="1.0" encoding="UTF-8"?>
<!--
<!--
Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
This code is free software; you can redistribute it and/or modify it
are met:
under the terms of the GNU General Public License version 2 only, as
published by the Free Software Foundation. Sun designates this
- Redistributions of source code must retain the above copyright
particular file as subject to the "Classpath" exception as provided
notice, this list of conditions and the following disclaimer.
by Sun in the LICENSE file that accompanied this code.
- Redistributions in binary form must reproduce the above copyright
This code is distributed in the hope that it will be useful, but WITHOUT
notice, this list of conditions and the following disclaimer in the
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
documentation and/or other materials provided with the distribution.
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
version 2 for more details (a copy is included in the LICENSE file that
- Neither the name of Sun Microsystems nor the names of its
accompanied this code).
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
You should have received a copy of the GNU General Public License version
2 along with this work; if not, write to the Free Software Foundation,
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CA 95054 USA or visit www.sun.com if you need additional information or
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
have any questions.
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
-->
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://www.netbeans.org/ns/project/1"
>
<project
xmlns=
"http://www.netbeans.org/ns/project/1"
>
<type>
org.netbeans.modules.java.j2seproject
</type>
<type>
org.netbeans.modules.java.j2seproject
</type>
<configuration>
<configuration>
...
...
make/modules/tools/src/com/sun/classanalyzer/Module.java
浏览文件 @
efdc7738
...
@@ -444,8 +444,8 @@ public class Module implements Comparable<Module> {
...
@@ -444,8 +444,8 @@ public class Module implements Comparable<Module> {
}
}
void
printClassListTo
(
String
output
)
throws
IOException
{
void
printClassListTo
(
String
output
)
throws
IOException
{
// no file created if the module doesn't have any class
// no file created if the module doesn't have any class
nor resource
if
(
classes
.
isEmpty
())
{
if
(
isEmpty
())
{
return
;
return
;
}
}
...
@@ -482,7 +482,7 @@ public class Module implements Comparable<Module> {
...
@@ -482,7 +482,7 @@ public class Module implements Comparable<Module> {
void
printDependenciesTo
(
String
output
,
boolean
showDynamic
)
throws
IOException
{
void
printDependenciesTo
(
String
output
,
boolean
showDynamic
)
throws
IOException
{
// no file created if the module doesn't have any class
// no file created if the module doesn't have any class
if
(
classes
.
isEmpty
())
{
if
(
isEmpty
())
{
return
;
return
;
}
}
...
...
make/sun/applet/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
applet
PACKAGE
=
sun.applet
PACKAGE
=
sun.applet
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/sun/awt/Makefile
浏览文件 @
efdc7738
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
awt
PACKAGE
=
sun.awt
PACKAGE
=
sun.awt
LIBRARY
=
awt
LIBRARY
=
awt
PRODUCT
=
sun
PRODUCT
=
sun
...
@@ -312,15 +313,15 @@ dgalibs: $(DGALIBS)
...
@@ -312,15 +313,15 @@ dgalibs: $(DGALIBS)
$(LIBDIR)/$(LIBARCH)/libxinerama.so
:
$(CLOSED_SRC)/solaris/lib/$(ARCH)/libxinerama.so
$(LIBDIR)/$(LIBARCH)/libxinerama.so
:
$(CLOSED_SRC)/solaris/lib/$(ARCH)/libxinerama.so
$
(
install-file
)
$
(
install-file
)
$(
CHMOD)
a+x
$@
$(
call
chmod-file, a+x
)
$(LIBDIR)/$(LIBARCH)/libjdgaSUNW%.so
:
$(CLOSED_SRC)/solaris/lib/$(ARCH)/libjdgaSUNW%.so
$(LIBDIR)/$(LIBARCH)/libjdgaSUNW%.so
:
$(CLOSED_SRC)/solaris/lib/$(ARCH)/libjdgaSUNW%.so
$
(
install-file
)
$
(
install-file
)
$(
CHMOD)
a+x
$@
$(
call
chmod-file, a+x
)
$(LIBDIR)/$(LIBARCH)/libjdgaSUNWafb.so
:
$(LIBDIR)/$(LIBARCH)/libjdgaSUNWffb.so
$(LIBDIR)/$(LIBARCH)/libjdgaSUNWafb.so
:
$(LIBDIR)/$(LIBARCH)/libjdgaSUNWffb.so
$
(
prep-target
)
$
(
prep-target
)
$(
LN)
-s
libjdgaSUNWffb.so
$(LIBDIR)
/
$(LIBARCH)
/libjdgaSUNWafb.so
$(
call
install-sym-link, libjdgaSUNWffb.so
)
clean
::
dgalib.clean
clean
::
dgalib.clean
...
@@ -404,7 +405,8 @@ $(LIBDIR)/%.bfc: $(FONTCONFIGS_SRC)/$(FONTCONFIGS_SRC_PREFIX)%.properties \
...
@@ -404,7 +405,8 @@ $(LIBDIR)/%.bfc: $(FONTCONFIGS_SRC)/$(FONTCONFIGS_SRC_PREFIX)%.properties \
$(COMPILEFONTCONFIG_JARFILE)
$(COMPILEFONTCONFIG_JARFILE)
$
(
prep-target
)
$
(
prep-target
)
$(BOOT_JAVA_CMD)
-jar
$(COMPILEFONTCONFIG_JARFILE)
$<
$@
$(BOOT_JAVA_CMD)
-jar
$(COMPILEFONTCONFIG_JARFILE)
$<
$@
$(CHMOD)
444
$
(
@
)
$
(
install-module-file
)
$(
call
chmod-file, 444
)
@
$
(
java-vm-cleanup
)
@
$
(
java-vm-cleanup
)
fontconfigs.clean
:
fontconfigs.clean
:
...
...
make/sun/cmm/Makefile
浏览文件 @
efdc7738
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
java2d
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
@@ -45,34 +46,24 @@ iccprofiles: $(ICCPROFILE_DEST_DIR)/sRGB.pf $(ICCPROFILE_DEST_DIR)/GRAY.pf \
...
@@ -45,34 +46,24 @@ iccprofiles: $(ICCPROFILE_DEST_DIR)/sRGB.pf $(ICCPROFILE_DEST_DIR)/GRAY.pf \
$(ICCPROFILE_DEST_DIR)/LINEAR_RGB.pf
$(ICCPROFILE_DEST_DIR)/LINEAR_RGB.pf
$(ICCPROFILE_DEST_DIR)/sRGB.pf
:
$(ICCPROFILE_SRC_DIR)/sRGB.pf
$(ICCPROFILE_DEST_DIR)/sRGB.pf
:
$(ICCPROFILE_SRC_DIR)/sRGB.pf
$(RM)
$(ICCPROFILE_DEST_DIR)
/sRGB.pf
$
(
install-file
)
-
$(MKDIR)
-p
$(ICCPROFILE_DEST_DIR)
$(
call
chmod-file, 444
)
$(CP)
$(ICCPROFILE_SRC_DIR)
/sRGB.pf
$(ICCPROFILE_DEST_DIR)
$(CHMOD)
444
$(ICCPROFILE_DEST_DIR)
/sRGB.pf
$(ICCPROFILE_DEST_DIR)/GRAY.pf
:
$(ICCPROFILE_SRC_DIR)/GRAY.pf
$(ICCPROFILE_DEST_DIR)/GRAY.pf
:
$(ICCPROFILE_SRC_DIR)/GRAY.pf
$(RM)
$(ICCPROFILE_DEST_DIR)
/GRAY.pf
$
(
install-file
)
-
$(MKDIR)
-p
$(ICCPROFILE_DEST_DIR)
$(
call
chmod-file, 444
)
$(CP)
$(ICCPROFILE_SRC_DIR)
/GRAY.pf
$(ICCPROFILE_DEST_DIR)
$(CHMOD)
444
$(ICCPROFILE_DEST_DIR)
/GRAY.pf
$(ICCPROFILE_DEST_DIR)/CIEXYZ.pf
:
$(ICCPROFILE_SRC_DIR)/CIEXYZ.pf
$(ICCPROFILE_DEST_DIR)/CIEXYZ.pf
:
$(ICCPROFILE_SRC_DIR)/CIEXYZ.pf
$(RM)
$(ICCPROFILE_DEST_DIR)
/CIEXYZ.pf
$
(
install-file
)
-
$(MKDIR)
-p
$(ICCPROFILE_DEST_DIR)
$(
call
chmod-file, 444
)
$(CP)
$(ICCPROFILE_SRC_DIR)
/CIEXYZ.pf
$(ICCPROFILE_DEST_DIR)
$(CHMOD)
444
$(ICCPROFILE_DEST_DIR)
/CIEXYZ.pf
$(ICCPROFILE_DEST_DIR)/PYCC.pf
:
$(ICCPROFILE_SRC_DIR)/PYCC.pf
$(ICCPROFILE_DEST_DIR)/PYCC.pf
:
$(ICCPROFILE_SRC_DIR)/PYCC.pf
$(RM)
$(ICCPROFILE_DEST_DIR)
/PYCC.pf
$
(
install-file
)
-
$(MKDIR)
-p
$(ICCPROFILE_DEST_DIR)
$(
call
chmod-file, 444
)
$(CP)
$(ICCPROFILE_SRC_DIR)
/PYCC.pf
$(ICCPROFILE_DEST_DIR)
$(CHMOD)
444
$(ICCPROFILE_DEST_DIR)
/PYCC.pf
$(ICCPROFILE_DEST_DIR)/LINEAR_RGB.pf
:
$(ICCPROFILE_SRC_DIR)/LINEAR_RGB.pf
$(ICCPROFILE_DEST_DIR)/LINEAR_RGB.pf
:
$(ICCPROFILE_SRC_DIR)/LINEAR_RGB.pf
$(RM)
$(ICCPROFILE_DEST_DIR)
/LINEAR_RGB.pf
$
(
install-file
)
-
$(MKDIR)
-p
$(ICCPROFILE_DEST_DIR)
$(
call
chmod-file, 444
)
$(CP)
$(ICCPROFILE_SRC_DIR)
/LINEAR_RGB.pf
$(ICCPROFILE_DEST_DIR)
$(CHMOD)
444
$(ICCPROFILE_DEST_DIR)
/LINEAR_RGB.pf
iccprofiles.clean
:
iccprofiles.clean
:
$(RM)
-r
$(ICCPROFILE_DEST_DIR)
$(RM)
-r
$(ICCPROFILE_DEST_DIR)
...
...
make/sun/cmm/kcms/Makefile
浏览文件 @
efdc7738
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#
#
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
java2d
PACKAGE
=
sun.java2d.cmm.kcms
PACKAGE
=
sun.java2d.cmm.kcms
LIBRARY
=
kcms
LIBRARY
=
kcms
PRODUCT
=
sun
PRODUCT
=
sun
...
...
make/sun/cmm/lcms/Makefile
浏览文件 @
efdc7738
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#
#
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
java2d
PACKAGE
=
sun.java2d.cmm.lcms
PACKAGE
=
sun.java2d.cmm.lcms
LIBRARY
=
lcms
LIBRARY
=
lcms
PRODUCT
=
sun
PRODUCT
=
sun
...
...
make/sun/dcpr/Makefile
浏览文件 @
efdc7738
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
# WARNING: Make sure the OPENJDK plugs are up-to-date, see make/common/internal/BinaryPlugs.gmk
# WARNING: Make sure the OPENJDK plugs are up-to-date, see make/common/internal/BinaryPlugs.gmk
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
java2d
PACKAGE
=
sun.dc
PACKAGE
=
sun.dc
LIBRARY
=
dcpr
LIBRARY
=
dcpr
PRODUCT
=
sun
PRODUCT
=
sun
...
...
make/sun/font/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
font
PACKAGE
=
sun.font
PACKAGE
=
sun.font
LIBRARY
=
fontmanager
LIBRARY
=
fontmanager
PRODUCT
=
sun
PRODUCT
=
sun
...
@@ -121,16 +122,21 @@ FILES_m=mapfile-vers.openjdk
...
@@ -121,16 +122,21 @@ FILES_m=mapfile-vers.openjdk
#
#
#TODO: rework this to avoid hardcoding library name in the makefile
#TODO: rework this to avoid hardcoding library name in the makefile
#
#
library
::
$(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX)
$(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX)
:
ifeq
($(PLATFORM), windows)
ifeq
($(PLATFORM), windows)
$(CP)
$(FREETYPE_LIB_PATH)
/
$(LIB_PREFIX)
freetype.
$(LIBRARY_SUFFIX)
$@
FREETYPE_LIB
=
$(LIB_LOCATION)
/
$(LIB_PREFIX)
freetype.
$(LIBRARY_SUFFIX)
OTHER_LDLIBS
+=
$(FREETYPE_LIB_PATH)
/freetype.lib
else
else
ifeq
($(USING_SYSTEM_FT_LIB), false)
ifeq
($(USING_SYSTEM_FT_LIB), false)
$(CP)
$(FREETYPE_LIB_PATH)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX)
$@
.6
FREETYPE_LIB
=
$(LIB_LOCATION)
/
$(LIB_PREFIX)
freetype.
$(LIBRARY_SUFFIX)
.6
endif
endif
OTHER_LDLIBS
+=
-L
$(FREETYPE_LIB_PATH)
-lfreetype
endif
endif
library
::
$(FREETYPE_LIB)
$(FREETYPE_LIB)
:
$(CP)
$(FREETYPE_LIB_PATH)
/
$(LIB_PREFIX)
freetype.
$(LIBRARY_SUFFIX)
$@
$
(
install-module-file
)
endif
endif
#ifeq ($(PLATFORM), solaris)
#ifeq ($(PLATFORM), solaris)
...
@@ -158,7 +164,6 @@ ifndef OPENJDK
...
@@ -158,7 +164,6 @@ ifndef OPENJDK
CPPFLAGS
+=
-I
$(CLOSED_SRC)
/share/native/
$(PKGDIR)
/t2k
CPPFLAGS
+=
-I
$(CLOSED_SRC)
/share/native/
$(PKGDIR)
/t2k
else
else
CPPFLAGS
+=
-I
$(FREETYPE_HEADERS_PATH)
-I
$(FREETYPE_HEADERS_PATH)
/freetype2
CPPFLAGS
+=
-I
$(FREETYPE_HEADERS_PATH)
-I
$(FREETYPE_HEADERS_PATH)
/freetype2
OTHER_LDLIBS
+=
$(FREETYPE_LIB)
endif
endif
ifeq
($(PLATFORM), windows)
ifeq
($(PLATFORM), windows)
...
...
make/sun/font/t2k/Makefile
浏览文件 @
efdc7738
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
#
#
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
font
PACKAGE
=
sun.font
PACKAGE
=
sun.font
LIBRARY
=
t2k
LIBRARY
=
t2k
PRODUCT
=
sun
PRODUCT
=
sun
...
...
make/sun/headless/Makefile
浏览文件 @
efdc7738
...
@@ -30,6 +30,7 @@ MOTIF_VERSION = none
...
@@ -30,6 +30,7 @@ MOTIF_VERSION = none
MOTIF_VERSION_STRING
=
none
MOTIF_VERSION_STRING
=
none
LIB_LOCATION
=
$(LIBDIR)
/
$(LIBARCH)
/headless
LIB_LOCATION
=
$(LIBDIR)
/
$(LIBARCH)
/headless
MODULE
=
awt
PACKAGE
=
sun.awt
PACKAGE
=
sun.awt
LIBRARY
=
mawt
LIBRARY
=
mawt
LIBRARY_OUTPUT
=
headless
LIBRARY_OUTPUT
=
headless
...
...
make/sun/image/generic/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
media
PACKAGE
=
sun.awt.medialib
PACKAGE
=
sun.awt.medialib
LIBRARY
=
mlib_image
LIBRARY
=
mlib_image
PRODUCT
=
sun
PRODUCT
=
sun
...
...
make/sun/image/vis/Makefile
浏览文件 @
efdc7738
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
# Makefile for building the VIS (solaris-only) version of medialib
# Makefile for building the VIS (solaris-only) version of medialib
#
#
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
media
PACKAGE
=
sun.awt.medialib
PACKAGE
=
sun.awt.medialib
LIBRARY
=
mlib_image_v
LIBRARY
=
mlib_image_v
PRODUCT
=
sun
PRODUCT
=
sun
...
...
make/sun/jar/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
jar-tool
PACKAGE
=
sun.tools
PACKAGE
=
sun.tools
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/sun/javazic/Makefile
浏览文件 @
efdc7738
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
base
PACKAGE
=
sun.javazic
PACKAGE
=
sun.javazic
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
@@ -69,6 +70,7 @@ $(INSTALLDIR)/$(MAPFILE): $(WORKDIR)/$(MAPFILE)
...
@@ -69,6 +70,7 @@ $(INSTALLDIR)/$(MAPFILE): $(WORKDIR)/$(MAPFILE)
$(RM)
-r
$
(
@D
)
$(RM)
-r
$
(
@D
)
$
(
prep-target
)
$
(
prep-target
)
$(CP)
-r
$(WORKDIR)
/
*
$
(
@D
)
$(CP)
-r
$(WORKDIR)
/
*
$
(
@D
)
$
(
install-module-dir
)
clean clobber
::
clean clobber
::
$(RM)
-r
$(TEMPDIR)
$(INSTALLDIR)
$(RM)
-r
$(TEMPDIR)
$(INSTALLDIR)
make/sun/jawt/Makefile
浏览文件 @
efdc7738
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
awt
PACKAGE
=
sun.awt
PACKAGE
=
sun.awt
LIBRARY
=
jawt
LIBRARY
=
jawt
PRODUCT
=
sun
PRODUCT
=
sun
...
...
make/sun/jconsole/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
jconsole
PACKAGE
=
sun.tools.jconsole
PACKAGE
=
sun.tools.jconsole
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
@@ -79,7 +80,7 @@ $(CLASSBINDIR)/$(PKGDIR)/resources/%: $(SHARE_SRC)/classes/$(PKGDIR)/resources/%
...
@@ -79,7 +80,7 @@ $(CLASSBINDIR)/$(PKGDIR)/resources/%: $(SHARE_SRC)/classes/$(PKGDIR)/resources/%
$
(
install-file
)
$
(
install-file
)
$(TEMPDIR)/manifest
:
$(SHARE_SRC)/classes/$(PKGDIR)/manifest
$(TEMPDIR)/manifest
:
$(SHARE_SRC)/classes/$(PKGDIR)/manifest
$
(
install-file
)
$
(
install-
manifest-
file
)
#
#
# Extra rule to build jconsole.jar
# Extra rule to build jconsole.jar
...
...
make/sun/jdbc/Makefile
浏览文件 @
efdc7738
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
jdbc-odbc
PACKAGE
=
sun.jdbc.odbc
PACKAGE
=
sun.jdbc.odbc
LIBRARY
=
JdbcOdbc
LIBRARY
=
JdbcOdbc
PRODUCT
=
sun
PRODUCT
=
sun
...
...
make/sun/jdga/Makefile
浏览文件 @
efdc7738
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
java2d
PACKAGE
=
sun.jdga
PACKAGE
=
sun.jdga
LIBRARY
=
sunwjdga
LIBRARY
=
sunwjdga
PRODUCT
=
sun
PRODUCT
=
sun
...
...
make/sun/jkernel/Makefile
浏览文件 @
efdc7738
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
jkernel
PACKAGE
=
sun.jkernel
PACKAGE
=
sun.jkernel
LIBRARY
=
jkernel
LIBRARY
=
jkernel
PRODUCT
=
sun
PRODUCT
=
sun
...
...
make/sun/jpeg/Makefile
浏览文件 @
efdc7738
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
java2d
PACKAGE
=
sun.awt
PACKAGE
=
sun.awt
LIBRARY
=
jpeg
LIBRARY
=
jpeg
PRODUCT
=
sun
PRODUCT
=
sun
...
...
make/sun/launcher/Makefile
浏览文件 @
efdc7738
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
base
PACKAGE
=
sun.launcher
PACKAGE
=
sun.launcher
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/sun/management/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,8 @@
...
@@ -28,6 +28,8 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
management
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
MGMT_LIBDIR
=
$(LIBDIR)
/management
MGMT_LIBDIR
=
$(LIBDIR)
/management
...
@@ -56,17 +58,17 @@ jmxremotefiles: $(MGMT_LIBDIR)/jmxremote.password.template $(MGMT_LIBDIR)/jmxrem
...
@@ -56,17 +58,17 @@ jmxremotefiles: $(MGMT_LIBDIR)/jmxremote.password.template $(MGMT_LIBDIR)/jmxrem
$(MGMT_LIBDIR)/management.properties
:
$(MGMT_LIB_SRC)/management.properties
$(MGMT_LIBDIR)/management.properties
:
$(MGMT_LIB_SRC)/management.properties
$
(
install-file
)
$
(
install-file
)
$(
CHMOD)
644
$@
$(
call
chmod-file, 644
)
$(MGMT_LIBDIR)/snmp.acl.template
:
$(MGMT_LIB_SRC)/snmp.acl.template
$(MGMT_LIBDIR)/snmp.acl.template
:
$(MGMT_LIB_SRC)/snmp.acl.template
$
(
install-file
)
$
(
install-file
)
$(
CHMOD)
444
$@
$(
call
chmod-file, 444
)
$(MGMT_LIBDIR)/jmxremote.password.template
:
$(MGMT_LIB_SRC)/jmxremote.password.template
$(MGMT_LIBDIR)/jmxremote.password.template
:
$(MGMT_LIB_SRC)/jmxremote.password.template
$
(
install-file
)
$
(
install-file
)
$(
CHMOD)
444
$@
$(
call
chmod-file, 444
)
$(MGMT_LIBDIR)/jmxremote.access
:
$(MGMT_LIB_SRC)/jmxremote.access
$(MGMT_LIBDIR)/jmxremote.access
:
$(MGMT_LIB_SRC)/jmxremote.access
$
(
install-file
)
$
(
install-file
)
$(
CHMOD)
644
$@
$(
call
chmod-file, 644
)
make/sun/native2ascii/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
tools
PACKAGE
=
sun.tools.native2ascii
PACKAGE
=
sun.tools.native2ascii
PRODUCT
=
sun
PRODUCT
=
sun
OTHER_JAVACFLAGS
+=
-Xlint
:serial
-Werror
OTHER_JAVACFLAGS
+=
-Xlint
:serial
-Werror
...
...
make/sun/net/others/Makefile
浏览文件 @
efdc7738
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#
#
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
base
PACKAGE
=
sun.net
PACKAGE
=
sun.net
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/sun/net/spi/nameservice/dns/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,9 @@
...
@@ -28,6 +28,9 @@
#
#
BUILDDIR
=
../../../../..
BUILDDIR
=
../../../../..
# dns should probably be its own module
MODULE
=
net-dns
PACKAGE
=
sun.net.spi.nameservice.dns
PACKAGE
=
sun.net.spi.nameservice.dns
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/sun/nio/Makefile
浏览文件 @
efdc7738
#
#
# Copyright
1996-2008
Sun Microsystems, Inc. All Rights Reserved.
# Copyright
2009
Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
#
# This code is free software; you can redistribute it and/or modify it
# This code is free software; you can redistribute it and/or modify it
...
@@ -23,88 +23,12 @@
...
@@ -23,88 +23,12 @@
# have any questions.
# have any questions.
#
#
#
# Makefile for character converters.
#
BUILDDIR
=
../..
BUILDDIR
=
../..
PACKAGE
=
sun.nio
PACKAGE
=
sun.nio
PRODUCT
=
sun
PRODUCT
=
sun
# This re-directs all the class files to a separate location
CLASSDESTDIR
=
$(TEMPDIR)
/classes
OTHER_JAVACFLAGS
+=
-Xlint
:serial
-Werror
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
#
SUBDIRS
=
cs
# Files
all build clean clobber
::
#
$
(
SUBDIRS-loop
)
include
FILES_java.gmk
AUTO_FILES_JAVA_DIRS
=
sun/nio/cs/ext
# For Cygwin, command line arguments that are paths must be converted to
# windows style paths. These paths cannot be used as targets, however, because
# the ":" in them will interfere with GNU Make rules, generating "multiple
# target pattern" errors.
# this define is for the rule:
CHARSETS_JAR
=
$(LIBDIR)
/charsets.jar
# extcs
FILES_genout_extcs
=
$
(
FILES_gen_extcs:%.java
=
$(GENSRCDIR)
/%.java
)
#
# Rules
#
include
$(BUILDDIR)/common/Classes.gmk
build
:
$(FILES_genout_extcs) $(CHARSETS_JAR)
#
# Extra rules to build character converters.
SERVICE_DESCRIPTION
=
java.nio.charset.spi.CharsetProvider
SERVICE_DESCRIPTION_PATH
=
META-INF/services/
$(SERVICE_DESCRIPTION)
GENCSDATASRC
=
$(BUILDDIR)
/tools/CharsetMapping
GENCSSRCDIR
=
$(BUILDDIR)
/tools/src/build/tools/charsetmapping
GENCSEXT
=
$(GENSRCDIR)
/sun/nio/cs/ext
FILES_MAP
=
$(GENCSDATASRC)
/sjis0213.map
FILES_DAT
=
$(CLASSDESTDIR)
/sun/nio/cs/ext/sjis0213.dat
CHARSETMAPPING_JARFILE
=
$(BUILDTOOLJARDIR)
/charsetmapping.jar
$(FILES_DAT)
:
$(FILES_MAP)
@
$
(
prep-target
)
$(BOOT_JAVA_CMD)
-jar
$(CHARSETMAPPING_JARFILE)
\
$(FILES_MAP)
$(FILES_DAT)
sjis0213
$(FILES_genout_extcs)
:
\
$(GENCSDATASRC)/SingleByte-X.java.template
\
$(GENCSDATASRC)/DoubleByte-X.java.template
\
$(GENCSDATASRC)/extsbcs $(GENCSDATASRC)/dbcs
@
$
(
prep-target
)
$(RM)
-r
$(GENCSEXT)
$(MKDIR)
-p
$(GENCSEXT)
$(BOOT_JAVA_CMD)
-jar
$(CHARSETMAPPING_JARFILE)
$(GENCSDATASRC)
$(GENCSEXT)
extsbcs
$(BOOT_JAVA_CMD)
-jar
$(CHARSETMAPPING_JARFILE)
$(GENCSDATASRC)
$(GENCSEXT)
euctw
\
$(GENCSSRCDIR)
/GenerateEUC_TW.java
$(BOOT_JAVA_CMD)
-jar
$(CHARSETMAPPING_JARFILE)
$(GENCSDATASRC)
$(GENCSEXT)
dbcs
$(CLASSDESTDIR)/$(SERVICE_DESCRIPTION_PATH)
:
\
$(SHARE_SRC)/classes/sun/nio/cs/ext/$(SERVICE_DESCRIPTION_PATH)
$
(
install-file
)
$(CHARSETS_JAR)
:
$(FILES_class) $(CLASSDESTDIR)/$(SERVICE_DESCRIPTION_PATH) $(FILES_DAT)
$(BOOT_JAR_CMD)
cf0
$(CHARSETS_JAR)
\
-C
$(CLASSDESTDIR)
sun
\
-C
$(CLASSDESTDIR)
$(SERVICE_DESCRIPTION_PATH)
\
$(BOOT_JAR_JFLAGS)
@
$
(
java-vm-cleanup
)
clean
::
$(RM)
-r
$(CLASSDESTDIR)
$(RM)
$(CHARSETS_JAR)
make/sun/nio/FILES_java.gmk
→
make/sun/nio/
cs/
FILES_java.gmk
浏览文件 @
efdc7738
文件已移动
make/sun/nio/cs/Makefile
0 → 100644
浏览文件 @
efdc7738
#
# Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Sun designates this
# particular file as subject to the "Classpath" exception as provided
# by Sun in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
#
# Makefile for character converters.
#
BUILDDIR
=
../../..
# charsets should be separated from nio module
MODULE
=
charsets
PACKAGE
=
sun.nio
PRODUCT
=
sun
# This re-directs all the class files to a separate location
CLASSDESTDIR
=
$(TEMPDIR)
/classes
OTHER_JAVACFLAGS
+=
-Xlint
:serial
-Werror
include
$(BUILDDIR)/common/Defs.gmk
#
# Files
#
include
FILES_java.gmk
AUTO_FILES_JAVA_DIRS
=
sun/nio/cs/ext
# For Cygwin, command line arguments that are paths must be converted to
# windows style paths. These paths cannot be used as targets, however, because
# the ":" in them will interfere with GNU Make rules, generating "multiple
# target pattern" errors.
# this define is for the rule:
CHARSETS_JAR
=
$(LIBDIR)
/charsets.jar
# extcs
FILES_genout_extcs
=
$
(
FILES_gen_extcs:%.java
=
$(GENSRCDIR)
/%.java
)
#
# Rules
#
include
$(BUILDDIR)/common/Classes.gmk
build
:
$(FILES_genout_extcs) $(CHARSETS_JAR)
#
# Extra rules to build character converters.
SERVICE_DESCRIPTION
=
java.nio.charset.spi.CharsetProvider
SERVICE_DESCRIPTION_PATH
=
META-INF/services/
$(SERVICE_DESCRIPTION)
GENCSDATASRC
=
$(BUILDDIR)
/tools/CharsetMapping
GENCSSRCDIR
=
$(BUILDDIR)
/tools/src/build/tools/charsetmapping
GENCSEXT
=
$(GENSRCDIR)
/sun/nio/cs/ext
FILES_MAP
=
$(GENCSDATASRC)
/sjis0213.map
FILES_DAT
=
$(CLASSDESTDIR)
/sun/nio/cs/ext/sjis0213.dat
CHARSETMAPPING_JARFILE
=
$(BUILDTOOLJARDIR)
/charsetmapping.jar
$(FILES_DAT)
:
$(FILES_MAP)
@
$
(
prep-target
)
$(BOOT_JAVA_CMD)
-jar
$(CHARSETMAPPING_JARFILE)
\
$(FILES_MAP)
$(FILES_DAT)
sjis0213
$(FILES_genout_extcs)
:
\
$(GENCSDATASRC)/SingleByte-X.java.template
\
$(GENCSDATASRC)/DoubleByte-X.java.template
\
$(GENCSDATASRC)/extsbcs $(GENCSDATASRC)/dbcs
@
$
(
prep-target
)
$(RM)
-r
$(GENCSEXT)
$(MKDIR)
-p
$(GENCSEXT)
$(BOOT_JAVA_CMD)
-jar
$(CHARSETMAPPING_JARFILE)
$(GENCSDATASRC)
$(GENCSEXT)
extsbcs
$(BOOT_JAVA_CMD)
-jar
$(CHARSETMAPPING_JARFILE)
$(GENCSDATASRC)
$(GENCSEXT)
euctw
\
$(GENCSSRCDIR)
/GenerateEUC_TW.java
$(BOOT_JAVA_CMD)
-jar
$(CHARSETMAPPING_JARFILE)
$(GENCSDATASRC)
$(GENCSEXT)
dbcs
$(CLASSDESTDIR)/$(SERVICE_DESCRIPTION_PATH)
:
\
$(SHARE_SRC)/classes/sun/nio/cs/ext/$(SERVICE_DESCRIPTION_PATH)
$
(
install-file
)
$(CHARSETS_JAR)
:
$(FILES_class) $(CLASSDESTDIR)/$(SERVICE_DESCRIPTION_PATH) $(FILES_DAT)
$(BOOT_JAR_CMD)
cf0
$(CHARSETS_JAR)
\
-C
$(CLASSDESTDIR)
sun
\
-C
$(CLASSDESTDIR)
$(SERVICE_DESCRIPTION_PATH)
\
$(BOOT_JAR_JFLAGS)
@
$
(
java-vm-cleanup
)
clean
::
$(RM)
-r
$(CLASSDESTDIR)
$(RM)
$(CHARSETS_JAR)
make/sun/org/mozilla/javascript/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../../../..
BUILDDIR
=
../../../..
MODULE
=
scripting-rhino
PACKAGE
=
sun.org.mozilla.javascript.internal
PACKAGE
=
sun.org.mozilla.javascript.internal
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/sun/pisces/Makefile
浏览文件 @
efdc7738
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
java2d
PACKAGE
=
sun.pisces
PACKAGE
=
sun.pisces
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/sun/rmi/cgi/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,8 @@
...
@@ -28,6 +28,8 @@
#
#
BUILDDIR
=
../../..
BUILDDIR
=
../../..
# java-rmi.cgi is a JDK tool
MODULE
=
tools
PACKAGE
=
sun.rmi
PACKAGE
=
sun.rmi
PRODUCT
=
sun
PRODUCT
=
sun
PROGRAM
=
java-rmi
PROGRAM
=
java-rmi
...
...
make/sun/rmi/oldtools/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
oldjavac
PRODUCT
=
oldjavac
PRODUCT
=
oldjavac
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/sun/rmi/registry/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
rmi
PACKAGE
=
sun.rmi.registry
PACKAGE
=
sun.rmi.registry
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
@@ -48,3 +49,7 @@ RESOURCE_BUNDLES_UNCOMPILED_PROPERTIES = $(PKGDIR)/resources/rmiregistry.propert
...
@@ -48,3 +49,7 @@ RESOURCE_BUNDLES_UNCOMPILED_PROPERTIES = $(PKGDIR)/resources/rmiregistry.propert
#
#
include
$(BUILDDIR)/common/Classes.gmk
include
$(BUILDDIR)/common/Classes.gmk
build
:
rmiregistry
rmiregistry
:
$(
call
make-launcher, rmiregistry, sun.rmi.registry.RegistryImpl, ,
)
make/sun/rmi/rmi/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
rmi
PACKAGE
=
sun.rmi
PACKAGE
=
sun.rmi
PRODUCT
=
sun
PRODUCT
=
sun
LIBRARY
=
rmi
LIBRARY
=
rmi
...
@@ -124,7 +125,7 @@ bin: $(BINDIR)/java-rmi.cgi
...
@@ -124,7 +125,7 @@ bin: $(BINDIR)/java-rmi.cgi
$(BINDIR)/java-rmi.cgi
:
$(PLATFORM_SRC)/bin/java-rmi.cgi.sh
$(BINDIR)/java-rmi.cgi
:
$(PLATFORM_SRC)/bin/java-rmi.cgi.sh
$
(
install-file
)
$
(
install-file
)
$(
CHMOD)
a+x
$@
$(
call
chmod-file, a+x
)
bin.clean
:
bin.clean
:
$(RM)
$(BINDIR)
/java-rmi.cgi
$(RM)
$(BINDIR)
/java-rmi.cgi
...
...
make/sun/rmi/rmic/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
rmic
PACKAGE
=
sun.rmi.rmic
PACKAGE
=
sun.rmi.rmic
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/sun/rmi/rmid/Makefile
浏览文件 @
efdc7738
...
@@ -29,11 +29,12 @@
...
@@ -29,11 +29,12 @@
#
#
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
rmi-activation
PACKAGE
=
sun.rmi.activation
PACKAGE
=
sun.rmi.activation
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
build
:
stubs
build
:
stubs
rmid
#
#
# Resources
# Resources
...
@@ -75,4 +76,5 @@ stubs: $(FILES_stubs)
...
@@ -75,4 +76,5 @@ stubs: $(FILES_stubs)
#
#
include
$(BUILDDIR)/common/Classes.gmk
include
$(BUILDDIR)/common/Classes.gmk
rmid
:
$(
call
make-launcher, rmid, sun.rmi.server.Activation, ,
)
make/sun/security/ec/Makefile
浏览文件 @
efdc7738
...
@@ -89,6 +89,7 @@
...
@@ -89,6 +89,7 @@
#
#
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
security-sunec
PACKAGE
=
sun.security.ec
PACKAGE
=
sun.security.ec
PRODUCT
=
sun
PRODUCT
=
sun
...
@@ -308,7 +309,7 @@ $(JAR_DESTFILE): $(UNSIGNED_DIR)/sunec.jar
...
@@ -308,7 +309,7 @@ $(JAR_DESTFILE): $(UNSIGNED_DIR)/sunec.jar
else
else
$(JAR_DESTFILE)
:
$(SIGNED_DIR)/sunec.jar
$(JAR_DESTFILE)
:
$(SIGNED_DIR)/sunec.jar
endif
endif
$
(
install-file
)
$
(
install-
non-module-
file
)
ifndef
OPENJDK
ifndef
OPENJDK
install-prebuilt
:
install-prebuilt
:
...
...
make/sun/security/jgss/wrapper/Makefile
浏览文件 @
efdc7738
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#
#
BUILDDIR
=
../../../..
BUILDDIR
=
../../../..
MODULE
=
security-kerberos
PACKAGE
=
sun.security.jgss.wrapper
PACKAGE
=
sun.security.jgss.wrapper
PRODUCT
=
sun
PRODUCT
=
sun
...
...
make/sun/security/krb5/Makefile
浏览文件 @
efdc7738
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#
#
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
security-kerberos
PACKAGE
=
sun.security.krb5
PACKAGE
=
sun.security.krb5
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
@@ -77,3 +78,10 @@ ifeq ($(PLATFORM), windows)
...
@@ -77,3 +78,10 @@ ifeq ($(PLATFORM), windows)
else
else
OTHER_LDLIBS
=
-ldl
$(JVMLIB)
OTHER_LDLIBS
=
-ldl
$(JVMLIB)
endif
endif
build
:
ifeq
($(PLATFORM),windows)
$(
call
make-launcher, kinit, sun.security.krb5.internal.tools.Kinit, ,
)
$(
call
make-launcher, klist, sun.security.krb5.internal.tools.Klist, ,
)
$(
call
make-launcher, ktab, sun.security.krb5.internal.tools.Ktab, ,
)
endif
make/sun/security/mscapi/Makefile
浏览文件 @
efdc7738
...
@@ -89,6 +89,7 @@
...
@@ -89,6 +89,7 @@
#
#
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
security-sunmscapi
PACKAGE
=
sun.security.mscapi
PACKAGE
=
sun.security.mscapi
LIBRARY
=
sunmscapi
LIBRARY
=
sunmscapi
PRODUCT
=
sun
PRODUCT
=
sun
...
@@ -271,7 +272,7 @@ $(JAR_DESTFILE): $(UNSIGNED_DIR)/sunmscapi.jar
...
@@ -271,7 +272,7 @@ $(JAR_DESTFILE): $(UNSIGNED_DIR)/sunmscapi.jar
else
else
$(JAR_DESTFILE)
:
$(SIGNED_DIR)/sunmscapi.jar
$(JAR_DESTFILE)
:
$(SIGNED_DIR)/sunmscapi.jar
endif
endif
$
(
install-file
)
$
(
install-
non-module-
file
)
ifndef
OPENJDK
ifndef
OPENJDK
install-prebuilt
:
install-prebuilt
:
...
...
make/sun/security/pkcs11/Makefile
浏览文件 @
efdc7738
...
@@ -89,6 +89,7 @@
...
@@ -89,6 +89,7 @@
#
#
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
security-sunpkcs11
PACKAGE
=
sun.security.pkcs11
PACKAGE
=
sun.security.pkcs11
LIBRARY
=
j2pkcs11
LIBRARY
=
j2pkcs11
PRODUCT
=
sun
PRODUCT
=
sun
...
@@ -161,6 +162,16 @@ else
...
@@ -161,6 +162,16 @@ else
OTHER_LDLIBS
=
-ldl
$(JVMLIB)
OTHER_LDLIBS
=
-ldl
$(JVMLIB)
endif
endif
# Other config files
SUNPKCS11_CFG
=
ifeq
($(PLATFORM), solaris)
SUNPKCS11_CFG
=
sunpkcs11-cfg
endif
# PLATFORM
SUNPKCS11_CFG_SRC
=
$(TOPDIR)
/src/share/lib/security/sunpkcs11-solaris.cfg
SUNPKCS11_CFG_BUILD
=
$(LIBDIR)
/security/sunpkcs11-solaris.cfg
#
#
# We use a variety of subdirectories in the $(TEMPDIR) depending on what
# We use a variety of subdirectories in the $(TEMPDIR) depending on what
# part of the build we're doing. Both OPENJDK/JDK builds are initially
# part of the build we're doing. Both OPENJDK/JDK builds are initially
...
@@ -174,12 +185,17 @@ UNSIGNED_DIR = $(TEMPDIR)/unsigned
...
@@ -174,12 +185,17 @@ UNSIGNED_DIR = $(TEMPDIR)/unsigned
#
#
ifdef
OPENJDK
ifdef
OPENJDK
all
:
build-jar install-jar
all
:
$(SUNPKCS11_CFG)
build-jar install-jar
else
else
all
:
build-jar install-prebuilt
all
:
$(SUNPKCS11_CFG)
build-jar install-prebuilt
$
(
build-warning
)
$
(
build-warning
)
endif
endif
sunpkcs11-cfg
:
$(SUNPKCS11_CFG_BUILD)
$(SUNPKCS11_CFG_BUILD)
:
$(SUNPKCS11_CFG_SRC)
$
(
install-file
)
include
$(BUILDDIR)/javax/crypto/Defs-jce.gmk
include
$(BUILDDIR)/javax/crypto/Defs-jce.gmk
...
@@ -271,7 +287,7 @@ $(JAR_DESTFILE): $(UNSIGNED_DIR)/sunpkcs11.jar
...
@@ -271,7 +287,7 @@ $(JAR_DESTFILE): $(UNSIGNED_DIR)/sunpkcs11.jar
else
else
$(JAR_DESTFILE)
:
$(SIGNED_DIR)/sunpkcs11.jar
$(JAR_DESTFILE)
:
$(SIGNED_DIR)/sunpkcs11.jar
endif
endif
$
(
install-file
)
$
(
install-
non-module-
file
)
ifndef
OPENJDK
ifndef
OPENJDK
install-prebuilt
:
install-prebuilt
:
...
@@ -287,6 +303,7 @@ endif
...
@@ -287,6 +303,7 @@ endif
clobber clean
::
clobber clean
::
$(RM)
-r
$(JAR_DESTFILE)
$(TEMPDIR)
$(JCE_BUILD_DIR)
$(RM)
-r
$(JAR_DESTFILE)
$(TEMPDIR)
$(JCE_BUILD_DIR)
$(RM)
$(SUNPKCS11_CFG_BUILD)
.PHONY
:
build-jar jar install-jar
.PHONY
:
build-jar jar install-jar
ifndef
OPENJDK
ifndef
OPENJDK
...
...
make/sun/security/smartcardio/Makefile
浏览文件 @
efdc7738
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#
#
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
security-smartcardio
PACKAGE
=
sun.security.smartcardio
PACKAGE
=
sun.security.smartcardio
LIBRARY
=
j2pcsc
LIBRARY
=
j2pcsc
PRODUCT
=
sun
PRODUCT
=
sun
...
...
make/sun/security/tools/Makefile
浏览文件 @
efdc7738
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#
#
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
security-tools
PACKAGE
=
sun.security.tools
PACKAGE
=
sun.security.tools
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
@@ -44,3 +45,7 @@ RESOURCE_BUNDLES_JAVA = sun/security/tools/JarSignerResources.java
...
@@ -44,3 +45,7 @@ RESOURCE_BUNDLES_JAVA = sun/security/tools/JarSignerResources.java
#
#
include
$(BUILDDIR)/common/Classes.gmk
include
$(BUILDDIR)/common/Classes.gmk
build
:
$(
call
make-launcher, keytool, sun.security.tools.KeyTool, ,
)
$(
call
make-launcher, policytool, sun.security.tools.PolicyTool, ,
)
make/sun/serialver/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
serialver
PACKAGE
=
sun.tools.serialver
PACKAGE
=
sun.tools.serialver
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/sun/splashscreen/Makefile
浏览文件 @
efdc7738
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
awt
PACKAGE
=
sun.awt
PACKAGE
=
sun.awt
LIBRARY
=
splashscreen
LIBRARY
=
splashscreen
PRODUCT
=
sun
PRODUCT
=
sun
...
...
make/sun/text/Makefile
浏览文件 @
efdc7738
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
localedata
PACKAGE
=
sun.text
PACKAGE
=
sun.text
PRODUCT
=
sun
PRODUCT
=
sun
...
...
make/sun/tools/Makefile
浏览文件 @
efdc7738
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
tools
PACKAGE
=
sun.tools
PACKAGE
=
sun.tools
PRODUCT
=
sun
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
include
$(BUILDDIR)/common/Defs.gmk
...
...
make/sun/tracing/dtrace/Makefile
浏览文件 @
efdc7738
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
# Makefile for building dtrace extension
# Makefile for building dtrace extension
#
#
BUILDDIR
=
../../..
BUILDDIR
=
../../..
MODULE
=
tracing
PACKAGE
=
sun.tracing.dtrace
PACKAGE
=
sun.tracing.dtrace
LIBRARY
=
jsdt
LIBRARY
=
jsdt
PRODUCT
=
sun
PRODUCT
=
sun
...
...
make/sun/xawt/Makefile
浏览文件 @
efdc7738
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#
#
BUILDDIR
=
../..
BUILDDIR
=
../..
MODULE
=
awt
PACKAGE
=
sun.awt.X11
PACKAGE
=
sun.awt.X11
LIBRARY
=
mawt
LIBRARY
=
mawt
LIBRARY_OUTPUT
=
xawt
LIBRARY_OUTPUT
=
xawt
...
...
src/share/classes/java/lang/Deprecated.java
浏览文件 @
efdc7738
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
package
java.lang
;
package
java.lang
;
import
java.lang.annotation.*
;
import
java.lang.annotation.*
;
import
static
java
.
lang
.
annotation
.
ElementType
.*;
/**
/**
* A program element annotated @Deprecated is one that programmers
* A program element annotated @Deprecated is one that programmers
...
@@ -38,5 +39,6 @@ import java.lang.annotation.*;
...
@@ -38,5 +39,6 @@ import java.lang.annotation.*;
*/
*/
@Documented
@Documented
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Target
(
value
={
CONSTRUCTOR
,
FIELD
,
LOCAL_VARIABLE
,
METHOD
,
PACKAGE
,
PARAMETER
,
TYPE
})
public
@interface
Deprecated
{
public
@interface
Deprecated
{
}
}
src/share/classes/java/lang/Error.java
浏览文件 @
efdc7738
...
@@ -26,27 +26,31 @@
...
@@ -26,27 +26,31 @@
package
java.lang
;
package
java.lang
;
/**
/**
* An
<code>Error</code> is a subclass of <code>Throwable</code>
* An
{@code Error} is a subclass of {@code Throwable}
* that indicates serious problems that a reasonable application
* that indicates serious problems that a reasonable application
* should not try to catch. Most such errors are abnormal conditions.
* should not try to catch. Most such errors are abnormal conditions.
* The
<code>ThreadDeath</code>
error, though a "normal" condition,
* The
{@code ThreadDeath}
error, though a "normal" condition,
* is also a subclass of
<code>Error</code>
because most applications
* is also a subclass of
{@code Error}
because most applications
* should not try to catch it.
* should not try to catch it.
* <p>
* <p>
* A method is not required to declare in its
<code>throws</code>
* A method is not required to declare in its
{@code throws}
* clause any subclasses of
<code>Error</code>
that might be thrown
* clause any subclasses of
{@code Error}
that might be thrown
* during the execution of the method but not caught, since these
* during the execution of the method but not caught, since these
* errors are abnormal conditions that should never occur.
* errors are abnormal conditions that should never occur.
*
*
* That is, {@code Error} and its subclasses are regarded as unchecked
* exceptions for the purposes of compile-time checking of exceptions.
*
* @author Frank Yellin
* @author Frank Yellin
* @see java.lang.ThreadDeath
* @see java.lang.ThreadDeath
* @jls3 11.2 Compile-Time Checking of Exceptions
* @since JDK1.0
* @since JDK1.0
*/
*/
public
class
Error
extends
Throwable
{
public
class
Error
extends
Throwable
{
static
final
long
serialVersionUID
=
4980196508277280342L
;
static
final
long
serialVersionUID
=
4980196508277280342L
;
/**
/**
* Constructs a new error with
<code>null</code>
as its detail message.
* Constructs a new error with
{@code null}
as its detail message.
* The cause is not initialized, and may subsequently be initialized by a
* The cause is not initialized, and may subsequently be initialized by a
* call to {@link #initCause}.
* call to {@link #initCause}.
*/
*/
...
@@ -69,7 +73,7 @@ public class Error extends Throwable {
...
@@ -69,7 +73,7 @@ public class Error extends Throwable {
/**
/**
* Constructs a new error with the specified detail message and
* Constructs a new error with the specified detail message and
* cause. <p>Note that the detail message associated with
* cause. <p>Note that the detail message associated with
*
<code>cause</code>
is <i>not</i> automatically incorporated in
*
{@code cause}
is <i>not</i> automatically incorporated in
* this error's detail message.
* this error's detail message.
*
*
* @param message the detail message (which is saved for later retrieval
* @param message the detail message (which is saved for later retrieval
...
...
src/share/classes/java/lang/Exception.java
浏览文件 @
efdc7738
...
@@ -26,19 +26,27 @@
...
@@ -26,19 +26,27 @@
package
java.lang
;
package
java.lang
;
/**
/**
* The class
<code>Exception</code>
and its subclasses are a form of
* The class
{@code Exception}
and its subclasses are a form of
*
<code>Throwable</code>
that indicates conditions that a reasonable
*
{@code Throwable}
that indicates conditions that a reasonable
* application might want to catch.
* application might want to catch.
*
*
* <p>The class {@code Exception} and any subclasses that are not also
* subclasses of {@link RuntimeException} are <em>checked
* exceptions</em>. Checked exceptions need to be declared in a
* method or constructor's {@code throws} clause if they can be thrown
* by the execution of the method or constructor and propagate outside
* the method or constructor boundary.
*
* @author Frank Yellin
* @author Frank Yellin
* @see java.lang.Error
* @see java.lang.Error
* @jls3 11.2 Compile-Time Checking of Exceptions
* @since JDK1.0
* @since JDK1.0
*/
*/
public
class
Exception
extends
Throwable
{
public
class
Exception
extends
Throwable
{
static
final
long
serialVersionUID
=
-
3387516993124229948L
;
static
final
long
serialVersionUID
=
-
3387516993124229948L
;
/**
/**
* Constructs a new exception with
<code>null</code>
as its detail message.
* Constructs a new exception with
{@code null}
as its detail message.
* The cause is not initialized, and may subsequently be initialized by a
* The cause is not initialized, and may subsequently be initialized by a
* call to {@link #initCause}.
* call to {@link #initCause}.
*/
*/
...
@@ -61,7 +69,7 @@ public class Exception extends Throwable {
...
@@ -61,7 +69,7 @@ public class Exception extends Throwable {
/**
/**
* Constructs a new exception with the specified detail message and
* Constructs a new exception with the specified detail message and
* cause. <p>Note that the detail message associated with
* cause. <p>Note that the detail message associated with
*
<code>cause</code>
is <i>not</i> automatically incorporated in
*
{@code cause}
is <i>not</i> automatically incorporated in
* this exception's detail message.
* this exception's detail message.
*
*
* @param message the detail message (which is saved for later retrieval
* @param message the detail message (which is saved for later retrieval
...
...
src/share/classes/java/lang/RuntimeException.java
浏览文件 @
efdc7738
...
@@ -26,22 +26,24 @@
...
@@ -26,22 +26,24 @@
package
java.lang
;
package
java.lang
;
/**
/**
*
<code>RuntimeException</code>
is the superclass of those
*
{@code RuntimeException}
is the superclass of those
* exceptions that can be thrown during the normal operation of the
* exceptions that can be thrown during the normal operation of the
* Java Virtual Machine.
* Java Virtual Machine.
* <p>
* A method is not required to declare in its <code>throws</code>
* clause any subclasses of <code>RuntimeException</code> that might
* be thrown during the execution of the method but not caught.
*
*
* <p>{@code RuntimeException} and its subclasses are <em>unchecked
* exceptions</em>. Unchecked exceptions do <em>not</em> need to be
* declared in a method or constructor's {@code throws} clause if they
* can be thrown by the execution of the method or constructor and
* propagate outside the method or constructor boundary.
*
*
* @author Frank Yellin
* @author Frank Yellin
* @jls3 11.2 Compile-Time Checking of Exceptions
* @since JDK1.0
* @since JDK1.0
*/
*/
public
class
RuntimeException
extends
Exception
{
public
class
RuntimeException
extends
Exception
{
static
final
long
serialVersionUID
=
-
7034897190745766939L
;
static
final
long
serialVersionUID
=
-
7034897190745766939L
;
/** Constructs a new runtime exception with
<code>null</code>
as its
/** Constructs a new runtime exception with
{@code null}
as its
* detail message. The cause is not initialized, and may subsequently be
* detail message. The cause is not initialized, and may subsequently be
* initialized by a call to {@link #initCause}.
* initialized by a call to {@link #initCause}.
*/
*/
...
@@ -63,7 +65,7 @@ public class RuntimeException extends Exception {
...
@@ -63,7 +65,7 @@ public class RuntimeException extends Exception {
/**
/**
* Constructs a new runtime exception with the specified detail message and
* Constructs a new runtime exception with the specified detail message and
* cause. <p>Note that the detail message associated with
* cause. <p>Note that the detail message associated with
*
<code>cause</code>
is <i>not</i> automatically incorporated in
*
{@code cause}
is <i>not</i> automatically incorporated in
* this runtime exception's detail message.
* this runtime exception's detail message.
*
*
* @param message the detail message (which is saved for later retrieval
* @param message the detail message (which is saved for later retrieval
...
...
src/share/classes/java/lang/SuppressWarnings.java
浏览文件 @
efdc7738
...
@@ -26,7 +26,6 @@
...
@@ -26,7 +26,6 @@
package
java.lang
;
package
java.lang
;
import
java.lang.annotation.*
;
import
java.lang.annotation.*
;
import
java.lang.annotation.ElementType
;
import
static
java
.
lang
.
annotation
.
ElementType
.*;
import
static
java
.
lang
.
annotation
.
ElementType
.*;
/**
/**
...
@@ -45,7 +44,7 @@ import static java.lang.annotation.ElementType.*;
...
@@ -45,7 +44,7 @@ import static java.lang.annotation.ElementType.*;
* @since 1.5
* @since 1.5
* @author Josh Bloch
* @author Josh Bloch
*/
*/
@Target
({
TYPE
,
FIELD
,
METHOD
,
PARAMETER
,
CONSTRUCTOR
,
LOCAL_VARIABLE
})
@Target
({
TYPE
,
FIELD
,
METHOD
,
PARAMETER
,
CONSTRUCTOR
,
LOCAL_VARIABLE
,
TYPE_PARAMETER
})
@Retention
(
RetentionPolicy
.
SOURCE
)
@Retention
(
RetentionPolicy
.
SOURCE
)
public
@interface
SuppressWarnings
{
public
@interface
SuppressWarnings
{
/**
/**
...
...
src/share/classes/java/lang/Throwable.java
浏览文件 @
efdc7738
...
@@ -34,6 +34,11 @@ import java.io.*;
...
@@ -34,6 +34,11 @@ import java.io.*;
* this class or one of its subclasses can be the argument type in a
* this class or one of its subclasses can be the argument type in a
* <code>catch</code> clause.
* <code>catch</code> clause.
*
*
* For the purposes of compile-time checking of exceptions, {@code
* Throwable} and any subclass of {@code Throwable} that is not also a
* subclass of either {@link RuntimeException} or {@link Error} are
* regarded as checked exceptions.
*
* <p>Instances of two subclasses, {@link java.lang.Error} and
* <p>Instances of two subclasses, {@link java.lang.Error} and
* {@link java.lang.Exception}, are conventionally used to indicate
* {@link java.lang.Exception}, are conventionally used to indicate
* that exceptional situations have occurred. Typically, these instances
* that exceptional situations have occurred. Typically, these instances
...
@@ -142,6 +147,7 @@ import java.io.*;
...
@@ -142,6 +147,7 @@ import java.io.*;
* @author unascribed
* @author unascribed
* @author Josh Bloch (Added exception chaining and programmatic access to
* @author Josh Bloch (Added exception chaining and programmatic access to
* stack trace in 1.4.)
* stack trace in 1.4.)
* @jls3 11.2 Compile-Time Checking of Exceptions
* @since JDK1.0
* @since JDK1.0
*/
*/
public
class
Throwable
implements
Serializable
{
public
class
Throwable
implements
Serializable
{
...
...
src/share/classes/java/util/NavigableMap.java
浏览文件 @
efdc7738
...
@@ -298,7 +298,7 @@ public interface NavigableMap<K,V> extends SortedMap<K,V> {
...
@@ -298,7 +298,7 @@ public interface NavigableMap<K,V> extends SortedMap<K,V> {
* Returns a view of the portion of this map whose keys range from
* Returns a view of the portion of this map whose keys range from
* {@code fromKey} to {@code toKey}. If {@code fromKey} and
* {@code fromKey} to {@code toKey}. If {@code fromKey} and
* {@code toKey} are equal, the returned map is empty unless
* {@code toKey} are equal, the returned map is empty unless
* {@code from
Exclusive} and {@code toEx
clusive} are both true. The
* {@code from
Inclusive} and {@code toIn
clusive} are both true. The
* returned map is backed by this map, so changes in the returned map are
* returned map is backed by this map, so changes in the returned map are
* reflected in this map, and vice-versa. The returned map supports all
* reflected in this map, and vice-versa. The returned map supports all
* optional map operations that this map supports.
* optional map operations that this map supports.
...
...
src/share/classes/java/util/NavigableSet.java
浏览文件 @
efdc7738
...
@@ -192,7 +192,7 @@ public interface NavigableSet<E> extends SortedSet<E> {
...
@@ -192,7 +192,7 @@ public interface NavigableSet<E> extends SortedSet<E> {
* Returns a view of the portion of this set whose elements range from
* Returns a view of the portion of this set whose elements range from
* {@code fromElement} to {@code toElement}. If {@code fromElement} and
* {@code fromElement} to {@code toElement}. If {@code fromElement} and
* {@code toElement} are equal, the returned set is empty unless {@code
* {@code toElement} are equal, the returned set is empty unless {@code
* from
Exclusive} and {@code toEx
clusive} are both true. The returned set
* from
Inclusive} and {@code toIn
clusive} are both true. The returned set
* is backed by this set, so changes in the returned set are reflected in
* is backed by this set, so changes in the returned set are reflected in
* this set, and vice-versa. The returned set supports all optional set
* this set, and vice-versa. The returned set supports all optional set
* operations that this set supports.
* operations that this set supports.
...
...
src/share/classes/sun/nio/fs/AbstractPath.java
浏览文件 @
efdc7738
...
@@ -256,8 +256,8 @@ abstract class AbstractPath extends Path {
...
@@ -256,8 +256,8 @@ abstract class AbstractPath extends Path {
}
}
if
(
option
==
null
)
if
(
option
==
null
)
throw
new
NullPointerException
();
throw
new
NullPointerException
();
throw
new
IllegalArgument
Exception
(
"'"
+
option
+
throw
new
UnsupportedOperation
Exception
(
"'"
+
option
+
"' is not a
vali
d copy option"
);
"' is not a
recognize
d copy option"
);
}
}
return
result
;
return
result
;
}
}
...
@@ -279,9 +279,21 @@ abstract class AbstractPath extends Path {
...
@@ -279,9 +279,21 @@ abstract class AbstractPath extends Path {
if
(
attrs
.
isSymbolicLink
())
if
(
attrs
.
isSymbolicLink
())
throw
new
IOException
(
"Copying of symbolic links not supported"
);
throw
new
IOException
(
"Copying of symbolic links not supported"
);
// delete target file
// check if target exists
if
(
opts
.
replaceExisting
)
boolean
exists
;
target
.
deleteIfExists
();
if
(
opts
.
replaceExisting
)
{
try
{
target
.
deleteIfExists
();
exists
=
false
;
}
catch
(
DirectoryNotEmptyException
x
)
{
// let exception translate to FileAlreadyExistsException (6895012)
exists
=
true
;
}
}
else
{
exists
=
target
.
exists
();
}
if
(
exists
)
throw
new
FileAlreadyExistsException
(
target
.
toString
());
// create directory or file
// create directory or file
if
(
attrs
.
isDirectory
())
{
if
(
attrs
.
isDirectory
())
{
...
@@ -318,7 +330,7 @@ abstract class AbstractPath extends Path {
...
@@ -318,7 +330,7 @@ abstract class AbstractPath extends Path {
ReadableByteChannel
rbc
=
newByteChannel
();
ReadableByteChannel
rbc
=
newByteChannel
();
try
{
try
{
// open target file for writing
// open target file for writing
SeekableByteChannel
sbc
=
target
.
newByteChannel
(
CREATE
,
WRITE
);
SeekableByteChannel
sbc
=
target
.
newByteChannel
(
CREATE
_NEW
,
WRITE
);
// simple copy loop
// simple copy loop
try
{
try
{
...
...
src/share/classes/sun/nio/fs/AbstractWatchKey.java
浏览文件 @
efdc7738
...
@@ -88,27 +88,25 @@ abstract class AbstractWatchKey extends WatchKey {
...
@@ -88,27 +88,25 @@ abstract class AbstractWatchKey extends WatchKey {
final
void
signalEvent
(
WatchEvent
.
Kind
<?>
kind
,
Object
context
)
{
final
void
signalEvent
(
WatchEvent
.
Kind
<?>
kind
,
Object
context
)
{
synchronized
(
this
)
{
synchronized
(
this
)
{
int
size
=
events
.
size
();
int
size
=
events
.
size
();
if
(
size
>
1
)
{
if
(
size
>
0
)
{
// don't let list get too big
// if the previous event is an OVERFLOW event or this is a
// repeated event then we simply increment the counter
WatchEvent
<?>
prev
=
events
.
get
(
size
-
1
);
if
((
prev
.
kind
()
==
StandardWatchEventKind
.
OVERFLOW
)
||
((
kind
==
prev
.
kind
()
&&
Objects
.
equals
(
context
,
prev
.
context
()))))
{
((
Event
<?>)
prev
).
increment
();
return
;
}
// if the list has reached the limit then drop pending events
// and queue an OVERFLOW event
if
(
size
>=
MAX_EVENT_LIST_SIZE
)
{
if
(
size
>=
MAX_EVENT_LIST_SIZE
)
{
events
.
clear
();
kind
=
StandardWatchEventKind
.
OVERFLOW
;
kind
=
StandardWatchEventKind
.
OVERFLOW
;
context
=
null
;
context
=
null
;
}
}
// repeated event
WatchEvent
<?>
prev
=
events
.
get
(
size
-
1
);
if
(
kind
==
prev
.
kind
())
{
boolean
isRepeat
;
if
(
context
==
null
)
{
isRepeat
=
(
prev
.
context
()
==
null
);
}
else
{
isRepeat
=
context
.
equals
(
prev
.
context
());
}
if
(
isRepeat
)
{
((
Event
<?>)
prev
).
increment
();
return
;
}
}
}
}
// non-repeated event
// non-repeated event
...
...
src/share/classes/sun/security/krb5/internal/ktab/KeyTabEntry.java
浏览文件 @
efdc7738
...
@@ -75,7 +75,7 @@ public class KeyTabEntry implements KeyTabConstants {
...
@@ -75,7 +75,7 @@ public class KeyTabEntry implements KeyTabConstants {
public
String
getKeyString
()
{
public
String
getKeyString
()
{
StringBuffer
sb
=
new
StringBuffer
(
"0x"
);
StringBuffer
sb
=
new
StringBuffer
(
"0x"
);
for
(
int
i
=
0
;
i
<
keyblock
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
keyblock
.
length
;
i
++)
{
sb
.
append
(
Integer
.
toHexString
(
keyblock
[
i
]&
0xff
));
sb
.
append
(
String
.
format
(
"%02x"
,
keyblock
[
i
]&
0xff
));
}
}
return
sb
.
toString
();
return
sb
.
toString
();
}
}
...
...
src/share/classes/sun/security/provider/certpath/OCSPResponse.java
浏览文件 @
efdc7738
...
@@ -574,10 +574,18 @@ public final class OCSPResponse {
...
@@ -574,10 +574,18 @@ public final class OCSPResponse {
(
singleExtDer
.
length
);
(
singleExtDer
.
length
);
for
(
int
i
=
0
;
i
<
singleExtDer
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
singleExtDer
.
length
;
i
++)
{
Extension
ext
=
new
Extension
(
singleExtDer
[
i
]);
Extension
ext
=
new
Extension
(
singleExtDer
[
i
]);
singleExtensions
.
put
(
ext
.
getId
(),
ext
);
if
(
DEBUG
!=
null
)
{
if
(
DEBUG
!=
null
)
{
DEBUG
.
println
(
"OCSP single extension: "
+
ext
);
DEBUG
.
println
(
"OCSP single extension: "
+
ext
);
}
}
// We don't support any extensions yet. Therefore, if it
// is critical we must throw an exception because we
// don't know how to process it.
if
(
ext
.
isCritical
())
{
throw
new
IOException
(
"Unsupported OCSP critical extension: "
+
ext
.
getExtensionId
());
}
singleExtensions
.
put
(
ext
.
getId
(),
ext
);
}
}
}
else
{
}
else
{
singleExtensions
=
Collections
.
emptyMap
();
singleExtensions
=
Collections
.
emptyMap
();
...
...
src/solaris/classes/sun/nio/ch/SctpChannelImpl.java
浏览文件 @
efdc7738
...
@@ -38,7 +38,6 @@ import java.nio.channels.SelectionKey;
...
@@ -38,7 +38,6 @@ import java.nio.channels.SelectionKey;
import
java.nio.channels.ClosedChannelException
;
import
java.nio.channels.ClosedChannelException
;
import
java.nio.channels.ConnectionPendingException
;
import
java.nio.channels.ConnectionPendingException
;
import
java.nio.channels.NoConnectionPendingException
;
import
java.nio.channels.NoConnectionPendingException
;
import
java.nio.channels.AlreadyBoundException
;
import
java.nio.channels.AlreadyConnectedException
;
import
java.nio.channels.AlreadyConnectedException
;
import
java.nio.channels.NotYetBoundException
;
import
java.nio.channels.NotYetBoundException
;
import
java.nio.channels.NotYetConnectedException
;
import
java.nio.channels.NotYetConnectedException
;
...
@@ -54,7 +53,6 @@ import com.sun.nio.sctp.MessageInfo;
...
@@ -54,7 +53,6 @@ import com.sun.nio.sctp.MessageInfo;
import
com.sun.nio.sctp.NotificationHandler
;
import
com.sun.nio.sctp.NotificationHandler
;
import
com.sun.nio.sctp.SctpChannel
;
import
com.sun.nio.sctp.SctpChannel
;
import
com.sun.nio.sctp.SctpSocketOption
;
import
com.sun.nio.sctp.SctpSocketOption
;
import
sun.nio.ch.NativeDispatcher
;
import
sun.nio.ch.PollArrayWrapper
;
import
sun.nio.ch.PollArrayWrapper
;
import
sun.nio.ch.SelChImpl
;
import
sun.nio.ch.SelChImpl
;
import
static
com
.
sun
.
nio
.
sctp
.
SctpStandardSocketOption
.*;
import
static
com
.
sun
.
nio
.
sctp
.
SctpStandardSocketOption
.*;
...
@@ -69,9 +67,6 @@ import static sun.nio.ch.SctpResultContainer.SHUTDOWN;
...
@@ -69,9 +67,6 @@ import static sun.nio.ch.SctpResultContainer.SHUTDOWN;
public
class
SctpChannelImpl
extends
SctpChannel
public
class
SctpChannelImpl
extends
SctpChannel
implements
SelChImpl
implements
SelChImpl
{
{
/* Used to make native close and preClose calls */
private
static
NativeDispatcher
nd
;
private
final
FileDescriptor
fd
;
private
final
FileDescriptor
fd
;
private
final
int
fdVal
;
private
final
int
fdVal
;
...
@@ -182,7 +177,7 @@ public class SctpChannelImpl extends SctpChannel
...
@@ -182,7 +177,7 @@ public class SctpChannelImpl extends SctpChannel
synchronized
(
stateLock
)
{
synchronized
(
stateLock
)
{
ensureOpenAndUnconnected
();
ensureOpenAndUnconnected
();
if
(
isBound
())
if
(
isBound
())
throw
new
AlreadyBoundException
();
SctpNet
.
throw
AlreadyBoundException
();
InetSocketAddress
isa
=
(
local
==
null
)
?
InetSocketAddress
isa
=
(
local
==
null
)
?
new
InetSocketAddress
(
0
)
:
Net
.
checkAddress
(
local
);
new
InetSocketAddress
(
0
)
:
Net
.
checkAddress
(
local
);
Net
.
bind
(
fd
,
isa
.
getAddress
(),
isa
.
getPort
());
Net
.
bind
(
fd
,
isa
.
getAddress
(),
isa
.
getPort
());
...
@@ -234,7 +229,7 @@ public class SctpChannelImpl extends SctpChannel
...
@@ -234,7 +229,7 @@ public class SctpChannelImpl extends SctpChannel
if
(
add
)
{
if
(
add
)
{
for
(
InetSocketAddress
addr
:
localAddresses
)
{
for
(
InetSocketAddress
addr
:
localAddresses
)
{
if
(
addr
.
getAddress
().
equals
(
address
))
{
if
(
addr
.
getAddress
().
equals
(
address
))
{
throw
new
AlreadyBoundException
();
SctpNet
.
throw
AlreadyBoundException
();
}
}
}
}
}
else
{
/*removing */
}
else
{
/*removing */
...
@@ -370,7 +365,7 @@ public class SctpChannelImpl extends SctpChannel
...
@@ -370,7 +365,7 @@ public class SctpChannelImpl extends SctpChannel
InetAddress
ia
=
isa
.
getAddress
();
InetAddress
ia
=
isa
.
getAddress
();
if
(
ia
.
isAnyLocalAddress
())
if
(
ia
.
isAnyLocalAddress
())
ia
=
InetAddress
.
getLocalHost
();
ia
=
InetAddress
.
getLocalHost
();
n
=
Net
.
connect
(
fd
,
ia
,
isa
.
getPort
());
n
=
SctpNet
.
connect
(
fdVal
,
ia
,
isa
.
getPort
());
if
(
(
n
==
IOStatus
.
INTERRUPTED
)
if
(
(
n
==
IOStatus
.
INTERRUPTED
)
&&
isOpen
())
&&
isOpen
())
continue
;
continue
;
...
@@ -556,7 +551,7 @@ public class SctpChannelImpl extends SctpChannel
...
@@ -556,7 +551,7 @@ public class SctpChannelImpl extends SctpChannel
@Override
@Override
public
void
implCloseSelectableChannel
()
throws
IOException
{
public
void
implCloseSelectableChannel
()
throws
IOException
{
synchronized
(
stateLock
)
{
synchronized
(
stateLock
)
{
nd
.
preClose
(
fd
);
SctpNet
.
preClose
(
fdVal
);
if
(
receiverThread
!=
0
)
if
(
receiverThread
!=
0
)
NativeThread
.
signal
(
receiverThread
);
NativeThread
.
signal
(
receiverThread
);
...
@@ -662,7 +657,7 @@ public class SctpChannelImpl extends SctpChannel
...
@@ -662,7 +657,7 @@ public class SctpChannelImpl extends SctpChannel
/* Postpone the kill if there is a waiting reader
/* Postpone the kill if there is a waiting reader
* or writer thread. */
* or writer thread. */
if
(
receiverThread
==
0
&&
senderThread
==
0
)
{
if
(
receiverThread
==
0
&&
senderThread
==
0
)
{
nd
.
close
(
fd
);
SctpNet
.
close
(
fdVal
);
state
=
ChannelState
.
KILLED
;
state
=
ChannelState
.
KILLED
;
}
else
{
}
else
{
state
=
ChannelState
.
KILLPENDING
;
state
=
ChannelState
.
KILLPENDING
;
...
@@ -874,8 +869,8 @@ public class SctpChannelImpl extends SctpChannel
...
@@ -874,8 +869,8 @@ public class SctpChannelImpl extends SctpChannel
public
HandlerResult
handleNotification
(
public
HandlerResult
handleNotification
(
AssociationChangeNotification
not
,
T
unused
)
{
AssociationChangeNotification
not
,
T
unused
)
{
if
(
not
.
event
().
equals
(
if
(
not
.
event
().
equals
(
AssociationChangeNotification
.
AssocChangeEvent
.
COMM_UP
)
)
{
AssociationChangeNotification
.
AssocChangeEvent
.
COMM_UP
)
&&
assert
association
==
null
;
association
==
null
)
{
SctpAssocChange
sac
=
(
SctpAssocChange
)
not
;
SctpAssocChange
sac
=
(
SctpAssocChange
)
not
;
association
=
new
SctpAssociationImpl
association
=
new
SctpAssociationImpl
(
sac
.
assocId
(),
sac
.
maxInStreams
(),
sac
.
maxOutStreams
());
(
sac
.
assocId
(),
sac
.
maxInStreams
(),
sac
.
maxOutStreams
());
...
@@ -987,17 +982,17 @@ public class SctpChannelImpl extends SctpChannel
...
@@ -987,17 +982,17 @@ public class SctpChannelImpl extends SctpChannel
SocketAddress
target
=
messageInfo
.
address
();
SocketAddress
target
=
messageInfo
.
address
();
boolean
unordered
=
messageInfo
.
isUnordered
();
boolean
unordered
=
messageInfo
.
isUnordered
();
int
ppid
=
messageInfo
.
payloadProtocolID
();
int
ppid
=
messageInfo
.
payloadProtocolID
();
int
pos
=
src
.
position
();
int
lim
=
src
.
limit
();
assert
(
pos
<=
lim
&&
streamNumber
>=
0
);
int
rem
=
(
pos
<=
lim
?
lim
-
pos
:
0
);
if
(
src
instanceof
DirectBuffer
)
if
(
src
instanceof
DirectBuffer
)
return
sendFromNativeBuffer
(
fd
,
src
,
rem
,
pos
,
target
,
streamNumber
,
return
sendFromNativeBuffer
(
fd
,
src
,
target
,
streamNumber
,
unordered
,
ppid
);
unordered
,
ppid
);
/* Substitute a native buffer */
/* Substitute a native buffer */
int
pos
=
src
.
position
();
int
lim
=
src
.
limit
();
assert
(
pos
<=
lim
&&
streamNumber
>=
0
);
int
rem
=
(
pos
<=
lim
?
lim
-
pos
:
0
);
ByteBuffer
bb
=
Util
.
getTemporaryDirectBuffer
(
rem
);
ByteBuffer
bb
=
Util
.
getTemporaryDirectBuffer
(
rem
);
try
{
try
{
bb
.
put
(
src
);
bb
.
put
(
src
);
...
@@ -1005,7 +1000,7 @@ public class SctpChannelImpl extends SctpChannel
...
@@ -1005,7 +1000,7 @@ public class SctpChannelImpl extends SctpChannel
/* Do not update src until we see how many bytes were written */
/* Do not update src until we see how many bytes were written */
src
.
position
(
pos
);
src
.
position
(
pos
);
int
n
=
sendFromNativeBuffer
(
fd
,
bb
,
rem
,
pos
,
target
,
streamNumber
,
int
n
=
sendFromNativeBuffer
(
fd
,
bb
,
target
,
streamNumber
,
unordered
,
ppid
);
unordered
,
ppid
);
if
(
n
>
0
)
{
if
(
n
>
0
)
{
/* now update src */
/* now update src */
...
@@ -1019,13 +1014,16 @@ public class SctpChannelImpl extends SctpChannel
...
@@ -1019,13 +1014,16 @@ public class SctpChannelImpl extends SctpChannel
private
int
sendFromNativeBuffer
(
int
fd
,
private
int
sendFromNativeBuffer
(
int
fd
,
ByteBuffer
bb
,
ByteBuffer
bb
,
int
rem
,
int
pos
,
SocketAddress
target
,
SocketAddress
target
,
int
streamNumber
,
int
streamNumber
,
boolean
unordered
,
boolean
unordered
,
int
ppid
)
int
ppid
)
throws
IOException
{
throws
IOException
{
int
pos
=
bb
.
position
();
int
lim
=
bb
.
limit
();
assert
(
pos
<=
lim
);
int
rem
=
(
pos
<=
lim
?
lim
-
pos
:
0
);
int
written
=
send0
(
fd
,
((
DirectBuffer
)
bb
).
address
()
+
pos
,
int
written
=
send0
(
fd
,
((
DirectBuffer
)
bb
).
address
()
+
pos
,
rem
,
target
,
-
1
/*121*/
,
streamNumber
,
unordered
,
ppid
);
rem
,
target
,
-
1
/*121*/
,
streamNumber
,
unordered
,
ppid
);
if
(
written
>
0
)
if
(
written
>
0
)
...
@@ -1097,6 +1095,5 @@ public class SctpChannelImpl extends SctpChannel
...
@@ -1097,6 +1095,5 @@ public class SctpChannelImpl extends SctpChannel
java
.
security
.
AccessController
.
doPrivileged
(
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"sctp"
));
new
sun
.
security
.
action
.
LoadLibraryAction
(
"sctp"
));
initIDs
();
initIDs
();
nd
=
new
SctpSocketDispatcher
();
}
}
}
}
src/solaris/classes/sun/nio/ch/SctpMultiChannelImpl.java
浏览文件 @
efdc7738
...
@@ -38,7 +38,6 @@ import java.util.HashSet;
...
@@ -38,7 +38,6 @@ import java.util.HashSet;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.nio.ByteBuffer
;
import
java.nio.ByteBuffer
;
import
java.nio.channels.SelectionKey
;
import
java.nio.channels.SelectionKey
;
import
java.nio.channels.AlreadyBoundException
;
import
java.nio.channels.ClosedChannelException
;
import
java.nio.channels.ClosedChannelException
;
import
java.nio.channels.NotYetBoundException
;
import
java.nio.channels.NotYetBoundException
;
import
java.nio.channels.spi.SelectorProvider
;
import
java.nio.channels.spi.SelectorProvider
;
...
@@ -63,9 +62,6 @@ import static sun.nio.ch.SctpResultContainer.*;
...
@@ -63,9 +62,6 @@ import static sun.nio.ch.SctpResultContainer.*;
public
class
SctpMultiChannelImpl
extends
SctpMultiChannel
public
class
SctpMultiChannelImpl
extends
SctpMultiChannel
implements
SelChImpl
implements
SelChImpl
{
{
/* Used to make native close and preClose calls */
private
static
NativeDispatcher
nd
;
private
final
FileDescriptor
fd
;
private
final
FileDescriptor
fd
;
private
final
int
fdVal
;
private
final
int
fdVal
;
...
@@ -140,7 +136,7 @@ public class SctpMultiChannelImpl extends SctpMultiChannel
...
@@ -140,7 +136,7 @@ public class SctpMultiChannelImpl extends SctpMultiChannel
synchronized
(
stateLock
)
{
synchronized
(
stateLock
)
{
ensureOpen
();
ensureOpen
();
if
(
isBound
())
if
(
isBound
())
throw
new
AlreadyBoundException
();
SctpNet
.
throw
AlreadyBoundException
();
InetSocketAddress
isa
=
(
local
==
null
)
?
InetSocketAddress
isa
=
(
local
==
null
)
?
new
InetSocketAddress
(
0
)
:
Net
.
checkAddress
(
local
);
new
InetSocketAddress
(
0
)
:
Net
.
checkAddress
(
local
);
...
@@ -155,7 +151,7 @@ public class SctpMultiChannelImpl extends SctpMultiChannel
...
@@ -155,7 +151,7 @@ public class SctpMultiChannelImpl extends SctpMultiChannel
if
(
isa
.
getAddress
().
isAnyLocalAddress
())
if
(
isa
.
getAddress
().
isAnyLocalAddress
())
wildcard
=
true
;
wildcard
=
true
;
Net
.
listen
(
fd
,
backlog
<
1
?
50
:
backlog
);
SctpNet
.
listen
(
fdVal
,
backlog
<
1
?
50
:
backlog
);
}
}
}
}
}
}
...
@@ -196,7 +192,7 @@ public class SctpMultiChannelImpl extends SctpMultiChannel
...
@@ -196,7 +192,7 @@ public class SctpMultiChannelImpl extends SctpMultiChannel
if
(
add
)
{
if
(
add
)
{
for
(
InetSocketAddress
addr
:
localAddresses
)
{
for
(
InetSocketAddress
addr
:
localAddresses
)
{
if
(
addr
.
getAddress
().
equals
(
address
))
{
if
(
addr
.
getAddress
().
equals
(
address
))
{
throw
new
AlreadyBoundException
();
SctpNet
.
throw
AlreadyBoundException
();
}
}
}
}
}
else
{
/*removing */
}
else
{
/*removing */
...
@@ -284,7 +280,7 @@ public class SctpMultiChannelImpl extends SctpMultiChannel
...
@@ -284,7 +280,7 @@ public class SctpMultiChannelImpl extends SctpMultiChannel
@Override
@Override
public
void
implCloseSelectableChannel
()
throws
IOException
{
public
void
implCloseSelectableChannel
()
throws
IOException
{
synchronized
(
stateLock
)
{
synchronized
(
stateLock
)
{
nd
.
preClose
(
fd
);
SctpNet
.
preClose
(
fdVal
);
if
(
receiverThread
!=
0
)
if
(
receiverThread
!=
0
)
NativeThread
.
signal
(
receiverThread
);
NativeThread
.
signal
(
receiverThread
);
...
@@ -375,7 +371,7 @@ public class SctpMultiChannelImpl extends SctpMultiChannel
...
@@ -375,7 +371,7 @@ public class SctpMultiChannelImpl extends SctpMultiChannel
/* Postpone the kill if there is a thread sending or receiving. */
/* Postpone the kill if there is a thread sending or receiving. */
if
(
receiverThread
==
0
&&
senderThread
==
0
)
{
if
(
receiverThread
==
0
&&
senderThread
==
0
)
{
nd
.
close
(
fd
);
SctpNet
.
close
(
fdVal
);
state
=
ChannelState
.
KILLED
;
state
=
ChannelState
.
KILLED
;
}
else
{
}
else
{
state
=
ChannelState
.
KILLPENDING
;
state
=
ChannelState
.
KILLPENDING
;
...
@@ -846,16 +842,17 @@ public class SctpMultiChannelImpl extends SctpMultiChannel
...
@@ -846,16 +842,17 @@ public class SctpMultiChannelImpl extends SctpMultiChannel
int
streamNumber
=
messageInfo
.
streamNumber
();
int
streamNumber
=
messageInfo
.
streamNumber
();
boolean
unordered
=
messageInfo
.
isUnordered
();
boolean
unordered
=
messageInfo
.
isUnordered
();
int
ppid
=
messageInfo
.
payloadProtocolID
();
int
ppid
=
messageInfo
.
payloadProtocolID
();
int
pos
=
src
.
position
();
int
lim
=
src
.
limit
();
assert
(
pos
<=
lim
&&
streamNumber
>=
0
);
int
rem
=
(
pos
<=
lim
?
lim
-
pos
:
0
);
if
(
src
instanceof
DirectBuffer
)
if
(
src
instanceof
DirectBuffer
)
return
sendFromNativeBuffer
(
fd
,
src
,
rem
,
pos
,
target
,
assocId
,
return
sendFromNativeBuffer
(
fd
,
src
,
target
,
assocId
,
streamNumber
,
unordered
,
ppid
);
streamNumber
,
unordered
,
ppid
);
/* Substitute a native buffer */
/* Substitute a native buffer */
int
pos
=
src
.
position
();
int
lim
=
src
.
limit
();
assert
(
pos
<=
lim
&&
streamNumber
>=
0
);
int
rem
=
(
pos
<=
lim
?
lim
-
pos
:
0
);
ByteBuffer
bb
=
Util
.
getTemporaryDirectBuffer
(
rem
);
ByteBuffer
bb
=
Util
.
getTemporaryDirectBuffer
(
rem
);
try
{
try
{
bb
.
put
(
src
);
bb
.
put
(
src
);
...
@@ -863,7 +860,7 @@ public class SctpMultiChannelImpl extends SctpMultiChannel
...
@@ -863,7 +860,7 @@ public class SctpMultiChannelImpl extends SctpMultiChannel
/* Do not update src until we see how many bytes were written */
/* Do not update src until we see how many bytes were written */
src
.
position
(
pos
);
src
.
position
(
pos
);
int
n
=
sendFromNativeBuffer
(
fd
,
bb
,
rem
,
pos
,
target
,
assocId
,
int
n
=
sendFromNativeBuffer
(
fd
,
bb
,
target
,
assocId
,
streamNumber
,
unordered
,
ppid
);
streamNumber
,
unordered
,
ppid
);
if
(
n
>
0
)
{
if
(
n
>
0
)
{
/* now update src */
/* now update src */
...
@@ -877,14 +874,17 @@ public class SctpMultiChannelImpl extends SctpMultiChannel
...
@@ -877,14 +874,17 @@ public class SctpMultiChannelImpl extends SctpMultiChannel
private
int
sendFromNativeBuffer
(
int
fd
,
private
int
sendFromNativeBuffer
(
int
fd
,
ByteBuffer
bb
,
ByteBuffer
bb
,
int
rem
,
int
pos
,
SocketAddress
target
,
SocketAddress
target
,
int
assocId
,
int
assocId
,
int
streamNumber
,
int
streamNumber
,
boolean
unordered
,
boolean
unordered
,
int
ppid
)
int
ppid
)
throws
IOException
{
throws
IOException
{
int
pos
=
bb
.
position
();
int
lim
=
bb
.
limit
();
assert
(
pos
<=
lim
);
int
rem
=
(
pos
<=
lim
?
lim
-
pos
:
0
);
int
written
=
send0
(
fd
,
((
DirectBuffer
)
bb
).
address
()
+
pos
,
int
written
=
send0
(
fd
,
((
DirectBuffer
)
bb
).
address
()
+
pos
,
rem
,
target
,
assocId
,
streamNumber
,
unordered
,
ppid
);
rem
,
target
,
assocId
,
streamNumber
,
unordered
,
ppid
);
if
(
written
>
0
)
if
(
written
>
0
)
...
@@ -981,6 +981,5 @@ public class SctpMultiChannelImpl extends SctpMultiChannel
...
@@ -981,6 +981,5 @@ public class SctpMultiChannelImpl extends SctpMultiChannel
Util
.
load
();
/* loads nio & net native libraries */
Util
.
load
();
/* loads nio & net native libraries */
java
.
security
.
AccessController
.
doPrivileged
(
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"sctp"
));
new
sun
.
security
.
action
.
LoadLibraryAction
(
"sctp"
));
nd
=
new
SctpSocketDispatcher
();
}
}
}
}
src/solaris/classes/sun/nio/ch/SctpNet.java
浏览文件 @
efdc7738
...
@@ -29,6 +29,7 @@ import java.io.IOException;
...
@@ -29,6 +29,7 @@ import java.io.IOException;
import
java.net.InetAddress
;
import
java.net.InetAddress
;
import
java.net.InetSocketAddress
;
import
java.net.InetSocketAddress
;
import
java.net.SocketAddress
;
import
java.net.SocketAddress
;
import
java.nio.channels.AlreadyBoundException
;
import
java.util.Set
;
import
java.util.Set
;
import
java.util.HashSet
;
import
java.util.HashSet
;
import
java.security.AccessController
;
import
java.security.AccessController
;
...
@@ -52,8 +53,29 @@ public class SctpNet {
...
@@ -52,8 +53,29 @@ public class SctpNet {
return
false
;
return
false
;
}
}
static
boolean
throwAlreadyBoundException
()
throws
IOException
{
throw
new
AlreadyBoundException
();
}
static
void
listen
(
int
fd
,
int
backlog
)
throws
IOException
{
listen0
(
fd
,
backlog
);
}
static
int
connect
(
int
fd
,
InetAddress
remote
,
int
remotePort
)
throws
IOException
{
return
connect0
(
fd
,
remote
,
remotePort
);
}
static
void
close
(
int
fd
)
throws
IOException
{
close0
(
fd
);
}
static
void
preClose
(
int
fd
)
throws
IOException
{
preClose0
(
fd
);
}
/**
/**
* @param oneTo
o
ne
* @param oneTo
O
ne
* if {@code true} returns a one-to-one sctp socket, otherwise
* if {@code true} returns a one-to-one sctp socket, otherwise
* returns a one-to-many sctp socket
* returns a one-to-many sctp socket
*/
*/
...
@@ -240,6 +262,15 @@ public class SctpNet {
...
@@ -240,6 +262,15 @@ public class SctpNet {
/* Native Methods */
/* Native Methods */
static
native
int
socket0
(
boolean
oneToOne
)
throws
IOException
;
static
native
int
socket0
(
boolean
oneToOne
)
throws
IOException
;
static
native
void
listen0
(
int
fd
,
int
backlog
)
throws
IOException
;
static
native
int
connect0
(
int
fd
,
InetAddress
remote
,
int
remotePort
)
throws
IOException
;
static
native
void
close0
(
int
fd
)
throws
IOException
;
static
native
void
preClose0
(
int
fd
)
throws
IOException
;
static
native
void
bindx
(
int
fd
,
InetAddress
[]
addrs
,
int
port
,
int
length
,
static
native
void
bindx
(
int
fd
,
InetAddress
[]
addrs
,
int
port
,
int
length
,
boolean
add
,
boolean
preferIPv6
)
throws
IOException
;
boolean
add
,
boolean
preferIPv6
)
throws
IOException
;
...
@@ -271,5 +302,11 @@ public class SctpNet {
...
@@ -271,5 +302,11 @@ public class SctpNet {
throws
IOException
;
throws
IOException
;
static
native
void
shutdown0
(
int
fd
,
int
assocId
);
static
native
void
shutdown0
(
int
fd
,
int
assocId
);
static
native
void
init
();
static
{
init
();
}
}
}
src/solaris/classes/sun/nio/ch/SctpServerChannelImpl.java
浏览文件 @
efdc7738
...
@@ -33,7 +33,6 @@ import java.util.Collections;
...
@@ -33,7 +33,6 @@ import java.util.Collections;
import
java.util.Set
;
import
java.util.Set
;
import
java.util.HashSet
;
import
java.util.HashSet
;
import
java.nio.channels.SelectionKey
;
import
java.nio.channels.SelectionKey
;
import
java.nio.channels.AlreadyBoundException
;
import
java.nio.channels.ClosedChannelException
;
import
java.nio.channels.ClosedChannelException
;
import
java.nio.channels.NotYetBoundException
;
import
java.nio.channels.NotYetBoundException
;
import
java.nio.channels.spi.SelectorProvider
;
import
java.nio.channels.spi.SelectorProvider
;
...
@@ -49,9 +48,6 @@ import com.sun.nio.sctp.SctpStandardSocketOption;
...
@@ -49,9 +48,6 @@ import com.sun.nio.sctp.SctpStandardSocketOption;
public
class
SctpServerChannelImpl
extends
SctpServerChannel
public
class
SctpServerChannelImpl
extends
SctpServerChannel
implements
SelChImpl
implements
SelChImpl
{
{
/* Used to make native close and preClose calls */
private
static
NativeDispatcher
nd
;
private
final
FileDescriptor
fd
;
private
final
FileDescriptor
fd
;
private
final
int
fdVal
;
private
final
int
fdVal
;
...
@@ -103,7 +99,7 @@ public class SctpServerChannelImpl extends SctpServerChannel
...
@@ -103,7 +99,7 @@ public class SctpServerChannelImpl extends SctpServerChannel
if
(!
isOpen
())
if
(!
isOpen
())
throw
new
ClosedChannelException
();
throw
new
ClosedChannelException
();
if
(
isBound
())
if
(
isBound
())
throw
new
AlreadyBoundException
();
SctpNet
.
throw
AlreadyBoundException
();
InetSocketAddress
isa
=
(
local
==
null
)
?
InetSocketAddress
isa
=
(
local
==
null
)
?
new
InetSocketAddress
(
0
)
:
Net
.
checkAddress
(
local
);
new
InetSocketAddress
(
0
)
:
Net
.
checkAddress
(
local
);
...
@@ -118,7 +114,7 @@ public class SctpServerChannelImpl extends SctpServerChannel
...
@@ -118,7 +114,7 @@ public class SctpServerChannelImpl extends SctpServerChannel
if
(
isa
.
getAddress
().
isAnyLocalAddress
())
if
(
isa
.
getAddress
().
isAnyLocalAddress
())
wildcard
=
true
;
wildcard
=
true
;
Net
.
listen
(
fd
,
backlog
<
1
?
50
:
backlog
);
SctpNet
.
listen
(
fdVal
,
backlog
<
1
?
50
:
backlog
);
}
}
}
}
return
this
;
return
this
;
...
@@ -156,7 +152,7 @@ public class SctpServerChannelImpl extends SctpServerChannel
...
@@ -156,7 +152,7 @@ public class SctpServerChannelImpl extends SctpServerChannel
if
(
add
)
{
if
(
add
)
{
for
(
InetSocketAddress
addr
:
localAddresses
)
{
for
(
InetSocketAddress
addr
:
localAddresses
)
{
if
(
addr
.
getAddress
().
equals
(
address
))
{
if
(
addr
.
getAddress
().
equals
(
address
))
{
throw
new
AlreadyBoundException
();
SctpNet
.
throw
AlreadyBoundException
();
}
}
}
}
}
else
{
/*removing */
}
else
{
/*removing */
...
@@ -261,7 +257,7 @@ public class SctpServerChannelImpl extends SctpServerChannel
...
@@ -261,7 +257,7 @@ public class SctpServerChannelImpl extends SctpServerChannel
@Override
@Override
public
void
implCloseSelectableChannel
()
throws
IOException
{
public
void
implCloseSelectableChannel
()
throws
IOException
{
synchronized
(
stateLock
)
{
synchronized
(
stateLock
)
{
nd
.
preClose
(
fd
);
SctpNet
.
preClose
(
fdVal
);
if
(
thread
!=
0
)
if
(
thread
!=
0
)
NativeThread
.
signal
(
thread
);
NativeThread
.
signal
(
thread
);
if
(!
isRegistered
())
if
(!
isRegistered
())
...
@@ -282,7 +278,7 @@ public class SctpServerChannelImpl extends SctpServerChannel
...
@@ -282,7 +278,7 @@ public class SctpServerChannelImpl extends SctpServerChannel
// Postpone the kill if there is a thread in accept
// Postpone the kill if there is a thread in accept
if
(
thread
==
0
)
{
if
(
thread
==
0
)
{
nd
.
close
(
fd
);
SctpNet
.
close
(
fdVal
);
state
=
ChannelState
.
KILLED
;
state
=
ChannelState
.
KILLED
;
}
else
{
}
else
{
state
=
ChannelState
.
KILLPENDING
;
state
=
ChannelState
.
KILLPENDING
;
...
@@ -423,7 +419,6 @@ public class SctpServerChannelImpl extends SctpServerChannel
...
@@ -423,7 +419,6 @@ public class SctpServerChannelImpl extends SctpServerChannel
Util
.
load
();
// loads nio & net native libraries
Util
.
load
();
// loads nio & net native libraries
java
.
security
.
AccessController
.
doPrivileged
(
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
LoadLibraryAction
(
"sctp"
));
new
sun
.
security
.
action
.
LoadLibraryAction
(
"sctp"
));
nd
=
new
SctpSocketDispatcher
();
initIDs
();
initIDs
();
}
}
}
}
src/solaris/native/sun/nio/ch/SctpNet.c
浏览文件 @
efdc7738
...
@@ -48,6 +48,9 @@ JNIEXPORT jint JNICALL JNI_OnLoad
...
@@ -48,6 +48,9 @@ JNIEXPORT jint JNICALL JNI_OnLoad
return
JNI_VERSION_1_2
;
return
JNI_VERSION_1_2
;
}
}
static
int
preCloseFD
=
-
1
;
/* File descriptor to which we dup other fd's
before closing them for real */
/**
/**
* Loads the native sctp library that contains the socket extension
* Loads the native sctp library that contains the socket extension
* functions, as well as locating the individual functions.
* functions, as well as locating the individual functions.
...
@@ -107,6 +110,55 @@ jboolean loadSocketExtensionFuncs
...
@@ -107,6 +110,55 @@ jboolean loadSocketExtensionFuncs
return
JNI_TRUE
;
return
JNI_TRUE
;
}
}
jint
handleSocketError
(
JNIEnv
*
env
,
jint
errorValue
)
{
char
*
xn
;
switch
(
errorValue
)
{
case
EINPROGRESS
:
/* Non-blocking connect */
return
0
;
case
EPROTO
:
xn
=
JNU_JAVANETPKG
"ProtocolException"
;
break
;
case
ECONNREFUSED
:
xn
=
JNU_JAVANETPKG
"ConnectException"
;
break
;
case
ETIMEDOUT
:
xn
=
JNU_JAVANETPKG
"ConnectException"
;
break
;
case
EHOSTUNREACH
:
xn
=
JNU_JAVANETPKG
"NoRouteToHostException"
;
break
;
case
EADDRINUSE
:
/* Fall through */
case
EADDRNOTAVAIL
:
xn
=
JNU_JAVANETPKG
"BindException"
;
break
;
default:
xn
=
JNU_JAVANETPKG
"SocketException"
;
break
;
}
errno
=
errorValue
;
JNU_ThrowByNameWithLastError
(
env
,
xn
,
"NioSocketError"
);
return
IOS_THROWN
;
}
/*
* Class: sun_nio_ch_SctpNet
* Method: init
* Signature: ()V
*/
JNIEXPORT
void
JNICALL
Java_sun_nio_ch_SctpNet_init
(
JNIEnv
*
env
,
jclass
cl
)
{
int
sp
[
2
];
if
(
socketpair
(
PF_UNIX
,
SOCK_STREAM
,
0
,
sp
)
<
0
)
{
JNU_ThrowIOExceptionWithLastError
(
env
,
"socketpair failed"
);
return
;
}
preCloseFD
=
sp
[
0
];
close
(
sp
[
1
]);
}
/*
/*
* Class: sun_nio_ch_SctpNet
* Class: sun_nio_ch_SctpNet
* Method: socket0
* Method: socket0
...
@@ -184,6 +236,76 @@ JNIEXPORT void JNICALL Java_sun_nio_ch_SctpNet_bindx
...
@@ -184,6 +236,76 @@ JNIEXPORT void JNICALL Java_sun_nio_ch_SctpNet_bindx
free
(
sap
);
free
(
sap
);
}
}
/*
* Class: sun_nio_ch_SctpNet
* Method: listen0
* Signature: (II)V
*/
JNIEXPORT
void
JNICALL
Java_sun_nio_ch_SctpNet_listen0
(
JNIEnv
*
env
,
jclass
cl
,
jint
fd
,
jint
backlog
)
{
if
(
listen
(
fd
,
backlog
)
<
0
)
handleSocketError
(
env
,
errno
);
}
/*
* Class: sun_nio_ch_SctpNet
* Method: connect0
* Signature: (ILjava/net/InetAddress;I)I
*/
JNIEXPORT
jint
JNICALL
Java_sun_nio_ch_SctpNet_connect0
(
JNIEnv
*
env
,
jclass
clazz
,
int
fd
,
jobject
iao
,
jint
port
)
{
SOCKADDR
sa
;
int
sa_len
=
SOCKADDR_LEN
;
int
rv
;
if
(
NET_InetAddressToSockaddr
(
env
,
iao
,
port
,
(
struct
sockaddr
*
)
&
sa
,
&
sa_len
,
JNI_TRUE
)
!=
0
)
{
return
IOS_THROWN
;
}
rv
=
connect
(
fd
,
(
struct
sockaddr
*
)
&
sa
,
sa_len
);
if
(
rv
!=
0
)
{
if
(
errno
==
EINPROGRESS
)
{
return
IOS_UNAVAILABLE
;
}
else
if
(
errno
==
EINTR
)
{
return
IOS_INTERRUPTED
;
}
return
handleSocketError
(
env
,
errno
);
}
return
1
;
}
/*
* Class: sun_nio_ch_SctpNet
* Method: close0
* Signature: (I)V
*/
JNIEXPORT
void
JNICALL
Java_sun_nio_ch_SctpNet_close0
(
JNIEnv
*
env
,
jclass
clazz
,
jint
fd
)
{
if
(
fd
!=
-
1
)
{
int
rv
=
close
(
fd
);
if
(
rv
<
0
)
JNU_ThrowIOExceptionWithLastError
(
env
,
"Close failed"
);
}
}
/*
* Class: sun_nio_ch_SctpNet
* Method: preClose0
* Signature: (I)V
*/
JNIEXPORT
void
JNICALL
Java_sun_nio_ch_SctpNet_preClose0
(
JNIEnv
*
env
,
jclass
clazz
,
jint
fd
)
{
if
(
preCloseFD
>=
0
)
{
if
(
dup2
(
preCloseFD
,
fd
)
<
0
)
JNU_ThrowIOExceptionWithLastError
(
env
,
"dup2 failed"
);
}
}
void
initializeISA
void
initializeISA
(
JNIEnv
*
env
)
{
(
JNIEnv
*
env
)
{
if
(
isaCls
==
0
)
{
if
(
isaCls
==
0
)
{
...
@@ -394,7 +516,7 @@ JNIEXPORT void JNICALL Java_sun_nio_ch_SctpNet_setIntOption0
...
@@ -394,7 +516,7 @@ JNIEXPORT void JNICALL Java_sun_nio_ch_SctpNet_setIntOption0
arglen
=
sizeof
(
arg
);
arglen
=
sizeof
(
arg
);
}
}
if
(
setsocko
pt
(
fd
,
klevel
,
kopt
,
parg
,
arglen
)
<
0
)
{
if
(
NET_SetSockO
pt
(
fd
,
klevel
,
kopt
,
parg
,
arglen
)
<
0
)
{
JNU_ThrowByNameWithLastError
(
env
,
JNU_JAVANETPKG
"SocketException"
,
JNU_ThrowByNameWithLastError
(
env
,
JNU_JAVANETPKG
"SocketException"
,
"sun_nio_ch_SctpNet.setIntOption0"
);
"sun_nio_ch_SctpNet.setIntOption0"
);
}
}
...
@@ -427,7 +549,7 @@ JNIEXPORT int JNICALL Java_sun_nio_ch_SctpNet_getIntOption0
...
@@ -427,7 +549,7 @@ JNIEXPORT int JNICALL Java_sun_nio_ch_SctpNet_getIntOption0
arglen
=
sizeof
(
result
);
arglen
=
sizeof
(
result
);
}
}
if
(
getsocko
pt
(
fd
,
klevel
,
kopt
,
arg
,
&
arglen
)
<
0
)
{
if
(
NET_GetSockO
pt
(
fd
,
klevel
,
kopt
,
arg
,
&
arglen
)
<
0
)
{
JNU_ThrowByNameWithLastError
(
env
,
JNU_JAVANETPKG
"SocketException"
,
JNU_ThrowByNameWithLastError
(
env
,
JNU_JAVANETPKG
"SocketException"
,
"sun.nio.ch.Net.getIntOption"
);
"sun.nio.ch.Net.getIntOption"
);
return
-
1
;
return
-
1
;
...
...
src/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java
浏览文件 @
efdc7738
...
@@ -445,20 +445,17 @@ public class WindowsAsynchronousFileChannelImpl
...
@@ -445,20 +445,17 @@ public class WindowsAsynchronousFileChannelImpl
// allocate OVERLAPPED
// allocate OVERLAPPED
overlapped
=
ioCache
.
add
(
result
);
overlapped
=
ioCache
.
add
(
result
);
// synchronize on result to allow this thread handle the case
// initiate read
// where the read completes immediately.
n
=
readFile
(
handle
,
address
,
rem
,
position
,
overlapped
);
synchronized
(
result
)
{
if
(
n
==
IOStatus
.
UNAVAILABLE
)
{
n
=
readFile
(
handle
,
address
,
rem
,
position
,
overlapped
);
// I/O is pending
if
(
n
==
IOStatus
.
UNAVAILABLE
)
{
return
;
// I/O is pending
}
else
if
(
n
==
IOStatus
.
EOF
)
{
return
;
}
// read completed immediately:
// 1. update buffer position
// 2. release waiters
updatePosition
(
n
);
result
.
setResult
(
n
);
result
.
setResult
(
n
);
}
else
{
throw
new
InternalError
(
"Unexpected result: "
+
n
);
}
}
}
catch
(
Throwable
x
)
{
}
catch
(
Throwable
x
)
{
// failed to initiate read
// failed to initiate read
result
.
setFailure
(
toIOException
(
x
));
result
.
setFailure
(
toIOException
(
x
));
...
@@ -466,12 +463,9 @@ public class WindowsAsynchronousFileChannelImpl
...
@@ -466,12 +463,9 @@ public class WindowsAsynchronousFileChannelImpl
end
();
end
();
}
}
// re
ad failed or EOF so completion port will not be notified
// re
lease resources
if
(
n
<
0
&&
overlapped
!=
0L
)
{
if
(
overlapped
!=
0L
)
ioCache
.
remove
(
overlapped
);
ioCache
.
remove
(
overlapped
);
}
// return direct buffer to cache if substituted
releaseBufferIfSubstituted
();
releaseBufferIfSubstituted
();
// invoke completion handler
// invoke completion handler
...
@@ -634,20 +628,15 @@ public class WindowsAsynchronousFileChannelImpl
...
@@ -634,20 +628,15 @@ public class WindowsAsynchronousFileChannelImpl
// allocate an OVERLAPPED structure
// allocate an OVERLAPPED structure
overlapped
=
ioCache
.
add
(
result
);
overlapped
=
ioCache
.
add
(
result
);
// synchronize on result to allow this thread handle the case
// initiate the write
// where the read completes immediately.
n
=
writeFile
(
handle
,
address
,
rem
,
position
,
overlapped
);
synchronized
(
result
)
{
if
(
n
==
IOStatus
.
UNAVAILABLE
)
{
n
=
writeFile
(
handle
,
address
,
rem
,
position
,
overlapped
);
// I/O is pending
if
(
n
==
IOStatus
.
UNAVAILABLE
)
{
return
;
// I/O is pending
}
else
{
return
;
throw
new
InternalError
(
"Unexpected result: "
+
n
);
}
// read completed immediately:
// 1. update buffer position
// 2. release waiters
updatePosition
(
n
);
result
.
setResult
(
n
);
}
}
}
catch
(
Throwable
x
)
{
}
catch
(
Throwable
x
)
{
// failed to initiate read:
// failed to initiate read:
result
.
setFailure
(
toIOException
(
x
));
result
.
setFailure
(
toIOException
(
x
));
...
...
src/windows/native/sun/nio/ch/WindowsAsynchronousFileChannelImpl.c
浏览文件 @
efdc7738
...
@@ -39,7 +39,6 @@ Java_sun_nio_ch_WindowsAsynchronousFileChannelImpl_readFile(JNIEnv* env, jclass
...
@@ -39,7 +39,6 @@ Java_sun_nio_ch_WindowsAsynchronousFileChannelImpl_readFile(JNIEnv* env, jclass
jlong
handle
,
jlong
address
,
jint
len
,
jlong
offset
,
jlong
ov
)
jlong
handle
,
jlong
address
,
jint
len
,
jlong
offset
,
jlong
ov
)
{
{
BOOL
res
;
BOOL
res
;
DWORD
nread
=
0
;
OVERLAPPED
*
lpOverlapped
=
(
OVERLAPPED
*
)
jlong_to_ptr
(
ov
);
OVERLAPPED
*
lpOverlapped
=
(
OVERLAPPED
*
)
jlong_to_ptr
(
ov
);
lpOverlapped
->
Offset
=
(
DWORD
)
offset
;
lpOverlapped
->
Offset
=
(
DWORD
)
offset
;
...
@@ -49,7 +48,7 @@ Java_sun_nio_ch_WindowsAsynchronousFileChannelImpl_readFile(JNIEnv* env, jclass
...
@@ -49,7 +48,7 @@ Java_sun_nio_ch_WindowsAsynchronousFileChannelImpl_readFile(JNIEnv* env, jclass
res
=
ReadFile
((
HANDLE
)
jlong_to_ptr
(
handle
),
res
=
ReadFile
((
HANDLE
)
jlong_to_ptr
(
handle
),
(
LPVOID
)
jlong_to_ptr
(
address
),
(
LPVOID
)
jlong_to_ptr
(
address
),
(
DWORD
)
len
,
(
DWORD
)
len
,
&
nread
,
NULL
,
lpOverlapped
);
lpOverlapped
);
if
(
res
==
0
)
{
if
(
res
==
0
)
{
...
@@ -62,7 +61,7 @@ Java_sun_nio_ch_WindowsAsynchronousFileChannelImpl_readFile(JNIEnv* env, jclass
...
@@ -62,7 +61,7 @@ Java_sun_nio_ch_WindowsAsynchronousFileChannelImpl_readFile(JNIEnv* env, jclass
return
IOS_THROWN
;
return
IOS_THROWN
;
}
}
return
(
jint
)
nread
;
return
IOS_UNAVAILABLE
;
}
}
JNIEXPORT
jint
JNICALL
JNIEXPORT
jint
JNICALL
...
@@ -70,7 +69,6 @@ Java_sun_nio_ch_WindowsAsynchronousFileChannelImpl_writeFile(JNIEnv* env, jclass
...
@@ -70,7 +69,6 @@ Java_sun_nio_ch_WindowsAsynchronousFileChannelImpl_writeFile(JNIEnv* env, jclass
jlong
handle
,
jlong
address
,
jint
len
,
jlong
offset
,
jlong
ov
)
jlong
handle
,
jlong
address
,
jint
len
,
jlong
offset
,
jlong
ov
)
{
{
BOOL
res
;
BOOL
res
;
DWORD
nwritten
=
0
;
OVERLAPPED
*
lpOverlapped
=
(
OVERLAPPED
*
)
jlong_to_ptr
(
ov
);
OVERLAPPED
*
lpOverlapped
=
(
OVERLAPPED
*
)
jlong_to_ptr
(
ov
);
lpOverlapped
->
Offset
=
(
DWORD
)
offset
;
lpOverlapped
->
Offset
=
(
DWORD
)
offset
;
...
@@ -80,18 +78,18 @@ Java_sun_nio_ch_WindowsAsynchronousFileChannelImpl_writeFile(JNIEnv* env, jclass
...
@@ -80,18 +78,18 @@ Java_sun_nio_ch_WindowsAsynchronousFileChannelImpl_writeFile(JNIEnv* env, jclass
res
=
WriteFile
((
HANDLE
)
jlong_to_ptr
(
handle
),
res
=
WriteFile
((
HANDLE
)
jlong_to_ptr
(
handle
),
(
LPVOID
)
jlong_to_ptr
(
address
),
(
LPVOID
)
jlong_to_ptr
(
address
),
(
DWORD
)
len
,
(
DWORD
)
len
,
&
nwritten
,
NULL
,
lpOverlapped
);
lpOverlapped
);
if
(
res
==
0
)
{
if
(
res
==
0
)
{
int
error
=
GetLastError
();
int
error
=
GetLastError
();
if
(
error
==
ERROR_IO_PENDING
)
{
if
(
error
==
ERROR_IO_PENDING
)
return
IOS_UNAVAILABLE
;
return
IOS_UNAVAILABLE
;
}
JNU_ThrowIOExceptionWithLastError
(
env
,
"WriteFile failed"
);
JNU_ThrowIOExceptionWithLastError
(
env
,
"WriteFile failed"
);
return
IOS_THROWN
;
return
IOS_THROWN
;
}
}
return
(
jint
)
nwritten
;
return
IOS_UNAVAILABLE
;
}
}
JNIEXPORT
jint
JNICALL
JNIEXPORT
jint
JNICALL
...
...
test/com/sun/jdi/ProcessAttachTest.sh
浏览文件 @
efdc7738
...
@@ -54,10 +54,14 @@ JAVA="${TESTJAVA}/bin/java"
...
@@ -54,10 +54,14 @@ JAVA="${TESTJAVA}/bin/java"
OS
=
`
uname
-s
`
OS
=
`
uname
-s
`
case
"
$OS
"
in
case
"
$OS
"
in
Windows
*
|
CYGWIN_NT
*
)
Windows
*
)
PS
=
";"
PS
=
";"
OS
=
"Windows"
OS
=
"Windows"
;;
;;
CYGWIN
*
)
PS
=
";"
OS
=
"CYGWIN"
;;
*
)
*
)
PS
=
":"
PS
=
":"
;;
;;
...
@@ -67,16 +71,23 @@ startDebuggee()
...
@@ -67,16 +71,23 @@ startDebuggee()
{
{
OUTPUTFILE
=
${
TESTCLASSES
}
/Debuggee.out
OUTPUTFILE
=
${
TESTCLASSES
}
/Debuggee.out
${
JAVA
}
"
$@
"
>
${
OUTPUTFILE
}
&
${
JAVA
}
"
$@
"
>
${
OUTPUTFILE
}
&
pid
=
"
$!
"
startpid
=
"
$!
"
pid
=
"
${
startpid
}
"
# CYGWIN startpid is not the native windows PID we want, get the WINPID
if
[
"
${
OS
}
"
=
"CYGWIN"
]
;
then
sleep
2
ps
-l
-p
${
startpid
}
pid
=
`
ps
-l
-p
${
startpid
}
|
tail
-1
|
awk
'{print $4;}'
`
fi
# MKS creates an intermediate shell to launch ${JAVA} so
# MKS creates an intermediate shell to launch ${JAVA} so
# ${pid} is not the actual pid. We have put in a small sleep
# ${
start
pid} is not the actual pid. We have put in a small sleep
# to give the intermediate shell process time to launch the
# to give the intermediate shell process time to launch the
# "java" process.
# "java" process.
if
[
"
$OS
"
=
"Windows"
]
;
then
if
[
"
$OS
"
=
"Windows"
]
;
then
sleep
2
sleep
2
realpid
=
`
ps
-o
pid,ppid,comm|grep
${
pid
}
|grep
"java"
|cut
-c1-6
`
pid
=
`
ps
-o
pid,ppid,comm|grep
${
startpid
}
|grep
"java"
|cut
-c1-6
`
pid
=
${
realpid
}
fi
fi
echo
"Waiting for Debuggee to initialize..."
echo
"Waiting for Debuggee to initialize..."
...
@@ -91,7 +102,7 @@ startDebuggee()
...
@@ -91,7 +102,7 @@ startDebuggee()
echo
"Waiting
$attempts
second(s) ..."
echo
"Waiting
$attempts
second(s) ..."
done
done
echo
"Debuggee is process
$pid
"
echo
"Debuggee is process
$pid
(startpid=
${
startpid
}
)
"
}
}
stopDebuggee
()
stopDebuggee
()
...
@@ -100,7 +111,7 @@ stopDebuggee()
...
@@ -100,7 +111,7 @@ stopDebuggee()
if
[
$?
!=
0
]
;
then
if
[
$?
!=
0
]
;
then
echo
"Error: ShutdownDebuggee failed"
echo
"Error: ShutdownDebuggee failed"
failures
=
`
expr
$failures
+ 1
`
failures
=
`
expr
$failures
+ 1
`
kill
-9
$
pid
kill
-9
$
{
startpid
}
fi
fi
}
}
...
@@ -123,7 +134,7 @@ startDebuggee \
...
@@ -123,7 +134,7 @@ startDebuggee \
-agentlib
:jdwp
=
transport
=
dt_socket,server
=
y,suspend
=
n
\
-agentlib
:jdwp
=
transport
=
dt_socket,server
=
y,suspend
=
n
\
-classpath
"
${
TESTCLASSES
}
"
ProcessAttachDebuggee
"
${
PORTFILE
}
"
-classpath
"
${
TESTCLASSES
}
"
ProcessAttachDebuggee
"
${
PORTFILE
}
"
$JAVA
-classpath
${
TESTCLASSES
}${
PS
}${
TESTJAVA
}
/lib/tools.jar
\
$JAVA
-classpath
"
${
TESTCLASSES
}${
PS
}${
TESTJAVA
}
/lib/tools.jar"
\
ProcessAttachDebugger
$pid
2>&1
ProcessAttachDebugger
$pid
2>&1
if
[
$?
!=
0
]
;
then
failures
=
`
expr
$failures
+ 1
`
;
fi
if
[
$?
!=
0
]
;
then
failures
=
`
expr
$failures
+ 1
`
;
fi
...
@@ -141,7 +152,7 @@ startDebuggee \
...
@@ -141,7 +152,7 @@ startDebuggee \
-agentlib
:jdwp
=
transport
=
dt_socket,server
=
y,suspend
=
y
\
-agentlib
:jdwp
=
transport
=
dt_socket,server
=
y,suspend
=
y
\
-classpath
"
${
TESTCLASSES
}
"
ProcessAttachDebuggee
"
${
PORTFILE
}
"
-classpath
"
${
TESTCLASSES
}
"
ProcessAttachDebuggee
"
${
PORTFILE
}
"
$JAVA
-classpath
${
TESTCLASSES
}${
PS
}${
TESTJAVA
}
/lib/tools.jar
\
$JAVA
-classpath
"
${
TESTCLASSES
}${
PS
}${
TESTJAVA
}
/lib/tools.jar"
\
ProcessAttachDebugger
$pid
2>&1
ProcessAttachDebugger
$pid
2>&1
# The debuggee is suspended and doesn't run until the debugger
# The debuggee is suspended and doesn't run until the debugger
...
...
test/com/sun/jdi/connect/spi/JdiLoadedByCustomLoader.sh
浏览文件 @
efdc7738
...
@@ -51,7 +51,7 @@ case "$OS" in
...
@@ -51,7 +51,7 @@ case "$OS" in
Linux
)
Linux
)
PS
=
":"
PS
=
":"
;;
;;
Windows
*
)
Windows
*
|
CYGWIN
*
)
PS
=
";"
PS
=
";"
;;
;;
*
)
*
)
...
@@ -71,7 +71,7 @@ SOMEOTHERDIR="${TESTCLASSES}"/someotherdir
...
@@ -71,7 +71,7 @@ SOMEOTHERDIR="${TESTCLASSES}"/someotherdir
$JAVAC
-d
"
${
TESTCLASSES
}
"
"
${
TESTSRC
}
"
/JdiLoadedByCustomLoader.java
$JAVAC
-d
"
${
TESTCLASSES
}
"
"
${
TESTSRC
}
"
/JdiLoadedByCustomLoader.java
mkdir
"
${
SOMEOTHERDIR
}
"
mkdir
"
${
SOMEOTHERDIR
}
"
$JAVAC
-d
"
${
SOMEOTHERDIR
}
"
-classpath
${
TESTSRC
}${
PS
}${
TESTJAVA
}
/lib/tools.jar
\
$JAVAC
-d
"
${
SOMEOTHERDIR
}
"
-classpath
"
${
TESTSRC
}${
PS
}${
TESTJAVA
}
/lib/tools.jar"
\
"
${
TESTSRC
}
"
/ListConnectors.java
"
${
TESTSRC
}
"
/ListConnectors.java
# Run the test
# Run the test
...
...
test/com/sun/nio/sctp/SctpChannel/Connect.java
浏览文件 @
efdc7738
...
@@ -192,6 +192,18 @@ public class Connect {
...
@@ -192,6 +192,18 @@ public class Connect {
testCCE
(
new
Callable
<
Void
>()
{
testCCE
(
new
Callable
<
Void
>()
{
public
Void
call
()
throws
IOException
{
public
Void
call
()
throws
IOException
{
cceChannel
.
finishConnect
();
return
null
;
}
});
cceChannel
.
finishConnect
();
return
null
;
}
});
/* TEST 8: IOException: Connection refused. Exercises handleSocketError.
* Assumption: no sctp socket listening on 3456 */
SocketAddress
addr
=
new
InetSocketAddress
(
"localhost"
,
3456
);
channel
=
SctpChannel
.
open
();
try
{
channel
.
connect
(
addr
);
fail
(
"should have thrown ConnectException: Connection refused"
);
}
catch
(
IOException
ioe
)
{
pass
();
}
}
catch
(
IOException
ioe
)
{
}
catch
(
IOException
ioe
)
{
unexpected
(
ioe
);
unexpected
(
ioe
);
}
finally
{
}
finally
{
...
...
test/com/sun/nio/sctp/SctpChannel/Send.java
浏览文件 @
efdc7738
...
@@ -112,9 +112,6 @@ public class Send {
...
@@ -112,9 +112,6 @@ public class Send {
/* Receive CommUp */
/* Receive CommUp */
channel
.
receive
(
buffer
,
null
,
handler
);
channel
.
receive
(
buffer
,
null
,
handler
);
/* save for TEST 8 */
Association
association
=
channel
.
association
();
/* TEST 2: send small message */
/* TEST 2: send small message */
int
streamNumber
=
0
;
int
streamNumber
=
0
;
debug
(
"sending on stream number: "
+
streamNumber
);
debug
(
"sending on stream number: "
+
streamNumber
);
...
@@ -250,6 +247,29 @@ public class Send {
...
@@ -250,6 +247,29 @@ public class Send {
pass
();
pass
();
debug
(
"OK, caught "
+
e
);
debug
(
"OK, caught "
+
e
);
}
}
/* TEST 9: Send from heap buffer to force implementation to
* substitute with a native buffer, then check that its position
* is updated correctly */
buffer
.
clear
();
info
=
MessageInfo
.
createOutgoing
(
null
,
0
);
buffer
.
put
(
Util
.
SMALL_MESSAGE
.
getBytes
(
"ISO-8859-1"
));
buffer
.
flip
();
final
int
offset
=
1
;
buffer
.
position
(
offset
);
remaining
=
buffer
.
remaining
();
debug
(
"sending small message: "
+
buffer
);
try
{
sent
=
channel
.
send
(
buffer
,
info
);
check
(
sent
==
remaining
,
"sent should be equal to remaining"
);
check
(
buffer
.
position
()
==
(
offset
+
sent
),
"buffers position should have been incremented by sent"
);
}
catch
(
IllegalArgumentException
iae
)
{
fail
(
iae
+
", Error updating buffers position"
);
}
}
catch
(
IOException
ioe
)
{
}
catch
(
IOException
ioe
)
{
unexpected
(
ioe
);
unexpected
(
ioe
);
}
finally
{
}
finally
{
...
@@ -335,6 +355,30 @@ public class Send {
...
@@ -335,6 +355,30 @@ public class Send {
/* TEST 7 ++ */
/* TEST 7 ++ */
sc2
=
ssc
.
accept
();
sc2
=
ssc
.
accept
();
/* TEST 9 */
ByteBuffer
expected
=
ByteBuffer
.
allocate
(
Util
.
SMALL_BUFFER
);
expected
.
put
(
Util
.
SMALL_MESSAGE
.
getBytes
(
"ISO-8859-1"
));
expected
.
flip
();
final
int
offset
=
1
;
expected
.
position
(
offset
);
buffer
.
clear
();
do
{
info
=
sc2
.
receive
(
buffer
,
null
,
null
);
if
(
info
==
null
)
{
fail
(
"Server: unexpected null from receive"
);
return
;
}
}
while
(!
info
.
isComplete
());
buffer
.
flip
();
check
(
info
!=
null
,
"info is null"
);
check
(
info
.
streamNumber
()
==
0
,
"message not sent on the correct stream"
);
check
(
info
.
bytes
()
==
expected
.
remaining
(),
"bytes received not equal to message length"
);
check
(
info
.
bytes
()
==
buffer
.
remaining
(),
"bytes != remaining"
);
check
(
expected
.
equals
(
buffer
),
"received message not the same as sent message"
);
clientFinishedLatch
.
await
(
10L
,
TimeUnit
.
SECONDS
);
clientFinishedLatch
.
await
(
10L
,
TimeUnit
.
SECONDS
);
serverFinishedLatch
.
countDown
();
serverFinishedLatch
.
countDown
();
}
catch
(
IOException
ioe
)
{
}
catch
(
IOException
ioe
)
{
...
...
test/com/sun/nio/sctp/SctpChannel/SocketOptionTests.java
浏览文件 @
efdc7738
...
@@ -104,7 +104,9 @@ public class SocketOptionTests {
...
@@ -104,7 +104,9 @@ public class SocketOptionTests {
sc
.
setOption
(
SCTP_NODELAY
,
true
);
sc
.
setOption
(
SCTP_NODELAY
,
true
);
checkOption
(
sc
,
SCTP_NODELAY
,
true
);
checkOption
(
sc
,
SCTP_NODELAY
,
true
);
sc
.
setOption
(
SO_SNDBUF
,
16
*
1024
);
sc
.
setOption
(
SO_SNDBUF
,
16
*
1024
);
checkOption
(
sc
,
SO_SNDBUF
,
16
*
1024
);
sc
.
setOption
(
SO_RCVBUF
,
16
*
1024
);
sc
.
setOption
(
SO_RCVBUF
,
16
*
1024
);
checkOption
(
sc
,
SO_RCVBUF
,
16
*
1024
);
checkOption
(
sc
,
SO_LINGER
,
-
1
);
/* default should be negative */
checkOption
(
sc
,
SO_LINGER
,
-
1
);
/* default should be negative */
sc
.
setOption
(
SO_LINGER
,
2000
);
sc
.
setOption
(
SO_LINGER
,
2000
);
checkOption
(
sc
,
SO_LINGER
,
2000
);
checkOption
(
sc
,
SO_LINGER
,
2000
);
...
...
test/com/sun/nio/sctp/SctpMultiChannel/Send.java
浏览文件 @
efdc7738
...
@@ -185,6 +185,27 @@ public class Send {
...
@@ -185,6 +185,27 @@ public class Send {
/* TEST 5: getRemoteAddresses(Association) */
/* TEST 5: getRemoteAddresses(Association) */
channel
.
getRemoteAddresses
(
assoc
);
channel
.
getRemoteAddresses
(
assoc
);
/* TEST 6: Send from heap buffer to force implementation to
* substitute with a native buffer, then check that its position
* is updated correctly */
info
=
MessageInfo
.
createOutgoing
(
assoc
,
null
,
0
);
buffer
.
clear
();
buffer
.
put
(
Util
.
SMALL_MESSAGE
.
getBytes
(
"ISO-8859-1"
));
buffer
.
flip
();
final
int
offset
=
1
;
buffer
.
position
(
offset
);
remaining
=
buffer
.
remaining
();
try
{
sent
=
channel
.
send
(
buffer
,
info
);
check
(
sent
==
remaining
,
"sent should be equal to remaining"
);
check
(
buffer
.
position
()
==
(
offset
+
sent
),
"buffers position should have been incremented by sent"
);
}
catch
(
IllegalArgumentException
iae
)
{
fail
(
iae
+
", Error updating buffers position"
);
}
}
catch
(
IOException
ioe
)
{
}
catch
(
IOException
ioe
)
{
unexpected
(
ioe
);
unexpected
(
ioe
);
}
finally
{
}
finally
{
...
@@ -284,6 +305,30 @@ public class Send {
...
@@ -284,6 +305,30 @@ public class Send {
bytes
=
serverChannel
.
send
(
buffer
,
info
);
bytes
=
serverChannel
.
send
(
buffer
,
info
);
debug
(
"Server: sent "
+
bytes
+
"bytes"
);
debug
(
"Server: sent "
+
bytes
+
"bytes"
);
/* TEST 6 */
ByteBuffer
expected
=
ByteBuffer
.
allocate
(
Util
.
SMALL_BUFFER
);
expected
.
put
(
Util
.
SMALL_MESSAGE
.
getBytes
(
"ISO-8859-1"
));
expected
.
flip
();
final
int
offset
=
1
;
expected
.
position
(
offset
);
buffer
.
clear
();
do
{
info
=
serverChannel
.
receive
(
buffer
,
null
,
null
);
if
(
info
==
null
)
{
fail
(
"Server: unexpected null from receive"
);
return
;
}
}
while
(!
info
.
isComplete
());
buffer
.
flip
();
check
(
info
!=
null
,
"info is null"
);
check
(
info
.
streamNumber
()
==
0
,
"message not sent on the correct stream"
);
check
(
info
.
bytes
()
==
expected
.
remaining
(),
"bytes received not equal to message length"
);
check
(
info
.
bytes
()
==
buffer
.
remaining
(),
"bytes != remaining"
);
check
(
expected
.
equals
(
buffer
),
"received message not the same as sent message"
);
clientFinishedLatch
.
await
(
10L
,
TimeUnit
.
SECONDS
);
clientFinishedLatch
.
await
(
10L
,
TimeUnit
.
SECONDS
);
serverFinishedLatch
.
countDown
();
serverFinishedLatch
.
countDown
();
}
catch
(
IOException
ioe
)
{
}
catch
(
IOException
ioe
)
{
...
...
test/com/sun/tools/attach/ApplicationSetup.sh
浏览文件 @
efdc7738
...
@@ -49,7 +49,11 @@ startApplication()
...
@@ -49,7 +49,11 @@ startApplication()
# "java" process.
# "java" process.
if
[
"
$OS
"
=
"Windows"
]
;
then
if
[
"
$OS
"
=
"Windows"
]
;
then
sleep
2
sleep
2
realpid
=
`
ps
-o
pid,ppid,comm|grep
${
pid
}
|grep
"java"
|cut
-c1-6
`
if
[
"
${
isCygwin
}
"
=
"true"
]
;
then
realpid
=
`
ps
-p
${
pid
}
|
tail
-1
|
awk
'{print $4;}'
`
else
realpid
=
`
ps
-o
pid,ppid,comm|grep
${
pid
}
|grep
"java"
|cut
-c1-6
`
fi
pid
=
${
realpid
}
pid
=
${
realpid
}
fi
fi
...
@@ -57,7 +61,7 @@ startApplication()
...
@@ -57,7 +61,7 @@ startApplication()
attempts
=
0
attempts
=
0
while
true
;
do
while
true
;
do
sleep
1
sleep
1
port
=
`
tail
-1
${
OUTPUTFILE
}
`
port
=
`
tail
-1
${
OUTPUTFILE
}
|
sed
-e
's@\\r@@g'
`
if
[
!
-z
"
$port
"
]
;
then
if
[
!
-z
"
$port
"
]
;
then
# In case of errors wait time for output to be flushed
# In case of errors wait time for output to be flushed
sleep
1
sleep
1
...
...
test/com/sun/tools/attach/BasicTests.sh
浏览文件 @
efdc7738
...
@@ -48,7 +48,7 @@ failures=0
...
@@ -48,7 +48,7 @@ failures=0
echo
"Running tests ..."
echo
"Running tests ..."
$JAVA
-classpath
${
TESTCLASSES
}${
PS
}${
TESTJAVA
}
/lib/tools.jar
\
$JAVA
-classpath
"
${
TESTCLASSES
}${
PS
}${
TESTJAVA
}
/lib/tools.jar"
\
BasicTests
$pid
$agent
$badagent
$redefineagent
2>&1
BasicTests
$pid
$agent
$badagent
$redefineagent
2>&1
if
[
$?
!=
0
]
;
then
failures
=
`
expr
$failures
+ 1
`
;
fi
if
[
$?
!=
0
]
;
then
failures
=
`
expr
$failures
+ 1
`
;
fi
...
...
test/com/sun/tools/attach/CommonSetup.sh
浏览文件 @
efdc7738
...
@@ -49,6 +49,12 @@ case "$OS" in
...
@@ -49,6 +49,12 @@ case "$OS" in
OS
=
"Windows"
OS
=
"Windows"
FS
=
"
\\
"
FS
=
"
\\
"
;;
;;
CYGWIN
*
)
PS
=
";"
OS
=
"Windows"
FS
=
"
\\
"
isCygwin
=
true
;;
*
)
*
)
echo
"Unrecognized system!"
echo
"Unrecognized system!"
exit
1
;
exit
1
;
...
...
test/com/sun/tools/attach/PermissionTests.sh
浏览文件 @
efdc7738
...
@@ -48,7 +48,7 @@ startApplication
...
@@ -48,7 +48,7 @@ startApplication
echo
"Deny test"
echo
"Deny test"
# deny
# deny
$JAVA
-classpath
${
TESTCLASSES
}${
PS
}${
TESTJAVA
}
/lib/tools.jar
\
$JAVA
-classpath
"
${
TESTCLASSES
}${
PS
}${
TESTJAVA
}
/lib/tools.jar"
\
-Djava
.security.manager
\
-Djava
.security.manager
\
-Djava
.security.policy
=
${
TESTSRC
}
/java.policy.deny
\
-Djava
.security.policy
=
${
TESTSRC
}
/java.policy.deny
\
PermissionTest
$pid
true
2>&1
PermissionTest
$pid
true
2>&1
...
@@ -56,7 +56,7 @@ if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
...
@@ -56,7 +56,7 @@ if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
# allow
# allow
echo
"Allow test"
echo
"Allow test"
$JAVA
-classpath
${
TESTCLASSES
}${
PS
}${
TESTJAVA
}
/lib/tools.jar
\
$JAVA
-classpath
"
${
TESTCLASSES
}${
PS
}${
TESTJAVA
}
/lib/tools.jar"
\
-Djava
.security.manager
\
-Djava
.security.manager
\
-Djava
.security.policy
=
${
TESTSRC
}
/java.policy.allow
\
-Djava
.security.policy
=
${
TESTSRC
}
/java.policy.allow
\
PermissionTest
$pid
false
2>&1
PermissionTest
$pid
false
2>&1
...
...
test/com/sun/tools/attach/ProviderTests.sh
浏览文件 @
efdc7738
...
@@ -46,6 +46,6 @@ $JAR -cf ${TESTCLASSES}/SimpleProvider.jar \
...
@@ -46,6 +46,6 @@ $JAR -cf ${TESTCLASSES}/SimpleProvider.jar \
echo
"Running test ..."
echo
"Running test ..."
$JAVA
-classpath
\
$JAVA
-classpath
\
${
TESTCLASSES
}${
PS
}${
TESTCLASSES
}
/SimpleProvider.jar
${
PS
}${
TESTJAVA
}
/lib/tools.jar
\
"
${
TESTCLASSES
}${
PS
}${
TESTCLASSES
}
/SimpleProvider.jar
${
PS
}${
TESTJAVA
}
/lib/tools.jar"
\
ProviderTest
ProviderTest
test/java/beans/Introspector/Test5102804.java
浏览文件 @
efdc7738
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
/*
/*
* @test
* @test
* @bug 5102804
* @bug 5102804
* @ignore This test is not predictable with regards to GC
* @summary Tests memory leak
* @summary Tests memory leak
* @author Sergey Malenkov
* @author Sergey Malenkov
*/
*/
...
...
test/java/io/File/Basic.java
浏览文件 @
efdc7738
...
@@ -75,7 +75,7 @@ public class Basic {
...
@@ -75,7 +75,7 @@ public class Basic {
if
(!
f
.
canRead
())
fail
(
f
,
"is not readable"
);
if
(!
f
.
canRead
())
fail
(
f
,
"is not readable"
);
if
(
f
.
canWrite
()
!=
writeable
)
if
(
f
.
canWrite
()
!=
writeable
)
fail
(
f
,
writeable
?
"is not writeable"
:
"is writeable"
);
fail
(
f
,
writeable
?
"is not writeable"
:
"is writeable"
);
int
rwLen
=
(
File
.
separatorChar
==
'/'
?
6
:
7
)
;
int
rwLen
=
6
;
if
(
f
.
length
()
!=
length
)
fail
(
f
,
"has wrong length"
);
if
(
f
.
length
()
!=
length
)
fail
(
f
,
"has wrong length"
);
}
}
...
@@ -89,7 +89,7 @@ public class Basic {
...
@@ -89,7 +89,7 @@ public class Basic {
if
(
nonExistantFile
.
exists
())
fail
(
nonExistantFile
,
"exists"
);
if
(
nonExistantFile
.
exists
())
fail
(
nonExistantFile
,
"exists"
);
show
(
rwFile
);
show
(
rwFile
);
testFile
(
rwFile
,
true
,
File
.
separatorChar
==
'/'
?
6
:
7
);
testFile
(
rwFile
,
true
,
6
);
rwFile
.
delete
();
rwFile
.
delete
();
if
(
rwFile
.
exists
())
if
(
rwFile
.
exists
())
fail
(
rwFile
,
"could not delete"
);
fail
(
rwFile
,
"could not delete"
);
...
...
test/java/io/File/basic.sh
浏览文件 @
efdc7738
...
@@ -32,10 +32,10 @@ fi
...
@@ -32,10 +32,10 @@ fi
rm
-rf
x.Basic.
*
rm
-rf
x.Basic.
*
rm
-f
x.Basic.non
rm
-f
x.Basic.non
echo
xyzzy
>
x.Basic.rw
printf
"%s"
"xyzzyN"
>
x.Basic.rw
touch
x.Basic.ro
;
chmod
ugo-w x.Basic.ro
touch
x.Basic.ro
;
chmod
ugo-w x.Basic.ro
mkdir
x.Basic.dir
mkdir
x.Basic.dir
if
$TESTJAVA
/bin/java
$*
-classpath
$TESTCLASSES
Basic
;
then
if
$TESTJAVA
/bin/java
$*
-classpath
"
$TESTCLASSES
"
Basic
;
then
[
-f
x.Basic.rw
]
&&
(
echo
"x.Basic.rw not deleted"
;
exit
1
)
[
-f
x.Basic.rw
]
&&
(
echo
"x.Basic.rw not deleted"
;
exit
1
)
([
-d
x.Basic.dir
]
||
[
\!
-d
x.Basic.dir2
])
\
([
-d
x.Basic.dir
]
||
[
\!
-d
x.Basic.dir2
])
\
&&
(
echo
"x.Basic.dir not renamed"
;
exit
1
)
&&
(
echo
"x.Basic.dir not renamed"
;
exit
1
)
...
...
test/java/io/Serializable/evolution/RenamePackage/run.sh
浏览文件 @
efdc7738
...
@@ -43,7 +43,7 @@ OS=`uname -s`
...
@@ -43,7 +43,7 @@ OS=`uname -s`
case
"
$OS
"
in
case
"
$OS
"
in
SunOS
|
Linux
)
SunOS
|
Linux
)
PS
=
":"
;;
PS
=
":"
;;
Windows
*
)
Windows
*
|
CYGWIN
*
)
PS
=
";"
;;
PS
=
";"
;;
*
)
*
)
echo
"Unrecognized system!"
echo
"Unrecognized system!"
...
@@ -85,14 +85,14 @@ CLASSPATH=${TESTCLASSES}/share; export CLASSPATH;
...
@@ -85,14 +85,14 @@ CLASSPATH=${TESTCLASSES}/share; export CLASSPATH;
${
JAVAC
}
-d
${
TESTCLASSES
}
/nclasses
${
TESTSRC
}
/install/SerialDriver.java
${
JAVAC
}
-d
${
TESTCLASSES
}
/nclasses
${
TESTSRC
}
/install/SerialDriver.java
# Run Case 1. Map test.SerialDriver within stream to install.SerialDriver.
# Run Case 1. Map test.SerialDriver within stream to install.SerialDriver.
CLASSPATH
=
${
TESTCLASSES
}
/oclasses
${
PS
}${
TESTCLASSES
}
/share
;
export
CLASSPATH
;
CLASSPATH
=
"
${
TESTCLASSES
}
/oclasses
${
PS
}${
TESTCLASSES
}
/share"
;
export
CLASSPATH
;
${
JAVA
}
test.SerialDriver
-s
${
JAVA
}
test.SerialDriver
-s
CLASSPATH
=
${
TESTCLASSES
}
/nclasses
${
PS
}${
TESTCLASSES
}
/share
;
export
CLASSPATH
;
CLASSPATH
=
"
${
TESTCLASSES
}
/nclasses
${
PS
}${
TESTCLASSES
}
/share"
;
export
CLASSPATH
;
${
JAVA
}
install.SerialDriver
-d
${
JAVA
}
install.SerialDriver
-d
rm
stream.ser
rm
stream.ser
# Run Case 2. Map install.SerialDriver within stream to test.SerialDriver.
# Run Case 2. Map install.SerialDriver within stream to test.SerialDriver.
CLASSPATH
=
${
TESTCLASSES
}
/nclasses
${
PS
}${
TESTCLASSES
}
/share
;
export
CLASSPATH
;
CLASSPATH
=
"
${
TESTCLASSES
}
/nclasses
${
PS
}${
TESTCLASSES
}
/share"
;
export
CLASSPATH
;
${
JAVA
}
install.SerialDriver
-s
${
JAVA
}
install.SerialDriver
-s
CLASSPATH
=
${
TESTCLASSES
}
/oclasses
${
PS
}${
TESTCLASSES
}
/share
;
export
CLASSPATH
;
CLASSPATH
=
"
${
TESTCLASSES
}
/oclasses
${
PS
}${
TESTCLASSES
}
/share"
;
export
CLASSPATH
;
${
JAVA
}
test.SerialDriver
-d
${
JAVA
}
test.SerialDriver
-d
test/java/io/Serializable/serialver/classpath/run.sh
浏览文件 @
efdc7738
...
@@ -49,7 +49,7 @@ OS=`uname -s`
...
@@ -49,7 +49,7 @@ OS=`uname -s`
case
"
$OS
"
in
case
"
$OS
"
in
SunOS
|
Linux
)
SunOS
|
Linux
)
PS
=
":"
;;
PS
=
":"
;;
Windows
*
)
Windows
*
|
CYGWIN
*
)
PS
=
";"
;;
PS
=
";"
;;
*
)
*
)
echo
"Unrecognized system!"
echo
"Unrecognized system!"
...
...
test/java/io/Serializable/serialver/nested/run.sh
浏览文件 @
efdc7738
...
@@ -49,7 +49,7 @@ OS=`uname -s`
...
@@ -49,7 +49,7 @@ OS=`uname -s`
case
"
$OS
"
in
case
"
$OS
"
in
SunOS
|
Linux
)
SunOS
|
Linux
)
PS
=
":"
;;
PS
=
":"
;;
Windows
*
)
Windows
*
|
CYGWIN
*
)
PS
=
";"
;;
PS
=
";"
;;
*
)
*
)
echo
"Unrecognized system!"
echo
"Unrecognized system!"
...
...
test/java/lang/ClassLoader/deadlock/TestOneWayDelegate.sh
浏览文件 @
efdc7738
...
@@ -55,7 +55,7 @@ case "$OS" in
...
@@ -55,7 +55,7 @@ case "$OS" in
Linux
)
Linux
)
FS
=
"/"
FS
=
"/"
;;
;;
Windows
*
)
Windows
*
|
CYGWIN
*
)
FS
=
"
\\
"
FS
=
"
\\
"
;;
;;
esac
esac
...
...
test/java/lang/StringCoding/CheckEncodings.sh
浏览文件 @
efdc7738
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
OS
=
`
uname
-s
`
OS
=
`
uname
-s
`
case
"
$OS
"
in
case
"
$OS
"
in
SunOS
|
Linux
)
;;
SunOS
|
Linux
)
;;
Windows
*
)
Windows
*
|
CYGWIN
*
)
echo
"Passed"
;
exit
0
;;
echo
"Passed"
;
exit
0
;;
*
)
echo
"Unrecognized system!"
;
exit
1
;;
*
)
echo
"Unrecognized system!"
;
exit
1
;;
esac
esac
...
...
test/java/lang/System/finalization/FinExit.sh
浏览文件 @
efdc7738
...
@@ -24,7 +24,9 @@
...
@@ -24,7 +24,9 @@
#
#
#
#
x
=
`
$TESTJAVA
/bin/java
-cp
$TESTCLASSES
FinExit
`
# We only want the first character, Windows might add CRLF
x
=
`
$TESTJAVA
/bin/java
-cp
"
$TESTCLASSES
"
FinExit |
cut
-c1
`
echo
$x
echo
$x
if
[
"x
$x
"
!=
"x1"
]
;
then
if
[
"x
$x
"
!=
"x1"
]
;
then
echo
On-exit finalizer invoked twice
echo
On-exit finalizer invoked twice
...
...
test/java/lang/annotation/loaderLeak/LoaderLeak.sh
浏览文件 @
efdc7738
...
@@ -49,6 +49,11 @@ case "$OS" in
...
@@ -49,6 +49,11 @@ case "$OS" in
PS
=
":"
PS
=
":"
FS
=
"/"
FS
=
"/"
;;
;;
CYGWIN
*
)
NULL
=
/dev/null
PS
=
";"
FS
=
"/"
;;
Windows
*
)
Windows
*
)
NULL
=
NUL
NULL
=
NUL
PS
=
";"
PS
=
";"
...
...
test/java/lang/instrument/appendToClassLoaderSearch/CommonSetup.sh
浏览文件 @
efdc7738
...
@@ -43,11 +43,17 @@ case "$OS" in
...
@@ -43,11 +43,17 @@ case "$OS" in
PS
=
":"
PS
=
":"
FS
=
"/"
FS
=
"/"
;;
;;
Windows
*
|
CYGWIN
*
)
Windows
*
)
PS
=
";"
PS
=
";"
OS
=
"Windows"
OS
=
"Windows"
FS
=
"
\\
"
FS
=
"
\\
"
;;
;;
CYGWIN
*
)
PS
=
";"
OS
=
"Windows"
FS
=
"
\\
"
isCygwin
=
true
;;
*
)
*
)
echo
"Unrecognized system!"
echo
"Unrecognized system!"
exit
1
;
exit
1
;
...
...
test/java/nio/channels/AsynchronousFileChannel/LotsOfWrites.java
0 → 100644
浏览文件 @
efdc7738
/*
* Copyright 2010 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
/* @test
* @bug 6913877
* @summary Stress AsynchronousFileChannel.write
*/
import
java.io.*
;
import
java.nio.ByteBuffer
;
import
static
java
.
nio
.
file
.
StandardOpenOption
.*;
import
java.nio.channels.*
;
import
java.util.Random
;
import
java.util.concurrent.CountDownLatch
;
public
class
LotsOfWrites
{
static
final
Random
rand
=
new
Random
();
/**
* Asynchronously writes a known pattern to a file up to a given size,
* counting down a latch to release waiters when done.
*/
static
class
Writer
implements
CompletionHandler
<
Integer
,
ByteBuffer
>
{
private
final
File
file
;
private
final
long
size
;
private
final
CountDownLatch
latch
;
private
final
AsynchronousFileChannel
channel
;
private
volatile
long
position
;
private
volatile
byte
nextByte
;
private
long
updatePosition
(
long
nwrote
)
{
position
+=
nwrote
;
return
position
;
}
private
ByteBuffer
genNextBuffer
()
{
int
n
=
Math
.
min
(
8192
+
rand
.
nextInt
(
8192
),
(
int
)(
size
-
position
));
ByteBuffer
buf
=
ByteBuffer
.
allocate
(
n
);
for
(
int
i
=
0
;
i
<
n
;
i
++)
{
buf
.
put
(
nextByte
++);
}
buf
.
flip
();
return
buf
;
}
// close channel and release any waiters
private
void
done
()
{
try
{
channel
.
close
();
}
catch
(
IOException
ignore
)
{
}
latch
.
countDown
();
}
Writer
(
File
file
,
long
size
,
CountDownLatch
latch
)
throws
IOException
{
this
.
file
=
file
;
this
.
size
=
size
;
this
.
latch
=
latch
;
this
.
channel
=
AsynchronousFileChannel
.
open
(
file
.
toPath
(),
WRITE
);
}
File
file
()
{
return
file
;
}
long
size
()
{
return
size
;
}
// initiate first write
void
start
()
{
ByteBuffer
buf
=
genNextBuffer
();
channel
.
write
(
buf
,
0L
,
buf
,
this
);
}
@Override
public
void
completed
(
Integer
nwrote
,
ByteBuffer
buf
)
{
long
pos
=
updatePosition
(
nwrote
);
if
(!
buf
.
hasRemaining
())
{
// buffer has been completely written; decide if we need to
// write more
if
(
position
>=
size
)
{
done
();
return
;
}
buf
=
genNextBuffer
();
}
channel
.
write
(
buf
,
pos
,
buf
,
this
);
}
@Override
public
void
failed
(
Throwable
exc
,
ByteBuffer
buf
)
{
exc
.
printStackTrace
();
done
();
}
}
public
static
void
main
(
String
[]
args
)
throws
Exception
{
// random number of writers
int
count
=
20
+
rand
.
nextInt
(
16
);
Writer
[]
writers
=
new
Writer
[
count
];
CountDownLatch
latch
=
new
CountDownLatch
(
count
);
// initiate writing to each file
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
long
size
=
512
*
1024
+
rand
.
nextInt
(
512
*
1024
);
File
blah
=
File
.
createTempFile
(
"blah"
,
null
);
blah
.
deleteOnExit
();
Writer
writer
=
new
Writer
(
blah
,
size
,
latch
);
writers
[
i
]
=
writer
;
writer
.
start
();
}
// wait for writing to complete
latch
.
await
();
// verify content of each file
byte
[]
buf
=
new
byte
[
8192
];
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
Writer
writer
=
writers
[
i
];
FileInputStream
in
=
new
FileInputStream
(
writer
.
file
());
try
{
long
size
=
0L
;
byte
expected
=
0
;
int
nread
=
in
.
read
(
buf
);
while
(
nread
>
0
)
{
for
(
int
j
=
0
;
j
<
nread
;
j
++)
{
if
(
buf
[
j
]
!=
expected
)
throw
new
RuntimeException
(
"Unexpected byte"
);
expected
++;
}
size
+=
nread
;
nread
=
in
.
read
(
buf
);
}
if
(
size
!=
writer
.
size
())
throw
new
RuntimeException
(
"Unexpected size"
);
}
finally
{
in
.
close
();
}
}
}
}
test/java/nio/channels/Selector/lots_of_updates.sh
浏览文件 @
efdc7738
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
OS
=
`
uname
-s
`
OS
=
`
uname
-s
`
case
"
$OS
"
in
case
"
$OS
"
in
Windows_
*
)
Windows_
*
|
CYGWIN
*
)
echo
"ulimit not on Windows"
echo
"ulimit not on Windows"
exit
0
exit
0
;;
;;
...
...
test/java/nio/channels/spi/AsynchronousChannelProvider/custom_provider.sh
浏览文件 @
efdc7738
...
@@ -38,7 +38,7 @@ fi
...
@@ -38,7 +38,7 @@ fi
OS
=
`
uname
-s
`
OS
=
`
uname
-s
`
case
"
$OS
"
in
case
"
$OS
"
in
Windows_
*
)
Windows_
*
|
CYGWIN
*
)
CLASSPATH
=
"
${
TESTCLASSES
}
;
${
TESTSRC
}
"
CLASSPATH
=
"
${
TESTCLASSES
}
;
${
TESTSRC
}
"
;;
;;
*
)
*
)
...
...
test/java/nio/file/Files/walk_file_tree.sh
浏览文件 @
efdc7738
...
@@ -39,7 +39,7 @@ fi
...
@@ -39,7 +39,7 @@ fi
OS
=
`
uname
-s
`
OS
=
`
uname
-s
`
case
"
$OS
"
in
case
"
$OS
"
in
Windows_
*
)
Windows_
*
|
CYGWIN
*
)
echo
"This test does not run on Windows"
echo
"This test does not run on Windows"
exit
0
exit
0
;;
;;
...
...
test/java/nio/file/Path/CopyAndMove.java
浏览文件 @
efdc7738
...
@@ -22,10 +22,10 @@
...
@@ -22,10 +22,10 @@
*/
*/
/* @test
/* @test
* @bug 4313887 6838333
* @bug 4313887 6838333
6917021
* @summary Unit test for java.nio.file.Path copyTo/moveTo methods
* @summary Unit test for java.nio.file.Path copyTo/moveTo methods
* @library ..
* @library ..
* @build CopyAndMove
* @build CopyAndMove
PassThroughFileSystem
* @run main/othervm CopyAndMove
* @run main/othervm CopyAndMove
*/
*/
...
@@ -40,22 +40,31 @@ import java.util.*;
...
@@ -40,22 +40,31 @@ import java.util.*;
public
class
CopyAndMove
{
public
class
CopyAndMove
{
static
final
Random
rand
=
new
Random
();
static
final
Random
rand
=
new
Random
();
static
boolean
heads
()
{
return
rand
.
nextBoolean
();
}
static
boolean
heads
()
{
return
rand
.
nextBoolean
();
}
static
boolean
supportsLinks
;
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
Path
dir1
=
TestUtil
.
createTemporaryDirectory
();
Path
dir1
=
TestUtil
.
createTemporaryDirectory
();
try
{
try
{
supportsLinks
=
TestUtil
.
supportsLinks
(
dir1
);
// Same directory
doCopyTests
(
dir1
,
dir1
,
TestUtil
.
supportsLinks
(
dir1
));
// Exercise copyTo
doMoveTests
(
dir1
,
dir1
,
TestUtil
.
supportsLinks
(
dir1
));
doCopyTests
(
dir1
);
// Different directories. Use test.dir if possible as it might be
// a different volume/file system and so improve test coverage.
String
testDir
=
System
.
getProperty
(
"test.dir"
,
"."
);
Path
dir2
=
TestUtil
.
createTemporaryDirectory
(
testDir
);
try
{
boolean
testSymbolicLinks
=
TestUtil
.
supportsLinks
(
dir1
)
&&
TestUtil
.
supportsLinks
(
dir2
);
doCopyTests
(
dir1
,
dir2
,
testSymbolicLinks
);
doMoveTests
(
dir1
,
dir2
,
testSymbolicLinks
);
}
finally
{
TestUtil
.
removeAll
(
dir2
);
}
// Exercise moveTo
// Target is location associated with custom provider
// if test.dir differs to temporary file system then can test
Path
dir3
=
PassThroughFileSystem
.
create
().
getPath
(
dir1
.
toString
());
// moving between devices
doCopyTests
(
dir1
,
dir3
,
false
);
String
testDir
=
System
.
getProperty
(
"test.dir"
);
doMoveTests
(
dir1
,
dir3
,
false
);
Path
dir2
=
(
testDir
!=
null
)
?
Paths
.
get
(
testDir
)
:
dir1
;
doMoveTests
(
dir1
,
dir2
);
}
finally
{
}
finally
{
TestUtil
.
removeAll
(
dir1
);
TestUtil
.
removeAll
(
dir1
);
...
@@ -186,30 +195,37 @@ public class CopyAndMove {
...
@@ -186,30 +195,37 @@ public class CopyAndMove {
checkBasicAttributes
(
basicAttributes
,
checkBasicAttributes
(
basicAttributes
,
Attributes
.
readBasicFileAttributes
(
target
,
NOFOLLOW_LINKS
));
Attributes
.
readBasicFileAttributes
(
target
,
NOFOLLOW_LINKS
));
// verify POSIX attributes
// verify other attributes when same provider
if
(
posixAttributes
!=
null
&&
!
basicAttributes
.
isSymbolicLink
())
{
if
(
source
.
getFileSystem
().
provider
()
==
target
.
getFileSystem
().
provider
())
{
checkPosixAttributes
(
posixAttributes
,
Attributes
.
readPosixFileAttributes
(
target
,
NOFOLLOW_LINKS
));
}
// verify DOS
attributes
// verify POSIX
attributes
if
(
dos
Attributes
!=
null
&&
!
basicAttributes
.
isSymbolicLink
())
{
if
(
posix
Attributes
!=
null
&&
!
basicAttributes
.
isSymbolicLink
())
{
checkDosAttributes
(
dos
Attributes
,
checkPosixAttributes
(
posix
Attributes
,
Attributes
.
readDos
FileAttributes
(
target
,
NOFOLLOW_LINKS
));
Attributes
.
readPosix
FileAttributes
(
target
,
NOFOLLOW_LINKS
));
}
}
// verify named attributes
// verify DOS attributes
if
(
namedAttributes
!=
null
&&
if
(
dosAttributes
!=
null
&&
!
basicAttributes
.
isSymbolicLink
())
{
target
.
getFileStore
().
supportsFileAttributeView
(
"xattr"
))
checkDosAttributes
(
dosAttributes
,
{
Attributes
.
readDosFileAttributes
(
target
,
NOFOLLOW_LINKS
));
checkUserDefinedFileAttributes
(
namedAttributes
,
readUserDefinedFileAttributes
(
target
));
}
// verify named attributes
if
(
namedAttributes
!=
null
&&
target
.
getFileStore
().
supportsFileAttributeView
(
"xattr"
))
{
checkUserDefinedFileAttributes
(
namedAttributes
,
readUserDefinedFileAttributes
(
target
));
}
}
}
}
}
/**
/**
* Tests all possible ways to invoke moveTo
* Tests all possible ways to invoke moveTo
*/
*/
static
void
doMoveTests
(
Path
dir1
,
Path
dir2
)
throws
IOException
{
static
void
doMoveTests
(
Path
dir1
,
Path
dir2
,
boolean
supportsLinks
)
throws
IOException
{
Path
source
,
target
,
entry
;
Path
source
,
target
,
entry
;
boolean
sameDevice
=
dir1
.
getFileStore
().
equals
(
dir2
.
getFileStore
());
boolean
sameDevice
=
dir1
.
getFileStore
().
equals
(
dir2
.
getFileStore
());
...
@@ -220,7 +236,7 @@ public class CopyAndMove {
...
@@ -220,7 +236,7 @@ public class CopyAndMove {
* Test: move regular file, target does not exist
* Test: move regular file, target does not exist
*/
*/
source
=
createSourceFile
(
dir1
);
source
=
createSourceFile
(
dir1
);
target
=
getTargetFile
(
dir
1
);
target
=
getTargetFile
(
dir
2
);
moveAndVerify
(
source
,
target
);
moveAndVerify
(
source
,
target
);
target
.
delete
();
target
.
delete
();
...
@@ -228,7 +244,7 @@ public class CopyAndMove {
...
@@ -228,7 +244,7 @@ public class CopyAndMove {
* Test: move regular file, target exists
* Test: move regular file, target exists
*/
*/
source
=
createSourceFile
(
dir1
);
source
=
createSourceFile
(
dir1
);
target
=
getTargetFile
(
dir
1
).
createFile
();
target
=
getTargetFile
(
dir
2
).
createFile
();
try
{
try
{
moveAndVerify
(
source
,
target
);
moveAndVerify
(
source
,
target
);
throw
new
RuntimeException
(
"FileAlreadyExistsException expected"
);
throw
new
RuntimeException
(
"FileAlreadyExistsException expected"
);
...
@@ -248,7 +264,7 @@ public class CopyAndMove {
...
@@ -248,7 +264,7 @@ public class CopyAndMove {
* Test: move regular file, target does not exist
* Test: move regular file, target does not exist
*/
*/
source
=
createSourceFile
(
dir1
);
source
=
createSourceFile
(
dir1
);
target
=
getTargetFile
(
dir
1
);
target
=
getTargetFile
(
dir
2
);
moveAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
moveAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
target
.
delete
();
target
.
delete
();
...
@@ -256,7 +272,7 @@ public class CopyAndMove {
...
@@ -256,7 +272,7 @@ public class CopyAndMove {
* Test: move regular file, target exists
* Test: move regular file, target exists
*/
*/
source
=
createSourceFile
(
dir1
);
source
=
createSourceFile
(
dir1
);
target
=
getTargetFile
(
dir
1
).
createFile
();
target
=
getTargetFile
(
dir
2
).
createFile
();
moveAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
moveAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
target
.
delete
();
target
.
delete
();
...
@@ -264,7 +280,7 @@ public class CopyAndMove {
...
@@ -264,7 +280,7 @@ public class CopyAndMove {
* Test: move regular file, target exists and is empty directory
* Test: move regular file, target exists and is empty directory
*/
*/
source
=
createSourceFile
(
dir1
);
source
=
createSourceFile
(
dir1
);
target
=
getTargetFile
(
dir
1
).
createDirectory
();
target
=
getTargetFile
(
dir
2
).
createDirectory
();
moveAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
moveAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
target
.
delete
();
target
.
delete
();
...
@@ -272,7 +288,7 @@ public class CopyAndMove {
...
@@ -272,7 +288,7 @@ public class CopyAndMove {
* Test: move regular file, target exists and is non-empty directory
* Test: move regular file, target exists and is non-empty directory
*/
*/
source
=
createSourceFile
(
dir1
);
source
=
createSourceFile
(
dir1
);
target
=
getTargetFile
(
dir
1
).
createDirectory
();
target
=
getTargetFile
(
dir
2
).
createDirectory
();
entry
=
target
.
resolve
(
"foo"
).
createFile
();
entry
=
target
.
resolve
(
"foo"
).
createFile
();
try
{
try
{
moveAndVerify
(
source
,
target
);
moveAndVerify
(
source
,
target
);
...
@@ -311,7 +327,7 @@ public class CopyAndMove {
...
@@ -311,7 +327,7 @@ public class CopyAndMove {
* Test: move empty directory, target does not exist
* Test: move empty directory, target does not exist
*/
*/
source
=
createSourceDirectory
(
dir1
);
source
=
createSourceDirectory
(
dir1
);
target
=
getTargetFile
(
dir
1
);
target
=
getTargetFile
(
dir
2
);
moveAndVerify
(
source
,
target
);
moveAndVerify
(
source
,
target
);
target
.
delete
();
target
.
delete
();
...
@@ -319,7 +335,7 @@ public class CopyAndMove {
...
@@ -319,7 +335,7 @@ public class CopyAndMove {
* Test: move empty directory, target exists
* Test: move empty directory, target exists
*/
*/
source
=
createSourceDirectory
(
dir1
);
source
=
createSourceDirectory
(
dir1
);
target
=
getTargetFile
(
dir
1
).
createFile
();
target
=
getTargetFile
(
dir
2
).
createFile
();
try
{
try
{
moveAndVerify
(
source
,
target
);
moveAndVerify
(
source
,
target
);
throw
new
RuntimeException
(
"FileAlreadyExistsException expected"
);
throw
new
RuntimeException
(
"FileAlreadyExistsException expected"
);
...
@@ -339,7 +355,7 @@ public class CopyAndMove {
...
@@ -339,7 +355,7 @@ public class CopyAndMove {
* Test: move empty directory, target does not exist
* Test: move empty directory, target does not exist
*/
*/
source
=
createSourceDirectory
(
dir1
);
source
=
createSourceDirectory
(
dir1
);
target
=
getTargetFile
(
dir
1
);
target
=
getTargetFile
(
dir
2
);
moveAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
moveAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
target
.
delete
();
target
.
delete
();
...
@@ -347,7 +363,7 @@ public class CopyAndMove {
...
@@ -347,7 +363,7 @@ public class CopyAndMove {
* Test: move empty directory, target exists
* Test: move empty directory, target exists
*/
*/
source
=
createSourceDirectory
(
dir1
);
source
=
createSourceDirectory
(
dir1
);
target
=
getTargetFile
(
dir
1
).
createFile
();
target
=
getTargetFile
(
dir
2
).
createFile
();
moveAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
moveAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
target
.
delete
();
target
.
delete
();
...
@@ -355,7 +371,7 @@ public class CopyAndMove {
...
@@ -355,7 +371,7 @@ public class CopyAndMove {
* Test: move empty, target exists and is empty directory
* Test: move empty, target exists and is empty directory
*/
*/
source
=
createSourceDirectory
(
dir1
);
source
=
createSourceDirectory
(
dir1
);
target
=
getTargetFile
(
dir
1
).
createDirectory
();
target
=
getTargetFile
(
dir
2
).
createDirectory
();
moveAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
moveAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
target
.
delete
();
target
.
delete
();
...
@@ -363,7 +379,7 @@ public class CopyAndMove {
...
@@ -363,7 +379,7 @@ public class CopyAndMove {
* Test: move empty directory, target exists and is non-empty directory
* Test: move empty directory, target exists and is non-empty directory
*/
*/
source
=
createSourceDirectory
(
dir1
);
source
=
createSourceDirectory
(
dir1
);
target
=
getTargetFile
(
dir
1
).
createDirectory
();
target
=
getTargetFile
(
dir
2
).
createDirectory
();
entry
=
target
.
resolve
(
"foo"
).
createFile
();
entry
=
target
.
resolve
(
"foo"
).
createFile
();
try
{
try
{
moveAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
moveAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
...
@@ -418,7 +434,7 @@ public class CopyAndMove {
...
@@ -418,7 +434,7 @@ public class CopyAndMove {
if
(
supportsLinks
)
{
if
(
supportsLinks
)
{
Path
tmp
=
createSourceFile
(
dir1
);
Path
tmp
=
createSourceFile
(
dir1
);
source
=
dir1
.
resolve
(
"link"
).
createSymbolicLink
(
tmp
);
source
=
dir1
.
resolve
(
"link"
).
createSymbolicLink
(
tmp
);
target
=
getTargetFile
(
dir
1
);
target
=
getTargetFile
(
dir
2
);
moveAndVerify
(
source
,
target
);
moveAndVerify
(
source
,
target
);
target
.
delete
();
target
.
delete
();
tmp
.
delete
();
tmp
.
delete
();
...
@@ -429,7 +445,7 @@ public class CopyAndMove {
...
@@ -429,7 +445,7 @@ public class CopyAndMove {
*/
*/
if
(
supportsLinks
)
{
if
(
supportsLinks
)
{
source
=
dir1
.
resolve
(
"link"
).
createSymbolicLink
(
dir2
);
source
=
dir1
.
resolve
(
"link"
).
createSymbolicLink
(
dir2
);
target
=
getTargetFile
(
dir
1
);
target
=
getTargetFile
(
dir
2
);
moveAndVerify
(
source
,
target
);
moveAndVerify
(
source
,
target
);
target
.
delete
();
target
.
delete
();
}
}
...
@@ -440,7 +456,7 @@ public class CopyAndMove {
...
@@ -440,7 +456,7 @@ public class CopyAndMove {
if
(
supportsLinks
)
{
if
(
supportsLinks
)
{
Path
tmp
=
Paths
.
get
(
"doesnotexist"
);
Path
tmp
=
Paths
.
get
(
"doesnotexist"
);
source
=
dir1
.
resolve
(
"link"
).
createSymbolicLink
(
tmp
);
source
=
dir1
.
resolve
(
"link"
).
createSymbolicLink
(
tmp
);
target
=
getTargetFile
(
dir
1
);
target
=
getTargetFile
(
dir
2
);
moveAndVerify
(
source
,
target
);
moveAndVerify
(
source
,
target
);
target
.
delete
();
target
.
delete
();
}
}
...
@@ -450,7 +466,7 @@ public class CopyAndMove {
...
@@ -450,7 +466,7 @@ public class CopyAndMove {
*/
*/
if
(
supportsLinks
)
{
if
(
supportsLinks
)
{
source
=
dir1
.
resolve
(
"link"
).
createSymbolicLink
(
dir2
);
source
=
dir1
.
resolve
(
"link"
).
createSymbolicLink
(
dir2
);
target
=
getTargetFile
(
dir
1
).
createFile
();
target
=
getTargetFile
(
dir
2
).
createFile
();
try
{
try
{
moveAndVerify
(
source
,
target
);
moveAndVerify
(
source
,
target
);
throw
new
RuntimeException
(
"FileAlreadyExistsException expected"
);
throw
new
RuntimeException
(
"FileAlreadyExistsException expected"
);
...
@@ -465,7 +481,7 @@ public class CopyAndMove {
...
@@ -465,7 +481,7 @@ public class CopyAndMove {
*/
*/
if
(
supportsLinks
)
{
if
(
supportsLinks
)
{
source
=
dir1
.
resolve
(
"link"
).
createSymbolicLink
(
dir2
);
source
=
dir1
.
resolve
(
"link"
).
createSymbolicLink
(
dir2
);
target
=
getTargetFile
(
dir
1
).
createFile
();
target
=
getTargetFile
(
dir
2
).
createFile
();
moveAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
moveAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
target
.
delete
();
target
.
delete
();
}
}
...
@@ -475,7 +491,7 @@ public class CopyAndMove {
...
@@ -475,7 +491,7 @@ public class CopyAndMove {
*/
*/
if
(
supportsLinks
)
{
if
(
supportsLinks
)
{
source
=
dir1
.
resolve
(
"link"
).
createSymbolicLink
(
dir2
);
source
=
dir1
.
resolve
(
"link"
).
createSymbolicLink
(
dir2
);
target
=
getTargetFile
(
dir
1
).
createDirectory
();
target
=
getTargetFile
(
dir
2
).
createDirectory
();
moveAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
moveAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
target
.
delete
();
target
.
delete
();
}
}
...
@@ -485,7 +501,7 @@ public class CopyAndMove {
...
@@ -485,7 +501,7 @@ public class CopyAndMove {
*/
*/
if
(
supportsLinks
)
{
if
(
supportsLinks
)
{
source
=
dir1
.
resolve
(
"link"
).
createSymbolicLink
(
dir2
);
source
=
dir1
.
resolve
(
"link"
).
createSymbolicLink
(
dir2
);
target
=
getTargetFile
(
dir
1
).
createDirectory
();
target
=
getTargetFile
(
dir
2
).
createDirectory
();
entry
=
target
.
resolve
(
"foo"
).
createFile
();
entry
=
target
.
resolve
(
"foo"
).
createFile
();
try
{
try
{
moveAndVerify
(
source
,
target
);
moveAndVerify
(
source
,
target
);
...
@@ -502,7 +518,7 @@ public class CopyAndMove {
...
@@ -502,7 +518,7 @@ public class CopyAndMove {
*/
*/
if
(
supportsLinks
)
{
if
(
supportsLinks
)
{
source
=
dir1
.
resolve
(
"link"
).
createSymbolicLink
(
dir1
);
source
=
dir1
.
resolve
(
"link"
).
createSymbolicLink
(
dir1
);
target
=
getTargetFile
(
dir
1
).
createFile
();
target
=
getTargetFile
(
dir
2
).
createFile
();
moveAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
moveAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
target
.
delete
();
target
.
delete
();
}
}
...
@@ -513,7 +529,7 @@ public class CopyAndMove {
...
@@ -513,7 +529,7 @@ public class CopyAndMove {
* Test nulls
* Test nulls
*/
*/
source
=
createSourceFile
(
dir1
);
source
=
createSourceFile
(
dir1
);
target
=
getTargetFile
(
dir
1
);
target
=
getTargetFile
(
dir
2
);
try
{
try
{
source
.
moveTo
(
null
);
source
.
moveTo
(
null
);
throw
new
RuntimeException
(
"NullPointerException expected"
);
throw
new
RuntimeException
(
"NullPointerException expected"
);
...
@@ -533,7 +549,7 @@ public class CopyAndMove {
...
@@ -533,7 +549,7 @@ public class CopyAndMove {
* Test UOE
* Test UOE
*/
*/
source
=
createSourceFile
(
dir1
);
source
=
createSourceFile
(
dir1
);
target
=
getTargetFile
(
dir
1
);
target
=
getTargetFile
(
dir
2
);
try
{
try
{
source
.
moveTo
(
target
,
new
CopyOption
()
{
});
source
.
moveTo
(
target
,
new
CopyOption
()
{
});
}
catch
(
UnsupportedOperationException
x
)
{
}
}
catch
(
UnsupportedOperationException
x
)
{
}
...
@@ -577,28 +593,32 @@ public class CopyAndMove {
...
@@ -577,28 +593,32 @@ public class CopyAndMove {
checkBasicAttributes
(
basicAttributes
,
checkBasicAttributes
(
basicAttributes
,
Attributes
.
readBasicFileAttributes
(
source
,
linkOptions
));
Attributes
.
readBasicFileAttributes
(
source
,
linkOptions
));
// check POSIX attributes are copied
// verify other attributes when same provider
String
os
=
System
.
getProperty
(
"os.name"
);
if
(
source
.
getFileSystem
().
provider
()
==
target
.
getFileSystem
().
provider
())
{
if
(
os
.
equals
(
"SunOS"
)
||
os
.
equals
(
"Linux"
))
{
checkPosixAttributes
(
Attributes
.
readPosixFileAttributes
(
source
,
linkOptions
),
Attributes
.
readPosixFileAttributes
(
target
,
linkOptions
));
}
// check DOS attributes are copied
// check POSIX attributes are copied
if
(
os
.
startsWith
(
"Windows"
))
{
String
os
=
System
.
getProperty
(
"os.name"
);
checkDosAttributes
(
if
(
os
.
equals
(
"SunOS"
)
||
os
.
equals
(
"Linux"
))
{
Attributes
.
readDosFileAttributes
(
source
,
linkOptions
),
checkPosixAttributes
(
Attributes
.
readDosFileAttributes
(
target
,
linkOptions
));
Attributes
.
readPosixFileAttributes
(
source
,
linkOptions
),
}
Attributes
.
readPosixFileAttributes
(
target
,
linkOptions
));
}
// check named attributes are copied
// check DOS attributes are copied
if
(
followLinks
&&
if
(
os
.
startsWith
(
"Windows"
))
{
source
.
getFileStore
().
supportsFileAttributeView
(
"xattr"
)
&&
checkDosAttributes
(
target
.
getFileStore
().
supportsFileAttributeView
(
"xattr"
))
Attributes
.
readDosFileAttributes
(
source
,
linkOptions
),
{
Attributes
.
readDosFileAttributes
(
target
,
linkOptions
));
checkUserDefinedFileAttributes
(
readUserDefinedFileAttributes
(
source
),
}
readUserDefinedFileAttributes
(
target
));
// check named attributes are copied
if
(
followLinks
&&
source
.
getFileStore
().
supportsFileAttributeView
(
"xattr"
)
&&
target
.
getFileStore
().
supportsFileAttributeView
(
"xattr"
))
{
checkUserDefinedFileAttributes
(
readUserDefinedFileAttributes
(
source
),
readUserDefinedFileAttributes
(
target
));
}
}
}
}
}
}
}
...
@@ -606,7 +626,9 @@ public class CopyAndMove {
...
@@ -606,7 +626,9 @@ public class CopyAndMove {
/**
/**
* Tests all possible ways to invoke copyTo
* Tests all possible ways to invoke copyTo
*/
*/
static
void
doCopyTests
(
Path
dir
)
throws
IOException
{
static
void
doCopyTests
(
Path
dir1
,
Path
dir2
,
boolean
supportsLinks
)
throws
IOException
{
Path
source
,
target
,
link
,
entry
;
Path
source
,
target
,
link
,
entry
;
// -- regular file --
// -- regular file --
...
@@ -614,8 +636,8 @@ public class CopyAndMove {
...
@@ -614,8 +636,8 @@ public class CopyAndMove {
/**
/**
* Test: move regular file, target does not exist
* Test: move regular file, target does not exist
*/
*/
source
=
createSourceFile
(
dir
);
source
=
createSourceFile
(
dir
1
);
target
=
getTargetFile
(
dir
);
target
=
getTargetFile
(
dir
2
);
copyAndVerify
(
source
,
target
);
copyAndVerify
(
source
,
target
);
source
.
delete
();
source
.
delete
();
target
.
delete
();
target
.
delete
();
...
@@ -623,8 +645,8 @@ public class CopyAndMove {
...
@@ -623,8 +645,8 @@ public class CopyAndMove {
/**
/**
* Test: copy regular file, target exists
* Test: copy regular file, target exists
*/
*/
source
=
createSourceFile
(
dir
);
source
=
createSourceFile
(
dir
1
);
target
=
getTargetFile
(
dir
).
createFile
();
target
=
getTargetFile
(
dir
2
).
createFile
();
try
{
try
{
copyAndVerify
(
source
,
target
);
copyAndVerify
(
source
,
target
);
throw
new
RuntimeException
(
"FileAlreadyExistsException expected"
);
throw
new
RuntimeException
(
"FileAlreadyExistsException expected"
);
...
@@ -643,8 +665,8 @@ public class CopyAndMove {
...
@@ -643,8 +665,8 @@ public class CopyAndMove {
/**
/**
* Test: copy regular file, target does not exist
* Test: copy regular file, target does not exist
*/
*/
source
=
createSourceFile
(
dir
);
source
=
createSourceFile
(
dir
1
);
target
=
getTargetFile
(
dir
);
target
=
getTargetFile
(
dir
2
);
copyAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
copyAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
source
.
delete
();
source
.
delete
();
target
.
delete
();
target
.
delete
();
...
@@ -652,8 +674,8 @@ public class CopyAndMove {
...
@@ -652,8 +674,8 @@ public class CopyAndMove {
/**
/**
* Test: copy regular file, target exists
* Test: copy regular file, target exists
*/
*/
source
=
createSourceFile
(
dir
);
source
=
createSourceFile
(
dir
1
);
target
=
getTargetFile
(
dir
).
createFile
();
target
=
getTargetFile
(
dir
2
).
createFile
();
copyAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
copyAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
source
.
delete
();
source
.
delete
();
target
.
delete
();
target
.
delete
();
...
@@ -661,8 +683,8 @@ public class CopyAndMove {
...
@@ -661,8 +683,8 @@ public class CopyAndMove {
/**
/**
* Test: copy regular file, target exists and is empty directory
* Test: copy regular file, target exists and is empty directory
*/
*/
source
=
createSourceFile
(
dir
);
source
=
createSourceFile
(
dir
1
);
target
=
getTargetFile
(
dir
).
createDirectory
();
target
=
getTargetFile
(
dir
2
).
createDirectory
();
copyAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
copyAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
source
.
delete
();
source
.
delete
();
target
.
delete
();
target
.
delete
();
...
@@ -670,8 +692,8 @@ public class CopyAndMove {
...
@@ -670,8 +692,8 @@ public class CopyAndMove {
/**
/**
* Test: copy regular file, target exists and is non-empty directory
* Test: copy regular file, target exists and is non-empty directory
*/
*/
source
=
createSourceFile
(
dir
);
source
=
createSourceFile
(
dir
1
);
target
=
getTargetFile
(
dir
).
createDirectory
();
target
=
getTargetFile
(
dir
2
).
createDirectory
();
entry
=
target
.
resolve
(
"foo"
).
createFile
();
entry
=
target
.
resolve
(
"foo"
).
createFile
();
try
{
try
{
copyAndVerify
(
source
,
target
);
copyAndVerify
(
source
,
target
);
...
@@ -685,8 +707,8 @@ public class CopyAndMove {
...
@@ -685,8 +707,8 @@ public class CopyAndMove {
/**
/**
* Test: copy regular file + attributes
* Test: copy regular file + attributes
*/
*/
source
=
createSourceFile
(
dir
);
source
=
createSourceFile
(
dir
1
);
target
=
getTargetFile
(
dir
);
target
=
getTargetFile
(
dir
2
);
copyAndVerify
(
source
,
target
,
COPY_ATTRIBUTES
);
copyAndVerify
(
source
,
target
,
COPY_ATTRIBUTES
);
source
.
delete
();
source
.
delete
();
target
.
delete
();
target
.
delete
();
...
@@ -697,8 +719,8 @@ public class CopyAndMove {
...
@@ -697,8 +719,8 @@ public class CopyAndMove {
/*
/*
* Test: copy directory, target does not exist
* Test: copy directory, target does not exist
*/
*/
source
=
createSourceDirectory
(
dir
);
source
=
createSourceDirectory
(
dir
1
);
target
=
getTargetFile
(
dir
);
target
=
getTargetFile
(
dir
2
);
copyAndVerify
(
source
,
target
);
copyAndVerify
(
source
,
target
);
source
.
delete
();
source
.
delete
();
target
.
delete
();
target
.
delete
();
...
@@ -706,8 +728,8 @@ public class CopyAndMove {
...
@@ -706,8 +728,8 @@ public class CopyAndMove {
/**
/**
* Test: copy directory, target exists
* Test: copy directory, target exists
*/
*/
source
=
createSourceDirectory
(
dir
);
source
=
createSourceDirectory
(
dir
1
);
target
=
getTargetFile
(
dir
).
createFile
();
target
=
getTargetFile
(
dir
2
).
createFile
();
try
{
try
{
copyAndVerify
(
source
,
target
);
copyAndVerify
(
source
,
target
);
throw
new
RuntimeException
(
"FileAlreadyExistsException expected"
);
throw
new
RuntimeException
(
"FileAlreadyExistsException expected"
);
...
@@ -726,8 +748,8 @@ public class CopyAndMove {
...
@@ -726,8 +748,8 @@ public class CopyAndMove {
/**
/**
* Test: copy directory, target does not exist
* Test: copy directory, target does not exist
*/
*/
source
=
createSourceDirectory
(
dir
);
source
=
createSourceDirectory
(
dir
1
);
target
=
getTargetFile
(
dir
);
target
=
getTargetFile
(
dir
2
);
copyAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
copyAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
source
.
delete
();
source
.
delete
();
target
.
delete
();
target
.
delete
();
...
@@ -735,8 +757,8 @@ public class CopyAndMove {
...
@@ -735,8 +757,8 @@ public class CopyAndMove {
/**
/**
* Test: copy directory, target exists
* Test: copy directory, target exists
*/
*/
source
=
createSourceDirectory
(
dir
);
source
=
createSourceDirectory
(
dir
1
);
target
=
getTargetFile
(
dir
).
createFile
();
target
=
getTargetFile
(
dir
2
).
createFile
();
copyAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
copyAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
source
.
delete
();
source
.
delete
();
target
.
delete
();
target
.
delete
();
...
@@ -744,8 +766,8 @@ public class CopyAndMove {
...
@@ -744,8 +766,8 @@ public class CopyAndMove {
/**
/**
* Test: copy directory, target exists and is empty directory
* Test: copy directory, target exists and is empty directory
*/
*/
source
=
createSourceDirectory
(
dir
);
source
=
createSourceDirectory
(
dir
1
);
target
=
getTargetFile
(
dir
).
createDirectory
();
target
=
getTargetFile
(
dir
2
).
createDirectory
();
copyAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
copyAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
source
.
delete
();
source
.
delete
();
target
.
delete
();
target
.
delete
();
...
@@ -753,8 +775,8 @@ public class CopyAndMove {
...
@@ -753,8 +775,8 @@ public class CopyAndMove {
/**
/**
* Test: copy directory, target exists and is non-empty directory
* Test: copy directory, target exists and is non-empty directory
*/
*/
source
=
createSourceDirectory
(
dir
);
source
=
createSourceDirectory
(
dir
1
);
target
=
getTargetFile
(
dir
).
createDirectory
();
target
=
getTargetFile
(
dir
2
).
createDirectory
();
entry
=
target
.
resolve
(
"foo"
).
createFile
();
entry
=
target
.
resolve
(
"foo"
).
createFile
();
try
{
try
{
copyAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
copyAndVerify
(
source
,
target
,
REPLACE_EXISTING
);
...
@@ -768,8 +790,8 @@ public class CopyAndMove {
...
@@ -768,8 +790,8 @@ public class CopyAndMove {
/*
/*
* Test: copy directory + attributes
* Test: copy directory + attributes
*/
*/
source
=
createSourceDirectory
(
dir
);
source
=
createSourceDirectory
(
dir
1
);
target
=
getTargetFile
(
dir
);
target
=
getTargetFile
(
dir
2
);
copyAndVerify
(
source
,
target
,
COPY_ATTRIBUTES
);
copyAndVerify
(
source
,
target
,
COPY_ATTRIBUTES
);
source
.
delete
();
source
.
delete
();
target
.
delete
();
target
.
delete
();
...
@@ -780,9 +802,9 @@ public class CopyAndMove {
...
@@ -780,9 +802,9 @@ public class CopyAndMove {
* Test: Follow link
* Test: Follow link
*/
*/
if
(
supportsLinks
)
{
if
(
supportsLinks
)
{
source
=
createSourceFile
(
dir
);
source
=
createSourceFile
(
dir
1
);
link
=
dir
.
resolve
(
"link"
).
createSymbolicLink
(
source
);
link
=
dir
1
.
resolve
(
"link"
).
createSymbolicLink
(
source
);
target
=
getTargetFile
(
dir
);
target
=
getTargetFile
(
dir
2
);
copyAndVerify
(
link
,
target
);
copyAndVerify
(
link
,
target
);
link
.
delete
();
link
.
delete
();
source
.
delete
();
source
.
delete
();
...
@@ -792,9 +814,9 @@ public class CopyAndMove {
...
@@ -792,9 +814,9 @@ public class CopyAndMove {
* Test: Copy link (to file)
* Test: Copy link (to file)
*/
*/
if
(
supportsLinks
)
{
if
(
supportsLinks
)
{
source
=
createSourceFile
(
dir
);
source
=
createSourceFile
(
dir
1
);
link
=
dir
.
resolve
(
"link"
).
createSymbolicLink
(
source
);
link
=
dir
1
.
resolve
(
"link"
).
createSymbolicLink
(
source
);
target
=
getTargetFile
(
dir
);
target
=
getTargetFile
(
dir
2
);
copyAndVerify
(
link
,
target
,
NOFOLLOW_LINKS
);
copyAndVerify
(
link
,
target
,
NOFOLLOW_LINKS
);
link
.
delete
();
link
.
delete
();
source
.
delete
();
source
.
delete
();
...
@@ -804,9 +826,9 @@ public class CopyAndMove {
...
@@ -804,9 +826,9 @@ public class CopyAndMove {
* Test: Copy link (to directory)
* Test: Copy link (to directory)
*/
*/
if
(
supportsLinks
)
{
if
(
supportsLinks
)
{
source
=
dir
.
resolve
(
"mydir"
).
createDirectory
();
source
=
dir
1
.
resolve
(
"mydir"
).
createDirectory
();
link
=
dir
.
resolve
(
"link"
).
createSymbolicLink
(
source
);
link
=
dir
1
.
resolve
(
"link"
).
createSymbolicLink
(
source
);
target
=
getTargetFile
(
dir
);
target
=
getTargetFile
(
dir
2
);
copyAndVerify
(
link
,
target
,
NOFOLLOW_LINKS
);
copyAndVerify
(
link
,
target
,
NOFOLLOW_LINKS
);
link
.
delete
();
link
.
delete
();
source
.
delete
();
source
.
delete
();
...
@@ -817,8 +839,8 @@ public class CopyAndMove {
...
@@ -817,8 +839,8 @@ public class CopyAndMove {
*/
*/
if
(
supportsLinks
)
{
if
(
supportsLinks
)
{
assertTrue
(
source
.
notExists
());
assertTrue
(
source
.
notExists
());
link
=
dir
.
resolve
(
"link"
).
createSymbolicLink
(
source
);
link
=
dir
1
.
resolve
(
"link"
).
createSymbolicLink
(
source
);
target
=
getTargetFile
(
dir
);
target
=
getTargetFile
(
dir
2
);
copyAndVerify
(
link
,
target
,
NOFOLLOW_LINKS
);
copyAndVerify
(
link
,
target
,
NOFOLLOW_LINKS
);
link
.
delete
();
link
.
delete
();
}
}
...
@@ -830,8 +852,8 @@ public class CopyAndMove {
...
@@ -830,8 +852,8 @@ public class CopyAndMove {
System
.
getProperty
(
"os.name"
).
startsWith
(
"Windows"
))
System
.
getProperty
(
"os.name"
).
startsWith
(
"Windows"
))
{
{
Path
unc
=
Paths
.
get
(
"\\\\rialto\\share\\file"
);
Path
unc
=
Paths
.
get
(
"\\\\rialto\\share\\file"
);
link
=
dir
.
resolve
(
"link"
).
createSymbolicLink
(
unc
);
link
=
dir
1
.
resolve
(
"link"
).
createSymbolicLink
(
unc
);
target
=
getTargetFile
(
dir
);
target
=
getTargetFile
(
dir
2
);
copyAndVerify
(
link
,
target
,
NOFOLLOW_LINKS
);
copyAndVerify
(
link
,
target
,
NOFOLLOW_LINKS
);
link
.
delete
();
link
.
delete
();
}
}
...
@@ -841,8 +863,8 @@ public class CopyAndMove {
...
@@ -841,8 +863,8 @@ public class CopyAndMove {
/**
/**
* Test nulls
* Test nulls
*/
*/
source
=
createSourceFile
(
dir
);
source
=
createSourceFile
(
dir
1
);
target
=
getTargetFile
(
dir
);
target
=
getTargetFile
(
dir
2
);
try
{
try
{
source
.
copyTo
(
null
);
source
.
copyTo
(
null
);
throw
new
RuntimeException
(
"NullPointerException expected"
);
throw
new
RuntimeException
(
"NullPointerException expected"
);
...
@@ -861,8 +883,8 @@ public class CopyAndMove {
...
@@ -861,8 +883,8 @@ public class CopyAndMove {
/**
/**
* Test UOE
* Test UOE
*/
*/
source
=
createSourceFile
(
dir
);
source
=
createSourceFile
(
dir
1
);
target
=
getTargetFile
(
dir
);
target
=
getTargetFile
(
dir
2
);
try
{
try
{
source
.
copyTo
(
target
,
new
CopyOption
()
{
});
source
.
copyTo
(
target
,
new
CopyOption
()
{
});
}
catch
(
UnsupportedOperationException
x
)
{
}
}
catch
(
UnsupportedOperationException
x
)
{
}
...
...
test/java/nio/file/Path/PassThroughFileSystem.java
0 → 100644
浏览文件 @
efdc7738
/*
* Copyright 2010 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
import
java.nio.file.*
;
import
java.nio.file.attribute.*
;
import
java.nio.file.spi.FileSystemProvider
;
import
java.nio.channels.SeekableByteChannel
;
import
java.net.URI
;
import
java.util.*
;
import
java.io.*
;
/**
* A "pass through" file system implementation that passes through, or delegates,
* everything to the default file system.
*/
class
PassThroughFileSystem
extends
FileSystem
{
private
final
FileSystemProvider
provider
;
private
final
FileSystem
delegate
;
PassThroughFileSystem
(
FileSystemProvider
provider
,
FileSystem
delegate
)
{
this
.
provider
=
provider
;
this
.
delegate
=
delegate
;
}
/**
* Creates a new "pass through" file system. Useful for test environments
* where the provider might not be deployed.
*/
static
FileSystem
create
()
throws
IOException
{
FileSystemProvider
provider
=
new
PassThroughProvider
();
Map
<
String
,?>
env
=
Collections
.
emptyMap
();
URI
uri
=
URI
.
create
(
"pass:///"
);
return
provider
.
newFileSystem
(
uri
,
env
);
}
@Override
public
FileSystemProvider
provider
()
{
return
provider
;
}
@Override
public
void
close
()
throws
IOException
{
delegate
.
close
();
}
@Override
public
boolean
isOpen
()
{
return
delegate
.
isOpen
();
}
@Override
public
boolean
isReadOnly
()
{
return
delegate
.
isReadOnly
();
}
@Override
public
String
getSeparator
()
{
return
delegate
.
getSeparator
();
}
@Override
public
Iterable
<
Path
>
getRootDirectories
()
{
final
Iterable
<
Path
>
roots
=
delegate
.
getRootDirectories
();
return
new
Iterable
<
Path
>()
{
@Override
public
Iterator
<
Path
>
iterator
()
{
final
Iterator
<
Path
>
itr
=
roots
.
iterator
();
return
new
Iterator
<
Path
>()
{
@Override
public
boolean
hasNext
()
{
return
itr
.
hasNext
();
}
@Override
public
Path
next
()
{
return
new
PassThroughPath
(
delegate
,
itr
.
next
());
}
@Override
public
void
remove
()
{
itr
.
remove
();
}
};
}
};
}
@Override
public
Iterable
<
FileStore
>
getFileStores
()
{
// assume that unwrapped objects aren't exposed
return
delegate
.
getFileStores
();
}
@Override
public
Set
<
String
>
supportedFileAttributeViews
()
{
// assume that unwrapped objects aren't exposed
return
delegate
.
supportedFileAttributeViews
();
}
@Override
public
Path
getPath
(
String
path
)
{
return
new
PassThroughPath
(
this
,
delegate
.
getPath
(
path
));
}
@Override
public
PathMatcher
getPathMatcher
(
String
syntaxAndPattern
)
{
final
PathMatcher
matcher
=
delegate
.
getPathMatcher
(
syntaxAndPattern
);
return
new
PathMatcher
()
{
@Override
public
boolean
matches
(
Path
path
)
{
return
matcher
.
matches
(
PassThroughPath
.
unwrap
(
path
));
}
};
}
@Override
public
UserPrincipalLookupService
getUserPrincipalLookupService
()
{
// assume that unwrapped objects aren't exposed
return
delegate
.
getUserPrincipalLookupService
();
}
@Override
public
WatchService
newWatchService
()
throws
IOException
{
// to keep it simple
throw
new
UnsupportedOperationException
();
}
static
class
PassThroughProvider
extends
FileSystemProvider
{
private
static
final
String
SCHEME
=
"pass"
;
private
static
volatile
PassThroughFileSystem
delegate
;
public
PassThroughProvider
()
{
}
@Override
public
String
getScheme
()
{
return
SCHEME
;
}
private
void
checkScheme
(
URI
uri
)
{
if
(!
uri
.
getScheme
().
equalsIgnoreCase
(
SCHEME
))
throw
new
IllegalArgumentException
();
}
private
void
checkUri
(
URI
uri
)
{
checkScheme
(
uri
);
if
(!
uri
.
getSchemeSpecificPart
().
equals
(
"///"
))
throw
new
IllegalArgumentException
();
}
@Override
public
FileSystem
newFileSystem
(
URI
uri
,
Map
<
String
,?>
env
)
throws
IOException
{
checkUri
(
uri
);
synchronized
(
PassThroughProvider
.
class
)
{
if
(
delegate
!=
null
)
throw
new
FileSystemAlreadyExistsException
();
PassThroughFileSystem
result
=
new
PassThroughFileSystem
(
this
,
FileSystems
.
getDefault
());
delegate
=
result
;
return
result
;
}
}
@Override
public
FileSystem
getFileSystem
(
URI
uri
)
{
checkUri
(
uri
);
FileSystem
result
=
delegate
;
if
(
result
==
null
)
throw
new
FileSystemNotFoundException
();
return
result
;
}
@Override
public
Path
getPath
(
URI
uri
)
{
checkScheme
(
uri
);
if
(
delegate
==
null
)
throw
new
FileSystemNotFoundException
();
uri
=
URI
.
create
(
delegate
.
provider
().
getScheme
()
+
":"
+
uri
.
getSchemeSpecificPart
());
return
new
PassThroughPath
(
delegate
,
delegate
.
provider
().
getPath
(
uri
));
}
}
static
class
PassThroughPath
extends
Path
{
private
final
FileSystem
fs
;
private
final
Path
delegate
;
PassThroughPath
(
FileSystem
fs
,
Path
delegate
)
{
this
.
fs
=
fs
;
this
.
delegate
=
delegate
;
}
private
Path
wrap
(
Path
path
)
{
return
(
path
!=
null
)
?
new
PassThroughPath
(
fs
,
path
)
:
null
;
}
static
Path
unwrap
(
Path
wrapper
)
{
if
(!(
wrapper
instanceof
PassThroughPath
))
throw
new
ProviderMismatchException
();
return
((
PassThroughPath
)
wrapper
).
delegate
;
}
@Override
public
FileSystem
getFileSystem
()
{
return
fs
;
}
@Override
public
boolean
isAbsolute
()
{
return
delegate
.
isAbsolute
();
}
@Override
public
Path
getRoot
()
{
return
wrap
(
delegate
.
getRoot
());
}
@Override
public
Path
getName
()
{
return
wrap
(
delegate
.
getName
());
}
@Override
public
Path
getParent
()
{
return
wrap
(
delegate
.
getParent
());
}
@Override
public
int
getNameCount
()
{
return
delegate
.
getNameCount
();
}
@Override
public
Path
getName
(
int
index
)
{
return
wrap
(
delegate
.
getName
(
index
));
}
@Override
public
Path
subpath
(
int
beginIndex
,
int
endIndex
)
{
return
wrap
(
delegate
.
subpath
(
beginIndex
,
endIndex
));
}
@Override
public
boolean
startsWith
(
Path
other
)
{
return
delegate
.
startsWith
(
unwrap
(
other
));
}
@Override
public
boolean
endsWith
(
Path
other
)
{
return
delegate
.
endsWith
(
unwrap
(
other
));
}
@Override
public
Path
normalize
()
{
return
wrap
(
delegate
.
normalize
());
}
@Override
public
Path
resolve
(
Path
other
)
{
return
wrap
(
delegate
.
resolve
(
unwrap
(
other
)));
}
@Override
public
Path
resolve
(
String
other
)
{
return
wrap
(
delegate
.
resolve
(
other
));
}
@Override
public
Path
relativize
(
Path
other
)
{
return
wrap
(
delegate
.
relativize
(
unwrap
(
other
)));
}
@Override
public
void
setAttribute
(
String
attribute
,
Object
value
,
LinkOption
...
options
)
throws
IOException
{
delegate
.
setAttribute
(
attribute
,
value
,
options
);
}
@Override
public
Object
getAttribute
(
String
attribute
,
LinkOption
...
options
)
throws
IOException
{
// assume that unwrapped objects aren't exposed
return
delegate
.
getAttribute
(
attribute
,
options
);
}
@Override
public
Map
<
String
,?>
readAttributes
(
String
attributes
,
LinkOption
...
options
)
throws
IOException
{
// assume that unwrapped objects aren't exposed
return
delegate
.
readAttributes
(
attributes
,
options
);
}
@Override
public
<
V
extends
FileAttributeView
>
V
getFileAttributeView
(
Class
<
V
>
type
,
LinkOption
...
options
)
{
return
delegate
.
getFileAttributeView
(
type
,
options
);
}
@Override
public
void
delete
()
throws
IOException
{
delegate
.
delete
();
}
@Override
public
void
deleteIfExists
()
throws
IOException
{
delegate
.
deleteIfExists
();
}
@Override
public
Path
createSymbolicLink
(
Path
target
,
FileAttribute
<?>...
attrs
)
throws
IOException
{
delegate
.
createSymbolicLink
(
unwrap
(
target
),
attrs
);
return
this
;
}
@Override
public
Path
createLink
(
Path
existing
)
throws
IOException
{
delegate
.
createLink
(
unwrap
(
existing
));
return
this
;
}
@Override
public
Path
readSymbolicLink
()
throws
IOException
{
return
wrap
(
delegate
.
readSymbolicLink
());
}
@Override
public
URI
toUri
()
{
String
ssp
=
delegate
.
toUri
().
getSchemeSpecificPart
();
return
URI
.
create
(
fs
.
provider
().
getScheme
()
+
":"
+
ssp
);
}
@Override
public
Path
toAbsolutePath
()
{
return
wrap
(
delegate
.
toAbsolutePath
());
}
@Override
public
Path
toRealPath
(
boolean
resolveLinks
)
throws
IOException
{
return
wrap
(
delegate
.
toRealPath
(
resolveLinks
));
}
@Override
public
Path
copyTo
(
Path
target
,
CopyOption
...
options
)
throws
IOException
{
return
wrap
(
delegate
.
copyTo
(
unwrap
(
target
),
options
));
}
@Override
public
Path
moveTo
(
Path
target
,
CopyOption
...
options
)
throws
IOException
{
return
wrap
(
delegate
.
copyTo
(
unwrap
(
target
),
options
));
}
private
DirectoryStream
<
Path
>
wrap
(
final
DirectoryStream
<
Path
>
stream
)
{
return
new
DirectoryStream
<
Path
>()
{
@Override
public
Iterator
<
Path
>
iterator
()
{
final
Iterator
<
Path
>
itr
=
stream
.
iterator
();
return
new
Iterator
<
Path
>()
{
@Override
public
boolean
hasNext
()
{
return
itr
.
hasNext
();
}
@Override
public
Path
next
()
{
return
wrap
(
itr
.
next
());
}
@Override
public
void
remove
()
{
itr
.
remove
();
}
};
}
@Override
public
void
close
()
throws
IOException
{
stream
.
close
();
}
};
}
@Override
public
DirectoryStream
<
Path
>
newDirectoryStream
()
throws
IOException
{
return
wrap
(
delegate
.
newDirectoryStream
());
}
@Override
public
DirectoryStream
<
Path
>
newDirectoryStream
(
String
glob
)
throws
IOException
{
return
wrap
(
delegate
.
newDirectoryStream
(
glob
));
}
@Override
public
DirectoryStream
<
Path
>
newDirectoryStream
(
DirectoryStream
.
Filter
<?
super
Path
>
filter
)
throws
IOException
{
return
wrap
(
delegate
.
newDirectoryStream
(
filter
));
}
@Override
public
Path
createFile
(
FileAttribute
<?>...
attrs
)
throws
IOException
{
delegate
.
createFile
(
attrs
);
return
this
;
}
@Override
public
Path
createDirectory
(
FileAttribute
<?>...
attrs
)
throws
IOException
{
delegate
.
createDirectory
(
attrs
);
return
this
;
}
@Override
public
SeekableByteChannel
newByteChannel
(
Set
<?
extends
OpenOption
>
options
,
FileAttribute
<?>...
attrs
)
throws
IOException
{
return
delegate
.
newByteChannel
(
options
,
attrs
);
}
@Override
public
SeekableByteChannel
newByteChannel
(
OpenOption
...
options
)
throws
IOException
{
return
delegate
.
newByteChannel
(
options
);
}
@Override
public
InputStream
newInputStream
(
OpenOption
...
options
)
throws
IOException
{
return
delegate
.
newInputStream
();
}
@Override
public
OutputStream
newOutputStream
(
OpenOption
...
options
)
throws
IOException
{
return
delegate
.
newOutputStream
(
options
);
}
@Override
public
boolean
isHidden
()
throws
IOException
{
return
delegate
.
isHidden
();
}
@Override
public
void
checkAccess
(
AccessMode
...
modes
)
throws
IOException
{
delegate
.
checkAccess
(
modes
);
}
@Override
public
boolean
exists
()
{
return
delegate
.
exists
();
}
@Override
public
boolean
notExists
()
{
return
delegate
.
notExists
();
}
@Override
public
FileStore
getFileStore
()
throws
IOException
{
return
delegate
.
getFileStore
();
}
@Override
public
WatchKey
register
(
WatchService
watcher
,
WatchEvent
.
Kind
<?>[]
events
,
WatchEvent
.
Modifier
...
modifiers
)
{
throw
new
UnsupportedOperationException
();
}
@Override
public
WatchKey
register
(
WatchService
watcher
,
WatchEvent
.
Kind
<?>...
events
)
{
throw
new
UnsupportedOperationException
();
}
@Override
public
Iterator
<
Path
>
iterator
()
{
final
Iterator
<
Path
>
itr
=
delegate
.
iterator
();
return
new
Iterator
<
Path
>()
{
@Override
public
boolean
hasNext
()
{
return
itr
.
hasNext
();
}
@Override
public
Path
next
()
{
return
wrap
(
itr
.
next
());
}
@Override
public
void
remove
()
{
itr
.
remove
();
}
};
}
@Override
public
int
compareTo
(
Path
other
)
{
return
delegate
.
compareTo
(
unwrap
(
other
));
}
@Override
public
boolean
isSameFile
(
Path
other
)
throws
IOException
{
return
delegate
.
isSameFile
(
unwrap
(
other
));
}
@Override
public
boolean
equals
(
Object
other
)
{
if
(!(
other
instanceof
PassThroughPath
))
return
false
;
return
delegate
.
equals
(
unwrap
((
PassThroughPath
)
other
));
}
@Override
public
int
hashCode
()
{
return
delegate
.
hashCode
();
}
@Override
public
String
toString
()
{
return
delegate
.
toString
();
}
}
}
test/java/nio/file/Path/delete_on_close.sh
浏览文件 @
efdc7738
...
@@ -40,7 +40,7 @@ fi
...
@@ -40,7 +40,7 @@ fi
OS
=
`
uname
-s
`
OS
=
`
uname
-s
`
case
"
$OS
"
in
case
"
$OS
"
in
Windows_
*
)
Windows_
*
|
CYGWIN
*
)
CLASSPATH
=
"
${
TESTCLASSES
}
;
${
TESTSRC
}
"
CLASSPATH
=
"
${
TESTCLASSES
}
;
${
TESTSRC
}
"
;;
;;
*
)
*
)
...
...
test/java/nio/file/TestUtil.java
浏览文件 @
efdc7738
...
@@ -30,17 +30,20 @@ public class TestUtil {
...
@@ -30,17 +30,20 @@ public class TestUtil {
private
TestUtil
()
{
private
TestUtil
()
{
}
}
public
static
Path
createTemporaryDirectory
(
)
throws
IOException
{
static
Path
createTemporaryDirectory
(
String
where
)
throws
IOException
{
Path
t
mpdir
=
Paths
.
get
(
System
.
getProperty
(
"java.io.tmpdir"
)
);
Path
t
op
=
FileSystems
.
getDefault
().
getPath
(
where
);
Random
r
=
new
Random
();
Random
r
=
new
Random
();
Path
dir
;
Path
dir
;
do
{
do
{
dir
=
t
mpdir
.
resolve
(
"name"
+
r
.
nextInt
());
dir
=
t
op
.
resolve
(
"name"
+
r
.
nextInt
());
}
while
(
dir
.
exists
());
}
while
(
dir
.
exists
());
return
dir
.
createDirectory
();
return
dir
.
createDirectory
();
}
}
static
Path
createTemporaryDirectory
()
throws
IOException
{
return
createTemporaryDirectory
(
System
.
getProperty
(
"java.io.tmpdir"
));
}
static
void
removeAll
(
Path
dir
)
{
static
void
removeAll
(
Path
dir
)
{
Files
.
walkFileTree
(
dir
,
new
FileVisitor
<
Path
>()
{
Files
.
walkFileTree
(
dir
,
new
FileVisitor
<
Path
>()
{
@Override
@Override
...
...
test/java/nio/file/WatchService/OverflowEventIsLoner.java
0 → 100644
浏览文件 @
efdc7738
/*
* Copyright 2010 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
/* @test
* @bug 6907760
* @summary Check that the OVERFLOW event is not retrieved with other events
* @library ..
*/
import
java.nio.file.*
;
import
static
java
.
nio
.
file
.
StandardWatchEventKind
.*;
import
java.io.IOException
;
import
java.util.List
;
import
java.util.concurrent.TimeUnit
;
public
class
OverflowEventIsLoner
{
static
void
drainEvents
(
WatchService
watcher
,
WatchEvent
.
Kind
<?>
expectedKind
,
int
count
)
throws
IOException
,
InterruptedException
{
// wait for key to be signalled - the timeout is long to allow for
// polling implementations
WatchKey
key
=
watcher
.
poll
(
15
,
TimeUnit
.
SECONDS
);
if
(
key
!=
null
&&
count
==
0
)
throw
new
RuntimeException
(
"Key was signalled (unexpected)"
);
if
(
key
==
null
&&
count
>
0
)
throw
new
RuntimeException
(
"Key not signalled (unexpected)"
);
int
nread
=
0
;
boolean
gotOverflow
=
false
;
do
{
List
<
WatchEvent
<?>>
events
=
key
.
pollEvents
();
for
(
WatchEvent
<?>
event:
events
)
{
WatchEvent
.
Kind
<?>
kind
=
event
.
kind
();
if
(
kind
==
expectedKind
)
{
// expected event kind
if
(++
nread
>
count
)
throw
new
RuntimeException
(
"More events than expected!!"
);
}
else
if
(
kind
==
OVERFLOW
)
{
// overflow event should not be retrieved with other events
if
(
events
.
size
()
>
1
)
throw
new
RuntimeException
(
"Overflow retrieved with other events"
);
gotOverflow
=
true
;
}
else
{
throw
new
RuntimeException
(
"Unexpected event '"
+
kind
+
"'"
);
}
}
if
(!
key
.
reset
())
throw
new
RuntimeException
(
"Key is no longer valid"
);
key
=
watcher
.
poll
(
2
,
TimeUnit
.
SECONDS
);
}
while
(
key
!=
null
);
// check that all expected events were received or there was an overflow
if
(
nread
<
count
&&
!
gotOverflow
)
throw
new
RuntimeException
(
"Insufficient events"
);
}
static
void
test
(
Path
dir
)
throws
IOException
,
InterruptedException
{
WatchService
watcher
=
dir
.
getFileSystem
().
newWatchService
();
try
{
WatchKey
key
=
dir
.
register
(
watcher
,
ENTRY_CREATE
,
ENTRY_DELETE
);
// create a lot of files
int
n
=
1024
;
Path
[]
files
=
new
Path
[
n
];
for
(
int
i
=
0
;
i
<
n
;
i
++)
{
files
[
i
]
=
dir
.
resolve
(
"foo"
+
i
).
createFile
();
}
// give time for events to accumulate (improve chance of overflow)
Thread
.
sleep
(
1000
);
// check that we see the create events (or overflow)
drainEvents
(
watcher
,
ENTRY_CREATE
,
n
);
// delete the files
for
(
int
i
=
0
;
i
<
n
;
i
++)
{
files
[
i
].
delete
();
}
// give time for events to accumulate (improve chance of overflow)
Thread
.
sleep
(
1000
);
// check that we see the delete events (or overflow)
drainEvents
(
watcher
,
ENTRY_DELETE
,
n
);
}
finally
{
watcher
.
close
();
}
}
public
static
void
main
(
String
[]
args
)
throws
Exception
{
Path
dir
=
TestUtil
.
createTemporaryDirectory
();
try
{
test
(
dir
);
}
finally
{
TestUtil
.
removeAll
(
dir
);
}
}
}
test/java/security/Provider/Turkish.java
浏览文件 @
efdc7738
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
* @test
* @test
* @bug 6220064
* @bug 6220064
* @summary make sure everything works ok in the Turkish local (dotted/dotless i problem)
* @summary make sure everything works ok in the Turkish local (dotted/dotless i problem)
* @run main/othervm Turkish
* @author Andreas Sterbenz
* @author Andreas Sterbenz
*/
*/
...
...
test/java/util/Currency/PropertiesTest.sh
浏览文件 @
efdc7738
...
@@ -34,7 +34,7 @@ case "$OS" in
...
@@ -34,7 +34,7 @@ case "$OS" in
PS
=
":"
PS
=
":"
FS
=
"/"
FS
=
"/"
;;
;;
Windows
*
)
Windows
*
|
CYGWIN
*
)
PS
=
";"
PS
=
";"
FS
=
"
\\
"
FS
=
"
\\
"
;;
;;
...
...
test/java/util/PluggableLocale/ExecTest.sh
浏览文件 @
efdc7738
...
@@ -62,7 +62,7 @@ case "$OS" in
...
@@ -62,7 +62,7 @@ case "$OS" in
PS
=
":"
PS
=
":"
FS
=
"/"
FS
=
"/"
;;
;;
Windows
*
)
Windows
*
|
CYGWIN
*
)
PS
=
";"
PS
=
";"
FS
=
"
\\
"
FS
=
"
\\
"
;;
;;
...
...
test/java/util/ResourceBundle/Bug6299235Test.sh
浏览文件 @
efdc7738
...
@@ -35,7 +35,7 @@ case "$OS" in
...
@@ -35,7 +35,7 @@ case "$OS" in
PATHSEP
=
":"
PATHSEP
=
":"
FILESEP
=
"/"
FILESEP
=
"/"
;;
;;
Windows
*
)
Windows
*
|
CYGWIN
*
)
PATHSEP
=
";"
PATHSEP
=
";"
FILESEP
=
"
\\
"
FILESEP
=
"
\\
"
;;
;;
...
@@ -63,7 +63,7 @@ else
...
@@ -63,7 +63,7 @@ else
fi
fi
if
[
-d
"
${
JRE_EXT_DIR
}
"
]
;
then
if
[
-d
"
${
JRE_EXT_DIR
}
"
]
;
then
NEW_EXT_DIR
=
${
JRE_EXT_DIR
}${
PATHSEP
}${
TESTSRC
}
NEW_EXT_DIR
=
"
${
JRE_EXT_DIR
}${
PATHSEP
}${
TESTSRC
}
"
else
else
NEW_EXT_DIR
=
${
TESTSRC
}
NEW_EXT_DIR
=
${
TESTSRC
}
fi
fi
...
...
test/java/util/ResourceBundle/Control/ExpirationTest.sh
浏览文件 @
efdc7738
...
@@ -69,7 +69,7 @@ export LC_ALL
...
@@ -69,7 +69,7 @@ export LC_ALL
HAS_S
=
NO
HAS_S
=
NO
case
"
`
uname
`
"
in
case
"
`
uname
`
"
in
Windows
*
)
Windows
*
|
CYGWIN
*
)
DEL
=
";"
DEL
=
";"
;;
;;
SunOS
)
SunOS
)
...
...
test/java/util/ServiceLoader/basic.sh
浏览文件 @
efdc7738
...
@@ -50,9 +50,9 @@ case "$OS" in
...
@@ -50,9 +50,9 @@ case "$OS" in
SEP
=
'\;'
;;
SEP
=
'\;'
;;
esac
esac
JARD
=
`
pwd
`
/
x.jar
JARD
=
x.jar
EXTD
=
`
pwd
`
/
x.ext
EXTD
=
x.ext
TESTD
=
`
pwd
`
/
x.test
TESTD
=
x.test
if
[
\!
-d
$EXTD
]
;
then
if
[
\!
-d
$EXTD
]
;
then
# Initialize
# Initialize
...
...
test/javax/imageio/stream/StreamCloserLeak/run_test.sh
浏览文件 @
efdc7738
...
@@ -92,7 +92,7 @@ case "$OS" in
...
@@ -92,7 +92,7 @@ case "$OS" in
TMP
=
"/tmp"
TMP
=
"/tmp"
;;
;;
Windows_95
|
Windows_98
|
Windows_NT
|
Windows_ME
)
Windows_95
|
Windows_98
|
Windows_NT
|
Windows_ME
|
CYGWIN
*
)
VAR
=
"A different value for Win32"
VAR
=
"A different value for Win32"
DEFAULT_JDK
=
/usr/local/java/jdk1.2/win32
DEFAULT_JDK
=
/usr/local/java/jdk1.2/win32
FILESEP
=
"
\\
"
FILESEP
=
"
\\
"
...
...
test/javax/script/CommonSetup.sh
浏览文件 @
efdc7738
...
@@ -49,6 +49,12 @@ case "$OS" in
...
@@ -49,6 +49,12 @@ case "$OS" in
OS
=
"Windows"
OS
=
"Windows"
FS
=
"
\\
"
FS
=
"
\\
"
;;
;;
CYGWIN
*
)
PS
=
";"
OS
=
"Windows"
FS
=
"
\\
"
isCygwin
=
true
;;
*
)
*
)
echo
"Unrecognized system!"
echo
"Unrecognized system!"
exit
1
;
exit
1
;
...
...
test/javax/script/ProviderTest.sh
浏览文件 @
efdc7738
...
@@ -46,5 +46,5 @@ $JAR -cf ${TESTCLASSES}/dummy.jar \
...
@@ -46,5 +46,5 @@ $JAR -cf ${TESTCLASSES}/dummy.jar \
echo
"Running test ..."
echo
"Running test ..."
$JAVA
-classpath
\
$JAVA
-classpath
\
${
TESTCLASSES
}${
PS
}${
TESTCLASSES
}
/dummy.jar
\
"
${
TESTCLASSES
}${
PS
}${
TESTCLASSES
}
/dummy.jar"
\
ProviderTest
ProviderTest
test/sun/jvmstat/testlibrary/utils.sh
浏览文件 @
efdc7738
...
@@ -40,7 +40,7 @@ setup() {
...
@@ -40,7 +40,7 @@ setup() {
OS
=
`
uname
-s
`
OS
=
`
uname
-s
`
case
${
OS
}
in
case
${
OS
}
in
Windows_
*
)
Windows_
*
|
CYGWIN
*
)
PS
=
";"
PS
=
";"
FS
=
"
\\
"
FS
=
"
\\
"
;;
;;
...
@@ -54,7 +54,7 @@ setup() {
...
@@ -54,7 +54,7 @@ setup() {
verify_os
()
{
verify_os
()
{
OS
=
`
uname
-s
`
OS
=
`
uname
-s
`
case
${
OS
}
in
case
${
OS
}
in
Windows_95
|
Windows_98
|
Windows_ME
)
Windows_95
|
Windows_98
|
Windows_ME
|
CYGWIN
*
)
echo
"Test bypassed: jvmstat feature not supported on
${
OS
}
"
echo
"Test bypassed: jvmstat feature not supported on
${
OS
}
"
exit
0
exit
0
;;
;;
...
...
test/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh
浏览文件 @
efdc7738
...
@@ -45,7 +45,7 @@ cat <<EOF > ${TMP_FILE}
...
@@ -45,7 +45,7 @@ cat <<EOF > ${TMP_FILE}
s^@TEST-SRC@/^
${
TESTCLASSES
}${
DFILESEP
}
^g
s^@TEST-SRC@/^
${
TESTCLASSES
}${
DFILESEP
}
^g
EOF
EOF
;;
;;
Windows_95
|
Windows_98
|
Windows_NT
|
Windows_ME
)
Windows_95
|
Windows_98
|
Windows_NT
|
Windows_ME
|
CYGWIN
*
)
PATHSEP
=
";"
PATHSEP
=
";"
FILESEP
=
"
\\
"
FILESEP
=
"
\\
"
DFILESEP
=
$FILESEP$FILESEP
DFILESEP
=
$FILESEP$FILESEP
...
...
test/sun/misc/URLClassPath/ClassnameCharTest.sh
浏览文件 @
efdc7738
...
@@ -44,7 +44,7 @@ case "$OS" in
...
@@ -44,7 +44,7 @@ case "$OS" in
PS
=
":"
PS
=
":"
FS
=
"/"
FS
=
"/"
;;
;;
Windows
*
)
Windows
*
|
CYGWIN
*
)
PS
=
";"
PS
=
";"
FS
=
"
\\
"
FS
=
"
\\
"
;;
;;
...
@@ -59,6 +59,6 @@ cd ${TESTCLASSES}
...
@@ -59,6 +59,6 @@ cd ${TESTCLASSES}
${
TESTJAVA
}${
FS
}
bin
${
FS
}
jar xvf testclasses.jar
"fo o.class"
${
TESTJAVA
}${
FS
}
bin
${
FS
}
jar xvf testclasses.jar
"fo o.class"
${
TESTJAVA
}${
FS
}
bin
${
FS
}
javac
-d
${
TESTCLASSES
}
${
TESTSRC
}${
FS
}
ClassnameCharTest.java
${
TESTJAVA
}${
FS
}
bin
${
FS
}
javac
-d
${
TESTCLASSES
}
${
TESTSRC
}${
FS
}
ClassnameCharTest.java
${
TESTJAVA
}${
FS
}
bin
${
FS
}
java
-classpath
${
TESTCLASSES
}${
PS
}${
TESTCLASSES
}${
FS
}
sun
${
FS
}
misc
${
FS
}
URLClassPath
ClassnameCharTest
${
TESTJAVA
}${
FS
}
bin
${
FS
}
java
-classpath
"
${
TESTCLASSES
}${
PS
}${
TESTCLASSES
}${
FS
}
sun
${
FS
}
misc
${
FS
}
URLClassPath"
ClassnameCharTest
rm
-rf
"fo o.class"
testclasses.jar
rm
-rf
"fo o.class"
testclasses.jar
src/solaris/classes/sun/nio/ch/SctpSocketDispatcher
.java
→
test/sun/security/krb5/ktab/KeyString
.java
浏览文件 @
efdc7738
/*
/*
* Copyright 20
09
Sun Microsystems, Inc. All Rights Reserved.
* Copyright 20
10
Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* published by the Free Software Foundation.
* particular file as subject to the "Classpath" exception as provided
* by Sun in the LICENSE file that accompanied this code.
*
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
...
@@ -22,47 +20,20 @@
...
@@ -22,47 +20,20 @@
* CA 95054 USA or visit www.sun.com if you need additional information or
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
* have any questions.
*/
*/
package
sun.nio.ch
;
/*
* @test
import
java.io.IOException
;
* @bug 6917791
import
java.io.FileDescriptor
;
* @summary KeyTabEntry, when the byte value smaller then 16, the string drop '0'
/**
* Only used for {@code close} and {@code preclose}. All other methods
* throw {@code IOException}.
*/
*/
class
SctpSocketDispatcher
extends
NativeDispatcher
{
@Override
@SuppressWarnings
(
"unused"
)
int
read
(
FileDescriptor
fd
,
long
address
,
int
len
)
throws
IOException
{
throw
new
IOException
(
"Operation Unsupported"
);
}
@Override
@SuppressWarnings
(
"unused"
)
long
readv
(
FileDescriptor
fd
,
long
address
,
int
len
)
throws
IOException
{
throw
new
IOException
(
"Operation Unsupported"
);
}
@Override
import
sun.security.krb5.internal.ktab.KeyTabEntry
;
@SuppressWarnings
(
"unused"
)
int
write
(
FileDescriptor
fd
,
long
address
,
int
len
)
throws
IOException
{
throw
new
IOException
(
"Operation Unsupported"
);
}
@Override
@SuppressWarnings
(
"unused"
)
long
writev
(
FileDescriptor
fd
,
long
address
,
int
len
)
throws
IOException
{
throw
new
IOException
(
"Operation Unsupported"
);
}
@Override
void
close
(
FileDescriptor
fd
)
throws
IOException
{
FileDispatcherImpl
.
close0
(
fd
);
}
@Override
public
class
KeyString
{
void
preClose
(
FileDescriptor
fd
)
throws
IOException
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
FileDispatcherImpl
.
preClose0
(
fd
);
KeyTabEntry
e
=
new
KeyTabEntry
(
null
,
null
,
null
,
1
,
1
,
new
byte
[
8
]);
// "0x" plus eight "00"
if
(
e
.
getKeyString
().
length
()
!=
18
)
{
throw
new
Exception
(
"key bytes length not correct"
);
}
}
}
}
}
test/sun/tools/common/ApplicationSetup.sh
浏览文件 @
efdc7738
...
@@ -45,7 +45,11 @@ startApplication()
...
@@ -45,7 +45,11 @@ startApplication()
# "java" process.
# "java" process.
if
[
"
$OS
"
=
"Windows"
]
;
then
if
[
"
$OS
"
=
"Windows"
]
;
then
sleep
2
sleep
2
realpid
=
`
ps
-o
pid,ppid,comm|grep
${
pid
}
|grep
"java"
|cut
-c1-6
`
if
[
"
${
isCygwin
}
"
=
"true"
]
;
then
realpid
=
`
ps
-p
${
pid
}
|
tail
-1
|
awk
'{print $4;}'
`
else
realpid
=
`
ps
-o
pid,ppid,comm|grep
${
pid
}
|grep
"java"
|cut
-c1-6
`
fi
pid
=
${
realpid
}
pid
=
${
realpid
}
fi
fi
...
...
test/sun/tools/common/CommonSetup.sh
浏览文件 @
efdc7738
...
@@ -67,6 +67,11 @@ case "$OS" in
...
@@ -67,6 +67,11 @@ case "$OS" in
PS
=
";"
PS
=
";"
OS
=
"Windows"
OS
=
"Windows"
;;
;;
CYGWIN
*
)
PS
=
";"
OS
=
"Windows"
isCygwin
=
true
;;
*
)
*
)
PS
=
":"
PS
=
":"
;;
;;
...
...
test/sun/tools/jps/jps-help.sh
浏览文件 @
efdc7738
...
@@ -35,7 +35,7 @@ JPS="${TESTJAVA}/bin/jps"
...
@@ -35,7 +35,7 @@ JPS="${TESTJAVA}/bin/jps"
rm
-f
jps.out 2>/dev/null
rm
-f
jps.out 2>/dev/null
${
JPS
}
-?
>
jps.out 2>&1
${
JPS
}
-?
>
jps.out 2>&1
diff jps.out
${
TESTSRC
}
/usage.out
diff
-w
jps.out
${
TESTSRC
}
/usage.out
if
[
$?
!=
0
]
if
[
$?
!=
0
]
then
then
echo
"Output of jps -? differ from expected output. Failed."
echo
"Output of jps -? differ from expected output. Failed."
...
@@ -46,7 +46,7 @@ fi
...
@@ -46,7 +46,7 @@ fi
rm
-f
jps.out 2>/dev/null
rm
-f
jps.out 2>/dev/null
${
JPS
}
-help
>
jps.out 2>&1
${
JPS
}
-help
>
jps.out 2>&1
diff jps.out
${
TESTSRC
}
/usage.out
diff
-w
jps.out
${
TESTSRC
}
/usage.out
if
[
$?
!=
0
]
if
[
$?
!=
0
]
then
then
echo
"Output of jps -help differ from expected output. Failed."
echo
"Output of jps -help differ from expected output. Failed."
...
...
test/sun/tools/jstat/jstatHelp.sh
浏览文件 @
efdc7738
...
@@ -35,7 +35,7 @@ JSTAT="${TESTJAVA}/bin/jstat"
...
@@ -35,7 +35,7 @@ JSTAT="${TESTJAVA}/bin/jstat"
rm
-f
jstat.out 2>/dev/null
rm
-f
jstat.out 2>/dev/null
${
JSTAT
}
-?
>
jstat.out 2>&1
${
JSTAT
}
-?
>
jstat.out 2>&1
diff jstat.out
${
TESTSRC
}
/usage.out
diff
-w
jstat.out
${
TESTSRC
}
/usage.out
if
[
$?
!=
0
]
if
[
$?
!=
0
]
then
then
echo
"Output of jstat -? differ from expected output. Failed."
echo
"Output of jstat -? differ from expected output. Failed."
...
@@ -45,7 +45,7 @@ fi
...
@@ -45,7 +45,7 @@ fi
rm
-f
jstat.out 2>/dev/null
rm
-f
jstat.out 2>/dev/null
${
JSTAT
}
-help
>
jstat.out 2>&1
${
JSTAT
}
-help
>
jstat.out 2>&1
diff jstat.out
${
TESTSRC
}
/usage.out
diff
-w
jstat.out
${
TESTSRC
}
/usage.out
if
[
$?
!=
0
]
if
[
$?
!=
0
]
then
then
echo
"Output of jstat -help differ from expected output. Failed."
echo
"Output of jstat -help differ from expected output. Failed."
...
...
test/sun/tools/jstat/jstatOptions1.sh
浏览文件 @
efdc7738
...
@@ -35,4 +35,4 @@ JSTAT="${TESTJAVA}/bin/jstat"
...
@@ -35,4 +35,4 @@ JSTAT="${TESTJAVA}/bin/jstat"
rm
-f
jstat.out 2>/dev/null
rm
-f
jstat.out 2>/dev/null
${
JSTAT
}
-options
>
jstat.out 2>&1
${
JSTAT
}
-options
>
jstat.out 2>&1
diff jstat.out
${
TESTSRC
}
/options1.out
diff
-w
jstat.out
${
TESTSRC
}
/options1.out
test/sun/tools/jstatd/jstatdUsage1.sh
浏览文件 @
efdc7738
...
@@ -37,7 +37,7 @@ JSTATD_2_OUT="jstatd_$$_2.out"
...
@@ -37,7 +37,7 @@ JSTATD_2_OUT="jstatd_$$_2.out"
${
JSTATD
}
-?
>
${
JSTATD_1_OUT
}
2>&1
${
JSTATD
}
-?
>
${
JSTATD_1_OUT
}
2>&1
diff
${
JSTATD_1_OUT
}
${
TESTSRC
}
/usage.out
diff
-w
${
JSTATD_1_OUT
}
${
TESTSRC
}
/usage.out
if
[
$?
!=
0
]
if
[
$?
!=
0
]
then
then
echo
"Output of jstatd -? differs from expected output. Failed."
echo
"Output of jstatd -? differs from expected output. Failed."
...
@@ -46,7 +46,7 @@ fi
...
@@ -46,7 +46,7 @@ fi
${
JSTATD
}
-help
>
${
JSTATD_2_OUT
}
2>&1
${
JSTATD
}
-help
>
${
JSTATD_2_OUT
}
2>&1
diff
${
JSTATD_2_OUT
}
${
TESTSRC
}
/usage.out
diff
-w
${
JSTATD_2_OUT
}
${
TESTSRC
}
/usage.out
if
[
$?
!=
0
]
if
[
$?
!=
0
]
then
then
echo
"Output of jstatd -help differs from expected output. Failed."
echo
"Output of jstatd -help differs from expected output. Failed."
...
...
test/sun/tools/native2ascii/Native2AsciiTests.sh
浏览文件 @
efdc7738
...
@@ -32,7 +32,7 @@ if [ "${TESTSRC}" = "" ]; then TESTSRC=.; fi
...
@@ -32,7 +32,7 @@ if [ "${TESTSRC}" = "" ]; then TESTSRC=.; fi
if
[
"
${
TESTJAVA
}
"
=
""
]
;
then
TESTJAVA
=
$1
;
shift
;
fi
if
[
"
${
TESTJAVA
}
"
=
""
]
;
then
TESTJAVA
=
$1
;
shift
;
fi
case
`
uname
-s
`
in
case
`
uname
-s
`
in
Windows
*
)
OS
=
Windows
;;
Windows
*
|
CYGWIN
*
)
OS
=
Windows
;;
SunOS|Linux
)
OS
=
Unix
;;
SunOS|Linux
)
OS
=
Unix
;;
esac
esac
...
@@ -45,12 +45,14 @@ check() {
...
@@ -45,12 +45,14 @@ check() {
# Strip carriage returns from output when comparing with n2a test output
# Strip carriage returns from output when comparing with n2a test output
# on win32 systems
# on win32 systems
if
[
OS
=
Windows
]
;
then
if
[
${
OS
}
=
Windows
]
;
then
tr
-d
'\015'
<
$out
>
$out
.1
sed
-e
's@\\r@@g'
$out
>
$out
.1
sed
-e
's@\\r@@g'
$expected
>
$out
.expected
else
else
cp
$out
$out
.1
cp
$out
$out
.1
cp
$expected
$out
.expected
fi
fi
if
(
set
-x
;
diff
-c
$expected
$out
.1
)
;
then
if
(
set
-x
;
diff
-c
$
out
.
expected
$out
.1
)
;
then
echo
"
$bug
passed"
echo
"
$bug
passed"
else
else
echo
"
$bug
failed"
echo
"
$bug
failed"
...
...
test/tools/launcher/ChangeDataModel.sh
浏览文件 @
efdc7738
...
@@ -29,6 +29,9 @@
...
@@ -29,6 +29,9 @@
OS
=
`
uname
-s
`
;
OS
=
`
uname
-s
`
;
# To remove CR from output, needed for java apps in CYGWIN, harmless otherwise
SED_CR
=
"sed -e s@
\\
r@@g"
case
"
$OS
"
in
case
"
$OS
"
in
Windows
*
|
CYGWIN
*
)
Windows
*
|
CYGWIN
*
)
PATHSEP
=
";"
PATHSEP
=
";"
...
@@ -79,10 +82,10 @@ $JAVAC GetDataModel.java
...
@@ -79,10 +82,10 @@ $JAVAC GetDataModel.java
# Verify data model flag for default data model is accepted
# Verify data model flag for default data model is accepted
DM
=
`
$JAVA
GetDataModel
`
DM
=
`
$JAVA
GetDataModel
|
${
SED_CR
}
`
case
"
$DM
"
in
case
"
$DM
"
in
32
)
32
)
DM2
=
`
${
JAVA
}
-d32
GetDataModel
`
DM2
=
`
${
JAVA
}
-d32
GetDataModel
|
${
SED_CR
}
`
if
[
"
${
DM2
}
"
!=
"32"
]
if
[
"
${
DM2
}
"
!=
"32"
]
then
then
echo
"Data model flag -d32 not accepted or had improper effect."
echo
"Data model flag -d32 not accepted or had improper effect."
...
@@ -91,7 +94,7 @@ case "$DM" in
...
@@ -91,7 +94,7 @@ case "$DM" in
;;
;;
64
)
64
)
DM2
=
`
${
JAVA
}
-d64
GetDataModel
`
DM2
=
`
${
JAVA
}
-d64
GetDataModel
|
${
SED_CR
}
`
if
[
"
${
DM2
}
"
!=
"64"
]
if
[
"
${
DM2
}
"
!=
"64"
]
then
then
echo
"Data model flag -d64 not accepted or had improper effect."
echo
"Data model flag -d64 not accepted or had improper effect."
...
@@ -227,10 +230,10 @@ then
...
@@ -227,10 +230,10 @@ then
else
else
# Negative tests for non-dual mode platforms to ensure the other data model is
# Negative tests for non-dual mode platforms to ensure the other data model is
# rejected
# rejected
DM
=
`
$JAVA
GetDataModel
`
DM
=
`
$JAVA
GetDataModel
|
${
SED_CR
}
`
case
"
$DM
"
in
case
"
$DM
"
in
32
)
32
)
DM2
=
`
${
JAVA
}
-d64
GetDataModel
`
DM2
=
`
${
JAVA
}
-d64
GetDataModel
|
${
SED_CR
}
`
if
[
"x
${
DM2
}
"
!=
"x"
]
if
[
"x
${
DM2
}
"
!=
"x"
]
then
then
echo
"Data model flag -d64 was accepted."
echo
"Data model flag -d64 was accepted."
...
@@ -239,7 +242,7 @@ else
...
@@ -239,7 +242,7 @@ else
;;
;;
64
)
64
)
DM2
=
`
${
JAVA
}
-d32
GetDataModel
`
DM2
=
`
${
JAVA
}
-d32
GetDataModel
|
${
SED_CR
}
`
if
[
"x
${
DM2
}
"
!=
"x"
]
if
[
"x
${
DM2
}
"
!=
"x"
]
then
then
echo
"Data model flag -d32 was accepted."
echo
"Data model flag -d32 was accepted."
...
...
test/tools/launcher/ClassPathWildCard.sh
浏览文件 @
efdc7738
...
@@ -145,7 +145,7 @@ CreateClassFiles D
...
@@ -145,7 +145,7 @@ CreateClassFiles D
OS
=
`
uname
-s
`
OS
=
`
uname
-s
`
case
$OS
in
case
$OS
in
Windows
*
|
C
ygwin
*
)
Windows
*
|
C
YGWIN
*
)
PATHSEP
=
";"
PATHSEP
=
";"
ExecJava
""
"
${
PATHSEP
}
NOOPDIR"
ExecJava
""
"
${
PATHSEP
}
NOOPDIR"
ExecJava
"w"
"
${
PATHSEP
}
NOOPDIR"
ExecJava
"w"
"
${
PATHSEP
}
NOOPDIR"
...
...
test/tools/launcher/DefaultLocaleTest.sh
浏览文件 @
efdc7738
...
@@ -48,7 +48,7 @@ fi
...
@@ -48,7 +48,7 @@ fi
OS
=
`
uname
`
OS
=
`
uname
`
case
"
$OS
"
in
case
"
$OS
"
in
Windows
*
|
CYGWIN
*
)
Windows
*
)
JAVAC
=
"
${
TESTJAVA
}
/bin/javac -d . "
JAVAC
=
"
${
TESTJAVA
}
/bin/javac -d . "
JAVA
=
"
${
TESTJAVA
}
/bin/java -classpath . "
JAVA
=
"
${
TESTJAVA
}
/bin/java -classpath . "
JAVAW
=
"
${
TESTJAVA
}
/bin/javaw -classpath . "
JAVAW
=
"
${
TESTJAVA
}
/bin/javaw -classpath . "
...
@@ -64,6 +64,22 @@ case "$OS" in
...
@@ -64,6 +64,22 @@ case "$OS" in
echo
"Test passes"
echo
"Test passes"
exit
0
exit
0
;;
;;
CYGWIN
*
)
JAVAC
=
"
${
TESTJAVA
}
/bin/javac -d . "
JAVA
=
"
${
TESTJAVA
}
/bin/java -classpath . "
JAVAW
=
"
${
TESTJAVA
}
/bin/javaw -classpath . "
${
JAVAC
}
${
TESTSRC
}
/DefaultLocaleTest.java
${
JAVA
}
DefaultLocaleTest |
sed
-e
s@
\\
r@@g
>
x.out
${
JAVAW
}
DefaultLocaleTest
`
cat
x.out
`
if
[
$?
-ne
0
]
then
echo
"Test fails"
exit
1
fi
echo
"Test passes"
exit
0
;;
*
)
*
)
echo
"Non-windows environment; test vacuously succeeds."
echo
"Non-windows environment; test vacuously succeeds."
exit
0
;
exit
0
;
...
...
test/tools/launcher/UnicodeTest.sh
浏览文件 @
efdc7738
...
@@ -54,7 +54,7 @@ mkdir UnicodeTest-src UnicodeTest-classes
...
@@ -54,7 +54,7 @@ mkdir UnicodeTest-src UnicodeTest-classes
echo
"creating test source files"
echo
"creating test source files"
"
$JAVAC
"
-d
.
"
${
TESTSRC
}
"
/UnicodeTest.java
"
$JAVAC
"
-d
.
"
${
TESTSRC
}
"
/UnicodeTest.java
CLASS_NAME
=
`
"
$JAVA
"
UnicodeTest
`
CLASS_NAME
=
`
"
$JAVA
"
UnicodeTest
|
sed
-e
's@\\r@@g'
`
if
[
"
$CLASS_NAME
"
=
""
]
if
[
"
$CLASS_NAME
"
=
""
]
then
then
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录