diff --git a/jdk/make/Bundles.gmk b/jdk/make/Bundles.gmk
deleted file mode 100644
index 470a1e9bfb5..00000000000
--- a/jdk/make/Bundles.gmk
+++ /dev/null
@@ -1,137 +0,0 @@
-#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. 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. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-include $(SPEC)
-include MakeBase.gmk
-
-default: bundles
-
-# Only macosx has bundles defined.
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-
- bundles: jre-bundle jdk-bundle
-
- # JDK_BUNDLE_DIR and JRE_BUNDLE_DIR are defined in SPEC.
-
- MACOSX_PLIST_SRC := $(JDK_TOPDIR)/make/data/bundle
-
- # All these OPENJDK checks are needed since there is no coherency between
- # these values in open and closed. Should probably be fixed.
- ifndef OPENJDK
- BUNDLE_ID := $(MACOSX_BUNDLE_ID_BASE).$(JDK_MINOR_VERSION)u$(JDK_UPDATE_VERSION)
- else
- BUNDLE_ID := $(MACOSX_BUNDLE_ID_BASE)
- endif
- BUNDLE_ID_JRE := $(BUNDLE_ID).jre
- BUNDLE_ID_JDK := $(BUNDLE_ID).jdk
-
- BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(JDK_MINOR_VERSION)
- BUNDLE_NAME_JRE := $(BUNDLE_NAME)
- BUNDLE_NAME_JDK := $(BUNDLE_NAME)
-
- ifndef OPENJDK
- BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) $(JDK_VERSION)
- else
- BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) ($(JDK_VERSION))
- endif
- BUNDLE_INFO_JRE := $(BUNDLE_INFO)
- BUNDLE_INFO_JDK := $(BUNDLE_INFO)
-
- BUNDLE_PLATFORM_VERSION := $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION)
- BUNDLE_VERSION := $(JDK_VERSION)
- ifeq ($(COMPANY_NAME), N/A)
- BUNDLE_VENDOR := UNDEFINED
- else
- BUNDLE_VENDOR := $(COMPANY_NAME)
- endif
-
-
- JDK_FILE_LIST := $(shell $(FIND) $(JDK_IMAGE_DIR))
- JRE_FILE_LIST := $(shell $(FIND) $(JRE_IMAGE_DIR))
-
- JDK_TARGET_LIST := $(subst $(JDK_IMAGE_DIR)/,$(JDK_BUNDLE_DIR)/Home/,$(JDK_FILE_LIST))
- JRE_TARGET_LIST := $(subst $(JRE_IMAGE_DIR)/,$(JRE_BUNDLE_DIR)/Home/,$(JRE_FILE_LIST))
-
- # Copy empty directories (jre/lib/applet).
- $(JDK_BUNDLE_DIR)/Home/%: $(JDK_IMAGE_DIR)/%
- $(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(MKDIR) -p $(@D)
- if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -P '$<' '$@'; fi
-
- $(JRE_BUNDLE_DIR)/Home/%: $(JRE_IMAGE_DIR)/%
- $(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(MKDIR) -p $(@D)
- if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -P '$<' '$@'; fi
-
- $(JDK_BUNDLE_DIR)/MacOS/libjli.dylib:
- $(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(MKDIR) -p $(@D)
- $(RM) $@
- $(LN) -s ../Home/jre/lib/jli/libjli.dylib $@
-
- $(JRE_BUNDLE_DIR)/MacOS/libjli.dylib:
- $(ECHO) Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(MKDIR) -p $(@D)
- $(RM) $@
- $(LN) -s ../Home/lib/jli/libjli.dylib $@
-
- $(JDK_BUNDLE_DIR)/Info.plist: $(SPEC)
- $(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(MKDIR) -p $(@D)
- $(SED) -e "s/@@ID@@/$(BUNDLE_ID_JDK)/g" \
- -e "s/@@NAME@@/$(BUNDLE_NAME_JDK)/g" \
- -e "s/@@INFO@@/$(BUNDLE_INFO_JDK)/g" \
- -e "s/@@PLATFORM_VERSION@@/$(BUNDLE_PLATFORM_VERSION)/g" \
- -e "s/@@VERSION@@/$(BUNDLE_VERSION)/g" \
- -e "s/@@VENDOR@@/$(BUNDLE_VENDOR)/g" \
- < $(MACOSX_PLIST_SRC)/JDK-Info.plist > $@
-
- $(JRE_BUNDLE_DIR)/Info.plist: $(SPEC)
- $(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(MKDIR) -p $(@D)
- $(SED) -e "s/@@ID@@/$(BUNDLE_ID_JRE)/g" \
- -e "s/@@NAME@@/$(BUNDLE_NAME_JRE)/g" \
- -e "s/@@INFO@@/$(BUNDLE_INFO_JRE)/g" \
- -e "s/@@PLATFORM_VERSION@@/$(BUNDLE_PLATFORM_VERSION)/g" \
- -e "s/@@VERSION@@/$(BUNDLE_VERSION)/g" \
- -e "s/@@VENDOR@@/$(BUNDLE_VENDOR)/g" \
- < $(MACOSX_PLIST_SRC)/JRE-Info.plist > $@
-
- jdk-bundle: $(JDK_TARGET_LIST) $(JDK_BUNDLE_DIR)/MacOS/libjli.dylib \
- $(JDK_BUNDLE_DIR)/Info.plist
- $(SETFILE) -a B $(dir $(JDK_BUNDLE_DIR))
-
- jre-bundle: $(JRE_TARGET_LIST) $(JRE_BUNDLE_DIR)/MacOS/libjli.dylib \
- $(JRE_BUNDLE_DIR)/Info.plist
- $(SETFILE) -a B $(dir $(JRE_BUNDLE_DIR))
-
-else # Not macosx
-
- bundles:
- $(ECHO) "No bundles defined for $(OPENJDK_TARGET_OS)"
-
-endif # macosx
-
-.PHONY: jdk-bundle jre-bundle bundles
diff --git a/jdk/make/CompileDemos.gmk b/jdk/make/CompileDemos.gmk
index b82548edb7a..040492a3c00 100644
--- a/jdk/make/CompileDemos.gmk
+++ b/jdk/make/CompileDemos.gmk
@@ -53,7 +53,7 @@ define SetupAppletDemo
$$(eval $$(call SetupJavaCompilation,BUILD_DEMO_APPLET_$1, \
SETUP := GENERATE_USINGJDKBYTECODE, \
SRC := $(JDK_TOPDIR)/src/$3demo/share/applets/$1, \
- BIN := $(JDK_OUTPUTDIR)/demo/applets/$1, \
+ BIN := $(SUPPORT_OUTPUTDIR)/demo/image/applets/$1, \
COPY := .html .java .xyz .obj .au .gif, \
DISABLE_SJAVAC := $2))
BUILD_DEMOS += $$(BUILD_DEMO_APPLET_$1)
@@ -118,27 +118,27 @@ define SetupDemo
SETUP := GENERATE_USINGJDKBYTECODE, \
ADD_JAVAC_FLAGS := $3, \
SRC := $$($1_MAIN_SRC) $5, \
- BIN := $(JDK_OUTPUTDIR)/democlasses/$2/$1, \
+ BIN := $(SUPPORT_OUTPUTDIR)/demo/classes/$2/$1, \
COPY := $(PATTERNS_TO_COPY) $(10), \
- JAR := $(JDK_OUTPUTDIR)/demo/$2/$1/$$($1_JARFILE), \
+ JAR := $(SUPPORT_OUTPUTDIR)/demo/image/$2/$1/$$($1_JARFILE), \
JARMAIN := $4, \
MANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf, \
EXTRA_MANIFEST_ATTR := $(11), \
- SRCZIP := $(JDK_OUTPUTDIR)/demo/$2/$1/src.zip, \
+ SRCZIP := $(SUPPORT_OUTPUTDIR)/demo/image/$2/$1/src.zip, \
EXCLUDE_FILES := $9, \
DISABLE_SJAVAC := $(12)))
BUILD_DEMOS += $$(BUILD_DEMO_$1) \
- $(JDK_OUTPUTDIR)/demo/$2/$1/$$($1_JARFILE) \
- $(JDK_OUTPUTDIR)/demo/$2/$1/src.zip
+ $(SUPPORT_OUTPUTDIR)/demo/image/$2/$1/$$($1_JARFILE) \
+ $(SUPPORT_OUTPUTDIR)/demo/image/$2/$1/src.zip
endif
# Copy files.
$1_COPY_TARGETS := $$(patsubst $$($1_SRC_BASE)/%, \
- $(JDK_OUTPUTDIR)/demo/$2/$1/%, \
+ $(SUPPORT_OUTPUTDIR)/demo/image/$2/$1/%, \
$$(wildcard $$(addprefix $$($1_SRC_BASE)/, $7)))
ifneq ($7, )
- $(JDK_OUTPUTDIR)/demo/$2/$1/%: $$($1_SRC_BASE)/%
+ $(SUPPORT_OUTPUTDIR)/demo/image/$2/$1/%: $$($1_SRC_BASE)/%
$$(call install-file)
$(CHMOD) -f ug+w $$@
@@ -148,20 +148,20 @@ define SetupDemo
endef
$(eval $(call SetupDemo,CodePointIM,jfc,,CodePointIM,,,*.html))
-$(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services: \
- $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar \
+$(SUPPORT_OUTPUTDIR)/demo/image/jfc/CodePointIM/_the.services: \
+ $(SUPPORT_OUTPUTDIR)/demo/image/jfc/CodePointIM/CodePointIM.jar \
$(DEMO_SHARE_SRC)/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor
- (cd $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM && \
+ (cd $(SUPPORT_OUTPUTDIR)/demo/image/jfc/CodePointIM && \
$(MKDIR) -p _the.tmp/META-INF/services && \
$(CP) $(DEMO_SHARE_SRC)/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor _the.tmp/META-INF/services && \
cd ./_the.tmp && \
- $(JAR) uf $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar META-INF/services/java.awt.im.spi.InputMethodDescriptor && \
+ $(JAR) uf $(SUPPORT_OUTPUTDIR)/demo/image/jfc/CodePointIM/CodePointIM.jar META-INF/services/java.awt.im.spi.InputMethodDescriptor && \
cd ./META-INF/services && \
- $(JAR) uf $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar java.awt.im.spi.InputMethodDescriptor)
- $(RM) -r $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.tmp
+ $(JAR) uf $(SUPPORT_OUTPUTDIR)/demo/image/jfc/CodePointIM/CodePointIM.jar java.awt.im.spi.InputMethodDescriptor)
+ $(RM) -r $(SUPPORT_OUTPUTDIR)/demo/image/jfc/CodePointIM/_the.tmp
$(TOUCH) $@
-BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services
+BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/jfc/CodePointIM/_the.services
ifneq ($(OPENJDK_TARGET_OS), solaris)
$(eval $(call SetupDemo,MoleculeViewer,applets,,XYZChemModel,,,example*.html *.java))
@@ -192,10 +192,10 @@ ifndef OPENJDK
SplashScreen-Image: resources/images/splash.png,true))
BUILD_DEMOS += $(patsubst $(DEMO_CLOSED_SHARE_SRC)/nbproject/%, \
- $(JDK_OUTPUTDIR)/demo/nbproject/%, \
+ $(SUPPORT_OUTPUTDIR)/demo/image/nbproject/%, \
$(call CacheFind, $(DEMO_CLOSED_SHARE_SRC)/nbproject))
- $(JDK_OUTPUTDIR)/demo/nbproject/%: $(DEMO_CLOSED_SHARE_SRC)/nbproject/%
+ $(SUPPORT_OUTPUTDIR)/demo/image/nbproject/%: $(DEMO_CLOSED_SHARE_SRC)/nbproject/%
$(call install-file)
$(CHMOD) -f ug+w $@
endif
@@ -266,16 +266,16 @@ define SetupJVMTIDemo
-D "JDK_FNAME=$1.dll" \
-D "JDK_INTERNAL_NAME=$1" \
-D "JDK_FTYPE=0x2L", \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/demoobjs/jvmti/$1, \
- OUTPUT_DIR := $(JDK_OUTPUTDIR)/demo/jvmti/$1/lib, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/demo/native/jvmti/$1, \
+ OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/lib, \
LIBRARY := $1))
$$(eval $$(call SetupZipArchive,BUILD_DEMO_JVMTI_SRC_$1, \
SRC := $(DEMO_SHARE_SRC)/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC), \
EXCLUDE_FILES := $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC_EXCLUDE), \
- ZIP := $(JDK_OUTPUTDIR)/demo/jvmti/$1/src.zip))
+ ZIP := $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/src.zip))
- $(JDK_OUTPUTDIR)/demo/jvmti/$1/README.txt: $(DEMO_SHARE_SRC)/jvmti/$1/README.txt
+ $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/README.txt: $(DEMO_SHARE_SRC)/jvmti/$1/README.txt
$$(call install-file)
$(CHMOD) -f ug+w $$@
@@ -283,30 +283,30 @@ define SetupJVMTIDemo
$$(eval $$(call SetupJavaCompilation,BUILD_DEMO_JVMTI_$1_JAVA, \
SETUP := GENERATE_USINGJDKBYTECODE, \
SRC := $(DEMO_SHARE_SRC)/jvmti/$1, \
- BIN := $(JDK_OUTPUTDIR)/democlasses/jvmti/$1, \
+ BIN := $(SUPPORT_OUTPUTDIR)/demo/classes/jvmti/$1, \
COPY := $(PATTERNS_TO_COPY), \
- JAR := $(JDK_OUTPUTDIR)/demo/jvmti/$1/$1.jar, \
+ JAR := $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/$1.jar, \
EXTRA_MANIFEST_ATTR := Main-Class: \n, \
MANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf))
- BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jvmti/$1/$1.jar
+ BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/$1.jar
endif
BUILD_DEMOS += $$(BUILD_DEMO_JVMTI_$1) \
- $(JDK_OUTPUTDIR)/demo/jvmti/$1/src.zip \
- $(JDK_OUTPUTDIR)/demo/jvmti/$1/README.txt
+ $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/src.zip \
+ $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/README.txt
ifeq ($(OPENJDK_TARGET_OS), windows)
# These files normally end up in OBJECT_DIR but for demos they
# are supposed to be included in the distro.
- $(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.lib: $$(BUILD_DEMO_JVMTI_$1)
- $(CP) $(JDK_OUTPUTDIR)/demoobjs/jvmti/$1/$1.lib $$@
+ $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/lib/$1.lib: $$(BUILD_DEMO_JVMTI_$1)
+ $(CP) $(SUPPORT_OUTPUTDIR)/demo/native/jvmti/$1/$1.lib $$@
- $(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.exp: $$(BUILD_DEMO_JVMTI_$1)
- $(CP) $(JDK_OUTPUTDIR)/demoobjs/jvmti/$1/$1.exp $$@
+ $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/lib/$1.exp: $$(BUILD_DEMO_JVMTI_$1)
+ $(CP) $(SUPPORT_OUTPUTDIR)/demo/native/jvmti/$1/$1.exp $$@
- BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.lib \
- $(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.exp
+ BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/lib/$1.lib \
+ $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/lib/$1.exp
endif
endef
@@ -321,95 +321,97 @@ $(eval $(call SetupJVMTIDemo,versionCheck, agent_util))
##################################################################################################
-$(JDK_OUTPUTDIR)/demo/management/index.html: $(DEMO_SHARE_SRC)/management/index.html
+$(SUPPORT_OUTPUTDIR)/demo/image/management/index.html: $(DEMO_SHARE_SRC)/management/index.html
$(call install-file)
$(CHMOD) -f ug+w $@
-$(JDK_OUTPUTDIR)/demo/jvmti/index.html: $(DEMO_SHARE_SRC)/jvmti/index.html
+$(SUPPORT_OUTPUTDIR)/demo/image/jvmti/index.html: $(DEMO_SHARE_SRC)/jvmti/index.html
$(call install-file)
$(CHMOD) -f ug+w $@
-BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/management/index.html \
- $(JDK_OUTPUTDIR)/demo/jvmti/index.html
+BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/management/index.html \
+ $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/index.html
##################################################################################################
# The netbeans project files are copied into the demo directory.
ifeq ($(OPENJDK_TARGET_OS), solaris)
BUILD_DEMOS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \
- $(JDK_OUTPUTDIR)/demo/nbproject/%, \
+ $(SUPPORT_OUTPUTDIR)/demo/image/nbproject/%, \
$(filter-out $(DEMO_SHARE_SRC)/nbproject/jfc/SwingApplet%, \
$(call CacheFind, $(DEMO_SHARE_SRC)/nbproject)))
else
BUILD_DEMOS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \
- $(JDK_OUTPUTDIR)/demo/nbproject/%, \
+ $(SUPPORT_OUTPUTDIR)/demo/image/nbproject/%, \
$(call CacheFind, $(DEMO_SHARE_SRC)/nbproject))
endif
-$(JDK_OUTPUTDIR)/demo/nbproject/%: $(DEMO_SHARE_SRC)/nbproject/%
+$(SUPPORT_OUTPUTDIR)/demo/image/nbproject/%: $(DEMO_SHARE_SRC)/nbproject/%
$(call install-file)
$(CHMOD) -f ug+w $@
##################################################################################################
-$(JDK_OUTPUTDIR)/demo/README: $(DEMO_SHARE_SRC)/README
+$(SUPPORT_OUTPUTDIR)/demo/image/README: $(DEMO_SHARE_SRC)/README
$(call install-file)
-BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/README
+BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/README
##################################################################################################
ifeq ($(OPENJDK_TARGET_OS), solaris)
- $(JDK_OUTPUTDIR)/democlasses/jni/Poller/%: $(DEMO_SOLARIS_SRC)/jni/Poller/%
+ $(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller/%: $(DEMO_SOLARIS_SRC)/jni/Poller/%
$(call install-file)
$(CHMOD) -f ug+w $@
- $(JDK_OUTPUTDIR)/demo/jni/Poller/README.txt: $(DEMO_SOLARIS_SRC)/jni/Poller/README.txt
+ $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/README.txt: $(DEMO_SOLARIS_SRC)/jni/Poller/README.txt
$(call install-file)
$(CHMOD) -f ug+w $@
- $(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar: \
- $(JDK_OUTPUTDIR)/democlasses/jni/Poller/README.txt $(JDK_OUTPUTDIR)/democlasses/jni/Poller/Poller.c
+ $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/Poller.jar: \
+ $(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller/README.txt \
+ $(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller/Poller.c
$(eval $(call SetupJavaCompilation,BUILD_DEMO_POLLER_JAR, \
SETUP := GENERATE_USINGJDKBYTECODE, \
SRC := $(DEMO_SOLARIS_SRC)/jni/Poller, \
- BIN := $(JDK_OUTPUTDIR)/democlasses/jni/Poller, \
- HEADERS := $(JDK_OUTPUTDIR)/democlasses/jni/Poller, \
- JAR := $(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar, \
+ BIN := $(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller, \
+ HEADERS := $(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller, \
+ JAR := $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/Poller.jar, \
MANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf, \
- SRCZIP := $(JDK_OUTPUTDIR)/demo/jni/Poller/src.zip, \
+ SRCZIP := $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/src.zip, \
COPY := README.txt Poller.c, \
JARMAIN := Client))
- BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar $(JDK_OUTPUTDIR)/demo/jni/Poller/src.zip \
- $(JDK_OUTPUTDIR)/demo/jni/Poller/README.txt
+ BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/Poller.jar \
+ $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/src.zip \
+ $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/README.txt
$(eval $(call SetupNativeCompilation,BUILD_LIBPOLLER, \
SRC := $(DEMO_SOLARIS_SRC)/jni/Poller, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(SHARED_LIBRARY_FLAGS) \
- -I$(JDK_OUTPUTDIR)/democlasses/jni/Poller, \
+ -I$(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller, \
LDFLAGS := $(LDFLAGS_JDKLIB), \
LDFLAGS_SUFFIX_solaris := -lc, \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/demoobjs/jni/Poller, \
- OUTPUT_DIR := $(JDK_OUTPUTDIR)/demoobjs, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/demo/native/jni/Poller, \
+ OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/demo/native, \
LIBRARY := Poller))
#
# We can only compile native code after jar has been build (since we depend on generated .h files)
#
- $(JDK_OUTPUTDIR)/demoobjs/jni/Poller/Poller.o: $(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar
+ $(SUPPORT_OUTPUTDIR)/demo/native/jni/Poller/Poller.o: $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/Poller.jar
- $(JDK_OUTPUTDIR)/demo/jni/Poller/lib/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX): \
- $(JDK_OUTPUTDIR)/demoobjs/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX)
+ $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/lib/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX): \
+ $(SUPPORT_OUTPUTDIR)/demo/native/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX)
$(call install-file)
- BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jni/Poller/lib/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX)
+ BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/lib/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX)
endif
@@ -419,22 +421,22 @@ ifndef OPENJDK
DB_ZIP_DIR := $(wildcard $(JDK_TOPDIR)/src/closed/db)
DB_DEMO_ZIPFILE := $(wildcard $(DB_ZIP_DIR)/*.zip)
- $(JDK_OUTPUTDIR)/demo/_the.db.unzipped: $(DB_DEMO_ZIPFILE)
+ $(SUPPORT_OUTPUTDIR)/demo/image/_the.db.unzipped: $(DB_DEMO_ZIPFILE)
$(MKDIR) -p $(@D)
- $(RM) -r $(JDK_OUTPUTDIR)/demo/db $(JDK_OUTPUTDIR)/demo/demo
- $(CD) $(JDK_OUTPUTDIR)/demo && $(UNZIP) -q -o $<
- $(MV) $(JDK_OUTPUTDIR)/demo/db-derby-*-bin/demo $(JDK_OUTPUTDIR)/demo/db
- $(CD) $(JDK_OUTPUTDIR)/demo && $(RM) -r db-derby-*-bin
+ $(RM) -r $(SUPPORT_OUTPUTDIR)/demo/image/db $(SUPPORT_OUTPUTDIR)/demo/image/demo
+ $(CD) $(SUPPORT_OUTPUTDIR)/demo/image && $(UNZIP) -q -o $<
+ $(MV) $(SUPPORT_OUTPUTDIR)/demo/image/db-derby-*-bin/demo $(SUPPORT_OUTPUTDIR)/demo/image/db
+ $(CD) $(SUPPORT_OUTPUTDIR)/demo/image && $(RM) -r db-derby-*-bin
$(TOUCH) $@
# Copy this after the unzip above to avoid race with directory creation and mv command.
- $(JDK_OUTPUTDIR)/demo/db/README-JDK-DEMOS.html: \
+ $(SUPPORT_OUTPUTDIR)/demo/image/db/README-JDK-DEMOS.html: \
$(DB_ZIP_DIR)/README-JDK-DEMOS.html \
- | $(JDK_OUTPUTDIR)/demo/_the.db.unzipped
+ | $(SUPPORT_OUTPUTDIR)/demo/image/_the.db.unzipped
$(MKDIR) -p $(@D)
$(CAT) $< | $(SED) "s/XXXX/$(shell cat $(DB_ZIP_DIR)/COPYRIGHTYEAR)/" > $@
- BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/_the.db.unzipped $(JDK_OUTPUTDIR)/demo/db/README-JDK-DEMOS.html
+ BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/_the.db.unzipped $(SUPPORT_OUTPUTDIR)/demo/image/db/README-JDK-DEMOS.html
endif
##################################################################################################
diff --git a/jdk/make/CompileInterimRmic.gmk b/jdk/make/CompileInterimRmic.gmk
index 79082cd415c..003a4af73e7 100644
--- a/jdk/make/CompileInterimRmic.gmk
+++ b/jdk/make/CompileInterimRmic.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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
@@ -45,7 +45,7 @@ $(eval $(call SetupJavaCompilation,BUILD_INTERIM_RMIC, \
SETUP := GENERATE_OLDBYTECODE, \
SRC := $(JDK_TOPDIR)/src/jdk.rmic/share/classes, \
INCLUDES := $(RMIC_PKGS), \
- BIN := $(JDK_OUTPUTDIR)/interim_rmic_classes, \
+ BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_rmic_classes, \
COPY := .properties, \
JAVAC_SOURCE_PATH_OVERRIDE := $(addprefix $(JDK_TOPDIR)/src/jdk.rmic/share/classes/, $(RMIC_PKGS))))
diff --git a/jdk/make/CopySamples.gmk b/jdk/make/CopySamples.gmk
index 3323e71a63a..37a1d21ebce 100644
--- a/jdk/make/CopySamples.gmk
+++ b/jdk/make/CopySamples.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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
@@ -28,7 +28,7 @@ default: all
include $(SPEC)
include MakeBase.gmk
-SAMPLE_TARGET_DIR := $(JDK_OUTPUTDIR)/sample
+SAMPLE_TARGET_DIR := $(SUPPORT_OUTPUTDIR)/sample
SAMPLE_SOURCE_DIR := $(JDK_TOPDIR)/src/sample/share
SAMPLE_CLOSED_SOURCE_DIR := $(JDK_TOPDIR)/src/closed/sample/share
SAMPLE_SOLARIS_SOURCE_DIR := $(JDK_TOPDIR)/src/sample/solaris
diff --git a/jdk/make/CreateJars.gmk b/jdk/make/CreateJars.gmk
deleted file mode 100644
index 568eeb2e0f3..00000000000
--- a/jdk/make/CreateJars.gmk
+++ /dev/null
@@ -1,795 +0,0 @@
-#
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-include $(SPEC)
-include MakeBase.gmk
-include JavaCompilation.gmk
-
-default: all
-
-include Tools.gmk
-
-JDK_OUT_CLASSES := $(wildcard $(JDK_OUTPUTDIR)/modules/*)
-$(eval $(call FillCacheFind, $(JDK_OUT_CLASSES)))
-
-include Profiles.gmk
-
-#
-# This makefile...so that altering will trigger rebuilding include/exclude-lists => jars
-#
-MAKEFILE = $(JDK_TOPDIR)/make/CreateJars.gmk
-#
-# And similarly for the Profiles
-PROFILE_MAKEFILES = $(JDK_TOPDIR)/make/Profiles.gmk $(JDK_TOPDIR)/make/profile-rtjar-includes.txt
-
-MAINMANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf
-BEANMANIFEST := $(JDK_TOPDIR)/make/data/swingbeaninfo/manifest.mf
-
-$(eval $(call MakeDir, $(IMAGES_OUTPUTDIR)/lib))
-
-##########################################################################################
-
-$(eval $(call SetupArchive,BUILD_JCONSOLE_JAR, , \
- SRCS := $(JDK_OUTPUTDIR)/modules/jdk.jconsole, \
- SUFFIXES := .class .gif .png .properties, \
- INCLUDES := sun/tools/jconsole com/sun/tools/jconsole, \
- JARMAIN := sun.tools.jconsole.JConsole, \
- JAR := $(IMAGES_OUTPUTDIR)/lib/jconsole.jar, \
- SKIP_METAINF := true))
-
-
-##########################################################################################
-
-$(eval $(call SetupArchive,BUILD_DNS_JAR, , \
- SRCS := $(JDK_OUTPUTDIR)/modules/jdk.naming.dns, \
- INCLUDES := sun/net/spi/nameservice/dns, \
- EXTRA_FILES := META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor, \
- JAR := $(IMAGES_OUTPUTDIR)/lib/ext/dnsns.jar, \
- SKIP_METAINF := true))
-
-
-##########################################################################################
-
-LOCALEDATA_INCLUDE_LOCALES := ar be bg ca cs da de el es et fi fr ga hi hr hu in is it \
- iw ja ko lt lv mk ms mt nl no pl pt ro ru sk sl sq sr sv \
- th tr uk vi zh
-
-LOCALEDATA_INCLUDES := sun/util/resources/provider/NonEnLocaleDataMetaInfo.class
-LOCALEDATA_INCLUDES += $(addprefix sun/text/resources/, $(LOCALEDATA_INCLUDE_LOCALES)) \
- $(addprefix sun/util/resources/, $(LOCALEDATA_INCLUDE_LOCALES))
-
-LOCALEDATA_SERVICES_DIR := $(IMAGES_OUTPUTDIR)/localemetainfo
-
-LOCALEDATA_METAINF_SERVICES := $(LOCALEDATA_SERVICES_DIR)/META-INF/services/sun.util.locale.provider.LocaleDataMetaInfo
-
-$(LOCALEDATA_METAINF_SERVICES): $(JDK_TOPDIR)/src/jdk.localedata/META-INF/localedata-services/sun.util.locale.provider.LocaleDataMetaInfo
- $(install-file)
-
-$(eval $(call SetupArchive,BUILD_LOCALEDATA_JAR, \
- $(LOCALEDATA_METAINF_SERVICES), \
- SRCS := $(JDK_OUTPUTDIR)/modules/jdk.localedata \
- $(LOCALEDATA_SERVICES_DIR), \
- SUFFIXES := .class _dict _th, \
- INCLUDES := $(LOCALEDATA_INCLUDES), \
- EXTRA_FILES := META-INF/services/sun.util.locale.provider.LocaleDataMetaInfo, \
- JAR := $(IMAGES_OUTPUTDIR)/lib/ext/localedata.jar, \
- SKIP_METAINF := true))
-
-##########################################################################################
-#
-# Different variants of rt.jar are built based on the current profile. The output
-# directory is augmented with the profile name so that the final jar file and all the
-# intermediary list files will be in directory. This has the form lib$PROFILE rather than
-# lib/$PROFILE so that it won't get copied as part of the image generation process.
-# Each profile customizes the RT_JAR_EXCLUDES variable.
-#
-##########################################################################################
-
-# Full JRE exclude list for rt.jar and resources.jar
-# This value should exclude types destined for jars other than rt.jar and resources.jar.
-# When building a Profile this value augments the profile specific exclusions
-RT_JAR_EXCLUDES += \
- com/oracle/security/ucrypto \
- com/sun/codemodel \
- com/sun/crypto/provider \
- com/sun/istack/internal/tools \
- com/sun/jarsigner \
- com/sun/java/accessibility \
- com/sun/javadoc \
- com/sun/jdi \
- com/sun/net/ssl/internal/ssl \
- com/sun/source \
- com/sun/tools \
- com/sun/xml/internal/dtdparser \
- com/sun/xml/internal/rngom \
- com/sun/xml/internal/xsom \
- javax/crypto \
- javax/swing/AbstractButtonBeanInfo.class \
- javax/swing/beaninfo \
- javax/swing/BoxBeanInfo.class \
- javax/swing/JAppletBeanInfo.class \
- javax/swing/JButtonBeanInfo.class \
- javax/swing/JCheckBoxBeanInfo.class \
- javax/swing/JCheckBoxMenuItemBeanInfo.class \
- javax/swing/JColorChooserBeanInfo.class \
- javax/swing/JComboBoxBeanInfo.class \
- javax/swing/JComponentBeanInfo.class \
- javax/swing/JDesktopPaneBeanInfo.class \
- javax/swing/JDialogBeanInfo.class \
- javax/swing/JEditorPaneBeanInfo.class \
- javax/swing/JFileChooserBeanInfo.class \
- javax/swing/JFormattedTextFieldBeanInfo.class \
- javax/swing/JFrameBeanInfo.class \
- javax/swing/JInternalFrameBeanInfo.class \
- javax/swing/JLabelBeanInfo.class \
- javax/swing/JLayeredPaneBeanInfo.class \
- javax/swing/JListBeanInfo.class \
- javax/swing/JMenuBarBeanInfo.class \
- javax/swing/JMenuBeanInfo.class \
- javax/swing/JMenuItemBeanInfo.class \
- javax/swing/JOptionPaneBeanInfo.class \
- javax/swing/JPanelBeanInfo.class \
- javax/swing/JPasswordFieldBeanInfo.class \
- javax/swing/JPopupMenuBeanInfo.class \
- javax/swing/JProgressBarBeanInfo.class \
- javax/swing/JRadioButtonBeanInfo.class \
- javax/swing/JRadioButtonMenuItemBeanInfo.class \
- javax/swing/JScrollBarBeanInfo.class \
- javax/swing/JScrollPaneBeanInfo.class \
- javax/swing/JSeparatorBeanInfo.class \
- javax/swing/JSliderBeanInfo.class \
- javax/swing/JSpinnerBeanInfo.class \
- javax/swing/JSplitPaneBeanInfo.class \
- javax/swing/JTabbedPaneBeanInfo.class \
- javax/swing/JTableBeanInfo.class \
- javax/swing/JTextAreaBeanInfo.class \
- javax/swing/JTextFieldBeanInfo.class \
- javax/swing/JTextPaneBeanInfo.class \
- javax/swing/JToggleButtonBeanInfo.class \
- javax/swing/JToolBarBeanInfo.class \
- javax/swing/JTreeBeanInfo.class \
- javax/swing/JWindowBeanInfo.class \
- javax/swing/SwingBeanInfoBase.class \
- javax/swing/text/JTextComponentBeanInfo.class \
- jdk/nio/zipfs \
- META-INF/services/com.sun.jdi.connect.Connector \
- META-INF/services/com.sun.jdi.connect.spi.TransportService \
- META-INF/services/com.sun.tools.attach.spi.AttachProvider \
- META-INF/services/com.sun.tools.xjc.Plugin \
- META-INF/services/javax.script.ScriptEngineFactory \
- META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor \
- META-INF/services/java.nio.file.spi.FileSystemProvider \
- org/relaxng/datatype \
- sun/awt/HKSCS.class \
- sun/awt/motif/X11GB2312.class \
- sun/awt/motif/X11GB2312$$$$Decoder.class \
- sun/awt/motif/X11GB2312$$$$Encoder.class \
- sun/awt/motif/X11GBK.class \
- sun/awt/motif/X11GBK$$$$Encoder.class \
- sun/awt/motif/X11KSC5601.class \
- sun/awt/motif/X11KSC5601$$$$Decoder.class \
- sun/awt/motif/X11KSC5601$$$$Encoder.class \
- sun/jvmstat \
- sun/net/spi/nameservice/dns \
- sun/nio/cs/ext \
- sun/rmi/rmic \
- sun/security/ec \
- sun/security/internal \
- sun/security/mscapi \
- sun/security/pkcs11 \
- sun/security/provider/Sun.class \
- sun/security/rsa/SunRsaSign.class \
- sun/security/ssl \
- sun/security/tools/jarsigner \
- sun/swing/BeanInfoUtils.class \
- sun/text/resources/cldr \
- sun/tools/asm \
- sun/tools/attach \
- sun/tools/java \
- sun/tools/javac \
- sun/tools/jcmd \
- sun/tools/jconsole \
- sun/tools/jinfo \
- sun/tools/jmap \
- sun/tools/jps \
- sun/tools/jstack \
- sun/tools/jstat \
- sun/tools/jstatd \
- sun/tools/native2ascii \
- sun/tools/serialver \
- sun/tools/tree \
- sun/tools/util \
- sun/util/resources/provider/NonEnLocaleDataMetaInfo.class \
- META-INF/services/sun.util.locale.provider.LocaleDataMetaInfo \
- sun/util/resources/cldr \
- $(LOCALEDATA_INCLUDES) \
- com/oracle/jrockit/jfr \
- oracle/jrockit/jfr \
- jdk/jfr \
- jdk/internal/dynalink \
- jdk/nashorn \
- sun/jvm \
- toolbarButtonGraphics \
- sa.properties \
- com/sun/java/swing/action \
- com/sun/java/swing/ui \
- com/oracle/security \
- #
-
-# Find all files in the classes dir to use as dependencies. This could be more fine granular.
-ALL_FILES_IN_CLASSES := $(call not-containing, _the., $(filter-out %javac_state, \
- $(call CacheFind, $(JDK_OUT_CLASSES))))
-
-RT_JAR_MANIFEST_FILE := $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.rt.jar_manifest
-RESOURCE_JAR_MANIFEST_FILE := $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.resources.jar_manifest
-
-$(RT_JAR_MANIFEST_FILE): $(MAINMANIFEST) $(BEANMANIFEST)
- $(MKDIR) -p $(@D)
- $(RM) $@ $@.tmp
- $(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \
- -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
- $(MAINMANIFEST) >> $@.tmp
- $(ECHO) >> $@.tmp
- $(CAT) $(BEANMANIFEST) >> $@.tmp
- $(MV) $@.tmp $@
-
-$(RESOURCE_JAR_MANIFEST_FILE): $(MAINMANIFEST)
- $(MKDIR) -p $(@D)
- $(RM) $@ $@.tmp
- $(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \
- -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
- $(MAINMANIFEST) >> $@.tmp
- $(MV) $@.tmp $@
-
-$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.exclude: $(MAKEFILE) $(PROFILE_MAKEFILES)
- $(MKDIR) -p $(@D)
- $(RM) $@ $@.tmp
- $(call ListPathsSafely,RT_JAR_EXCLUDES,\n, >> $@.tmp)
- $(MV) $@.tmp $@
-
-$(IMAGES_OUTPUTDIR)/lib/classlist: $(JDK_TOPDIR)/make/data/classlist/classlist.$(OPENJDK_TARGET_OS) \
- $(MAKEFILE)
- $(MKDIR) -p $(@D)
- $(RM) $@ $@.tmp
- $(TOOL_ADDJSUM) $< $@.tmp
- $(MV) $@.tmp $@
-
-$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents: $(BUILD_TOOLS_JDK) $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.exclude \
- $(ALL_FILES_IN_CLASSES) $(IMAGES_OUTPUTDIR)/lib/classlist
- $(MKDIR) -p $(@D)
- $(RM) $@ $@.tmp
- ($(CD) $(JDK_OUTPUTDIR)/modules && \
- $(TOOL_JARREORDER) -m \
- -o $@.tmp $(IMAGES_OUTPUTDIR)/lib/classlist $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.exclude . )
- $(MV) $@.tmp $@
-
-$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.rt.jar.contents: $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents
- $(MKDIR) -p $(@D)
- $(RM) $@ $@.tmp
- $(GREP) -e '\.class$$' $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents > $@.tmp
- ifneq ($(PROFILE), )
- # Add back classes from excluded packages (fixing the $ substitution in the process)
- # This currently won't work with modular build layout, but there currently are no
- # types needing to be re added.
- for type in $(subst \$$,\, $(RT_JAR_INCLUDE_TYPES)) ; do \
- $(ECHO) $$type >> $@.tmp ; \
- done
- endif
- $(MV) $@.tmp $@
-
-$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.resources.jar.contents: $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents
- $(MKDIR) -p $(@D)
- $(RM) $@ $@.tmp
- $(GREP) -v -e '\.class$$' \
- -e '/_the\.' -e '^_the\.' -e '\\_the\.' -e ' _the\.' -e 'javac_state' \
- $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents > $@.tmp
- ifneq ($(PROFILE), )
- # Strip out all META-INF/services/ entries
- $(GREP) -v -e 'META-INF/services/' $@.tmp > $@.tmp2
- # Add back the required services
- # FIXME: On Solaris if PROFILE_INCLUDE_METAINF_SERVICES is not defined
- # we get a syntax error from sh. That doesn't happen on linux
- # Preserve any -C
part of the original include line.
- for service in $(PROFILE_INCLUDE_METAINF_SERVICES) ; do \
- $(GREP) -e "$$service" $@.tmp >> $@.tmp2; \
- done
- $(MV) $@.tmp2 $@.tmp
- endif
- $(MV) $@.tmp $@
-
-# This is a hack but I don't know how to make this fit into the existing scheme
-$(PROFILE_VERSION_CLASS_TARGETS): $(PROFILE_VERSION_JAVA_TARGETS)
- @$(JAVAC) -d $(@D)/../../ $(@D)/$(VERSION_JAVA_FILE)
-
-
-RT_JAR_CREATE_OPTIONS := c0fm
-RT_JAR_UPDATE_OPTIONS := u0f
-ifeq ($(COMPRESS_JARS), true)
- RT_JAR_CREATE_OPTIONS := cfm
- RT_JAR_UPDATE_OPTIONS := uf
-endif
-
-# This defines a target-specific variables to make the shell logic easier to see.
-# We need to find the Version.class file for the profile currently being built
-$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/rt.jar: \
- CLASS_FILE = $(if $(PROFILE), $(strip $(foreach class, $(PROFILE_VERSION_CLASS_TARGETS), $(if $(findstring $(PROFILE), $(class)), $(class)))), NO_SUCH_FILE)
-# This is the real target
-$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/rt.jar: $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.rt.jar.contents $(RT_JAR_MANIFEST_FILE) $(PROFILE_VERSION_CLASS_TARGETS)
- $(ECHO) Creating rt.jar $(PROFILE) Compressed=$(COMPRESS_JARS)
- $(MKDIR) -p $(@D)
- $(RM) $@ $@.tmp
- $(CD) $(JDK_OUTPUTDIR)/modules && \
- $(JAR) $(RT_JAR_CREATE_OPTIONS) $@.tmp $(RT_JAR_MANIFEST_FILE) \
- @$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.rt.jar.contents && \
- if [ -f $(CLASS_FILE) ]; then \
- $(ECHO) Updating rt.jar $(PROFILE) && \
- $(CD) $(patsubst %$(VERSION_CLASS_PATH), %, $(CLASS_FILE)) && \
- $(JAR) $(RT_JAR_UPDATE_OPTIONS) $@.tmp $(VERSION_CLASS_PATH); \
- fi
- $(MV) $@.tmp $@
-
-$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/resources.jar: $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.resources.jar.contents \
- $(RESOURCE_JAR_MANIFEST_FILE)
- $(ECHO) Creating resources.jar
- $(MKDIR) -p $(@D)
- $(RM) $@ $@.tmp
- $(CD) $(JDK_OUTPUTDIR)/modules && \
- $(JAR) $(RT_JAR_CREATE_OPTIONS) $@.tmp $(RESOURCE_JAR_MANIFEST_FILE) \
- @$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.resources.jar.contents
- $(MV) $@.tmp $@
-
-##########################################################################################
-
-ifneq ($(OPENJDK_TARGET_OS), windows)
- CHARSETS_EXTRA_FILES := sun/awt/motif/X11GBK.class \
- sun/awt/motif/X11GB2312$$$$Decoder.class \
- sun/awt/motif/X11GB2312.class \
- sun/awt/motif/X11KSC5601$$$$Decoder.class \
- sun/awt/motif/X11KSC5601$$$$Encoder.class \
- sun/awt/motif/X11GB2312$$$$Encoder.class \
- sun/awt/motif/X11GBK$$$$Encoder.class \
- sun/awt/motif/X11KSC5601.class
-endif
-
-$(eval $(call SetupArchive,BUILD_CHARSETS_JAR, , \
- SRCS := $(JDK_OUT_CLASSES), \
- SUFFIXES := .class .dat, \
- INCLUDES := sun/nio/cs/ext, \
- EXTRA_FILES := sun/awt/HKSCS.class \
- $(CHARSETS_EXTRA_FILES), \
- JAR := $(IMAGES_OUTPUTDIR)/lib/charsets.jar, \
- SKIP_METAINF := true, \
- CHECK_COMPRESS_JAR := true))
-
-##########################################################################################
-
-$(eval $(call SetupArchive,BUILD_ZIPFS_JAR, , \
- SRCS := $(JDK_OUT_CLASSES), \
- INCLUDES := jdk/nio/zipfs, \
- EXTRA_FILES := META-INF/services/java.nio.file.spi.FileSystemProvider, \
- JAR := $(IMAGES_OUTPUTDIR)/lib/ext/zipfs.jar, \
- SKIP_METAINF := true, \
- CHECK_COMPRESS_JAR := true))
-
-##########################################################################################
-
-ifndef OPENJDK
- ifeq ($(ENABLE_JFR), true)
- $(eval $(call SetupArchive,BUILD_JFR_JAR, , \
- SRCS := $(JDK_OUTPUTDIR)/modules/jdk.jfr, \
- SUFFIXES := .class .jfc .xsd, \
- INCLUDES := com/oracle/jrockit/jfr \
- oracle/jrockit/jfr \
- jdk/jfr, \
- JAR := $(IMAGES_OUTPUTDIR)/lib/jfr.jar, \
- SKIP_METAINF := true, \
- MANIFEST := $(MAINMANIFEST), \
- CHECK_COMPRESS_JAR := true))
-
- endif
-endif
-
-##########################################################################################
-
-$(eval $(call SetupArchive,BUILD_JSSE_JAR, , \
- SRCS := $(JDK_OUT_CLASSES), \
- INCLUDES := sun/security/provider/Sun.class \
- sun/security/rsa/SunRsaSign.class \
- sun/security/ssl \
- com/sun/net/ssl/internal/ssl, \
- JAR := $(IMAGES_OUTPUTDIR)/lib/jsse.jar, \
- SKIP_METAINF := true, \
- MANIFEST := $(MAINMANIFEST), \
- CHECK_COMPRESS_JAR := true))
-
-##########################################################################################
-
-$(eval $(call SetupArchive,BUILD_SWINGBEANS_JAR, , \
- SRCS := $(JDK_OUTPUTDIR)/modules/java.desktop, \
- SUFFIXES := BeanInfo.class .gif, \
- INCLUDES := javax/swing sun/swing, \
- EXCLUDES := javax/swing/plaf, \
- EXTRA_FILES := javax/swing/SwingBeanInfoBase.class sun/swing/BeanInfoUtils.class, \
- JAR := $(IMAGES_OUTPUTDIR)/lib/dt.jar, \
- SKIP_METAINF := true))
-
-##########################################################################################
-
-# Get the CLDRVERSION
-include gensrc/GensrcCLDR.gmk
-
-CLDRDATA_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/cldrdata.jar
-
-CLDR_SERVICES_DIR := $(IMAGES_OUTPUTDIR)/cldrmetainfo
-
-CLDR_METAINF_SERVICES := $(CLDR_SERVICES_DIR)/META-INF/services/sun.util.locale.provider.LocaleDataMetaInfo
-
-$(CLDR_METAINF_SERVICES): $(JDK_TOPDIR)/src/jdk.localedata/META-INF/cldrdata-services/sun.util.locale.provider.LocaleDataMetaInfo
- $(install-file)
-
-$(eval $(call SetupArchive,BUILD_CLDRDATA_JAR, \
- $(CLDR_METAINF_SERVICES), \
- SRCS := $(JDK_OUTPUTDIR)/modules/jdk.localedata \
- $(CLDR_SERVICES_DIR), \
- SUFFIXES := .class, \
- INCLUDES := sun/text/resources/cldr \
- sun/util/resources/cldr, \
- EXTRA_FILES := META-INF/services/sun.util.locale.provider.LocaleDataMetaInfo, \
- JAR := $(CLDRDATA_JAR_DST), \
- EXTRA_MANIFEST_ATTR := CLDR-Version: $(CLDRVERSION), \
- SKIP_METAINF := true))
-
-##########################################################################################
-
-TOOLS_JAR_INCLUDES := \
- com/sun/codemodel \
- com/sun/istack/internal/tools \
- com/sun/jarsigner \
- com/sun/javadoc \
- com/sun/jdi \
- com/sun/source \
- com/sun/tools/attach \
- com/sun/tools/classfile \
- com/sun/tools/corba \
- com/sun/tools/doclets \
- com/sun/tools/doclint \
- com/sun/tools/example/debug/expr \
- com/sun/tools/example/debug/tty \
- com/sun/tools/hat \
- com/sun/tools/internal/jxc \
- com/sun/tools/internal/jxc/ap \
- com/sun/tools/internal/ws \
- com/sun/tools/internal/ws/wscompile/plugin/at_generated \
- com/sun/tools/internal/xjc \
- com/sun/tools/javac \
- com/sun/tools/javadoc \
- com/sun/tools/javah \
- com/sun/tools/javap \
- com/sun/tools/jdeps \
- com/sun/tools/jdi \
- com/sun/tools/script/shell \
- com/sun/xml/internal/dtdparser \
- com/sun/xml/internal/rngom \
- com/sun/xml/internal/xsom \
- org/relaxng/datatype \
- sun/applet \
- sun/jvmstat \
- sun/rmi/rmic \
- sun/security/tools/jarsigner \
- sun/tools/asm \
- sun/tools/attach \
- sun/tools/jar \
- sun/tools/java \
- sun/tools/javac \
- sun/tools/jcmd \
- sun/tools/jinfo \
- sun/tools/jmap \
- sun/tools/jps \
- sun/tools/jstack \
- sun/tools/jstat \
- sun/tools/jstatd \
- sun/tools/native2ascii \
- sun/tools/serialver \
- sun/tools/tree \
- sun/tools/util
-
-# The sjavac tools is not ready for public consumption.
-TOOLS_JAR_EXCLUDES = com/sun/tools/sjavac
-
-TOOLS_JAR_SRC := $(addprefix $(JDK_OUTPUTDIR)/modules/,\
- java.corba \
- java.desktop \
- jdk.attach \
- jdk.compiler \
- jdk.dev \
- jdk.javadoc \
- jdk.jconsole \
- jdk.jcmd \
- jdk.jdi \
- jdk.jvmstat \
- jdk.rmic \
- jdk.runtime \
- jdk.xml.bind \
- jdk.xml.ws \
- )
- #
-
-$(eval $(call SetupArchive,BUILD_TOOLS_JAR, , \
- SRCS := $(TOOLS_JAR_SRC), \
- SUFFIXES := .class .prp .gif .properties .xml .css .xsd .js .html .txt .java \
- Tool aliasmap options, \
- INCLUDES := $(TOOLS_JAR_INCLUDES), \
- EXCLUDES := $(TOOLS_JAR_EXCLUDES), \
- EXTRA_FILES := \
- $(JDK_OUTPUTDIR)/modules/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector \
- META-INF/services/com.sun.jdi.connect.spi.TransportService \
- META-INF/services/com.sun.tools.attach.spi.AttachProvider \
- META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin \
- META-INF/services/com.sun.tools.internal.xjc.Plugin, \
- JAR := $(IMAGES_OUTPUTDIR)/lib/tools.jar, \
- SKIP_METAINF := true, \
- CHECK_COMPRESS_JAR := true))
-
-
-##########################################################################################
-
-include CORE_PKGS.gmk
-include NON_CORE_PKGS.gmk
-
-# The compiler should not issue a "Proprietary" warning when compiling
-# classes in the com.sun.java.swing.plaf packages, since we've always
-# allowed, and even advocated, extending them (see bug 6476749).
-#
-# This approach is NOT to be used as a general purpose way to avoid such
-# compiler warnings for non-core packages. The correct way is to document
-# the packages in NON_CORE_PKGS.gmk, and include them in the NON_CORE_PKGS
-# definition.
-#
-# Swing has taken this approach only as a temporary measure to avoid
-# the compiler warnings until we can properly document these packages.
-# This is covered under 6491853.
-EXCLUDE_PROPWARN_PKGS = com.sun.java.swing.plaf.windows \
- com.sun.java.swing.plaf.motif \
- com.sun.java.swing.plaf.gtk
-
-#
-# Include the exported private packages in ct.sym.
-# This is an interim solution until the ct.sym is replaced
-# with a new module system (being discussed for JDK 8).
-#
-EXPORTED_PRIVATE_PKGS = com.oracle.net \
- com.oracle.nio
-
-$(IMAGES_OUTPUTDIR)/symbols/_the.symbols: $(IMAGES_OUTPUTDIR)/lib/rt.jar
- $(RM) -r $(IMAGES_OUTPUTDIR)/symbols/META-INF/sym
- $(MKDIR) -p $(IMAGES_OUTPUTDIR)/symbols/META-INF/sym
- $(JAVA) $(NEW_JAVAC) \
- -bootclasspath "$(IMAGES_OUTPUTDIR)/lib/rt.jar" \
- -XDprocess.packages -proc:only \
- -processor com.sun.tools.javac.sym.CreateSymbols \
- -Acom.sun.tools.javac.sym.Jar=$(IMAGES_OUTPUTDIR)/lib/rt.jar \
- -Acom.sun.tools.javac.sym.Dest=$(IMAGES_OUTPUTDIR)/symbols/META-INF/sym/rt.jar \
- -Acom.sun.tools.javac.sym.Profiles=profile-rtjar-includes.txt \
- $(CORE_PKGS) $(NON_CORE_PKGS) $(EXCLUDE_PROPWARN_PKGS) $(EXPORTED_PRIVATE_PKGS)
- $(TOUCH) $@
-
-$(eval $(call MakeDir, $(IMAGES_OUTPUTDIR)/symbols))
-$(eval $(call SetupArchive,BUILD_CT_SYM, $(IMAGES_OUTPUTDIR)/symbols/_the.symbols, \
- SRCS := $(IMAGES_OUTPUTDIR)/symbols, \
- INCLUDES := META-INF/sym, \
- JAR := $(IMAGES_OUTPUTDIR)/lib/ct.sym, \
- CHECK_COMPRESS_JAR := true))
-
-
-##########################################################################################
-
-ifdef OPENJDK
- SRC_ZIP_INCLUDES = \
- com \
- java \
- javax \
- jdk \
- org \
- sun \
- #
- SRC_ZIP_EXCLUDES =
-else
- SRC_ZIP_INCLUDES = \
- com/sun/corba \
- com/sun/image/codec/jpeg \
- com/sun/imageio \
- com/sun/java_cup \
- com/sun/javadoc \
- com/sun/java/swing \
- com/sun/jmx \
- com/sun/naming \
- com/sun/org/apache \
- com/sun/security/auth \
- com/sun/security/jgss \
- com/sun/source \
- java \
- javax/accessibility \
- javax/annotation \
- javax/imageio \
- javax/lang \
- javax/management \
- javax/naming \
- javax/print \
- javax/rmi \
- javax/script \
- javax/security \
- javax/sound \
- javax/sql \
- javax/swing \
- javax/tools \
- javax/xml \
- org/ietf \
- org/omg \
- org/w3c/dom \
- org/xml/sax \
- #
- SRC_ZIP_EXCLUDES = javax/swing/beaninfo
-endif
-
-SRC_ZIP_SRCS := $(wildcard \
- $(JDK_TOPDIR)/src/*/share/classes \
- $(JDK_TOPDIR)/src/*/$(OPENJDK_TARGET_OS)/classes \
- $(JDK_TOPDIR)/src/*/$(OPENJDK_TARGET_OS_API_DIR)/classes \
- $(LANGTOOLS_TOPDIR)/src/*/share/classes \
- $(CORBA_TOPDIR)/src/*/share/classes \
- $(JAXP_TOPDIR)/src/*/share/classes \
- $(JAXWS_TOPDIR)/src/*/share/classes \
- $(JDK_OUTPUTDIR)/gensrc/j* \
- $(JDK_OUTPUTDIR)/gendocsrc_rmic \
- $(CORBA_OUTPUTDIR)/gensrc/j* \
- ) \
- #
-ifndef OPENJDK
- SRC_ZIP_SRCS += $(wildcard $(JDK_TOPDIR)/src/closed/*/share/classes)
-endif
-
-# Need to copy launcher src files into desired directory structure
-# before zipping the sources.
-$(eval $(call SetupCopyFiles,COPY_LAUNCHER_SRC, \
- SRC := $(JDK_TOPDIR)/src/java.base, \
- DEST := $(IMAGES_OUTPUTDIR)/src/launcher, \
- FLATTEN := true, \
- FILES := $(wildcard \
- $(JDK_TOPDIR)/src/java.base/share/native/launcher/* \
- $(JDK_TOPDIR)/src/java.base/share/native/libjli/* \
- $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libjli/java_md*)))
-
-LAUNCHER_ZIP_SRC := $(COPY_LAUNCHER_SRC)
-
-$(IMAGES_OUTPUTDIR)/src.zip: $(LAUNCHER_ZIP_SRC)
-
-# This dir needs to exist before macro is evaluated to avoid warning from find.
-$(eval $(call MakeDir, $(IMAGES_OUTPUTDIR)/src))
-$(eval $(call SetupZipArchive,BUILD_SRC_ZIP, \
- SRC := $(SRC_ZIP_SRCS) $(IMAGES_OUTPUTDIR)/src, \
- INCLUDES := $(SRC_ZIP_INCLUDES) launcher, \
- EXCLUDES := $(SRC_ZIP_EXCLUDES), \
- SUFFIXES := .java .c .h, \
- ZIP := $(IMAGES_OUTPUTDIR)/src.zip, \
- EXTRA_DEPS := $(LAUNCHER_ZIP_SRC)))
-
-##########################################################################################
-
-# This file is imported from hotspot in Import.gmk. Copying it into images/lib so that
-# all jars can be found in one place when creating images in Images.gmk. It needs to be
-# done here so that clean targets can be simple and accurate.
-$(IMAGES_OUTPUTDIR)/lib/sa-jdi.jar: $(HOTSPOT_DIST)/lib/sa-jdi.jar
- $(install-file)
-
-##########################################################################################
-#
-# sec-bin.zip is used by builds where the corresponding sources are not available
-#
-$(eval $(call SetupZipArchive,BUILD_SEC_BIN_ZIP, \
- SRC := $(JDK_OUTPUTDIR), \
- INCLUDES := \
- modules/java.base/javax/crypto \
- modules/java.base/javax/crypto/spec \
- modules/java.base/sun/security/internal/interfaces \
- modules/java.base/sun/security/internal/spec \
- modules/java.base/com/sun/crypto/provider \
- modules/jdk.crypto.ec/sun/security/ec \
- modules/jdk.crypto.mscapi/sun/security/mscapi \
- modules/jdk.crypto.pkcs11/sun/security/pkcs11 \
- modules/jdk.crypto.pkcs11/sun/security/pkcs11/wrapper \
- modules/jdk.crypto.ucrypto/com/oracle/security/ucrypto \
- modules/java.base/javax/net \
- modules/java.base/javax/security/cert \
- modules/java.base/com/sun/net/ssl \
- modules/java.base/com/sun/security/cert \
- modules/java.base/sun/net/www/protocol/https \
- modules/java.base/sun/security/pkcs12 \
- modules/java.base/sun/security/ssl \
- modules/java.security.jgss/sun/security/krb5 \
- modules/java.security.jgss/sun/security/krb5/internal \
- modules/java.security.jgss/sun/security/krb5/internal/ccache \
- modules/java.security.jgss/sun/security/krb5/internal/crypto \
- modules/java.security.jgss/sun/security/krb5/internal/ktab \
- modules/java.security.jgss/sun/security/krb5/internal/rcache \
- modules/java.security.jgss/sun/security/krb5/internal/util, \
- INCLUDE_FILES := modules/java.security.jgss/sun/security/jgss/spi/GSSContextSpi.class, \
- EXCLUDES := modules/java.security.jgss/sun/security/krb5/internal/tools, \
- ZIP := $(IMAGES_OUTPUTDIR)/sec-bin.zip))
-
-JARS += $(IMAGES_OUTPUTDIR)/sec-bin.zip
-
-##########################################################################################
-#
-# Windows specific binary security packages.
-#
-ifeq ($(OPENJDK_TARGET_OS), windows)
- # sec-windows-bin.zip is used by builds where the corresponding sources are not available
- $(eval $(call SetupZipArchive,BUILD_SEC_WINDOWS_BIN_ZIP, \
- SRC := $(JDK_OUTPUTDIR), \
- INCLUDES := modules/java.security.jgss/sun/security/krb5/internal/tools, \
- ZIP := $(IMAGES_OUTPUTDIR)/sec-windows-bin.zip))
-
- JARS += $(IMAGES_OUTPUTDIR)/sec-windows-bin.zip
-
- # JGSS files contain the native Kerberos library
- ifeq ($(OPENJDK_TARGET_CPU), x86_64)
- JGSS_ZIP_NAME = jgss-windows-x64-bin.zip
- else
- JGSS_ZIP_NAME = jgss-windows-i586-bin.zip
- endif
-
- $(eval $(call SetupZipArchive,BUILD_JGSS_BIN_ZIP, \
- SRC := $(JDK_OUTPUTDIR), \
- INCLUDE_FILES := bin/w2k_lsa_auth.dll \
- bin/w2k_lsa_auth.map \
- bin/w2k_lsa_auth.pdb, \
- ZIP := $(IMAGES_OUTPUTDIR)/$(JGSS_ZIP_NAME)))
-
- JARS += $(IMAGES_OUTPUTDIR)/$(JGSS_ZIP_NAME)
-endif
-
-##########################################################################################
-
-# This rule copies all jars from jdk/lib/... to images/lib/... to avoid having to track
-# which jars are where
-$(IMAGES_OUTPUTDIR)/lib/%: $(JDK_OUTPUTDIR)/lib/%
- $(install-file)
-
-##########################################################################################
-
-# Import nashorn.jar from nashorn dist dir.
-$(IMAGES_OUTPUTDIR)/lib/ext/nashorn.jar: $(NASHORN_DIST)/nashorn.jar
- $(install-file)
-
-##########################################################################################
-
-# Hook to include the corresponding custom file, if present.
-$(eval $(call IncludeCustomExtension, jdk, CreateJars.gmk))
-
-##########################################################################################
-
-all: $(JARS)
-
-.PHONY: default all
diff --git a/jdk/make/CreateSecurityJars.gmk b/jdk/make/CreateSecurityJars.gmk
deleted file mode 100644
index 252152a3357..00000000000
--- a/jdk/make/CreateSecurityJars.gmk
+++ /dev/null
@@ -1,195 +0,0 @@
-#
-# Copyright (c) 2013, 2014, Oracle and/or its affiliates. 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. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-include JavaCompilation.gmk
-
-##########################################################################################
-# Create manifest for security jars
-#
-# Include these extra attributes for now, should probably take out.
-#
-MAINMANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf
-JCE_MANIFEST := $(JDK_OUTPUTDIR)/jce/unsigned/_the.security.manifest.mf
-
-$(JCE_MANIFEST): $(MAINMANIFEST)
- $(MKDIR) -p $(@D)
- $(RM) $@ $@.tmp
- $(SED) -e "s#@@RELEASE@@#$(JDK_VERSION)#" \
- -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
- $(MAINMANIFEST) >> $@.tmp
- $(ECHO) "Extension-Name: javax.crypto" >> $@.tmp
- $(ECHO) "Implementation-Vendor-Id: com.sun" >> $@.tmp
- $(ECHO) "Release-Version: $(RELEASE)" >> $@.tmp
- $(MV) $@.tmp $@
-
-##########################################################################################
-# For crypto jars, always build the jar.
-#
-# The source for the crypto jars is not available for all licensees.
-# The BUILD_CRYPTO variable is set to no if these jars can't be built
-# to skip that step of the build.
-
-SUNPKCS11_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunpkcs11.jar
-SUNPKCS11_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunpkcs11.jar
-
-$(eval $(call SetupArchive,BUILD_SUNPKCS11_JAR, , \
- SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.pkcs11, \
- SUFFIXES := .class, \
- INCLUDES := sun/security/pkcs11, \
- JAR := $(SUNPKCS11_JAR_UNSIGNED), \
- MANIFEST := $(JCE_MANIFEST), \
- SKIP_METAINF := true))
-
-$(SUNPKCS11_JAR_UNSIGNED): $(JCE_MANIFEST)
-
-$(SUNPKCS11_JAR_DST): $(SUNPKCS11_JAR_UNSIGNED)
- $(install-file)
-
-TARGETS += $(SUNPKCS11_JAR_UNSIGNED) $(SUNPKCS11_JAR_DST)
-
-##########################################################################################
-
-SUNEC_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunec.jar
-SUNEC_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunec.jar
-
-$(eval $(call SetupArchive,BUILD_SUNEC_JAR, , \
- SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.ec, \
- SUFFIXES := .class, \
- INCLUDES := sun/security/ec, \
- JAR := $(SUNEC_JAR_UNSIGNED), \
- MANIFEST := $(JCE_MANIFEST), \
- SKIP_METAINF := true))
-
-$(SUNEC_JAR_UNSIGNED): $(JCE_MANIFEST)
-
-$(SUNEC_JAR_DST): $(SUNEC_JAR_UNSIGNED)
- $(install-file)
-
-TARGETS += $(SUNEC_JAR_UNSIGNED) $(SUNEC_JAR_DST)
-
-##########################################################################################
-
-SUNJCE_PROVIDER_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunjce_provider.jar
-SUNJCE_PROVIDER_JAR_UNSIGNED := \
- $(JDK_OUTPUTDIR)/jce/unsigned/sunjce_provider.jar
-
-ifneq ($(BUILD_CRYPTO), no)
- $(eval $(call SetupArchive,BUILD_SUNJCE_PROVIDER_JAR, , \
- SRCS := $(JDK_OUTPUTDIR)/modules/java.base, \
- SUFFIXES := .class, \
- INCLUDES := com/sun/crypto/provider, \
- JAR := $(SUNJCE_PROVIDER_JAR_UNSIGNED), \
- MANIFEST := $(JCE_MANIFEST), \
- SKIP_METAINF := true))
-
- $(SUNJCE_PROVIDER_JAR_UNSIGNED): $(JCE_MANIFEST)
-
- TARGETS += $(SUNJCE_PROVIDER_JAR_UNSIGNED)
-endif
-
-$(SUNJCE_PROVIDER_JAR_DST): $(SUNJCE_PROVIDER_JAR_UNSIGNED)
- $(install-file)
-
-TARGETS += $(SUNJCE_PROVIDER_JAR_DST)
-
-##########################################################################################
-
-JCE_JAR_DST := $(JDK_OUTPUTDIR)/lib/jce.jar
-JCE_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/jce.jar
-
-ifneq ($(BUILD_CRYPTO), no)
- $(eval $(call SetupArchive,BUILD_JCE_JAR, , \
- SRCS := $(JDK_OUTPUTDIR)/modules/java.base, \
- SUFFIXES := .class, \
- INCLUDES := javax/crypto sun/security/internal, \
- JAR := $(JCE_JAR_UNSIGNED), \
- MANIFEST := $(JCE_MANIFEST), \
- SKIP_METAINF := true))
-
- $(JCE_JAR_UNSIGNED): $(JCE_MANIFEST)
-
- TARGETS += $(JCE_JAR_UNSIGNED)
-endif
-
-$(JCE_JAR_DST): $(JCE_JAR_UNSIGNED)
- $(install-file)
-
-TARGETS += $(JCE_JAR_DST)
-
-##########################################################################################
-
-ifeq ($(OPENJDK_TARGET_OS), windows)
-
- SUNMSCAPI_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunmscapi.jar
- SUNMSCAPI_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunmscapi.jar
-
- $(eval $(call SetupArchive,BUILD_SUNMSCAPI_JAR, , \
- SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.mscapi, \
- SUFFIXES := .class, \
- INCLUDES := sun/security/mscapi, \
- JAR := $(SUNMSCAPI_JAR_UNSIGNED), \
- MANIFEST := $(JCE_MANIFEST), \
- SKIP_METAINF := true))
-
- $(SUNMSCAPI_JAR_UNSIGNED): $(JCE_MANIFEST)
-
- $(SUNMSCAPI_JAR_DST): $(SUNMSCAPI_JAR_UNSIGNED)
- $(install-file)
-
- TARGETS += $(SUNMSCAPI_JAR_UNSIGNED) $(SUNMSCAPI_JAR_DST)
-
-endif
-
-##########################################################################################
-
-ifeq ($(OPENJDK_TARGET_OS), solaris)
-
- UCRYPTO_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/ucrypto.jar
- UCRYPTO_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/ucrypto.jar
-
- $(eval $(call SetupArchive,BUILD_UCRYPTO_JAR, , \
- SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.ucrypto, \
- SUFFIXES := .class, \
- INCLUDES := com/oracle/security/ucrypto, \
- JAR := $(UCRYPTO_JAR_UNSIGNED), \
- MANIFEST := $(JCE_MANIFEST), \
- SKIP_METAINF := true))
-
- $(UCRYPTO_JAR_UNSIGNED): $(JCE_MANIFEST)
-
- $(UCRYPTO_JAR_DST): $(UCRYPTO_JAR_UNSIGNED)
- $(install-file)
-
- TARGETS += $(UCRYPTO_JAR_UNSIGNED) $(UCRYPTO_JAR_DST)
-
-endif
-
-all: $(TARGETS)
-
-.PHONY: default all
diff --git a/jdk/make/Images.gmk b/jdk/make/Images.gmk
deleted file mode 100644
index e7ec8c715e0..00000000000
--- a/jdk/make/Images.gmk
+++ /dev/null
@@ -1,782 +0,0 @@
-#
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-include $(SPEC)
-include MakeBase.gmk
-include JavaCompilation.gmk
-
-default: images
-
-# Prepare the find cache.
-$(eval $(call FillCacheFind, \
- $(wildcard $(JDK_OUTPUTDIR)/bin \
- $(JDK_OUTPUTDIR)/lib \
- $(IMAGES_OUTPUTDIR)/lib \
- $(JDK_OUTPUTDIR)/include \
- $(JDK_OUTPUTDIR)/sample \
- $(JDK_OUTPUTDIR)/demo)))
-
-include Tools.gmk
-
-include Profiles.gmk
-
-# Note: This double-colon rule is intentional, to support
-# custom make file integration.
-images:: jre-image jdk-image
-
-overlay-images: jre-overlay-image jdk-overlay-image
-
-
-
-# Processing license files from source area to image area
-# These will be modified to have the platform specific EOL chars.
-define process-doc-file
- $(ECHO) $(LOG_INFO) Processing $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(MKDIR) -p $(@D)
- $(RM) $@
- LC_ALL=C $(SED) 's/$$//g' $< > $@
- $(CHMOD) 444 $@
-endef
-
-define AddFileToCopy
- # Param 1 - src root dir
- # Param 2 - dest root dir
- # Param 3 - src file
- # Param 4 - variable to add targets to
-
- # Remove src dir root from src file
- $2_$3_FILE := $$(patsubst $1/%,%,$3)
-
- $2/$$($2_$3_FILE): $3
- $(ECHO) $(LOG_INFO) Copying $$(patsubst $(OUTPUT_ROOT)/%,%,$$@)
- $$(install-file)
-
- $4 += $2/$$($2_$3_FILE)
-endef
-
-################################################################################
-#
-# JRE and JDK build rules
-#
-################################################################################
-#
-# Variable prefixes explained:
-# JRE_ refers to files in the j2re-*-image.
-# JDK_ refers to files in the j2sdk-image outside of the jre subdir.
-# JDKJRE_ refers to files in the j2sdk-image inside the jre subdir.
-#
-
-################################################################################
-# /bin dir
-
-ifeq ($(PROFILE), )
- NOT_JRE_BIN_FILES := \
- appletviewer$(EXE_SUFFIX) \
- idlj$(EXE_SUFFIX) \
- jar$(EXE_SUFFIX) \
- jarsigner$(EXE_SUFFIX) \
- java-rmi.cgi \
- javac$(EXE_SUFFIX) \
- javadoc$(EXE_SUFFIX) \
- javah$(EXE_SUFFIX) \
- javap$(EXE_SUFFIX) \
- jdeps$(EXE_SUFFIX) \
- jcmd$(EXE_SUFFIX) \
- jdb$(EXE_SUFFIX) \
- jps$(EXE_SUFFIX) \
- jrunscript$(EXE_SUFFIX) \
- jstat$(EXE_SUFFIX) \
- jstatd$(EXE_SUFFIX) \
- jstack$(EXE_SUFFIX) \
- packagebean$(SCRIPT_SUFFIX) \
- rmic$(EXE_SUFFIX) \
- serialver$(EXE_SUFFIX) \
- unregbean$(EXE_SUFFIX) \
- jconsole$(EXE_SUFFIX) \
- jinfo$(EXE_SUFFIX) \
- jmap$(EXE_SUFFIX) \
- native2ascii$(EXE_SUFFIX) \
- xjc$(EXE_SUFFIX) \
- wsgen$(EXE_SUFFIX) \
- wsimport$(EXE_SUFFIX) \
- schemagen$(EXE_SUFFIX) \
- jsadebugd$(EXE_SUFFIX) \
- jhat$(EXE_SUFFIX)
-endif
-
-WINDOWS_JDK_BIN_FILES = \
- $(EXE_SUFFIX) \
- $(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX) \
- $(notdir $(MSVCR_DLL))
-
-WINDOWS_JDKJRE_BIN_FILES := \
- $(LIBRARY_PREFIX)attach$(SHARED_LIBRARY_SUFFIX) \
- $(SALIB_NAME)
-
-# Find all files in bin dir
-ALL_BIN_LIST := $(call CacheFind, $(JDK_OUTPUTDIR)/bin)
-
-# Prevent sjavac from entering the images.
-ALL_BIN_LIST := $(filter-out %/sjavac, $(ALL_BIN_LIST))
-
-# For unknown reason the debuginfo files for executables are not put into images
-# e.g filter them out
-ifneq ($(OPENJDK_TARGET_OS), windows)
- ALL_BIN_LIST := $(filter-out %.debuginfo %.diz, $(ALL_BIN_LIST))
-else
- # On windows, the libraries are in the bin dir, only filter out debuginfo files
- # for executables. "java" is both a library and executable.
- ALL_BIN_EXEC_FILES := $(filter-out java.exe, $(notdir $(filter %.exe, $(ALL_BIN_LIST))))
- ALL_BIN_DEBUG_FILTER := $(addprefix %, $(patsubst %.exe, %.debuginfo, $(ALL_BIN_EXEC_FILES)) \
- $(patsubst %.exe, %.diz, $(ALL_BIN_EXEC_FILES))) %.pdb
- ALL_BIN_LIST := $(filter-out $(ALL_BIN_DEBUG_FILTER), $(ALL_BIN_LIST))
-endif
-
-JDKJRE_BIN_LIST := $(filter-out $(addprefix %, $(NOT_JRE_BIN_FILES)), $(ALL_BIN_LIST))
-JRE_BIN_LIST := $(filter-out $(addprefix %, $(WINDOWS_JDKJRE_BIN_FILES)), $(JDKJRE_BIN_LIST))
-
-ifeq ($(OPENJDK_TARGET_OS), windows)
- JDK_BIN_LIST := $(filter $(addprefix %, $(WINDOWS_JDK_BIN_FILES)), $(ALL_BIN_LIST))
- # On windows x86, the server jvm is filtered out from the j2re image. This could possibly
- # be handled by profiles in the future. If no client jvm is built, leave server in.
- ifeq ($(OPENJDK_TARGET_CPU), x86)
- ifeq ($(JVM_VARIANT_CLIENT), true)
- JRE_BIN_LIST := $(filter-out $(JDK_OUTPUTDIR)/bin/server/%, $(JRE_BIN_LIST))
- endif
- endif
-else
- JDK_BIN_LIST := $(ALL_BIN_LIST)
-endif
-
-ifneq ($(OPENJDK_TARGET_CPU_ISADIR), )
- OVERLAY_FILTER := $(JDK_OUTPUTDIR)/bin$(OPENJDK_TARGET_CPU_ISADIR)%
-endif
-
-$(foreach f,$(filter-out $(OVERLAY_FILTER),$(JRE_BIN_LIST)), \
- $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_IMAGE_DIR),$f,JRE_BIN_TARGETS)))
-$(foreach f,$(filter-out $(OVERLAY_FILTER),$(JDK_BIN_LIST)), \
- $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_BIN_TARGETS)))
-$(foreach f,$(filter-out $(OVERLAY_FILTER),$(JDKJRE_BIN_LIST)), \
- $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR)/jre,$f,JDKJRE_BIN_TARGETS)))
-
-$(foreach f,$(filter $(OVERLAY_FILTER),$(JRE_BIN_LIST)), \
- $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_OVERLAY_IMAGE_DIR),$f,JRE_BIN_TARGETS)))
-$(foreach f,$(filter $(OVERLAY_FILTER),$(JDK_BIN_LIST)), \
- $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR),$f,JDK_BIN_TARGETS)))
-$(foreach f,$(filter $(OVERLAY_FILTER),$(JDKJRE_BIN_LIST)), \
- $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR)/jre,$f,JDKJRE_BIN_TARGETS)))
-
-################################################################################
-# /lib dir
-ifneq ($(OPENJDK_TARGET_OS), macosx)
- JDKJRE_LIB_FILES := \
- $(LIBRARY_PREFIX)attach$(SHARED_LIBRARY_SUFFIX) \
- $(SALIB_NAME)
-endif
-
-ifeq ($(PROFILE), )
- NOT_JRE_LIB_FILES := \
- tools.jar \
- jconsole.jar \
- sa-jdi.jar \
- dt.jar \
- ct.sym
-
- ifeq ($(OPENJDK_TARGET_OS), windows)
- NOT_JRE_LIB_FILES += jawt.lib jvm.lib
- endif
-endif
-
-JDK_LIB_FILES := $(NOT_JRE_LIB_FILES)
-ifeq ($(OPENJDK_TARGET_OS), linux)
- JDK_LIB_FILES += jexec
-endif
-
-ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris),) # If Linux or Solaris
- JDK_LIB_FILES += $(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX) \
- $(LIBRARY_PREFIX)jawt$(SHARED_LIBRARY_SUFFIX)
-endif
-
-# Find all files to copy from $(JDK_OUTPUTDIR)/lib
-# Jar files are not expected to be here
-ALL_JDKOUT_LIB_LIST := $(call not-containing,_the., $(filter-out %.jar, \
- $(call CacheFind, $(JDK_OUTPUTDIR)/lib)))
-# Find all files to copy from $(IMAGES_OUTPUTDIR)/lib
-# This is were the jar files are and might not exist if building overlay-images
-ifneq ($(wildcard $(IMAGES_OUTPUTDIR)/lib), )
- ALL_IMAGES_LIB_LIST := $(call not-containing,_the., \
- $(call CacheFind, $(IMAGES_OUTPUTDIR)/lib))
-endif
-
-# Filter files to copy for each destination
-JRE_JDKOUT_LIB_LIST := $(filter-out $(addprefix %, $(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)), \
- $(ALL_JDKOUT_LIB_LIST))
-JDKJRE_JDKOUT_LIB_LIST := $(filter-out $(addprefix %, $(NOT_JRE_LIB_FILES)), $(ALL_JDKOUT_LIB_LIST))
-JDK_JDKOUT_LIB_LIST := $(filter $(addprefix %, $(JDK_LIB_FILES)), $(ALL_JDKOUT_LIB_LIST))
-
-JRE_IMAGES_LIB_LIST := $(filter-out $(addprefix %, $(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)), \
- $(ALL_IMAGES_LIB_LIST))
-JDKJRE_IMAGES_LIB_LIST := $(filter-out $(addprefix %, $(NOT_JRE_LIB_FILES)), $(ALL_IMAGES_LIB_LIST))
-JDK_IMAGES_LIB_LIST := $(filter $(addprefix %, $(JDK_LIB_FILES)), $(ALL_IMAGES_LIB_LIST))
-
-# Iterate over files to copy to create rules for each one
-$(foreach f,$(JRE_JDKOUT_LIB_LIST), \
- $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_IMAGE_DIR),$f,JRE_LIB_TARGETS)))
-$(foreach f,$(JDK_JDKOUT_LIB_LIST), \
- $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_LIB_TARGETS)))
-$(foreach f,$(JDKJRE_JDKOUT_LIB_LIST), \
- $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR)/jre,$f,JDKJRE_LIB_TARGETS)))
-
-$(foreach f,$(JRE_IMAGES_LIB_LIST), \
- $(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR),$(JRE_IMAGE_DIR),$f,JRE_LIB_TARGETS)))
-$(foreach f,$(JDK_IMAGES_LIB_LIST), \
- $(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_LIB_TARGETS)))
-$(foreach f,$(JDKJRE_IMAGES_LIB_LIST), \
- $(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR),$(JDK_IMAGE_DIR)/jre,$f,JDKJRE_LIB_TARGETS)))
-
-$(foreach f,$(filter $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_ISADIR)/%,$(JRE_JDKOUT_LIB_LIST)), \
- $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_OVERLAY_IMAGE_DIR),$f,JRE_OVERLAY_LIB_TARGETS)))
-$(foreach f,$(filter $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_ISADIR)/%,$(JDK_JDKOUT_LIB_LIST)), \
- $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR),$f,JDK_OVERLAY_LIB_TARGETS)))
-$(foreach f,$(filter $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_ISADIR)/%,$(JDKJRE_JDKOUT_LIB_LIST)), \
- $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR)/jre,$f,JDKJRE_OVERLAY_LIB_TARGETS)))
-
-ifneq ($(PROFILE), )
- # Files in lib$(PROFILE) are excluded from the generic copying routines so
- # we have to add them back in here
- $(foreach f,$(CUSTOM_PROFILE_JARS), \
- $(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR)/lib$(PROFILE),$(JRE_IMAGE_DIR)/lib,$f,JRE_LIB_TARGETS)))
-endif
-
-# CTE plugin security change require new empty directory lib/applet
-$(JRE_IMAGE_DIR)/lib/applet:
- $(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(MKDIR) -p $@
-
-$(JDK_IMAGE_DIR)/jre/lib/applet:
- $(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(MKDIR) -p $@
-
-$(JRE_IMAGE_DIR)/lib/meta-index: $(JRE_LIB_TARGETS)
- $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar
-
-$(JDK_IMAGE_DIR)/jre/lib/meta-index: $(JDKJRE_LIB_TARGETS)
- $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar
-
-$(JRE_IMAGE_DIR)/lib/ext/meta-index: $(JRE_LIB_TARGETS)
- $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar
-
-$(JDK_IMAGE_DIR)/jre/lib/ext/meta-index: $(JDKJRE_LIB_TARGETS)
- $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar
-
-################################################################################
-# /man dir
-#
-# All variables in this section are assigned with simple =, without :, to enable
-# more selective overriding from the custom version of this file.
-#
-# Avoid evaluating this whole section on windows for speed and stability
-ifneq ($(OPENJDK_TARGET_OS), windows)
- JRE_MAN_PAGES = \
- java.1 \
- jjs.1 \
- keytool.1 \
- orbd.1 \
- pack200.1 \
- policytool.1 \
- rmid.1 \
- rmiregistry.1 \
- servertool.1 \
- tnameserv.1 \
- unpack200.1
-
- ifndef OPENJDK
- ifneq ($(OPENJDK_TARGET_OS), solaris)
- JRE_MAN_PAGES += javaws.1
- endif
- endif
-
- JDK_MAN_PAGES = \
- $(JRE_MAN_PAGES) \
- appletviewer.1 \
- idlj.1 \
- jar.1 \
- jarsigner.1 \
- javac.1 \
- javadoc.1 \
- javah.1 \
- javap.1 \
- jconsole.1 \
- jcmd.1 \
- jdb.1 \
- jdeps.1 \
- jhat.1 \
- jinfo.1 \
- jmap.1 \
- jps.1 \
- jrunscript.1 \
- jsadebugd.1 \
- jstack.1 \
- jstat.1 \
- jstatd.1 \
- native2ascii.1 \
- rmic.1 \
- schemagen.1 \
- serialver.1 \
- wsgen.1 \
- wsimport.1 \
- xjc.1
-
- # This variable is potentially overridden in the closed makefile.
- MAN_SRC_BASEDIR ?= $(JDK_TOPDIR)/src
-
- ifeq ($(OPENJDK_TARGET_OS), linux)
- MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/linux/doc
- MAN1_SUBDIR = man
- endif
- ifeq ($(OPENJDK_TARGET_OS), solaris)
- MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/solaris/doc
- MAN1_SUBDIR = sun/man/man1
- endif
- ifeq ($(OPENJDK_TARGET_OS), macosx)
- MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/bsd/doc
- MAN1_SUBDIR = man
- endif
-
- $(JRE_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/%
- $(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(install-file)
-
- $(JDK_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/%
- $(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(install-file)
-
- $(JRE_IMAGE_DIR)/man/man1/%: $(JDK_OUTPUTDIR)/impdoc/$(MAN1_SUBDIR)/%
- $(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(install-file)
-
- $(JDK_IMAGE_DIR)/man/man1/%: $(JDK_OUTPUTDIR)/impdoc/$(MAN1_SUBDIR)/%
- $(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(install-file)
-
- define install-ja-manpage
- $(MKDIR) -p $(@D)
- $(CAT) $< \
- | $(NATIVE2ASCII) -encoding eucJP \
- | $(SED) 's/@@VERSION@@/$(THIS_JDK_VERSION)/g' \
- | $(NATIVE2ASCII) -reverse -encoding $1 \
- > $@
- endef
-
- $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
- $(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(call install-ja-manpage, UTF-8)
-
- $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
- $(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(call install-ja-manpage, UTF-8)
-
- $(JRE_IMAGE_DIR)/man/ja_JP.PCK/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
- $(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(call install-ja-manpage, PCK)
-
- $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
- $(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(call install-ja-manpage, PCK)
-
- ifeq ($(OPENJDK_TARGET_OS), solaris)
- $(JRE_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
- $(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(install-file)
-
- $(JDK_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
- $(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(install-file)
- endif
-
- ifeq ($(OPENJDK_TARGET_OS), linux)
- $(JRE_IMAGE_DIR)/man/ja:
- $(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
-
- $(JDK_IMAGE_DIR)/man/ja:
- $(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
- endif
-
- ifeq ($(OPENJDK_TARGET_OS), macosx)
- $(JRE_IMAGE_DIR)/man/ja:
- $(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
-
- $(JDK_IMAGE_DIR)/man/ja:
- $(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
- endif
-
- ifeq ($(OPENJDK_TARGET_OS), linux)
- JRE_MAN_PAGE_LIST = $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \
- $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \
- $(JRE_IMAGE_DIR)/man/ja
-
- JDK_MAN_PAGE_LIST = $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \
- $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \
- $(JDK_IMAGE_DIR)/man/ja
- endif
-
- ifeq ($(OPENJDK_TARGET_OS), solaris)
- JRE_MAN_PAGE_LIST = $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \
- $(addprefix $(JRE_IMAGE_DIR)/man/ja/man1/, $(JRE_MAN_PAGES)) \
- $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \
- $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.PCK/man1/, $(JRE_MAN_PAGES))
-
- JDK_MAN_PAGE_LIST = $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \
- $(addprefix $(JDK_IMAGE_DIR)/man/ja/man1/, $(JDK_MAN_PAGES)) \
- $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \
- $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/, $(JDK_MAN_PAGES))
- endif
-
- ifeq ($(OPENJDK_TARGET_OS), macosx)
- JRE_MAN_PAGE_LIST = $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \
- $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \
- $(JRE_IMAGE_DIR)/man/ja
-
- JDK_MAN_PAGE_LIST = $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \
- $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \
- $(JDK_IMAGE_DIR)/man/ja
- endif
-
-endif # Windows
-
-################################################################################
-# /demo dir
-
-# FIXME: demo/applets/GraphLayout/GraphPanel$2.class is sometimes not copied.
-
-# The db demo contains an empty dir that needs to be copied. The other
-# directories will always trigger the rule for recompile since
-# _the.list_of_packages files are touched.
-$(JDK_IMAGE_DIR)/demo/%: $(JDK_OUTPUTDIR)/demo/%
- if [ ! -d "$@" ]; then \
- $(ECHO) $(LOG_INFO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'; \
- $(MKDIR) -p $(@D); \
- if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) '$<' '$@'; fi \
- fi
-
-# Find all files including directories
-JDK_DEMO_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/demo/%, $(JDK_IMAGE_DIR)/demo/%, \
- $(shell $(FIND) $(JDK_OUTPUTDIR)/demo ! \( -name "_the*" -o -name "javac_state" \) ))
-
-
-
-# Param 1 is source file
-define CreateOverlayDemoRule
- $1_TARGET := $$(subst $(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR), \
- $$(dir $1)$(OPENJDK_TARGET_CPU_ISADIR)/$$(notdir $1))
- $$($1_TARGET): $1
- $(ECHO) $(LOG_INFO) Copying '$$(patsubst $(OUTPUT_ROOT)/%,%,$$@)'
- $$(call install-file)
-
- JDK_OVERLAY_DEMO_TARGETS += $$($1_TARGET)
-endef
-JDK_OVERLAY_DEMO_SOURCES := $(filter %$(SHARED_LIBRARY_SUFFIX), $(call CacheFind, $(JDK_OUTPUTDIR)/demo))
-$(foreach lib, $(JDK_OVERLAY_DEMO_SOURCES), $(eval $(call CreateOverlayDemoRule, $(lib))))
-
-################################################################################
-# /sample dir
-
-$(foreach f,$(call CacheFind,$(JDK_OUTPUTDIR)/sample), \
- $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_SAMPLE_TARGETS)))
-
-################################################################################
-# /db dir
-
-ifndef OPENJDK
- DB_ZIP_DIR := $(wildcard $(JDK_TOPDIR)/src/closed/db)
-
- $(IMAGES_OUTPUTDIR)/_unzip/%.unzipped: $(DB_ZIP_DIR)/%
- $(ECHO) Unzipping $(patsubst $(SRC_ROOT)/%,%,$<)
- $(RM) -r $(JDK_IMAGE_DIR)/db
- $(MKDIR) -p $(JDK_IMAGE_DIR)/db
- cd $(JDK_IMAGE_DIR)/db && $(UNZIP) -q -o $< -x */index.html */KEYS */test/* *javadoc/* */docs/* */demo/* 2> /dev/null
- cd $(JDK_IMAGE_DIR)/db && $(MV) db-derby-*-bin/* . && $(RM) -r db-derby-*-bin
- $(MKDIR) -p $(@D)
- $(TOUCH) $@
-
- $(JDK_IMAGE_DIR)/db/README-JDK.html: $(DB_ZIP_DIR)/README-JDK.html
- $(ECHO) $(LOG_INFO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'
- $(MKDIR) -p $(@D)
- $(CAT) $< | $(SED) "s/XXXX/$(shell cat $(DB_ZIP_DIR)/COPYRIGHTYEAR)/" > $@
-
- $(JDK_IMAGE_DIR)/db/3RDPARTY: $(DB_ZIP_DIR)/3RDPARTY
- $(ECHO) $(LOG_INFO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'
- $(MKDIR) -p $(@D)
- $(CAT) $< | $(SED) "s/XXXX/$(shell cat $(DB_ZIP_DIR)/COPYRIGHTYEAR)/" > $@
-
- JDK_DB_TARGETS := $(patsubst $(DB_ZIP_DIR)/%, $(IMAGES_OUTPUTDIR)/_unzip/%.unzipped, \
- $(wildcard $(DB_ZIP_DIR)/*.zip)) \
- $(JDK_IMAGE_DIR)/db/README-JDK.html $(JDK_IMAGE_DIR)/db/3RDPARTY
-
-endif
-
-################################################################################
-# /include dir
-
-$(foreach f,$(call CacheFind,$(JDK_OUTPUTDIR)/include), \
- $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_INCLUDE_TARGETS)))
-
-################################################################################
-# doc files
-
-ifdef OPENJDK
- JRE_DOC_FILES := LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README
- JDK_DOC_FILES := LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README
- JRE_DOC_LOCATION := $(JDK_TOPDIR)
- JDK_DOC_LOCATION := $(JDK_TOPDIR)
-else
- JRE_DOC_FILES := COPYRIGHT Welcome.html LICENSE THIRDPARTYLICENSEREADME.txt
- JDK_DOC_FILES := COPYRIGHT README.html LICENSE THIRDPARTYLICENSEREADME.txt
- ifeq ($(OPENJDK_TARGET_OS), windows)
- JRE_DOC_FILES += README.txt
- else
- JRE_DOC_FILES += README
- endif
- JDK_DOC_FILES += demo/DEMOS_LICENSE sample/SAMPLES_LICENSE
- JRE_DOC_LOCATION := $(JDK_TOPDIR)/src/closed/doc/jre
- JDK_DOC_LOCATION := $(JDK_TOPDIR)/src/closed/doc/jdk
-endif
-JRE_DOC_TARGETS := $(addprefix $(JRE_IMAGE_DIR)/, $(JRE_DOC_FILES))
-JDKJRE_DOC_TARGETS := $(addprefix $(JDK_IMAGE_DIR)/jre/, $(JRE_DOC_FILES))
-JDK_DOC_TARGETS := $(addprefix $(JDK_IMAGE_DIR)/, $(JDK_DOC_FILES))
-
-$(JRE_IMAGE_DIR)/%: $(JRE_DOC_LOCATION)/%
- $(process-doc-file)
-
-$(JDK_IMAGE_DIR)/jre/%: $(JRE_DOC_LOCATION)/%
- $(process-doc-file)
-
-$(JRE_IMAGE_DIR)/README.txt: $(JRE_DOC_LOCATION)/README
- $(process-doc-file)
-
-$(JDK_IMAGE_DIR)/jre/README.txt: $(JRE_DOC_LOCATION)/README
- $(process-doc-file)
-
-$(JDK_IMAGE_DIR)/%: $(JDK_DOC_LOCATION)/%
- $(process-doc-file)
-
-$(JDK_IMAGE_DIR)/demo/%: $(JDK_DOC_LOCATION)/%
- $(process-doc-file)
-
-$(JDK_IMAGE_DIR)/sample/%: $(JDK_DOC_LOCATION)/%
- $(process-doc-file)
-
-JRE_INFO_FILE := $(JRE_IMAGE_DIR)/release
-JDK_INFO_FILE := $(JDK_IMAGE_DIR)/release
-
-JRE_OVERLAY_INFO_FILE := $(JRE_OVERLAY_IMAGE_DIR)/release
-JDK_OVERLAY_INFO_FILE := $(JDK_OVERLAY_IMAGE_DIR)/release
-
-# Common way to emit a line into the release or info file
-define info-file-item # name value
- $(PRINTF) '%s="%s"\n' $1 $2 >> $@
-endef
-
-define create-info-file
- $(MKDIR) -p $(@D)
- $(RM) $@
- $(call info-file-item, "JAVA_VERSION", "$(JDK_VERSION)")
- $(call info-file-item, "OS_NAME", "$(REQUIRED_OS_NAME)")
- $(call info-file-item, "OS_VERSION", "$(REQUIRED_OS_VERSION)")
- $(call info-file-item, "OS_ARCH", "$(OPENJDK_TARGET_CPU_LEGACY)")
- if [ -n "$(JDK_ARCH_ABI_PROP_NAME)" ]; then $(call info-file-item, "SUN_ARCH_ABI", "$(JDK_ARCH_ABI_PROP_NAME)"); fi
- $(call info-file-item, "SOURCE", "$(ALL_SOURCE_TIPS)")
-endef
-
-ALL_SOURCE_TIPS = $(shell \
- if [ -f $(OUTPUT_ROOT)/source_tips ] ; then \
- $(CAT) $(OUTPUT_ROOT)/source_tips ; \
- fi)
-
-$(JRE_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips
- $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(call create-info-file)
- ifneq ($(PROFILE), )
- $(call info-file-item, "JAVA_PROFILE", "$(call profile_name, $(call profile_number, $(PROFILE)))")
- endif
-
-$(JDK_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips
- $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(call create-info-file)
-
-$(JRE_OVERLAY_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips
- $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(call create-info-file)
-
-$(JDK_OVERLAY_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips
- $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(call create-info-file)
-
-$(JDK_IMAGE_DIR)/src.zip: $(IMAGES_OUTPUTDIR)/src.zip
- $(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
- $(install-file)
-
-################################################################################
-# Post processing (strip etc)
-
-ifneq ($(POST_STRIP_CMD), )
- ifeq ($(OPENJDK_TARGET_OS), windows)
- EXEC_LIST_BIN := $(filter-out %$(notdir $(MSVCR_DLL)), $(filter %.exe %.dll, $(ALL_BIN_LIST)))
- else
- # Find all executables in JDK_OUTPUTDIR since they exist when this makefile is parsed
- EXEC_LIST_BIN := $(shell $(FILE) `$(FIND) $(JDK_OUTPUTDIR)/bin -type f -name \*$(EXE_SUFFIX) ! -name \*.debuginfo` \
- | $(EGREP) 'ELF' | $(CUT) -d':' -f1)
- # On mac, the old build searches for static libraries for stripping instead of shared.
- # Not clear if it's intentional.
- ifneq ($(OPENJDK_TARGET_OS), macosx)
- EXEC_LIST_LIB := $(shell $(FIND) $(JDK_OUTPUTDIR)/lib -type f -name \*$(SHARED_LIBRARY_SUFFIX))
- endif
- endif
- # Filter out sjavac
- EXEC_LIST_BIN := $(filter-out %sjavac$(EXE_SUFFIX), $(EXEC_LIST_BIN))
-
- # Filter out the overlay specific bin files
- EXEC_LIST := $(filter-out $(OVERLAY_FILTER), $(EXEC_LIST_BIN)) $(EXEC_LIST_LIB)
- EXEC_LIST_OVERLAY := $(filter $(OVERLAY_FILTER), $(EXEC_LIST_BIN)) $(EXEC_LIST_LIB)
-
- # Filter out non JRE files and convert to unique touch files to depend on
- JRE_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, $(IMAGES_OUTPUTDIR)/_strip_jre$(PROFILE)/%.stripped, \
- $(filter-out $(addprefix %, $(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)), \
- $(EXEC_LIST)))
-
- JDKJRE_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, \
- $(IMAGES_OUTPUTDIR)/_strip_jdk/jre/%.stripped, \
- $(filter-out $(addprefix %, $(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES)), $(EXEC_LIST)))
-
- JDK_BIN_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, \
- $(IMAGES_OUTPUTDIR)/_strip_jdk/%.stripped, \
- $(filter-out $(JDK_OUTPUTDIR)/lib/%, $(EXEC_LIST)))
-
- # Do the same for overlay image
- JRE_OVERLAY_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, $(IMAGES_OUTPUTDIR)/_strip_jre_overlay/%.stripped, \
- $(filter-out $(addprefix %, $(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)), \
- $(EXEC_LIST_OVERLAY)))
-
- JDKJRE_OVERLAY_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, \
- $(IMAGES_OUTPUTDIR)/_strip_jdk_overlay/jre/%.stripped, \
- $(filter-out $(addprefix %, $(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES)), $(EXEC_LIST_OVERLAY)))
-
- JDK_OVERLAY_BIN_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, \
- $(IMAGES_OUTPUTDIR)/_strip_jdk_overlay/%.stripped, \
- $(filter-out $(JDK_OUTPUTDIR)/lib/%, $(EXEC_LIST_OVERLAY)))
-
- define mcs-file
- $(if $(POST_MCS_CMD), $(POST_MCS_CMD) $<)
- endef
-
- define strip-file
- $(ECHO) Stripping $(LOG_INFO) $(patsubst $(OUTPUT_ROOT)/%,%,$<)
- $(CHMOD) u+w $<
- $(POST_STRIP_CMD) $<
- $(call mcs-file)
- $(CHMOD) go-w $<
- $(MKDIR) -p $(@D)
- $(TOUCH) $@
- endef
-
- # Setup a rule for stripping files based on touch files
- $(IMAGES_OUTPUTDIR)/_strip_jre$(PROFILE)/%.stripped: $(JRE_IMAGE_DIR)/%
- $(call strip-file)
-
- $(IMAGES_OUTPUTDIR)/_strip_jdk/%.stripped: $(JDK_IMAGE_DIR)/%
- $(call strip-file)
-
- $(IMAGES_OUTPUTDIR)/_strip_jre_overlay/%.stripped: $(JRE_OVERLAY_IMAGE_DIR)/%
- $(call strip-file)
-
- $(IMAGES_OUTPUTDIR)/_strip_jdk_overlay/%.stripped: $(JDK_OVERLAY_IMAGE_DIR)/%
- $(call strip-file)
-
-endif
-
-################################################################################
-
-# Include the custom makefile right here, after all variables have been defined
-# so that they may be overridden, but before the main targets are declared, so
-# that overriding has an effect.
-$(eval $(call IncludeCustomExtension, jdk, Images.gmk))
-
-################################################################################
-# Main targets
-
-jre-image: $(JRE_BIN_TARGETS) $(JRE_LIB_TARGETS) $(JRE_IMAGE_DIR)/lib/applet \
- $(JRE_IMAGE_DIR)/lib/meta-index $(JRE_IMAGE_DIR)/lib/ext/meta-index \
- $(JRE_MAN_PAGE_LIST) $(JRE_DOC_TARGETS) $(JRE_INFO_FILE) $(JRE_STRIP_LIST) \
- $(JRE_BIN_ISADIR_LINK_TARGETS)
-
-jdk-image: $(JDK_BIN_TARGETS) $(JDKJRE_BIN_TARGETS) \
- $(JDK_LIB_TARGETS) $(JDKJRE_LIB_TARGETS) \
- $(JDK_IMAGE_DIR)/jre/lib/applet \
- $(JDK_DEMO_TARGETS) \
- $(JDK_IMAGE_DIR)/jre/lib/meta-index $(JDK_IMAGE_DIR)/jre/lib/ext/meta-index \
- $(JDK_MAN_PAGE_LIST) $(JDK_SAMPLE_TARGETS) \
- $(JDK_DB_TARGETS) $(JDK_INCLUDE_TARGETS) \
- $(JDKJRE_DOC_TARGETS) $(JDK_DOC_TARGETS) \
- $(JDK_INFO_FILE) $(JDKJRE_STRIP_LIST) $(JDK_BIN_STRIP_LIST) \
- $(JDK_IMAGE_DIR)/src.zip \
- $(JDK_BIN_ISADIR_LINK_TARGETS) $(JDKJRE_BIN_ISADIR_LINK_TARGETS)
-
-jre-overlay-image: $(JRE_OVERLAY_BIN_TARGETS) $(JRE_OVERLAY_LIB_TARGETS) \
- $(JRE_OVERLAY_INFO_FILE) $(JRE_OVERLAY_STRIP_LIST)
-
-jdk-overlay-image: $(JDK_OVERLAY_BIN_TARGETS) $(JDKJRE_OVERLAY_BIN_TARGETS) \
- $(JDK_OVERLAY_LIB_TARGETS) $(JDKJRE_OVERLAY_LIB_TARGETS) \
- $(JDK_OVERLAY_DEMO_TARGETS) $(JDK_OVERLAY_INFO_FILE) \
- $(JDKJRE_OVERLAY_STRIP_LIST) $(JDK_OVERLAY_BIN_STRIP_LIST)
-
-ifneq ($(PROFILE), )
- PROFILE_IMAGE_JARS := $(filter %.jar, $(JRE_LIB_TARGETS))
-
- PROFILE_IMAGE_JARS_CHECKED := $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_jars_checked
-
- $(PROFILE_IMAGE_JARS_CHECKED) : $(PROFILE_IMAGE_JARS)
- $(TOOL_CHECKDEPS) $(JRE_IMAGE_DIR) \
- $(call profile_name, $(call profile_number, $(PROFILE)))
- $(TOUCH) $@
-
- profile-image: $(JRE_BIN_TARGETS) $(JRE_LIB_TARGETS) \
- $(JRE_IMAGE_DIR)/lib/meta-index $(JRE_IMAGE_DIR)/lib/ext/meta-index \
- $(JRE_INFO_FILE) $(JRE_STRIP_LIST) $(PROFILE_IMAGE_JARS_CHECKED)
-
- .PHONY: profile-image
-
-endif # Profile
-
-################################################################################
-
-.PHONY: default images jre-image jdk-image
diff --git a/jdk/make/Import.gmk b/jdk/make/Import.gmk
index 5bf9437da7f..66996057fa4 100644
--- a/jdk/make/Import.gmk
+++ b/jdk/make/Import.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2014, Oracle and/or its affiliates. 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
@@ -31,34 +31,53 @@ include MakeBase.gmk
################################################################################
# Put the libraries here. Different locations for different target apis.
-ifeq ($(OPENJDK_TARGET_OS_API), posix)
- INSTALL_LIBRARIES_HERE := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
+ifneq ($(OPENJDK_TARGET_OS), windows)
HOTSPOT_LIB_DIR := $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)
+ BASE_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)
+ SA_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent$(OPENJDK_TARGET_CPU_LIBDIR)
else
- INSTALL_LIBRARIES_HERE := $(JDK_OUTPUTDIR)/bin
HOTSPOT_LIB_DIR := $(HOTSPOT_DIST)/jre/bin
+ BASE_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base
+ SA_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.hotspot.agent
endif
################################################################################
-
-define CopyDir
- $1_SRC_FILES := $(shell $(FIND) $2 -type f -a \( -name DUMMY $(addprefix -o$(SPACE)-name$(SPACE),$4) \))
- $1_DST_FILES := $$(patsubst $2/%,$3/%,$$($1_SRC_FILES))
- HOTSPOT_IMPORT_TARGET_FILES += $$($1_DST_FILES)
- $3/%: $2/%
- $(ECHO) $(LOG_INFO) Copying $$(@F)
- $$(install-file)
-endef
-
-################################################################################
-
#
# Import hotspot
#
-HOTSPOT_IMPORT_FILES := $(addprefix $(LIBRARY_PREFIX), jvm.* saproc.* jsig.* sawindbg.* jvm_db.* jvm_dtrace.*) \
- Xusage.txt sa-jdi.jar
-$(eval $(call CopyDir,HOTSPOT0, $(HOTSPOT_LIB_DIR), $(INSTALL_LIBRARIES_HERE), $(HOTSPOT_IMPORT_FILES)))
-$(eval $(call CopyDir,HOTSPOT1, $(HOTSPOT_DIST)/lib, $(JDK_OUTPUTDIR)/lib, $(HOTSPOT_IMPORT_FILES)))
+HOTSPOT_BASE_IMPORT_FILES := \
+ $(addprefix $(LIBRARY_PREFIX), jvm.* jsig.* jvm_db.* jvm_dtrace.*) \
+ Xusage.txt \
+ #
+
+HOTSPOT_SA_IMPORT_FILES := \
+ $(addprefix $(LIBRARY_PREFIX), saproc.* sawindbg.*) \
+ #
+
+$(eval $(call SetupCopyFiles,COPY_HOTSPOT_BASE, \
+ SRC := $(HOTSPOT_LIB_DIR), \
+ DEST := $(BASE_INSTALL_LIBRARIES_HERE), \
+ FILES := $(shell $(FIND) $(HOTSPOT_LIB_DIR) -type f \
+ -a \( -name DUMMY $(addprefix -o$(SPACE)-name$(SPACE), $(HOTSPOT_BASE_IMPORT_FILES)) \) )))
+
+ifeq ($(OPENJDK_TARGET_OS), windows)
+ $(eval $(call SetupCopyFiles,COPY_HOTSPOT_BASE_JVMLIB, \
+ SRC := $(HOTSPOT_DIST)/lib, \
+ DEST := $(BASE_INSTALL_LIBRARIES_HERE), \
+ FILES := $(wildcard $(HOTSPOT_DIST)/lib/*.lib)))
+endif
+
+BASE_TARGETS := $(COPY_HOTSPOT_BASE) $(COPY_HOTSPOT_BASE_JVMLIB)
+
+$(eval $(call SetupCopyFiles,COPY_HOTSPOT_SA, \
+ SRC := $(HOTSPOT_LIB_DIR), \
+ DEST := $(SA_INSTALL_LIBRARIES_HERE), \
+ FILES := $(shell $(FIND) $(HOTSPOT_LIB_DIR) -type f \
+ -a \( -name DUMMY $(addprefix -o$(SPACE)-name$(SPACE), $(HOTSPOT_SA_IMPORT_FILES)) \) )))
+
+SA_TARGETS := $(COPY_HOTSPOT_SA)
+
+################################################################################
ifeq ($(OPENJDK_TARGET_OS), macosx)
JSIG_DEBUGINFO := $(strip $(wildcard $(HOTSPOT_DIST)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig$(SHARED_LIBRARY_SUFFIX).dSYM) \
@@ -70,39 +89,39 @@ endif
ifneq ($(OPENJDK_TARGET_OS), windows)
ifeq ($(JVM_VARIANT_SERVER), true)
- HOTSPOT_IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/server/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
+ BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/server/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
ifneq (, $(JSIG_DEBUGINFO))
- HOTSPOT_IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/server/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
+ BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/server/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
endif
endif
ifeq ($(JVM_VARIANT_CLIENT), true)
- HOTSPOT_IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/client/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
+ BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/client/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
ifneq (, $(JSIG_DEBUGINFO))
- HOTSPOT_IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/client/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
+ BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/client/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
endif
endif
ifneq ($(OPENJDK_TARGET_OS), macosx)
ifeq ($(JVM_VARIANT_MINIMAL1), true)
- HOTSPOT_IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/minimal/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
+ BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/minimal/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
ifneq (,$(JSIG_DEBUGINFO))
- HOTSPOT_IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/minimal/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
+ BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/minimal/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
endif
endif
endif
endif
-$(INSTALL_LIBRARIES_HERE)/server/%$(SHARED_LIBRARY_SUFFIX): $(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
+$(BASE_INSTALL_LIBRARIES_HERE)/server/%$(SHARED_LIBRARY_SUFFIX): $(BASE_INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
$(MKDIR) -p $(@D)
$(RM) $@
$(LN) -s ../$(@F) $@
ifeq ($(OPENJDK_TARGET_OS), macosx)
- $(INSTALL_LIBRARIES_HERE)/server/%.dSYM : $(INSTALL_LIBRARIES_HERE)/%.dSYM
+ $(BASE_INSTALL_LIBRARIES_HERE)/server/%.dSYM : $(BASE_INSTALL_LIBRARIES_HERE)/%.dSYM
$(MKDIR) -p $(@D)
$(RM) $@
$(LN) -s ../$(@F) $@
- $(INSTALL_LIBRARIES_HERE)/server/%.diz : $(INSTALL_LIBRARIES_HERE)/%.diz
+ $(BASE_INSTALL_LIBRARIES_HERE)/server/%.diz : $(BASE_INSTALL_LIBRARIES_HERE)/%.diz
$(MKDIR) -p $(@D)
$(RM) $@
$(RM) $@.tmp $(basename $@)$(SHARED_LIBRARY_SUFFIX).dSYM
@@ -111,12 +130,12 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
$(RM) $(basename $@)$(SHARED_LIBRARY_SUFFIX).dSYM
$(MV) $@.tmp $@
else
- $(INSTALL_LIBRARIES_HERE)/server/%.debuginfo: $(INSTALL_LIBRARIES_HERE)/%.debuginfo
+ $(BASE_INSTALL_LIBRARIES_HERE)/server/%.debuginfo: $(BASE_INSTALL_LIBRARIES_HERE)/%.debuginfo
$(MKDIR) -p $(@D)
$(RM) $@
$(LN) -s ../$(@F) $@
- $(INSTALL_LIBRARIES_HERE)/server/%.diz: $(INSTALL_LIBRARIES_HERE)/%.diz
+ $(BASE_INSTALL_LIBRARIES_HERE)/server/%.diz: $(BASE_INSTALL_LIBRARIES_HERE)/%.diz
$(MKDIR) -p $(@D)
$(RM) $@
$(RM) $@.tmp $(basename $@).debuginfo
@@ -126,18 +145,18 @@ else
$(MV) $@.tmp $@
endif
-$(INSTALL_LIBRARIES_HERE)/client/%$(SHARED_LIBRARY_SUFFIX): $(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
+$(BASE_INSTALL_LIBRARIES_HERE)/client/%$(SHARED_LIBRARY_SUFFIX): $(BASE_INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
$(MKDIR) -p $(@D)
$(RM) $@
$(LN) -s ../$(@F) $@
ifeq ($(OPENJDK_TARGET_OS), macosx)
- $(INSTALL_LIBRARIES_HERE)/client/%.dSYM : $(INSTALL_LIBRARIES_HERE)/%.dSYM
+ $(BASE_INSTALL_LIBRARIES_HERE)/client/%.dSYM : $(BASE_INSTALL_LIBRARIES_HERE)/%.dSYM
$(MKDIR) -p $(@D)
$(RM) $@
$(LN) -s ../$(@F) $@
- $(INSTALL_LIBRARIES_HERE)/client/%.diz : $(INSTALL_LIBRARIES_HERE)/%.diz
+ $(BASE_INSTALL_LIBRARIES_HERE)/client/%.diz : $(BASE_INSTALL_LIBRARIES_HERE)/%.diz
$(MKDIR) -p $(@D)
$(RM) $@
$(RM) $@.tmp $(basename $@)$(SHARED_LIBRARY_SUFFIX).dSYM
@@ -146,12 +165,12 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
$(RM) $(basename $@)$(SHARED_LIBRARY_SUFFIX).dSYM
$(MV) $@.tmp $@
else
- $(INSTALL_LIBRARIES_HERE)/client/%.debuginfo: $(INSTALL_LIBRARIES_HERE)/%.debuginfo
+ $(BASE_INSTALL_LIBRARIES_HERE)/client/%.debuginfo: $(BASE_INSTALL_LIBRARIES_HERE)/%.debuginfo
$(MKDIR) -p $(@D)
$(RM) $@
$(LN) -s ../$(@F) $@
- $(INSTALL_LIBRARIES_HERE)/client/%.diz: $(INSTALL_LIBRARIES_HERE)/%.diz
+ $(BASE_INSTALL_LIBRARIES_HERE)/client/%.diz: $(BASE_INSTALL_LIBRARIES_HERE)/%.diz
$(MKDIR) -p $(@D)
$(RM) $@
$(RM) $@.tmp $(basename $@).debuginfo
@@ -161,18 +180,18 @@ else
$(MV) $@.tmp $@
endif
-$(INSTALL_LIBRARIES_HERE)/minimal/%$(SHARED_LIBRARY_SUFFIX): $(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
+$(BASE_INSTALL_LIBRARIES_HERE)/minimal/%$(SHARED_LIBRARY_SUFFIX): $(BASE_INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
$(MKDIR) -p $(@D)
$(RM) $@
$(LN) -s ../$(@F) $@
ifneq ($(OPENJDK_TARGET_OS), macosx)
- $(INSTALL_LIBRARIES_HERE)/minimal/%.debuginfo: $(INSTALL_LIBRARIES_HERE)/%.debuginfo
+ $(BASE_INSTALL_LIBRARIES_HERE)/minimal/%.debuginfo: $(BASE_INSTALL_LIBRARIES_HERE)/%.debuginfo
$(MKDIR) -p $(@D)
$(RM) $@
$(LN) -s ../$(@F) $@
- $(INSTALL_LIBRARIES_HERE)/minimal/%.diz: $(INSTALL_LIBRARIES_HERE)/%.diz
+ $(BASE_INSTALL_LIBRARIES_HERE)/minimal/%.diz: $(BASE_INSTALL_LIBRARIES_HERE)/%.diz
$(MKDIR) -p $(@D)
$(RM) $@
$(RM) $@.tmp $(basename $@).debuginfo
@@ -182,10 +201,69 @@ ifneq ($(OPENJDK_TARGET_OS), macosx)
$(MV) $@.tmp $@
endif
-##########################################################################################
+################################################################################
-hotspot: $(HOTSPOT_IMPORT_TARGET_FILES)
+$(JDK_OUTPUTDIR)/modules/jdk.hotspot.agent/_the.sa.jar.unpacked: $(HOTSPOT_DIST)/lib/sa-jdi.jar \
+ $(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent/_the.sa.services
+ $(ECHO) $(LOG_INFO) Unzipping $( $@.tmp)
$(MV) $@.tmp $@
endef
-$(JDK_OUTPUTDIR)/classes/_the.sec-bin.unzipped: $(SEC_FILES_ZIP)
+define unzip-native-sec-file
+ $(ECHO) Unzipping $( $@.tmp)
+ $(MV) $@.tmp $@
+endef
+
+$(SUPPORT_OUTPUTDIR)/_the.sec-bin.unzipped: $(SEC_FILES_ZIP)
$(call unzip-sec-file)
-$(JDK_OUTPUTDIR)/classes/_the.sec-windows-bin.unzipped: $(SEC_FILES_WIN_ZIP)
+# Trying to unzip both of the sec files at the same time may cause a race
+# when creating directories common to both files.
+$(SUPPORT_OUTPUTDIR)/_the.sec-windows-bin.unzipped: $(SEC_FILES_WIN_ZIP) \
+ | $(SUPPORT_OUTPUTDIR)/_the.sec-bin.unzipped
$(call unzip-sec-file)
-$(JDK_OUTPUTDIR)/classes/_the.jgss-windows-i586-bin.unzipped: $(JGSS_WIN32_FILES_ZIP)
- $(call unzip-sec-file)
+$(SUPPORT_OUTPUTDIR)/_the.jgss-windows-i586-bin.unzipped: $(JGSS_WIN32_FILES_ZIP)
+ $(call unzip-native-sec-file)
-$(JDK_OUTPUTDIR)/classes/_the.jgss-windows-x64-bin.unzipped: $(JGSS_WIN64_FILES_ZIP)
- $(call unzip-sec-file)
+$(SUPPORT_OUTPUTDIR)/_the.jgss-windows-x64-bin.unzipped: $(JGSS_WIN64_FILES_ZIP)
+ $(call unzip-native-sec-file)
ifneq ($(wildcard $(SEC_FILES_ZIP)), )
- IMPORT_TARGET_FILES += $(JDK_OUTPUTDIR)/classes/_the.sec-bin.unzipped
+ IMPORT_TARGET_FILES += $(SUPPORT_OUTPUTDIR)/_the.sec-bin.unzipped
ifeq ($(OPENJDK_TARGET_OS), windows)
- IMPORT_TARGET_FILES += $(JDK_OUTPUTDIR)/classes/_the.sec-windows-bin.unzipped
+ IMPORT_TARGET_FILES += $(SUPPORT_OUTPUTDIR)/_the.sec-windows-bin.unzipped
ifeq ($(OPENJDK_TARGET_CPU), x86)
- IMPORT_TARGET_FILES += $(JDK_OUTPUTDIR)/classes/_the.jgss-windows-i586-bin.unzipped
+ IMPORT_TARGET_FILES += $(SUPPORT_OUTPUTDIR)/_the.jgss-windows-i586-bin.unzipped
endif
ifeq ($(OPENJDK_TARGET_CPU), x86_64)
- IMPORT_TARGET_FILES += $(JDK_OUTPUTDIR)/classes/_the.jgss-windows-x64-bin.unzipped
+ IMPORT_TARGET_FILES += $(SUPPORT_OUTPUTDIR)/_the.jgss-windows-x64-bin.unzipped
endif
endif
endif
diff --git a/jdk/make/copy/Copy-java.base.gmk b/jdk/make/copy/Copy-java.base.gmk
index fd9a0ef3afa..ab7696e9f99 100644
--- a/jdk/make/copy/Copy-java.base.gmk
+++ b/jdk/make/copy/Copy-java.base.gmk
@@ -31,7 +31,7 @@ $(eval $(call IncludeCustomExtension, jdk, copy/Copy-java.base.gmk))
#
# Copy exported header files to outputdir.
#
-JAVA_BASE_HEADERS := \
+TARGETS += \
$(INCLUDE_DST_DIR)/jni.h \
$(INCLUDE_DST_DIR)/jvmti.h \
$(INCLUDE_DST_DIR)/jvmticmlr.h \
@@ -55,7 +55,7 @@ ifneq ($(findstring $(OPENJDK_TARGET_OS), windows aix),)
$(LIB_DST_DIR)/tzmappings: $(TZMAPPINGS_SRC)/tzmappings
$(call install-file)
- BASE_CONF_FILES += $(LIB_DST_DIR)/tzmappings
+ TARGETS += $(LIB_DST_DIR)/tzmappings
endif
@@ -63,11 +63,13 @@ endif
# Copy msvcrXX.dll on windows
ifeq ($(OPENJDK_TARGET_OS), windows)
- MSVCR_TARGET := $(JDK_OUTPUTDIR)/bin/$(notdir $(MSVCR_DLL))
+ MSVCR_TARGET := $(LIB_DST_DIR)/$(notdir $(MSVCR_DLL))
# Chmod to avoid permission issues if bundles are unpacked on unix platforms.
$(MSVCR_TARGET): $(MSVCR_DLL)
$(call install-file)
$(CHMOD) a+rx $@
+
+ TARGETS += $(MSVCR_TARGET)
endif
################################################################################
@@ -85,7 +87,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
else
JVMCFG_SRC := $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/conf/$(JVMCFG_ARCH)/jvm.cfg
endif
-JVMCFG_DIR := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
+JVMCFG_DIR := $(LIB_DST_DIR)$(OPENJDK_TARGET_CPU_LIBDIR)
JVMCFG := $(JVMCFG_DIR)/jvm.cfg
# To do: should this also support -zeroshark?
@@ -143,12 +145,12 @@ else
endif
endif
-BASE_CONF_FILES += $(JVMCFG)
+TARGETS += $(JVMCFG)
################################################################################
POLICY_SRC := $(JDK_TOPDIR)/src/java.base/share/conf/security/java.policy
-POLICY_DST := $(JDK_OUTPUTDIR)/lib/security/java.policy
+POLICY_DST := $(CONF_DST_DIR)/security/java.policy
POLICY_SRC_LIST :=
@@ -167,40 +169,34 @@ $(POLICY_DST): $(POLICY_SRC_LIST)
$(foreach f,$(POLICY_SRC_LIST),$(CAT) $(f) >> $@.tmp;)
$(MV) $@.tmp $@
-BASE_CONF_FILES += $(POLICY_DST)
+TARGETS += $(POLICY_DST)
################################################################################
ifeq ($(CACERTS_FILE), )
CACERTS_FILE := $(JDK_TOPDIR)/src/java.base/share/conf/security/cacerts
endif
-CACERTS_DST := $(JDK_OUTPUTDIR)/lib/security/cacerts
+CACERTS_DST := $(LIB_DST_DIR)/security/cacerts
$(CACERTS_DST): $(CACERTS_FILE)
$(call install-file)
-BASE_CONF_FILES += $(CACERTS_DST)
+TARGETS += $(CACERTS_DST)
################################################################################
-$(JDK_OUTPUTDIR)/lib/net.properties: $(JDK_TOPDIR)/src/java.base/share/conf/net.properties
+$(CONF_DST_DIR)/net.properties: $(JDK_TOPDIR)/src/java.base/share/conf/net.properties
$(ECHO) $(LOG_INFO) Copying $(@F)
$(call install-file)
-NET_CONF_FILES += $(JDK_OUTPUTDIR)/lib/net.properties
+TARGETS += $(CONF_DST_DIR)/net.properties
ifeq ($(OPENJDK_TARGET_OS), solaris)
- $(JDK_OUTPUTDIR)/lib/sdp/sdp.conf.template: $(JDK_TOPDIR)/src/java.base/${OPENJDK_TARGET_OS_API_DIR}/conf/sdp/sdp.conf.template
+ $(CONF_DST_DIR)/sdp/sdp.conf.template: $(JDK_TOPDIR)/src/java.base/${OPENJDK_TARGET_OS_API_DIR}/conf/sdp/sdp.conf.template
$(ECHO) $(LOG_INFO) Copying $(@F)
$(call install-file)
- NET_CONF_FILES += $(JDK_OUTPUTDIR)/lib/sdp/sdp.conf.template
+ TARGETS += $(CONF_DST_DIR)/sdp/sdp.conf.template
endif
################################################################################
-
-java.base: $(BASE_CONF_FILES) $(NET_CONF_FILES) $(JAVA_BASE_HEADERS) $(MSVCR_TARGET)
-
-all: java.base
-
-.PHONY: all java.base
diff --git a/jdk/make/copy/Copy-java.desktop.gmk b/jdk/make/copy/Copy-java.desktop.gmk
index b3fd662bf9c..2c01cd32fa0 100644
--- a/jdk/make/copy/Copy-java.desktop.gmk
+++ b/jdk/make/copy/Copy-java.desktop.gmk
@@ -29,7 +29,7 @@ $(eval $(call IncludeCustomExtension, jdk, copy/Copy-java.desktop.gmk))
################################################################################
-JAVA_DESKTOP_HEADERS := \
+TARGETS += \
$(INCLUDE_DST_DIR)/jawt.h \
$(INCLUDE_DST_OS_DIR)/jawt_md.h \
#
@@ -62,9 +62,9 @@ ifneq ($(FREETYPE_BUNDLE_LIB_PATH), )
#TODO: rework this to avoid hardcoding library name in the makefile
#
ifeq ($(OPENJDK_TARGET_OS), windows)
- FREETYPE_TARGET_LIB := $(JDK_OUTPUTDIR)/bin/$(call SHARED_LIBRARY,freetype)
+ FREETYPE_TARGET_LIB := $(LIB_DST_DIR)/$(call SHARED_LIBRARY,freetype)
else
- FREETYPE_TARGET_LIB := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/$(call SHARED_LIBRARY,freetype).6
+ FREETYPE_TARGET_LIB := $(LIB_DST_DIR)$(OPENJDK_TARGET_CPU_LIBDIR)/$(call SHARED_LIBRARY,freetype).6
endif
# We can't use $(install-file) in this rule because it preserves symbolic links and
@@ -75,14 +75,16 @@ ifneq ($(FREETYPE_BUNDLE_LIB_PATH), )
ifeq ($(OPENJDK_BUILD_OS), windows)
$(CHMOD) +rx $@
endif
+
+ TARGETS += $(FREETYPE_TARGET_LIB)
endif
################################################################################
-$(JDK_OUTPUTDIR)/lib/sound.properties: $(JDK_TOPDIR)/src/java.desktop/share/conf/sound.properties
+$(CONF_DST_DIR)/sound.properties: $(JDK_TOPDIR)/src/java.desktop/share/conf/sound.properties
$(call install-file)
-DESKTOP_CONF_FILES += $(JDK_OUTPUTDIR)/lib/sound.properties
+TARGETS += $(CONF_DST_DIR)/sound.properties
################################################################################
#
@@ -95,7 +97,7 @@ PSFONTPROPFILE_TARGET_FILES := $(subst $(PSFONTPROPFILE_SRC_DIR),$(LIB_DST_DIR),
$(LIB_DST_DIR)/%: $(PSFONTPROPFILE_SRC_DIR)/%
$(call install-file)
-DESKTOP_CONF_FILES += $(PSFONTPROPFILE_TARGET_FILES)
+TARGETS += $(PSFONTPROPFILE_TARGET_FILES)
################################################################################
#
@@ -113,7 +115,7 @@ CURSORS_OPENJDK_TARGET_OS_LIB_SRC := $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TA
$(CURSORS_DEST_DIR)/cursors.properties: $(CURSORS_OPENJDK_TARGET_OS_LIB_SRC)/cursors.properties
$(call install-file)
-DESKTOP_CONF_FILES += $(CURSORS_DEST_DIR)/cursors.properties
+TARGETS += $(CURSORS_DEST_DIR)/cursors.properties
CURSORS_LIB_SRC := $(JDK_TOPDIR)/src/java.desktop/share/conf/images/cursors
ifeq ($(OPENJDK_TARGET_OS), windows)
@@ -126,12 +128,6 @@ CURSORS_TARGET_FILES := $(subst $(CURSORS_LIB_SRC),$(CURSORS_DEST_DIR),$(CURSORS
$(CURSORS_DEST_DIR)/%: $(CURSORS_LIB_SRC)/%
$(call install-file)
-DESKTOP_CONF_FILES += $(CURSORS_TARGET_FILES)
+TARGETS += $(CURSORS_TARGET_FILES)
################################################################################
-
-java.desktop: $(DESKTOP_CONF_FILES) $(FREETYPE_TARGET_LIB) $(JAVA_DESKTOP_HEADERS)
-
-all: java.desktop
-
-.PHONY: all java.desktop
diff --git a/jdk/make/copy/Copy-java.logging.gmk b/jdk/make/copy/Copy-java.logging.gmk
index da77f247276..8791e574e8d 100644
--- a/jdk/make/copy/Copy-java.logging.gmk
+++ b/jdk/make/copy/Copy-java.logging.gmk
@@ -29,15 +29,9 @@ include CopyCommon.gmk
LOGGING_LIB_SRC := $(JDK_TOPDIR)/src/java.logging/share/conf
-$(LIB_DST_DIR)/logging.properties: $(LOGGING_LIB_SRC)/logging.properties
+$(CONF_DST_DIR)/logging.properties: $(LOGGING_LIB_SRC)/logging.properties
$(call install-file)
-LOGGING_CONF_FILES := $(LIB_DST_DIR)/logging.properties
+TARGETS := $(CONF_DST_DIR)/logging.properties
################################################################################
-
-java.logging: $(LOGGING_CONF_FILES)
-
-all: java.logging
-
-.PHONY: all java.logging
diff --git a/jdk/make/copy/Copy-java.management.gmk b/jdk/make/copy/Copy-java.management.gmk
index 2352c909cad..32348570198 100644
--- a/jdk/make/copy/Copy-java.management.gmk
+++ b/jdk/make/copy/Copy-java.management.gmk
@@ -27,30 +27,24 @@ include CopyCommon.gmk
################################################################################
-MGMT_LIBDIR := $(LIB_DST_DIR)/management
-MGMT_LIB_SRC := $(JDK_TOPDIR)/src/java.management/share/conf
-MGMT_SRC_FILES := $(wildcard $(MGMT_LIB_SRC)/*)
-MGMT_TARGET_FILES := $(subst $(MGMT_LIB_SRC),$(MGMT_LIBDIR),$(MGMT_SRC_FILES))
+MGMT_CONF_DIR := $(CONF_DST_DIR)/management
+MGMT_CONF_SRC := $(JDK_TOPDIR)/src/java.management/share/conf
+MGMT_SRC_FILES := $(wildcard $(MGMT_CONF_SRC)/*)
+MGMT_TARGET_FILES := $(subst $(MGMT_CONF_SRC),$(MGMT_CONF_DIR),$(MGMT_SRC_FILES))
-$(MGMT_LIBDIR)/management.properties: $(MGMT_LIB_SRC)/management.properties
+$(MGMT_CONF_DIR)/management.properties: $(MGMT_CONF_SRC)/management.properties
$(call install-file)
$(CHMOD) 644 $@
# this file has different permissions...don't know why...
-$(MGMT_LIBDIR)/jmxremote.access: $(MGMT_LIB_SRC)/jmxremote.access
+$(MGMT_CONF_DIR)/jmxremote.access: $(MGMT_CONF_SRC)/jmxremote.access
$(call install-file)
$(CHMOD) 644 $@
-$(MGMT_LIBDIR)/%: $(MGMT_LIB_SRC)/%
+$(MGMT_CONF_DIR)/%: $(MGMT_CONF_SRC)/%
$(call install-file)
$(CHMOD) 444 $@
-MANAGEMENT_CONF_FILES := $(MGMT_TARGET_FILES)
+TARGETS := $(MGMT_TARGET_FILES)
################################################################################
-
-java.management: $(MANAGEMENT_CONF_FILES)
-
-all: java.management
-
-.PHONY: all java.management
diff --git a/jdk/make/copy/Copy-jdk.crypto.pkcs11.gmk b/jdk/make/copy/Copy-jdk.crypto.pkcs11.gmk
index 6db3dc97a8e..b9771dee017 100644
--- a/jdk/make/copy/Copy-jdk.crypto.pkcs11.gmk
+++ b/jdk/make/copy/Copy-jdk.crypto.pkcs11.gmk
@@ -31,20 +31,15 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
SUNPKCS11_CFG_SRC := \
$(JDK_TOPDIR)/src/jdk.crypto.pkcs11/solaris/conf/security/sunpkcs11-solaris.cfg
- SUNPKCS11_CFG_DST := $(JDK_OUTPUTDIR)/lib/security/sunpkcs11-solaris.cfg
+ SUNPKCS11_CFG_DST := $(CONF_DST_DIR)/security/sunpkcs11-solaris.cfg
$(SUNPKCS11_CFG_DST): $(SUNPKCS11_CFG_SRC)
$(call install-file)
SECURITY_PKCS11_CONF_FILES += $(SUNPKCS11_CFG_DST)
+ TARGETS := $(SUNPKCS11_CFG_DST)
+
endif
################################################################################
-
-jdk.crypto.pkcs11: $(SECURITY_PKCS11_CONF_FILES)
-
-all: jdk.crypto.pkcs11
-
-.PHONY: all jdk.crypto.pkcs11
-
diff --git a/jdk/make/copy/Copy-jdk.crypto.ucrypto.gmk b/jdk/make/copy/Copy-jdk.crypto.ucrypto.gmk
index 640e7ec2486..521c81b7a89 100644
--- a/jdk/make/copy/Copy-jdk.crypto.ucrypto.gmk
+++ b/jdk/make/copy/Copy-jdk.crypto.ucrypto.gmk
@@ -30,20 +30,13 @@ include CopyCommon.gmk
ifeq ($(OPENJDK_TARGET_OS), solaris)
UCRYPTO_CFG_SRC := $(JDK_TOPDIR)/src/jdk.crypto.ucrypto/solaris/conf/security/ucrypto-solaris.cfg
- UCRYPTO_CFG_DST := $(JDK_OUTPUTDIR)/lib/security/ucrypto-solaris.cfg
+ UCRYPTO_CFG_DST := $(CONF_DST_DIR)/security/ucrypto-solaris.cfg
$(UCRYPTO_CFG_DST): $(UCRYPTO_CFG_SRC)
$(call install-file)
- SECURITY_UCRYPTO_CONF_FILES += $(UCRYPTO_CFG_DST)
+ TARGETS += $(UCRYPTO_CFG_DST)
endif
################################################################################
-
-jdk.crypto.ucrypto: $(SECURITY_UCRYPTO_CONF_FILES)
-
-all: jdk.crypto.ucrypto
-
-.PHONY: all jdk.crypto.ucrypto
-
diff --git a/jdk/make/copy/Copy-jdk.hprof.agent.gmk b/jdk/make/copy/Copy-jdk.hprof.agent.gmk
index 069e915514f..f738867240c 100644
--- a/jdk/make/copy/Copy-jdk.hprof.agent.gmk
+++ b/jdk/make/copy/Copy-jdk.hprof.agent.gmk
@@ -32,12 +32,6 @@ HPROF_SRC := $(JDK_TOPDIR)/src/jdk.hprof.agent/share/native/libhprof/jvm.hprof.t
$(LIB_DST_DIR)/jvm.hprof.txt: $(HPROF_SRC)
$(call install-file)
-HPROF_CONF_FILES := $(LIB_DST_DIR)/jvm.hprof.txt
+TARGETS := $(LIB_DST_DIR)/jvm.hprof.txt
################################################################################
-
-jdk.hprof.agent: $(HPROF_CONF_FILES)
-
-all: jdk.hprof.agent
-
-.PHONY: all jdk.hprof.agent
diff --git a/jdk/make/copy/Copy-jdk.jdwp.agent.gmk b/jdk/make/copy/Copy-jdk.jdwp.agent.gmk
index dd7ccf01c44..279f2749efb 100644
--- a/jdk/make/copy/Copy-jdk.jdwp.agent.gmk
+++ b/jdk/make/copy/Copy-jdk.jdwp.agent.gmk
@@ -27,16 +27,9 @@ include CopyCommon.gmk
################################################################################
-
-JDK_DEBUG_AGENT_HEADERS := $(INCLUDE_DST_DIR)/jdwpTransport.h
+TARGETS := $(INCLUDE_DST_DIR)/jdwpTransport.h
$(INCLUDE_DST_DIR)/%.h: $(JDK_TOPDIR)/src/jdk.jdwp.agent/share/native/include/%.h
$(call install-file)
################################################################################
-
-jdk.jdwp.agent: $(JDK_DEBUG_AGENT_HEADERS)
-
-all: jdk.jdwp.agent
-
-.PHONY: all jdk.jdwp.agent
diff --git a/jdk/make/copy/CopyCommon.gmk b/jdk/make/copy/CopyCommon.gmk
index f9c951287fc..cb87c80294f 100644
--- a/jdk/make/copy/CopyCommon.gmk
+++ b/jdk/make/copy/CopyCommon.gmk
@@ -23,13 +23,9 @@
# questions.
#
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-
-INCLUDE_DST_DIR := $(JDK_OUTPUTDIR)/include
-LIB_DST_DIR := $(JDK_OUTPUTDIR)/lib
+INCLUDE_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_include/$(MODULE)
+LIB_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)
+CONF_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_conf/$(MODULE)
INCLUDE_DST_OS_DIR := $(INCLUDE_DST_DIR)/$(OPENJDK_TARGET_OS)
diff --git a/jdk/make/gendata/Gendata-java.base.gmk b/jdk/make/gendata/Gendata-java.base.gmk
index a7135abe563..c0ee693f730 100644
--- a/jdk/make/gendata/Gendata-java.base.gmk
+++ b/jdk/make/gendata/Gendata-java.base.gmk
@@ -29,15 +29,14 @@ include GendataCommon.gmk
$(eval $(call IncludeCustomExtension, jdk, gendata/Gendata-java.base.gmk))
include GendataBreakIterator.gmk
-GENDATA += $(BREAK_ITERATOR)
include GendataTZDB.gmk
-GENDATA += $(GENDATA_TZDB)
include GendataBlacklistedCerts.gmk
-GENDATA += $(GENDATA_BLACKLISTED_CERTS)
-##########################################################################################
+include GendataPolicyJars.gmk
+
+################################################################################
GENDATA_UNINAME := $(JDK_OUTPUTDIR)/modules/java.base/java/lang/uniName.dat
@@ -45,9 +44,9 @@ $(GENDATA_UNINAME): $(JDK_TOPDIR)/make/data/unicodedata/UnicodeData.txt $(BUILD_
$(MKDIR) -p $(@D)
$(TOOL_CHARACTERNAME) $< $@
-GENDATA += $(GENDATA_UNINAME)
+TARGETS += $(GENDATA_UNINAME)
-##########################################################################################
+################################################################################
GENDATA_CURDATA := $(JDK_OUTPUTDIR)/modules/java.base/java/util/currency.data
@@ -58,12 +57,12 @@ $(GENDATA_CURDATA): $(JDK_TOPDIR)/make/data/currency/CurrencyData.properties $(B
$(MV) $@.tmp $@
$(CHMOD) 444 $@
-GENDATA += $(GENDATA_CURDATA)
+TARGETS += $(GENDATA_CURDATA)
-##########################################################################################
+################################################################################
GENDATA_JAVA_SECURITY_SRC := $(JDK_TOPDIR)/src/java.base/share/conf/security/java.security
-GENDATA_JAVA_SECURITY := $(JDK_OUTPUTDIR)/lib/security/java.security
+GENDATA_JAVA_SECURITY := $(SUPPORT_OUTPUTDIR)/modules_conf/java.base/security/java.security
# RESTRICTED_PKGS_SRC is optionally set in custom extension for this makefile
@@ -73,14 +72,17 @@ $(GENDATA_JAVA_SECURITY): $(BUILD_TOOLS) $(GENDATA_JAVA_SECURITY_SRC) $(RESTRICT
$(TOOL_MAKEJAVASECURITY) $(GENDATA_JAVA_SECURITY_SRC) $@ $(OPENJDK_TARGET_OS) \
$(RESTRICTED_PKGS_SRC) || exit 1
-GENDATA += $(GENDATA_JAVA_SECURITY)
+TARGETS += $(GENDATA_JAVA_SECURITY)
-##########################################################################################
+################################################################################
-$(GENDATA): $(BUILD_TOOLS_JDK)
+$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/classlist: \
+ $(JDK_TOPDIR)/make/data/classlist/classlist.$(OPENJDK_TARGET_OS)
+ $(MKDIR) -p $(@D)
+ $(RM) $@ $@.tmp
+ $(TOOL_ADDJSUM) $< $@.tmp
+ $(MV) $@.tmp $@
-java.base: $(GENDATA)
+TARGETS += $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/classlist
-all: java.base
-
-.PHONY: all java.base
+################################################################################
diff --git a/jdk/make/gendata/Gendata-java.desktop.gmk b/jdk/make/gendata/Gendata-java.desktop.gmk
index 8ba2fe198a1..73dbec0d873 100644
--- a/jdk/make/gendata/Gendata-java.desktop.gmk
+++ b/jdk/make/gendata/Gendata-java.desktop.gmk
@@ -26,15 +26,5 @@
include GendataCommon.gmk
include GendataFontConfig.gmk
-GENDATA += $(GENDATA_FONT_CONFIG)
include GendataHtml32dtd.gmk
-GENDATA += $(GENDATA_HTML32DTD)
-
-$(GENDATA): $(BUILD_TOOLS_JDK)
-
-java.desktop: $(GENDATA)
-
-all: $(GENDATA)
-
-.PHONY: all java.desktop
diff --git a/jdk/make/gendata/Gendata-jdk.dev.gmk b/jdk/make/gendata/Gendata-jdk.dev.gmk
index 3c24cf4b703..6025b32233e 100644
--- a/jdk/make/gendata/Gendata-jdk.dev.gmk
+++ b/jdk/make/gendata/Gendata-jdk.dev.gmk
@@ -27,20 +27,16 @@ include GendataCommon.gmk
$(eval $(call IncludeCustomExtension, jdk, gendata/Gendata-jdk.dev.gmk))
-GENDATA := $(JDK_OUTPUTDIR)/modules/jdk.dev/com/sun/tools/jdeps/resources/jdeps-modules.xml
-METADATA_FILES += $(TOPDIR)/modules.xml
+JDEPS_MODULES_XML := $(JDK_OUTPUTDIR)/modules/jdk.dev/com/sun/tools/jdeps/resources/jdeps-modules.xml
+MODULES_XML += $(TOPDIR)/modules.xml
#
# Generate modules.xml for jdeps to use
# It augments $(TOPDIR)/modules.xml to include module membership
#
-$(GENDATA): $(BUILD_TOOLS_JDK) $(METADATA_FILES)
+$(JDEPS_MODULES_XML): $(BUILD_TOOLS_JDK) $(MODULES_XML)
$(MKDIR) -p $(@D)
$(RM) $@
- $(TOOL_GENMODULESXML) -o $@ -mp $(JDK_OUTPUTDIR)/modules $(METADATA_FILES)
+ $(TOOL_GENMODULESXML) -o $@ -mp $(JDK_OUTPUTDIR)/modules $(MODULES_XML)
-jdk.dev: $(GENDATA)
-
-all: $(GENDATA)
-
-.PHONY: all jdk.dev
+TARGETS += $(JDEPS_MODULES_XML)
diff --git a/jdk/make/gendata/GendataBlacklistedCerts.gmk b/jdk/make/gendata/GendataBlacklistedCerts.gmk
index ab62ca69ef9..4ed2763970f 100644
--- a/jdk/make/gendata/GendataBlacklistedCerts.gmk
+++ b/jdk/make/gendata/GendataBlacklistedCerts.gmk
@@ -24,7 +24,7 @@
#
GENDATA_BLACKLISTED_CERTS_SRC := $(JDK_TOPDIR)/make/data/blacklistedcertsconverter/blacklisted.certs.pem
-GENDATA_BLACKLISTED_CERTS := $(JDK_OUTPUTDIR)/lib/security/blacklisted.certs
+GENDATA_BLACKLISTED_CERTS := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/security/blacklisted.certs
ifndef OPENJDK
GENDATA_BLACKLISTED_CERTS_SRC += $(wildcard $(JDK_TOPDIR)/make/closed/data/blacklistedcertsconverter/blacklisted.certs.pem)
@@ -34,3 +34,5 @@ $(GENDATA_BLACKLISTED_CERTS): $(BUILD_TOOLS) $(GENDATA_BLACKLISTED_CERTS_SRC)
$(ECHO) "Generating blacklisted certs"
$(MKDIR) -p $(@D)
($(CAT) $(GENDATA_BLACKLISTED_CERTS_SRC) | $(TOOL_BLACKLISTED_CERTS) > $@) || exit 1
+
+TARGETS += $(GENDATA_BLACKLISTED_CERTS)
diff --git a/jdk/make/gendata/GendataBreakIterator.gmk b/jdk/make/gendata/GendataBreakIterator.gmk
index 7deb71e0db5..1db16158e76 100644
--- a/jdk/make/gendata/GendataBreakIterator.gmk
+++ b/jdk/make/gendata/GendataBreakIterator.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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
@@ -33,17 +33,16 @@
# They are used at JDK build phase in order to create $(BIFILES) which
# are used on runtime instead.
#
-TEXT_SRCDIR = $(JDK_TOPDIR)/src/java.base/share/classes \
+TEXT_SRCDIR := $(JDK_TOPDIR)/src/java.base/share/classes \
$(JDK_TOPDIR)/src/jdk.localedata/share/classes
-TEXT_PKG = sun/text/resources
-TEXT_SOURCES = $(TEXT_PKG)/BreakIteratorRules.java \
+TEXT_PKG := sun/text/resources
+TEXT_SOURCES := $(TEXT_PKG)/BreakIteratorRules.java \
$(TEXT_PKG)/BreakIteratorInfo.java \
$(TEXT_PKG)/th/BreakIteratorRules_th.java \
$(TEXT_PKG)/th/BreakIteratorInfo_th.java
# Generate BreakIteratorData
-BREAK_ITERATOR_DIR = $(JDK_OUTPUTDIR)/break_iterator
-BREAK_ITERATOR_CLASSES = $(BREAK_ITERATOR_DIR)/classes
+BREAK_ITERATOR_CLASSES := $(BUILDTOOLS_OUTPUTDIR)/break_iterator_classes
# JAVAC_SOURCE_PATH_OVERRIDE is set to isolate the compile to just those
# two files in that directory and not get anything implicit from
@@ -62,16 +61,16 @@ $(eval $(call SetupJavaCompilation,BUILD_BREAKITERATOR, \
# Generate data resource files.
# input
-UNICODEDATA = $(JDK_TOPDIR)/make/data/unicodedata/UnicodeData.txt
+UNICODEDATA := $(JDK_TOPDIR)/make/data/unicodedata/UnicodeData.txt
# output
-BASE_DATA_PKG_DIR = $(JDK_OUTPUTDIR)/modules/java.base/sun/text/resources
-SL_DATA_PKG_DIR = $(JDK_OUTPUTDIR)/modules/jdk.localedata/sun/text/resources
-BIFILES = $(BASE_DATA_PKG_DIR)/CharacterBreakIteratorData \
+BASE_DATA_PKG_DIR := $(JDK_OUTPUTDIR)/modules/java.base/sun/text/resources
+SL_DATA_PKG_DIR := $(JDK_OUTPUTDIR)/modules/jdk.localedata/sun/text/resources
+BIFILES := $(BASE_DATA_PKG_DIR)/CharacterBreakIteratorData \
$(BASE_DATA_PKG_DIR)/WordBreakIteratorData \
$(BASE_DATA_PKG_DIR)/LineBreakIteratorData \
$(BASE_DATA_PKG_DIR)/SentenceBreakIteratorData
-BIFILES_TH = $(SA_DATA_PKG_DIR)/th/WordBreakIteratorData_th \
+BIFILES_TH := $(SA_DATA_PKG_DIR)/th/WordBreakIteratorData_th \
$(SA_DATA_PKG_DIR)/th/LineBreakIteratorData_th
$(BIFILES): $(BASE_DATA_PKG_DIR)/_the.bifiles
@@ -97,5 +96,4 @@ $(SL_DATA_PKG_DIR)/_the.bifiles_th: $(BUILD_TOOLS) $(UNICODEDATA) $(BUILD_BREAKI
-language th
$(TOUCH) $@
-
-BREAK_ITERATOR += $(BIFILES) $(BIFILES_TH)
+TARGETS += $(BIFILES) $(BIFILES_TH)
diff --git a/jdk/make/gendata/GendataCommon.gmk b/jdk/make/gendata/GendataCommon.gmk
index e5e0336b325..0eb8ed38923 100644
--- a/jdk/make/gendata/GendataCommon.gmk
+++ b/jdk/make/gendata/GendataCommon.gmk
@@ -23,10 +23,6 @@
# questions.
#
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
include JavaCompilation.gmk
include SetupJavaCompilers.gmk
# We need the tools.
diff --git a/jdk/make/gendata/GendataFontConfig.gmk b/jdk/make/gendata/GendataFontConfig.gmk
index 5c85e7712e6..32680470630 100644
--- a/jdk/make/gendata/GendataFontConfig.gmk
+++ b/jdk/make/gendata/GendataFontConfig.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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
@@ -23,7 +23,7 @@
# questions.
#
-GENDATA_FONT_CONFIG_DST := $(JDK_OUTPUTDIR)/lib
+GENDATA_FONT_CONFIG_DST := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)
GENDATA_FONT_CONFIG_DATA_DIR := $(JDK_TOPDIR)/make/data/fontconfig
ifndef OPENJDK
@@ -42,7 +42,7 @@ $(GENDATA_FONT_CONFIG_DST)/%.src: \
$(GENDATA_FONT_CONFIG_DST)/%.bfc: \
$(GENDATA_FONT_CONFIG_DATA_DIR)/$(OPENJDK_TARGET_OS).%.properties \
- $(BUILD_TOOLS)
+ $(BUILD_TOOLS_JDK)
$(MKDIR) -p $(@D)
$(RM) $@
$(TOOL_COMPILEFONTCONFIG) $< $@
@@ -54,5 +54,5 @@ GENDATA_FONT_CONFIGS := $(patsubst $(GENDATA_FONT_CONFIG_DATA_DIR)/$(OPENJDK_TAR
GENDATA_BFONT_CONFIGS := $(patsubst $(GENDATA_FONT_CONFIG_DATA_DIR)/$(OPENJDK_TARGET_OS).%.properties, \
$(GENDATA_FONT_CONFIG_DST)/%.bfc, $(GENDATA_FONT_CONFIG_SRC_FILES))
-GENDATA_FONT_CONFIG := $(GENDATA_FONT_CONFIGS) $(GENDATA_BFONT_CONFIGS)
+TARGETS := $(GENDATA_FONT_CONFIGS) $(GENDATA_BFONT_CONFIGS)
diff --git a/jdk/make/gendata/GendataHtml32dtd.gmk b/jdk/make/gendata/GendataHtml32dtd.gmk
index 7c996818969..1adb85ad0aa 100644
--- a/jdk/make/gendata/GendataHtml32dtd.gmk
+++ b/jdk/make/gendata/GendataHtml32dtd.gmk
@@ -26,10 +26,10 @@
GENDATA_HTML32DTD :=
HTML32DTD = $(JDK_OUTPUTDIR)/modules/java.desktop/javax/swing/text/html/parser/html32.bdtd
-$(HTML32DTD): $(BUILD_TOOLS)
+$(HTML32DTD): $(BUILD_TOOLS_JDK)
$(ECHO) "Generating HTML DTD file"
$(MKDIR) -p $(@D)
$(RM) $@
($(TOOL_DTDBUILDER) $(LOG_INFO) html32 > $@) || exit 1
-GENDATA_HTML32DTD += $(HTML32DTD)
+TARGETS += $(HTML32DTD)
diff --git a/jdk/make/CreatePolicyJars.gmk b/jdk/make/gendata/GendataPolicyJars.gmk
similarity index 74%
rename from jdk/make/CreatePolicyJars.gmk
rename to jdk/make/gendata/GendataPolicyJars.gmk
index f0910db0382..0ef6ddcc9e5 100644
--- a/jdk/make/CreatePolicyJars.gmk
+++ b/jdk/make/gendata/GendataPolicyJars.gmk
@@ -32,14 +32,15 @@ include JavaCompilation.gmk
################################################################################
-US_EXPORT_POLICY_JAR_DST := $(JDK_OUTPUTDIR)/lib/security/US_export_policy.jar
+US_EXPORT_POLICY_JAR_DST := \
+ $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/security/US_export_policy.jar
ifneq ($(BUILD_CRYPTO), no)
- US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED := \
- $(JDK_OUTPUTDIR)/jce/unsigned/policy/limited/US_export_policy.jar
- US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED := \
- $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/US_export_policy.jar
+ US_EXPORT_POLICY_JAR_LIMITED := \
+ $(SUPPORT_OUTPUTDIR)/jce/policy/limited/US_export_policy.jar
+ US_EXPORT_POLICY_JAR_UNLIMITED := \
+ $(SUPPORT_OUTPUTDIR)/jce/policy/unlimited/US_export_policy.jar
ifndef OPENJDK
#
@@ -53,7 +54,8 @@ ifneq ($(BUILD_CRYPTO), no)
# file in their environment. Users/deployers simply need to overwrite
# the files. Consult README.txt (below) for more info.
#
- UNLIMITED_POLICY_DIR := $(JDK_OUTPUTDIR)/lib/security/unlimited_policy
+ UNLIMITED_POLICY_DIR := \
+ $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/security/unlimited_policy
endif
#
@@ -68,7 +70,7 @@ ifneq ($(BUILD_CRYPTO), no)
US_EXPORT_POLICY_JAR_SRC_DIR := \
$(JDK_TOPDIR)/make/data/cryptopolicy/unlimited
US_EXPORT_POLICY_JAR_TMP := \
- $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/US_export_policy_jar.tmp
+ $(SUPPORT_OUTPUTDIR)/jce/policy/unlimited/US_export_policy_jar.tmp
$(US_EXPORT_POLICY_JAR_TMP)/%: $(US_EXPORT_POLICY_JAR_SRC_DIR)/%
$(install-file)
@@ -80,32 +82,31 @@ ifneq ($(BUILD_CRYPTO), no)
$(US_EXPORT_POLICY_JAR_DEPS), \
SRCS := $(US_EXPORT_POLICY_JAR_TMP), \
SUFFIXES := .policy, \
- JAR := $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED), \
+ JAR := $(US_EXPORT_POLICY_JAR_UNLIMITED), \
EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
SKIP_METAINF := true))
- $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED): \
- $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED)
+ $(US_EXPORT_POLICY_JAR_LIMITED): \
+ $(US_EXPORT_POLICY_JAR_UNLIMITED)
$(ECHO) $(LOG_INFO) \
Copying unlimited $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(install-file)
- TARGETS += $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED) \
- $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED)
+ TARGETS += $(US_EXPORT_POLICY_JAR_LIMITED) $(US_EXPORT_POLICY_JAR_UNLIMITED)
endif
ifeq ($(UNLIMITED_CRYPTO), true)
- $(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED)
+ $(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_UNLIMITED)
$(install-file)
else
- $(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED)
+ $(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_LIMITED)
$(install-file)
endif
ifndef OPENJDK
ifneq ($(UNLIMITED_CRYPTO), true)
$(UNLIMITED_POLICY_DIR)/US_export_policy.jar: \
- $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED)
+ $(US_EXPORT_POLICY_JAR_UNLIMITED)
$(install-file)
TARGETS += $(UNLIMITED_POLICY_DIR)/US_export_policy.jar
endif
@@ -115,23 +116,24 @@ POLICY_JARS += $(US_EXPORT_POLICY_JAR_DST)
################################################################################
-LOCAL_POLICY_JAR_DST := $(JDK_OUTPUTDIR)/lib/security/local_policy.jar
+LOCAL_POLICY_JAR_DST := \
+ $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/security/local_policy.jar
ifneq ($(BUILD_CRYPTO), no)
- LOCAL_POLICY_JAR_LIMITED_UNSIGNED := \
- $(JDK_OUTPUTDIR)/jce/unsigned/policy/limited/local_policy.jar
- LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED := \
- $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/local_policy.jar
+ LOCAL_POLICY_JAR_LIMITED := \
+ $(SUPPORT_OUTPUTDIR)/jce/policy/limited/local_policy.jar
+ LOCAL_POLICY_JAR_UNLIMITED := \
+ $(SUPPORT_OUTPUTDIR)/jce/policy/unlimited/local_policy.jar
#
# TODO fix so that SetupArchive does not write files into SRCS
# then we don't need this extra copying
#
LOCAL_POLICY_JAR_LIMITED_TMP := \
- $(JDK_OUTPUTDIR)/jce/unsigned/policy/limited/local_policy_jar.tmp
+ $(SUPPORT_OUTPUTDIR)/jce/policy/limited/local_policy_jar.tmp
LOCAL_POLICY_JAR_UNLIMITED_TMP := \
- $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/local_policy_jar.tmp
+ $(SUPPORT_OUTPUTDIR)/jce/policy/unlimited/local_policy_jar.tmp
$(LOCAL_POLICY_JAR_LIMITED_TMP)/%: \
$(JDK_TOPDIR)/make/data/cryptopolicy/limited/%
@@ -146,7 +148,7 @@ ifneq ($(BUILD_CRYPTO), no)
$(LOCAL_POLICY_JAR_LIMITED_TMP)/default_local.policy, \
SRCS := $(LOCAL_POLICY_JAR_LIMITED_TMP), \
SUFFIXES := .policy, \
- JAR := $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED), \
+ JAR := $(LOCAL_POLICY_JAR_LIMITED), \
EXTRA_MANIFEST_ATTR := Crypto-Strength: limited, \
SKIP_METAINF := true))
@@ -154,12 +156,11 @@ ifneq ($(BUILD_CRYPTO), no)
$(LOCAL_POLICY_JAR_UNLIMITED_TMP)/default_local.policy, \
SRCS := $(LOCAL_POLICY_JAR_UNLIMITED_TMP), \
SUFFIXES := .policy, \
- JAR := $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED), \
+ JAR := $(LOCAL_POLICY_JAR_UNLIMITED), \
EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
SKIP_METAINF := true))
- TARGETS += $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED) \
- $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED)
+ TARGETS += $(LOCAL_POLICY_JAR_LIMITED) $(LOCAL_POLICY_JAR_UNLIMITED)
ifndef OPENJDK
ifneq ($(UNLIMITED_CRYPTO), true)
@@ -173,17 +174,17 @@ ifneq ($(BUILD_CRYPTO), no)
endif
ifeq ($(UNLIMITED_CRYPTO), true)
- $(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED)
+ $(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_UNLIMITED)
$(install-file)
else
- $(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED)
+ $(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_LIMITED)
$(install-file)
endif
ifndef OPENJDK
ifneq ($(UNLIMITED_CRYPTO), true)
$(UNLIMITED_POLICY_DIR)/local_policy.jar: \
- $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED)
+ $(LOCAL_POLICY_JAR_UNLIMITED)
$(install-file)
TARGETS += $(UNLIMITED_POLICY_DIR)/local_policy.jar
endif
@@ -194,5 +195,3 @@ TARGETS += $(POLICY_JARS)
################################################################################
-all: $(TARGETS)
-
diff --git a/jdk/make/gendata/GendataTZDB.gmk b/jdk/make/gendata/GendataTZDB.gmk
index 20c2b19eb4f..5d17b4fedf0 100644
--- a/jdk/make/gendata/GendataTZDB.gmk
+++ b/jdk/make/gendata/GendataTZDB.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2014, Oracle and/or its affiliates. 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
@@ -32,11 +32,11 @@ TZDATA_DIR := $(JDK_TOPDIR)/make/data/tzdata
TZDATA_TZFILE := africa antarctica asia australasia europe northamerica pacificnew southamerica backward etcetera gmt jdk11_backward
TZDATA_TZFILES := $(addprefix $(TZDATA_DIR)/,$(TZDATA_TZFILE))
-GENDATA_TZDB_DAT := $(JDK_OUTPUTDIR)/lib/tzdb.dat
+GENDATA_TZDB_DAT := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/tzdb.dat
$(GENDATA_TZDB_DAT): $(TZDATA_TZFILES)
$(RM) $(GENDATA_TZDB_DAT)
$(MKDIR) -p $(@D)
$(TOOL_TZDB) -srcdir $(TZDATA_DIR) -dstfile $(GENDATA_TZDB_DAT) $(TZDATA_TZFILE)
-GENDATA_TZDB += $(GENDATA_TZDB_DAT)
+TARGETS += $(GENDATA_TZDB_DAT)
diff --git a/jdk/make/gensrc/Gensrc-jdk.charsets.gmk b/jdk/make/gensrc/Gensrc-jdk.charsets.gmk
index 931b969a0dc..a646099c339 100644
--- a/jdk/make/gensrc/Gensrc-jdk.charsets.gmk
+++ b/jdk/make/gensrc/Gensrc-jdk.charsets.gmk
@@ -30,7 +30,7 @@ include GensrcCommon.gmk
# Generate files using the charsetmapping tool
#
CHARSET_DATA_DIR := $(JDK_TOPDIR)/make/data/charsetmapping
-CHARSET_GENSRC_JAVA_DIR_CS := $(JDK_OUTPUTDIR)/gensrc/jdk.charsets/sun/nio/cs/ext
+CHARSET_GENSRC_JAVA_DIR_CS := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.charsets/sun/nio/cs/ext
CHARSET_DONE_CS := $(CHARSET_GENSRC_JAVA_DIR_CS)/_the.charsetmapping
CHARSET_COPYRIGHT_HEADER := $(JDK_TOPDIR)/make/src/classes/build/tools/charsetmapping
CHARSET_TEMPLATES := \
diff --git a/jdk/make/gensrc/Gensrc-jdk.dev.gmk b/jdk/make/gensrc/Gensrc-jdk.dev.gmk
index 60c6a527217..0c956abbc12 100644
--- a/jdk/make/gensrc/Gensrc-jdk.dev.gmk
+++ b/jdk/make/gensrc/Gensrc-jdk.dev.gmk
@@ -31,7 +31,9 @@ include GensrcProperties.gmk
$(eval $(call SetupCompileProperties,COMPILE_PROPERTIES, \
$(filter %.properties, \
- $(call CacheFind, $(JDK_TOPDIR)/src/jdk.dev/share/classes/sun/tools/jar/resources)), \
+ $(call CacheFind, \
+ $(JDK_TOPDIR)/src/jdk.dev/share/classes/jdk/tools/jimage/resources \
+ $(JDK_TOPDIR)/src/jdk.dev/share/classes/sun/tools/jar/resources)), \
ListResourceBundle))
TARGETS += $(COMPILE_PROPERTIES)
diff --git a/jdk/make/gensrc/Gensrc-jdk.jconsole.gmk b/jdk/make/gensrc/Gensrc-jdk.jconsole.gmk
index 38775c00948..2885540dfb4 100644
--- a/jdk/make/gensrc/Gensrc-jdk.jconsole.gmk
+++ b/jdk/make/gensrc/Gensrc-jdk.jconsole.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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
@@ -28,7 +28,7 @@ include GensrcCommon.gmk
##########################################################################################
# Version file for jconsole
-$(JDK_OUTPUTDIR)/gensrc/jdk.jconsole/sun/tools/jconsole/Version.java: \
+$(SUPPORT_OUTPUTDIR)/gensrc/jdk.jconsole/sun/tools/jconsole/Version.java: \
$(JDK_TOPDIR)/src/jdk.jconsole/share/classes/sun/tools/jconsole/Version.java.template
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
@@ -36,7 +36,7 @@ $(JDK_OUTPUTDIR)/gensrc/jdk.jconsole/sun/tools/jconsole/Version.java: \
$(SED) -e 's/@@jconsole_version@@/$(FULL_VERSION)/g' $< > $@.tmp
$(MV) $@.tmp $@
-GENSRC_JDK_JCONSOLE += $(JDK_OUTPUTDIR)/gensrc/jdk.jconsole/sun/tools/jconsole/Version.java
+GENSRC_JDK_JCONSOLE += $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jconsole/sun/tools/jconsole/Version.java
jdk.jconsole: $(GENSRC_JDK_JCONSOLE)
diff --git a/jdk/make/gensrc/Gensrc-jdk.jdi.gmk b/jdk/make/gensrc/Gensrc-jdk.jdi.gmk
index e5bad8240d8..d71c5dd6177 100644
--- a/jdk/make/gensrc/Gensrc-jdk.jdi.gmk
+++ b/jdk/make/gensrc/Gensrc-jdk.jdi.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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
@@ -30,27 +30,34 @@ include GensrcCommon.gmk
# and a JDWPCommands.h C-header file.
JDWP_SPEC_FILE := $(JDK_TOPDIR)/make/data/jdwp/jdwp.spec
+HEADER_FILE := $(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent/JDWPCommands.h
+JAVA_FILE := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/com/sun/tools/jdi/JDWP.java
-$(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h: $(JDWP_SPEC_FILE)
+# Both the header and java file are created using the same recipe. By declaring
+# this rule and adding header file to dependencies for java file, both are
+# rebuilt if either is missing
+$(HEADER_FILE): $(JDWP_SPEC_FILE) $(BUILD_TOOLS_JDK)
-$(JDK_OUTPUTDIR)/gensrc/jdk.jdi/com/sun/tools/jdi/JDWP.java: \
- $(JDWP_SPEC_FILE) $(BUILD_TOOLS_JDK)
+# Touch the target of this rule at the end to avoid triggering false rebuilds
+$(JAVA_FILE): $(JDWP_SPEC_FILE) $(BUILD_TOOLS_JDK) $(HEADER_FILE)
$(MKDIR) -p $(@D)
- $(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc_jdwp_headers
- $(RM) $@ $(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h
+ $(MKDIR) -p $(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent
+ $(RM) $@ $(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent/JDWPCommands.h
$(ECHO) $(LOG_INFO) Creating JDWP.java and JDWPCommands.h from jdwp.spec
- $(TOOL_JDWPGEN) $< -jdi $@ -include $(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h
+ $(TOOL_JDWPGEN) $< -jdi $@ -include \
+ $(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent/JDWPCommands.h
+ $(TOUCH) $@
-$(JDK_OUTPUTDIR)/gensrc_jdwp_doc/jdwp-protocol.html: $(JDWP_SPEC_FILE) \
+$(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html: $(JDWP_SPEC_FILE) \
$(BUILD_TOOLS_JDK)
$(MKDIR) -p $(@D)
$(RM) $@
$(ECHO) $(LOG_INFO) Creating $(@F) from jdwp.spec
$(TOOL_JDWPGEN) $< -doc $@
-GENSRC_JDWP := $(JDK_OUTPUTDIR)/gensrc/jdk.jdi/com/sun/tools/jdi/JDWP.java \
- $(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h \
- $(JDK_OUTPUTDIR)/gensrc_jdwp_doc/jdwp-protocol.html
+GENSRC_JDWP := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/com/sun/tools/jdi/JDWP.java \
+ $(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent/JDWPCommands.h \
+ $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html
GENSRC_JDK_JDI += $(GENSRC_JDWP)
################################################################################
@@ -61,11 +68,18 @@ define process-provider
endef
# Filter com.sun.jdi.connect.Connector
-$(JDK_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector: \
- $(JDK_TOPDIR)/src/jdk.jdi/share/classes/META-INF/services/com.sun.jdi.connect.Connector
+$(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector: \
+ $(JDK_TOPDIR)/src/jdk.jdi/share/classes/META-INF/services/com.sun.jdi.connect.Connector \
+ $(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent/_the.sa.services
$(process-provider)
-GENSRC_JDK_JDI += $(JDK_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector
+# Copy the same service file into jdk.hotspot.agent so that they are kept the same.
+$(JDK_OUTPUTDIR)/modules/jdk.hotspot.agent/META-INF/services/com.sun.jdi.connect.Connector: \
+ $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector
+ $(install-file)
+
+GENSRC_JDK_JDI += $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector \
+ $(JDK_OUTPUTDIR)/modules/jdk.hotspot.agent/META-INF/services/com.sun.jdi.connect.Connector
################################################################################
diff --git a/jdk/make/gensrc/GensrcBuffer.gmk b/jdk/make/gensrc/GensrcBuffer.gmk
index bc23520fac2..2f5d789cd60 100644
--- a/jdk/make/gensrc/GensrcBuffer.gmk
+++ b/jdk/make/gensrc/GensrcBuffer.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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
@@ -25,8 +25,7 @@
GENSRC_BUFFER :=
-GENSRC_BUFFER_TMP := $(JDK_OUTPUTDIR)/gensrc
-GENSRC_BUFFER_DST := $(JDK_OUTPUTDIR)/gensrc/java.base/java/nio
+GENSRC_BUFFER_DST := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/nio
GENSRC_BUFFER_SRC := $(JDK_TOPDIR)/src/java.base/share/classes/java/nio
diff --git a/jdk/make/gensrc/GensrcCLDR.gmk b/jdk/make/gensrc/GensrcCLDR.gmk
index a0f2a0d4748..010922d0315 100644
--- a/jdk/make/gensrc/GensrcCLDR.gmk
+++ b/jdk/make/gensrc/GensrcCLDR.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2014, Oracle and/or its affiliates. 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
@@ -26,7 +26,7 @@
CLDRVERSION := 21.0.1
CLDRSRCDIR := $(JDK_TOPDIR)/src/jdk.localedata/share/classes/sun/util/cldr/resources/$(subst .,_,$(CLDRVERSION))
-GENSRC_DIR := $(JDK_OUTPUTDIR)/gensrc/jdk.localedata
+GENSRC_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata
CLDR_METAINFO_FILE := $(GENSRC_DIR)/sun/util/resources/cldr/provider/CLDRLocaleDataMetaInfo.java
diff --git a/jdk/make/gensrc/GensrcCharacterData.gmk b/jdk/make/gensrc/GensrcCharacterData.gmk
index 1f57bff7bf6..b0b5eddacde 100644
--- a/jdk/make/gensrc/GensrcCharacterData.gmk
+++ b/jdk/make/gensrc/GensrcCharacterData.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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
@@ -24,7 +24,7 @@
#
#
-# Rules to create $(JDK_OUTPUTDIR)/gensrc/sun/lang/CharacterData*.java
+# Rules to create $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/lang/CharacterData*.java
#
GENSRC_CHARACTERDATA :=
@@ -33,7 +33,8 @@ CHARACTERDATA = $(JDK_TOPDIR)/make/data/characterdata
UNICODEDATA = $(JDK_TOPDIR)/make/data/unicodedata
define SetupCharacterData
- $(JDK_OUTPUTDIR)/gensrc/java.base/java/lang/$1.java: $(CHARACTERDATA)/$1.java.template $(BUILD_TOOLS_JDK)
+ $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/lang/$1.java: \
+ $(CHARACTERDATA)/$1.java.template
$(MKDIR) -p $$(@D)
$(ECHO) $(LOG_INFO) Generating $1.java
$(TOOL_GENERATECHARACTER) $2 \
@@ -41,10 +42,10 @@ define SetupCharacterData
-spec $(UNICODEDATA)/UnicodeData.txt \
-specialcasing $(UNICODEDATA)/SpecialCasing.txt \
-proplist $(UNICODEDATA)/PropList.txt \
- -o $(JDK_OUTPUTDIR)/gensrc/java.base/java/lang/$1.java -string \
+ -o $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/lang/$1.java -string \
-usecharforbyte $3
- GENSRC_CHARACTERDATA += $(JDK_OUTPUTDIR)/gensrc/java.base/java/lang/$1.java
+ GENSRC_CHARACTERDATA += $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/lang/$1.java
endef
$(eval $(call SetupCharacterData,CharacterDataLatin1, , -latin1 8))
@@ -54,12 +55,12 @@ $(eval $(call SetupCharacterData,CharacterData02, -plane 2, 11 4 1))
$(eval $(call SetupCharacterData,CharacterData0E, -plane 14, 11 4 1))
# Copy two Java files that need no preprocessing.
-$(JDK_OUTPUTDIR)/gensrc/java.base/java/lang/%.java: $(CHARACTERDATA)/%.java.template
+$(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/lang/%.java: $(CHARACTERDATA)/%.java.template
$(ECHO) $(LOG_INFO) Generating $(@F)
$(call install-file)
-GENSRC_CHARACTERDATA += $(JDK_OUTPUTDIR)/gensrc/java.base/java/lang/CharacterDataUndefined.java \
- $(JDK_OUTPUTDIR)/gensrc/java.base/java/lang/CharacterDataPrivateUse.java
+GENSRC_CHARACTERDATA += $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/lang/CharacterDataUndefined.java \
+ $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/lang/CharacterDataPrivateUse.java
GENSRC_JAVA_BASE += $(GENSRC_CHARACTERDATA)
$(GENSRC_CHARACTERDATA): $(BUILD_TOOLS_JDK)
diff --git a/jdk/make/gensrc/GensrcCharsetCoder.gmk b/jdk/make/gensrc/GensrcCharsetCoder.gmk
index b5444138b6f..e992b19a3fa 100644
--- a/jdk/make/gensrc/GensrcCharsetCoder.gmk
+++ b/jdk/make/gensrc/GensrcCharsetCoder.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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
@@ -25,14 +25,13 @@
GENSRC_CHARSETCODER :=
-GENSRC_CHARSETCODER_TMP := $(JDK_OUTPUTDIR)/gensrc
-GENSRC_CHARSETCODER_DST := $(JDK_OUTPUTDIR)/gensrc/java.base/java/nio/charset
+GENSRC_CHARSETCODER_DST := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/nio/charset
GENSRC_CHARSETCODER_SRC := $(JDK_TOPDIR)/src/java.base/share/classes/java/nio
GENSRC_CHARSETCODER_TEMPLATE := $(GENSRC_CHARSETCODER_SRC)/charset/Charset-X-Coder.java.template
-###
+################################################################################
$(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java: $(GENSRC_CHARSETCODER_TEMPLATE)
$(MKDIR) -p $(@D)
@@ -67,7 +66,7 @@ $(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java: $(GENSRC_CHARSETCODER_TEMPLATE)
GENSRC_CHARSETCODER += $(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java
-###
+################################################################################
$(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java: $(GENSRC_CHARSETCODER_TEMPLATE)
$(MKDIR) -p $(@D)
@@ -103,6 +102,6 @@ $(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java: $(GENSRC_CHARSETCODER_TEMPLATE)
GENSRC_CHARSETCODER += $(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java
GENSRC_JAVA_BASE += $(GENSRC_CHARSETCODER)
-###
+################################################################################
$(GENSRC_CHARSETCODER): $(BUILD_TOOLS_JDK)
diff --git a/jdk/make/gensrc/GensrcCharsetMapping.gmk b/jdk/make/gensrc/GensrcCharsetMapping.gmk
index a44dd887ac9..af1e9f08ce4 100644
--- a/jdk/make/gensrc/GensrcCharsetMapping.gmk
+++ b/jdk/make/gensrc/GensrcCharsetMapping.gmk
@@ -28,7 +28,7 @@
# Generate files using the charsetmapping tool
#
CHARSET_DATA_DIR := $(JDK_TOPDIR)/make/data/charsetmapping
-CHARSET_GENSRC_JAVA_DIR_BASE := $(JDK_OUTPUTDIR)/gensrc/java.base/sun/nio/cs
+CHARSET_GENSRC_JAVA_DIR_BASE := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/nio/cs
CHARSET_DONE_BASE := $(CHARSET_GENSRC_JAVA_DIR_BASE)/_the.charsetmapping
CHARSET_TEMPLATES := \
$(CHARSET_DATA_DIR)/SingleByte-X.java.template \
@@ -46,7 +46,7 @@ GENSRC_JAVA_BASE += $(CHARSET_DONE_BASE)-sbcs
#
# Generate the sun/nio/cs/StandardCharsets.java file
#
-CHARSET_STANDARD_GENSRC_DIR := $(JDK_OUTPUTDIR)/gensrc/standardcharsets
+CHARSET_STANDARD_GENSRC_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/_standardcharsets
CHARSET_STANDARD_DATA := $(CHARSET_DATA_DIR)/standard-charsets
CHARSET_STANDARD_JAVA := sun/nio/cs/StandardCharsets.java
@@ -118,7 +118,7 @@ $(CHARSET_STANDARD_GENSRC_DIR)/cache-map.java.snippet: $(CHARSET_STANDARD_GENSRC
$(eval $(call SetupTextFileProcessing, BUILD_CHARSET_STANDARD, \
SOURCE_FILES := $(JDK_TOPDIR)/src/java.base/share/classes/$(CHARSET_STANDARD_JAVA).template, \
- OUTPUT_FILE := $(JDK_OUTPUTDIR)/gensrc/java.base/$(CHARSET_STANDARD_JAVA), \
+ OUTPUT_FILE := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/$(CHARSET_STANDARD_JAVA), \
INCLUDES := \
_INCLUDE_ALIASES_TABLES_ => $(CHARSET_STANDARD_GENSRC_DIR)/aliases-tables.java.snippet ; \
_INCLUDE_ALIASES_MAP_ => $(CHARSET_STANDARD_GENSRC_DIR)/aliases-map.java.snippet ; \
diff --git a/jdk/make/gensrc/GensrcExceptions.gmk b/jdk/make/gensrc/GensrcExceptions.gmk
index e180bdc4eb3..398a8857963 100644
--- a/jdk/make/gensrc/GensrcExceptions.gmk
+++ b/jdk/make/gensrc/GensrcExceptions.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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
@@ -25,8 +25,7 @@
GENSRC_EXCEPTIONS :=
-GENSRC_EXCEPTIONS_TMP := $(JDK_OUTPUTDIR)/gensrc
-GENSRC_EXCEPTIONS_DST := $(JDK_OUTPUTDIR)/gensrc/java.base/java/nio
+GENSRC_EXCEPTIONS_DST := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/nio
GENSRC_EXCEPTIONS_SRC := $(JDK_TOPDIR)/src/java.base/share/classes/java/nio
GENSRC_EXCEPTIONS_CMD := $(JDK_TOPDIR)/make/scripts/genExceptions.sh
diff --git a/jdk/make/gensrc/GensrcIcons.gmk b/jdk/make/gensrc/GensrcIcons.gmk
index e9b32f8f0b5..777ac7fe569 100644
--- a/jdk/make/gensrc/GensrcIcons.gmk
+++ b/jdk/make/gensrc/GensrcIcons.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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
@@ -25,8 +25,8 @@
GENSRC_AWT_ICONS :=
GENSRC_AWT_ICONS_SRC :=
-GENSRC_AWT_ICONS_TMP := $(JDK_OUTPUTDIR)/gensrc
-GENSRC_AWT_ICONS_DST := $(GENSRC_AWT_ICONS_TMP)/java.desktop/sun/awt/
+GENSRC_AWT_ICONS_TMP := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop
+GENSRC_AWT_ICONS_DST := $(GENSRC_AWT_ICONS_TMP)/sun/awt/
ifdef OPENJDK
X11_ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)
@@ -62,14 +62,14 @@ GENSRC_AWT_ICONS_FILES := $(notdir $(GENSRC_AWT_ICONS_SRC))
GENSRC_AWT_ICONS_SHORT_NAME = $(subst .,_,$(subst -,_,$(1)))
GENSRC_AWT_ICONS_DST_NAME = AWTIcon$(2)_$(subst .,_,$(subst -,_,$(1)))
-###
+################################################################################
$(GENSRC_AWT_ICONS_TMP)/_the.icons.dir:
$(ECHO) Generating icon classes
$(MKDIR) -p $(GENSRC_AWT_ICONS_DST)
$(TOUCH) $@
-###
+################################################################################
define SetupGensrcAWTIcon
# param 1 is for src-file
@@ -107,11 +107,11 @@ $(foreach I, $(GENSRC_AWT_ICONS_SRC), $(eval $(call SetupGensrcAWTIcon,$(notdir
GENSRC_JAVA_DESKTOP += $(GENSRC_AWT_ICONS)
-###
+################################################################################
ifeq ($(OPENJDK_TARGET_OS), macosx)
- GENSRC_OSX_ICONS_DST := $(JDK_OUTPUTDIR)/gensrc_headers_icons
+ GENSRC_OSX_ICONS_DST := $(SUPPORT_OUTPUTDIR)/headers/java.desktop
GENSRC_OSX_ICONS := $(GENSRC_OSX_ICONS_DST)/AWTIconData.h
ifdef OPENJDK
diff --git a/jdk/make/gensrc/GensrcLocaleData.gmk b/jdk/make/gensrc/GensrcLocaleData.gmk
index c7b73dc7d39..8ce1c2292e5 100644
--- a/jdk/make/gensrc/GensrcLocaleData.gmk
+++ b/jdk/make/gensrc/GensrcLocaleData.gmk
@@ -42,14 +42,14 @@ LOCALE_FILES := $(shell $(FIND) $(JDK_TOPDIR)/src/java.base/share/classes \
LOCALE_RESOURCES := $(sort $(subst .properties,,$(subst .java,,$(notdir $(LOCALE_FILES)))))
# Include the list of resources found during the previous compile.
--include $(JDK_OUTPUTDIR)/gensrc/_the.locale_resources
+-include $(SUPPORT_OUTPUTDIR)/gensrc/java.base/_the.locale_resources
MISSING_RESOURCES := $(filter-out $(LOCALE_RESOURCES), $(PREV_LOCALE_RESOURCES))
NEW_RESOURCES := $(filter-out $(PREV_LOCALE_RESOURCES), $(LOCALE_RESOURCES))
ifneq (, $(MISSING_RESOURCES)$(NEW_RESOURCES))
# There is a difference in the number of supported resources. Trigger a regeneration.
- $(shell $(RM) $(JDK_OUTPUTDIR)/gensrc/sun/util/locale/provider/LocaleDataMetaInfo.java)
+ $(shell $(RM) $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/util/locale/provider/LocaleDataMetaInfo.java)
endif
# The EN locales
@@ -116,26 +116,28 @@ $(eval $(call CaptureLocale,CalendarData))
SED_ENARGS += -e 's/$(HASH)AvailableLocales_Locales$(HASH)/$(sort $(ALL_EN_LOCALES))/g'
SED_NONENARGS += -e 's/$(HASH)AvailableLocales_Locales$(HASH)/$(sort $(ALL_NON_EN_LOCALES))/g'
-$(JDK_OUTPUTDIR)/gensrc/java.base/sun/util/locale/provider/EnLocaleDataMetaInfo.java: \
+$(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/util/locale/provider/EnLocaleDataMetaInfo.java: \
$(JDK_TOPDIR)/src/java.base/share/classes/sun/util/locale/provider/LocaleDataMetaInfo-XLocales.java.template
$(MKDIR) -p $(@D)
$(ECHO) Creating sun/util/locale/provider/EnLocaleDataMetaInfo.java from $(words $(LOCALE_RESOURCES)) found resources.
- $(PRINTF) "PREV_LOCALE_RESOURCES:=$(LOCALE_RESOURCES)" > $(JDK_OUTPUTDIR)/gensrc/_the.locale_resources
+ $(PRINTF) "PREV_LOCALE_RESOURCES:=$(LOCALE_RESOURCES)" \
+ > $(SUPPORT_OUTPUTDIR)/gensrc/_the.locale_resources
$(SED) $(SED_ENARGS) $< > $@
-$(JDK_OUTPUTDIR)/gensrc/jdk.localedata/sun/util/resources/provider/NonEnLocaleDataMetaInfo.java: \
+$(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata/sun/util/resources/provider/NonEnLocaleDataMetaInfo.java: \
$(JDK_TOPDIR)/src/java.base/share/classes/sun/util/locale/provider/LocaleDataMetaInfo-XLocales.java.template
$(MKDIR) -p $(@D)
$(ECHO) Creating sun/util/resources/provider/NonEnLocaleDataMetaInfo.java from $(words $(LOCALE_RESOURCES)) found resources.
- $(PRINTF) "PREV_LOCALE_RESOURCES:=$(LOCALE_RESOURCES)" > $(JDK_OUTPUTDIR)/gensrc/_the.locale_resources
+ $(PRINTF) "PREV_LOCALE_RESOURCES:=$(LOCALE_RESOURCES)" \
+ > $(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata/_the.locale_resources
$(SED) $(SED_NONENARGS) $< > $@
-GENSRC_BASELOCALEDATA := $(JDK_OUTPUTDIR)/gensrc/java.base/sun/util/locale/provider/EnLocaleDataMetaInfo.java
-GENSRC_LOCALEDATA := $(JDK_OUTPUTDIR)/gensrc/jdk.localedata/sun/util/resources/provider/NonEnLocaleDataMetaInfo.java
+GENSRC_BASELOCALEDATA := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/util/locale/provider/EnLocaleDataMetaInfo.java
+GENSRC_LOCALEDATA := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata/sun/util/resources/provider/NonEnLocaleDataMetaInfo.java
################################################################################
-GENSRC_CRBC_DST := $(JDK_OUTPUTDIR)/gensrc/java.base/sun/util/CoreResourceBundleControl.java
+GENSRC_CRBC_DST := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/util/CoreResourceBundleControl.java
GENSRC_CRBC_CMD := $(JDK_TOPDIR)/make/scripts/localelist.sh
JRE_NONEXIST_LOCALES := en en_US de_DE es_ES fr_FR it_IT ja_JP ko_KR sv_SE zh
diff --git a/jdk/make/gensrc/GensrcMisc.gmk b/jdk/make/gensrc/GensrcMisc.gmk
index 75fa0387c2b..f8ed6b172a7 100644
--- a/jdk/make/gensrc/GensrcMisc.gmk
+++ b/jdk/make/gensrc/GensrcMisc.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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
@@ -23,37 +23,32 @@
# questions.
#
-include ProfileNames.gmk
-
##########################################################################################
# Install the launcher name, release version string, full version
# string and the runtime name into the Version.java file.
# To be printed by java -version
-$(JDK_OUTPUTDIR)/gensrc/java.base/sun/misc/Version.java \
-$(PROFILE_VERSION_JAVA_TARGETS): \
+$(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/misc/Version.java: \
$(JDK_TOPDIR)/src/java.base/share/classes/sun/misc/Version.java.template
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
- $(ECHO) Generating sun/misc/Version.java $(call profile_version_name, $@)
+ $(ECHO) Generating sun/misc/Version.java
$(SED) -e 's/@@launcher_name@@/$(LAUNCHER_NAME)/g' \
-e 's/@@java_version@@/$(RELEASE)/g' \
-e 's/@@java_runtime_version@@/$(FULL_VERSION)/g' \
-e 's/@@java_runtime_name@@/$(RUNTIME_NAME)/g' \
- -e 's/@@java_profile_name@@/$(call profile_version_name, $@)/g' \
$< > $@.tmp
$(MV) $@.tmp $@
-GENSRC_JAVA_BASE += $(JDK_OUTPUTDIR)/gensrc/java.base/sun/misc/Version.java \
- $(PROFILE_VERSION_JAVA_TARGETS)
+GENSRC_JAVA_BASE += $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/misc/Version.java
##########################################################################################
-GENSRC_JAVA_BASE += $(JDK_OUTPUTDIR)/gensrc/java.base/sun/nio/ch/SocketOptionRegistry.java
+GENSRC_JAVA_BASE += $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/nio/ch/SocketOptionRegistry.java
GENSRC_SOR_SRC := $(JDK_TOPDIR)/make/src/native/genconstants/ch
GENSRC_SOR_SRC_FILE := genSocketOptionRegistry.c
-GENSRC_SOR_BIN := $(JDK_OUTPUTDIR)/btnative/genSocketOptionRegistry
+GENSRC_SOR_BIN := $(BUILDTOOLS_OUTPUTDIR)/native/genSocketOptionRegistry
SOR_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_SOR_SRC)/$(GENSRC_SOR_SRC_FILE) | \
$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }')
@@ -71,14 +66,15 @@ $(eval $(call SetupNativeCompilation,BUILD_GENSRC_SOR_EXE, \
SOR_PREGEN_FILE := $(JDK_TOPDIR)/src/closed/java.base/$(OPENJDK_TARGET_OS)/classes/sun/nio/ch/SocketOptionRegistry-$(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH).java.template
ifeq ($(wildcard $(SOR_PREGEN_FILE)), )
- $(JDK_OUTPUTDIR)/gensrc/java.base/sun/nio/ch/SocketOptionRegistry.java: $(BUILD_GENSRC_SOR_EXE)
+ $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/nio/ch/SocketOptionRegistry.java: $(BUILD_GENSRC_SOR_EXE)
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
- NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/make/scripts/addNotices.sh "$(SOR_COPYRIGHT_YEARS)" > $@.tmp
+ NAWK="$(NAWK)" SH="$(SH)" $(SH) -e \
+ $(JDK_TOPDIR)/make/scripts/addNotices.sh "$(SOR_COPYRIGHT_YEARS)" > $@.tmp
$(BUILD_GENSRC_SOR_EXE) >> $@.tmp
$(MV) $@.tmp $@
else
- $(JDK_OUTPUTDIR)/gensrc/java.base/sun/nio/ch/SocketOptionRegistry.java: $(SOR_PREGEN_FILE)
+ $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/nio/ch/SocketOptionRegistry.java: $(SOR_PREGEN_FILE)
$(call install-file)
endif
@@ -86,11 +82,11 @@ endif
ifneq ($(OPENJDK_TARGET_OS), windows)
- GENSRC_JAVA_BASE += $(JDK_OUTPUTDIR)/gensrc/java.base/sun/nio/fs/UnixConstants.java
+ GENSRC_JAVA_BASE += $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/nio/fs/UnixConstants.java
GENSRC_UC_SRC := $(JDK_TOPDIR)/make/src/native/genconstants/fs
GENSRC_UC_SRC_FILE := genUnixConstants.c
- GENSRC_UC_BIN := $(JDK_OUTPUTDIR)/btnative/genUnixConstants
+ GENSRC_UC_BIN := $(BUILDTOOLS_OUTPUTDIR)/native/genUnixConstants
UC_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_UC_SRC)/$(GENSRC_UC_SRC_FILE) | \
$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }')
@@ -109,14 +105,15 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
UC_PREGEN_FILE := $(JDK_TOPDIR)/src/closed/java.base/$(OPENJDK_TARGET_OS)/classes/sun/nio/fs/UnixConstants-$(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH).java.template
ifeq ($(wildcard $(UC_PREGEN_FILE)), )
- $(JDK_OUTPUTDIR)/gensrc/java.base/sun/nio/fs/UnixConstants.java: $(BUILD_GENSRC_UC_EXE)
+ $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/nio/fs/UnixConstants.java: $(BUILD_GENSRC_UC_EXE)
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
- NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/make/scripts/addNotices.sh "$(UC_COPYRIGHT_YEARS)" > $@.tmp
+ NAWK="$(NAWK)" SH="$(SH)" $(SH) -e \
+ $(JDK_TOPDIR)/make/scripts/addNotices.sh "$(UC_COPYRIGHT_YEARS)" > $@.tmp
$(BUILD_GENSRC_UC_EXE) >> $@.tmp
$(MV) $@.tmp $@
else
- $(JDK_OUTPUTDIR)/gensrc/java.base/sun/nio/fs/UnixConstants.java: $(UC_PREGEN_FILE)
+ $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/nio/fs/UnixConstants.java: $(UC_PREGEN_FILE)
$(call install-file)
endif
@@ -126,11 +123,11 @@ endif
ifeq ($(OPENJDK_TARGET_OS), solaris)
- GENSRC_JAVA_BASE += $(JDK_OUTPUTDIR)/gensrc/java.base/sun/nio/fs/SolarisConstants.java
+ GENSRC_JAVA_BASE += $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/nio/fs/SolarisConstants.java
GENSRC_SOL_SRC := $(JDK_TOPDIR)/make/src/native/genconstants/fs
GENSRC_SOL_SRC_FILE := genSolarisConstants.c
- GENSRC_SOL_BIN := $(JDK_OUTPUTDIR)/btnative/genSolarisConstants
+ GENSRC_SOL_BIN := $(BUILDTOOLS_OUTPUTDIR)/native/genSolarisConstants
SOL_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_SOL_SRC)/$(GENSRC_SOL_SRC_FILE) | \
$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }')
@@ -145,10 +142,11 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
OUTPUT_DIR := $(GENSRC_SOL_BIN), \
PROGRAM := genSolarisConstants))
- $(JDK_OUTPUTDIR)/gensrc/java.base/sun/nio/fs/SolarisConstants.java: $(BUILD_GENSRC_SOL_EXE)
+ $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/nio/fs/SolarisConstants.java: $(BUILD_GENSRC_SOL_EXE)
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
- NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/make/scripts/addNotices.sh "$(SOL_COPYRIGHT_YEARS)" > $@.tmp
+ NAWK="$(NAWK)" SH="$(SH)" $(SH) -e \
+ $(JDK_TOPDIR)/make/scripts/addNotices.sh "$(SOL_COPYRIGHT_YEARS)" > $@.tmp
$(BUILD_GENSRC_SOL_EXE) >> $@.tmp
$(MV) $@.tmp $@
diff --git a/jdk/make/gensrc/GensrcProperties.gmk b/jdk/make/gensrc/GensrcProperties.gmk
index 0b0520c6fd9..65e4e9e6214 100644
--- a/jdk/make/gensrc/GensrcProperties.gmk
+++ b/jdk/make/gensrc/GensrcProperties.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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
@@ -30,7 +30,7 @@
# Helper macro for SetupCopy-zh_HK.
define SetupOneCopy-zh_HK
$1_$2_TARGET := $$(patsubst $(JDK_TOPDIR)/src/$(MODULE)/share/classes/%, \
- $(JDK_OUTPUTDIR)/gensrc/$(MODULE)/%, \
+ $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/%, \
$$(subst _zh_TW,_zh_HK, $2))
$$($1_$2_TARGET): $2
@@ -62,7 +62,7 @@ define SetupCompileProperties
# Strip away prefix and suffix, leaving for example only:
# "/share/classes/com/sun/tools/javac/resources/javac_zh_CN"
$1_JAVAS := $$(patsubst $(JDK_TOPDIR)/src/%, \
- $(JDK_OUTPUTDIR)/gensrc/%, \
+ $(SUPPORT_OUTPUTDIR)/gensrc/%, \
$$(patsubst %.properties, %.java, \
$$(subst /share/classes,, $$($1_SRCS))))
@@ -78,10 +78,10 @@ define SetupCompileProperties
$$(addsuffix _SPACE_$$($1_CLASS), \
$$(addprefix _SPACE_, $$($1_JAVAS)))))
- $1_TARGET := $(JDK_OUTPUTDIR)/gensrc/$(MODULE)/_the.$1.done
- $1_CMDLINE_FILE := $(JDK_OUTPUTDIR)/gensrc/$(MODULE)/_the.$1.cmdline
+ $1_TARGET := $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/_the.$1.done
+ $1_CMDLINE_FILE := $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/_the.$1.cmdline
- # Now setup the rule for the generation of the resource bundles.
+# Now setup the rule for the generation of the resource bundles.
$$($1_TARGET): $$($1_SRCS) $$($1_JAVAS) $(BUILD_TOOLS_JDK)
$(MKDIR) -p $$(@D) $$($1_DIRS)
$(ECHO) Compiling $$(words $$($1_SRCS)) properties into resource bundles for $(MODULE)
diff --git a/jdk/make/gensrc/GensrcSwing.gmk b/jdk/make/gensrc/GensrcSwing.gmk
index c7571269c98..537ca4b2437 100644
--- a/jdk/make/gensrc/GensrcSwing.gmk
+++ b/jdk/make/gensrc/GensrcSwing.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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
@@ -27,25 +27,26 @@
# Generate java files for javax.swing.plaf package
#
NIMBUS_PACKAGE = javax.swing.plaf
-NIMBUS_GENSRC_DIR = $(JDK_OUTPUTDIR)/gensrc/java.desktop/javax/swing/plaf/nimbus
+NIMBUS_GENSRC_DIR = $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/javax/swing/plaf/nimbus
NIMBUS_SKIN_FILE = $(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus/skin.laf
-$(JDK_OUTPUTDIR)/gensrc/_the.generated_nimbus: $(NIMBUS_SKIN_FILE) $(BUILD_TOOLS_JDK)
+$(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_the.generated_nimbus: $(NIMBUS_SKIN_FILE) $(BUILD_TOOLS_JDK)
$(MKDIR) -p $(@D)
$(ECHO) "Generating Nimbus source files"
$(TOOL_GENERATENIMBUS) $(LOG_INFO) \
- -skinFile $(NIMBUS_SKIN_FILE) -buildDir $(JDK_OUTPUTDIR)/gensrc/java.desktop \
+ -skinFile $(NIMBUS_SKIN_FILE) -buildDir $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop \
-packagePrefix $(NIMBUS_PACKAGE).nimbus -lafName Nimbus
$(ECHO) $(LOG_INFO) "Finished generating Nimbus source files"
$(TOUCH) $@
-GENSRC_SWING_NIMBUS := $(JDK_OUTPUTDIR)/gensrc/_the.generated_nimbus
+GENSRC_SWING_NIMBUS := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_the.generated_nimbus
#
# Generate beaninfo java files
#
-DOCLET_DATA_DIR = $(JDK_TOPDIR)/make/data/swingbeaninfo
+BEANINFO_OUTPUTDIR := $(SUPPORT_OUTPUTDIR)/gensrc_no_docs/java.desktop
+DOCLET_DATA_DIR := $(JDK_TOPDIR)/make/data/swingbeaninfo
# javax.swing package
BEANS = AbstractButton Box JComponent JApplet JButton \
@@ -67,41 +68,44 @@ BEANS_SRC = $(BEANS:%=$(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/%
# Dummy variable so far, in the old build system it was false by default
SWINGBEAN_DEBUG_FLAG = false
-# GenDocletBeanInfo is compiled in Tools.gmk and picks up from $(JDK_OUTPUTDIR)/btclasses
+# GenDocletBeanInfo is compiled in Tools.gmk and picks up from $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes
# LocaleDataMetaInfo needs to be generated before running this to avoid confusing errors
# in the build log.
-$(JDK_OUTPUTDIR)/gensrc_no_srczip/_the.generated_beaninfo: $(BEANS_SRC) \
- $(JDK_OUTPUTDIR)/gensrc_no_srczip/java.desktop/javax/swing/SwingBeanInfoBase.java \
- $(JDK_OUTPUTDIR)/gensrc/java.desktop/sun/swing/BeanInfoUtils.java $(BUILD_TOOLS_JDK) \
- | $(GENSRC_LOCALEDATAMETAINFO)
+$(BEANINFO_OUTPUTDIR)/_the.generated_beaninfo: $(BEANS_SRC) \
+ $(BEANINFO_OUTPUTDIR)/javax/swing/SwingBeanInfoBase.java \
+ $(BEANINFO_OUTPUTDIR)/sun/swing/BeanInfoUtils.java $(BUILD_TOOLS_JDK)
$(ECHO) Generating beaninfo
- $(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc_no_srczip/java.desktop/javax/swing
+ $(MKDIR) -p $(BEANINFO_OUTPUTDIR)/javax/swing
$(JAVA) -Djava.awt.headless=true $(NEW_JAVADOC) \
-sourcepath "$(subst $(SPACE),$(PATH_SEP),\
$(wildcard $(JDK_TOPDIR)/src/*/*/classes) \
- $(JDK_OUTPUTDIR)/gensrc/java.base)" \
+ $(SUPPORT_OUTPUTDIR)/gensrc/java.base)" \
-doclet build.tools.swingbeaninfo.GenDocletBeanInfo \
- -x $(SWINGBEAN_DEBUG_FLAG) -d $(JDK_OUTPUTDIR)/gensrc_no_srczip/java.desktop/javax/swing \
- -t $(DOCLET_DATA_DIR)/SwingBeanInfo.template -docletpath $(JDK_OUTPUTDIR)/btclasses \
+ -x $(SWINGBEAN_DEBUG_FLAG) -d $(BEANINFO_OUTPUTDIR)/javax/swing \
+ -t $(DOCLET_DATA_DIR)/SwingBeanInfo.template \
+ -docletpath $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
-XDignore.symbol.file=true \
- -classpath $(JDK_OUTPUTDIR)/btclasses $(BEANS_SRC) $(LOG_INFO)
+ -classpath $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes $(BEANS_SRC) $(LOG_INFO)
# Move the JTextComponent into its proper package directory.
- $(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc_no_srczip/java.desktop/javax/swing/text
- $(MV) $(JDK_OUTPUTDIR)/gensrc_no_srczip/java.desktop/javax/swing/JTextComponentBeanInfo.java $(JDK_OUTPUTDIR)/gensrc_no_srczip/java.desktop/javax/swing/text/JTextComponentBeanInfo.java
+ $(MKDIR) -p $(BEANINFO_OUTPUTDIR)/javax/swing/text
+ $(MV) $(BEANINFO_OUTPUTDIR)/javax/swing/JTextComponentBeanInfo.java \
+ $(BEANINFO_OUTPUTDIR)/javax/swing/text/JTextComponentBeanInfo.java
$(TOUCH) $@
# This file is the part of dt.jar
# For some reason it is under $(JDK_TOPDIR)/make/data/swingbeaninfo
# Should it be moved under $(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing instead?
-$(JDK_OUTPUTDIR)/gensrc_no_srczip/java.desktop/javax/swing/SwingBeanInfoBase.java: $(DOCLET_DATA_DIR)/javax/swing/SwingBeanInfoBase.java
+$(BEANINFO_OUTPUTDIR)/javax/swing/SwingBeanInfoBase.java: \
+ $(DOCLET_DATA_DIR)/javax/swing/SwingBeanInfoBase.java
$(call install-file)
# This file is the part of dt.jar
# For some reason it is under $(JDK_TOPDIR)/make/data/swingbeaninfo
# Should it be moved under $(JDK_TOPDIR)/src/java.desktop/share/classes/sun/swing instead?
-$(JDK_OUTPUTDIR)/gensrc/java.desktop/sun/swing/BeanInfoUtils.java: $(DOCLET_DATA_DIR)/sun/swing/BeanInfoUtils.java
+$(BEANINFO_OUTPUTDIR)/sun/swing/BeanInfoUtils.java: \
+ $(DOCLET_DATA_DIR)/sun/swing/BeanInfoUtils.java
$(call install-file)
-GENSRC_SWING_BEANINFO = $(JDK_OUTPUTDIR)/gensrc_no_srczip/_the.generated_beaninfo
+GENSRC_SWING_BEANINFO = $(BEANINFO_OUTPUTDIR)/_the.generated_beaninfo
GENSRC_JAVA_DESKTOP += $(GENSRC_SWING_BEANINFO) $(GENSRC_SWING_NIMBUS)
diff --git a/jdk/make/gensrc/GensrcX11Wrappers.gmk b/jdk/make/gensrc/GensrcX11Wrappers.gmk
index b21729654f8..da8732bbf54 100644
--- a/jdk/make/gensrc/GensrcX11Wrappers.gmk
+++ b/jdk/make/gensrc/GensrcX11Wrappers.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2014, Oracle and/or its affiliates. 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
@@ -37,9 +37,9 @@
GENSRC_X11WRAPPERS :=
# Put temporary c-code and executable to calculate offsets here.
# Also put verification offset file here as well.
-GENSRC_X11WRAPPERS_TMP := $(JDK_OUTPUTDIR)/gensrc_x11wrappers
+GENSRC_X11WRAPPERS_TMP := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_x11wrappers
# Put the generated Java classes used to interface X11 from awt here.
-GENSRC_X11WRAPPERS_DST := $(JDK_OUTPUTDIR)/gensrc/java.desktop/sun/awt/X11
+GENSRC_X11WRAPPERS_DST := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/sun/awt/X11
# The pre-calculated offset file are stored here:
GENSRC_SIZER_DIR := $(JDK_TOPDIR)/make/data/x11wrappergen
@@ -69,12 +69,12 @@ $(GENSRC_X11WRAPPERS_TMP)/sizes.%: $(GENSRC_SIZER_DIR)/sizes.%
# Run the tool on the offset files copied from the source repository to generate several Java classes
# used in awt.
-$(JDK_OUTPUTDIR)/gensrc/_the.generated.x11: $(GENSRC_X11_SIZES_USED) $(BUILD_TOOLS_JDK)
+$(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_the.generated.x11: $(GENSRC_X11_SIZES_USED) $(BUILD_TOOLS_JDK)
$(MKDIR) -p $(GENSRC_X11WRAPPERS_DST)
$(TOOL_WRAPPERGENERATOR) $(GENSRC_X11WRAPPERS_DST) $(GENSRC_SIZER_DIR)/xlibtypes.txt "gen" $(GENSRC_X11WRAPPERS_TMP)/sizes
$(TOUCH) $@
-GENSRC_X11WRAPPERS += $(JDK_OUTPUTDIR)/gensrc/_the.generated.x11
+GENSRC_X11WRAPPERS += $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_the.generated.x11
ifneq ($(COMPILE_TYPE), cross)
# This is not a cross compile, regenerate the offset file, so that we
@@ -91,7 +91,7 @@ ifneq ($(COMPILE_TYPE), cross)
MEMORY_MODEL_FLAG="$(COMPILER_TARGET_BITS_FLAG)$*"
endif
- SIZER_CFLAGS := -I$(JDK_OUTPUTDIR)/include \
+ SIZER_CFLAGS := \
-I$(JDK_TOPDIR)/src/java.base/share/native/include \
-I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_EXPORT_DIR)/native/include \
-I$(JDK_TOPDIR)/src/java.base/share/native/libjava \
diff --git a/jdk/make/launcher/Launcher-java.base.gmk b/jdk/make/launcher/Launcher-java.base.gmk
index 555c6f25aab..d117ad3b2ca 100644
--- a/jdk/make/launcher/Launcher-java.base.gmk
+++ b/jdk/make/launcher/Launcher-java.base.gmk
@@ -32,20 +32,20 @@ include LauncherCommon.gmk
# overwritten.
$(eval $(call SetupLauncher,java, \
-DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib, \
- $(JDK_OUTPUTDIR)/objs/jli_static.lib, $(JAVA_RC_FLAGS), \
- $(JAVA_VERSION_INFO_RESOURCE), $(JDK_OUTPUTDIR)/objs/java_objs,true))
+ $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jli_static.lib, $(JAVA_RC_FLAGS), \
+ $(JAVA_VERSION_INFO_RESOURCE), $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/java_objs,true))
-$(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX): $(BUILD_LAUNCHER_java)
+$(SUPPORT_OUTPUTDIR)/modules_cmds/java.base/java$(EXE_SUFFIX): $(BUILD_LAUNCHER_java)
$(MKDIR) -p $(@D)
$(RM) $@
- $(CP) $(JDK_OUTPUTDIR)/objs/java_objs$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX) $@
+ $(CP) $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/java_objs$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX) $@
-LAUNCHERS += $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX)
+TARGETS += $(SUPPORT_OUTPUTDIR)/modules_cmds/java.base/java$(EXE_SUFFIX)
ifeq ($(OPENJDK_TARGET_OS), windows)
$(eval $(call SetupLauncher,javaw, \
-DJAVAW -DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib, \
- $(JDK_OUTPUTDIR)/objs/jli_static.lib, $(JAVA_RC_FLAGS), \
+ $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jli_static.lib, $(JAVA_RC_FLAGS), \
$(JAVA_VERSION_INFO_RESOURCE),,true))
endif
@@ -57,7 +57,7 @@ $(eval $(call SetupLauncher,keytool, \
BUILD_JEXEC :=
BUILD_JEXEC_SRC :=
BUILD_JEXEC_INC :=
-BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
+BUILD_JEXEC_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)
#
# UNHANDLED:
@@ -90,7 +90,7 @@ ifeq ($(BUILD_JEXEC), 1)
endif
ifeq ($(OPENJDK_TARGET_OS), linux)
- BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib
+ BUILD_JEXEC_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base
BUILD_JEXEC_INC += -I$(JDK_TOPDIR)/src/java.base/share/native/libjli
endif
endif
@@ -111,12 +111,12 @@ ifneq ($(BUILD_JEXEC_SRC), )
CFLAGS_solaris := -KPIC, \
LDFLAGS := $(LDFLAGS_JDKEXE) \
$(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/jexec_obj, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jexec_obj, \
OUTPUT_DIR := $(BUILD_JEXEC_DST_DIR), \
DEBUG_SYMBOLS := true, \
PROGRAM := jexec))
- LIBRARIES += $(BUILD_JEXEC)
+ TARGETS += $(BUILD_JEXEC)
endif
################################################################################
@@ -124,8 +124,8 @@ endif
BUILD_JSPAWNHELPER :=
BUILD_JSPAWNHELPER_SRC := $(JDK_TOPDIR)/src/java.base/unix/native/jspawnhelper
JSPAWNHELPER_CFLAGS := -I$(JDK_TOPDIR)/src/java.base/unix/native/libjava
-BUILD_JSPAWNHELPER_DST_DIR := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
-LINK_JSPAWNHELPER_OBJECTS := $(JDK_OUTPUTDIR)/objs/libjava/childproc.o
+BUILD_JSPAWNHELPER_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)
+LINK_JSPAWNHELPER_OBJECTS := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava/childproc.o
LINK_JSPAWNHELPER_FLAGS :=
ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris aix), )
@@ -133,7 +133,7 @@ ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris aix), )
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
- BUILD_JSPAWNHELPER_DST_DIR := $(JDK_OUTPUTDIR)/lib
+ BUILD_JSPAWNHELPER_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base
endif
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
@@ -149,19 +149,13 @@ ifeq ($(BUILD_JSPAWNHELPER), 1)
CFLAGS := $(CFLAGS_JDKEXE) $(JSPAWNHELPER_CFLAGS), \
LDFLAGS := $(LDFLAGS_JDKEXE) $(LINK_JSPAWNHELPER_FLAGS), \
LDFLAGS_SUFFIX := $(LINK_JSPAWNHELPER_OBJECTS), \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/jspawnhelper, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jspawnhelper, \
OUTPUT_DIR := $(BUILD_JSPAWNHELPER_DST_DIR), \
PROGRAM := jspawnhelper))
$(BUILD_JSPAWNHELPER): $(LINK_JSPAWNHELPER_OBJECTS)
- LIBRARIES += $(BUILD_JSPAWNHELPER)
+ TARGETS += $(BUILD_JSPAWNHELPER)
endif
################################################################################
-
-java.base: $(LAUNCHERS) $(LIBRARIES)
-
-all: java.base
-
-.PHONY: all java.base
diff --git a/jdk/make/launcher/Launcher-java.corba.gmk b/jdk/make/launcher/Launcher-java.corba.gmk
index 82b44247e23..8404c556bcb 100644
--- a/jdk/make/launcher/Launcher-java.corba.gmk
+++ b/jdk/make/launcher/Launcher-java.corba.gmk
@@ -45,9 +45,3 @@ $(eval $(call SetupLauncher,tnameserv, \
"-J-Dcom.sun.CORBA.POA.ORBServerId=1"$(COMMA) \
"com.sun.corba.se.impl.naming.cosnaming.TransientNameServer"$(COMMA) }'))
-
-java.corba: $(LAUNCHERS)
-
-all: java.corba
-
-.PHONY: all java.corba
diff --git a/jdk/make/launcher/Launcher-java.desktop.gmk b/jdk/make/launcher/Launcher-java.desktop.gmk
index b7566e35bbe..1b36c691a03 100644
--- a/jdk/make/launcher/Launcher-java.desktop.gmk
+++ b/jdk/make/launcher/Launcher-java.desktop.gmk
@@ -34,8 +34,3 @@ ifndef BUILD_HEADLESS_ONLY
$(XLIBS)))
endif
-java.desktop: $(LAUNCHERS)
-
-all: java.desktop
-
-.PHONY: all java.desktop
diff --git a/jdk/make/launcher/Launcher-java.rmi.gmk b/jdk/make/launcher/Launcher-java.rmi.gmk
index 9eabcc2da30..26f9b7dc627 100644
--- a/jdk/make/launcher/Launcher-java.rmi.gmk
+++ b/jdk/make/launcher/Launcher-java.rmi.gmk
@@ -36,12 +36,12 @@ $(eval $(call SetupLauncher,rmiregistry, \
#
# The java-rmi.cgi script in bin/ only gets delivered in certain situations
#
-JAVA_RMI_CGI := $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java-rmi.cgi
+JAVA_RMI_CGI := $(SUPPORT_OUTPUTDIR)/modules_cmds/$(MODULE)/java-rmi.cgi
ifeq ($(OPENJDK_TARGET_OS), linux)
- LAUNCHERS += $(JAVA_RMI_CGI)
+ TARGETS += $(JAVA_RMI_CGI)
endif
ifeq ($(OPENJDK_TARGET_OS), solaris)
- LAUNCHERS += $(JAVA_RMI_CGI)
+ TARGETS += $(JAVA_RMI_CGI)
endif
# TODO:
@@ -61,9 +61,3 @@ else
endif
##########################################################################################
-
-java.rmi: $(LAUNCHERS)
-
-all: java.rmi
-
-.PHONY: all java.rmi
diff --git a/jdk/make/launcher/Launcher-java.scripting.gmk b/jdk/make/launcher/Launcher-java.scripting.gmk
index d43ea36b4e9..14889a7f77b 100644
--- a/jdk/make/launcher/Launcher-java.scripting.gmk
+++ b/jdk/make/launcher/Launcher-java.scripting.gmk
@@ -28,8 +28,3 @@ include LauncherCommon.gmk
$(eval $(call SetupLauncher,jrunscript, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.script.shell.Main"$(COMMA) }'))
-java.scripting: $(LAUNCHERS)
-
-all: java.scripting
-
-.PHONY: all java.scripting
diff --git a/jdk/make/launcher/Launcher-java.security.jgss.gmk b/jdk/make/launcher/Launcher-java.security.jgss.gmk
index d25035170e1..818503ed569 100644
--- a/jdk/make/launcher/Launcher-java.security.jgss.gmk
+++ b/jdk/make/launcher/Launcher-java.security.jgss.gmk
@@ -36,8 +36,3 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Ktab"$(COMMA) }'))
endif
-java.security.jgss: $(LAUNCHERS)
-
-all: java.security.jgss
-
-.PHONY: all java.security.jgss
diff --git a/jdk/make/launcher/Launcher-jdk.compiler.gmk b/jdk/make/launcher/Launcher-jdk.compiler.gmk
index a73616d3a18..77695993886 100644
--- a/jdk/make/launcher/Launcher-jdk.compiler.gmk
+++ b/jdk/make/launcher/Launcher-jdk.compiler.gmk
@@ -30,13 +30,6 @@ $(eval $(call SetupLauncher,javac, \
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javac.Main"$(COMMA) }'))
-ifeq ($(ENABLE_SJAVAC), yes)
- $(eval $(call SetupLauncher,sjavac, \
- -DEXPAND_CLASSPATH_WILDCARDS \
- -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
- -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.sjavac.Main"$(COMMA) }'))
-endif
-
$(eval $(call SetupLauncher,javah, \
-DEXPAND_CLASSPATH_WILDCARDS \
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
@@ -51,8 +44,12 @@ $(eval $(call SetupLauncher,serialver, \
-DEXPAND_CLASSPATH_WILDCARDS \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.serialver.SerialVer"$(COMMA) }'))
-jdk.compiler: $(LAUNCHERS)
-
-all: jdk.compiler
-
-.PHONY: all jdk.compiler
+ifeq ($(ENABLE_SJAVAC), yes)
+ # Build sjavac directly to the exploded image so that it does not get included
+ # into any real images
+ $(eval $(call SetupLauncher,sjavac, \
+ -DEXPAND_CLASSPATH_WILDCARDS \
+ -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
+ -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.sjavac.Main"$(COMMA) }',,,,,,, \
+ $(JDK_OUTPUTDIR)/bin))
+endif
diff --git a/jdk/make/launcher/Launcher-jdk.dev.gmk b/jdk/make/launcher/Launcher-jdk.dev.gmk
index b3e74b13e92..6008ffd3b6d 100644
--- a/jdk/make/launcher/Launcher-jdk.dev.gmk
+++ b/jdk/make/launcher/Launcher-jdk.dev.gmk
@@ -36,14 +36,12 @@ $(eval $(call SetupLauncher,jdeps, \
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.jdeps.Main"$(COMMA) }'))
+$(eval $(call SetupLauncher,jimage,\
+ -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "jdk.tools.jimage.Main"$(COMMA) }'))
+
$(eval $(call SetupLauncher,jhat, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.hat.Main"$(COMMA) }'))
$(eval $(call SetupLauncher,native2ascii, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.native2ascii.Main"$(COMMA) }'))
-jdk.dev: $(LAUNCHERS)
-
-all: jdk.dev
-
-.PHONY: all jdk.dev
diff --git a/jdk/make/launcher/Launcher-jdk.hotspot.agent.gmk b/jdk/make/launcher/Launcher-jdk.hotspot.agent.gmk
index 984288dcec4..6686513e3c2 100644
--- a/jdk/make/launcher/Launcher-jdk.hotspot.agent.gmk
+++ b/jdk/make/launcher/Launcher-jdk.hotspot.agent.gmk
@@ -30,8 +30,3 @@ $(eval $(call SetupLauncher,jsadebugd, \
-DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \
,,,,,,,,,Info-privileged.plist))
-jdk.hotspot.agent: $(LAUNCHERS)
-
-all: jdk.hotspot.agent
-
-.PHONY: all jdk.hotspot.agent
diff --git a/jdk/make/launcher/Launcher-jdk.javadoc.gmk b/jdk/make/launcher/Launcher-jdk.javadoc.gmk
index dbf3ce45493..65eac4f120c 100644
--- a/jdk/make/launcher/Launcher-jdk.javadoc.gmk
+++ b/jdk/make/launcher/Launcher-jdk.javadoc.gmk
@@ -30,8 +30,3 @@ $(eval $(call SetupLauncher,javadoc, \
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javadoc.Main"$(COMMA) }'))
-jdk.javadoc: $(LAUNCHERS)
-
-all: jdk.javadoc
-
-.PHONY: all jdk.javadoc
diff --git a/jdk/make/launcher/Launcher-jdk.jcmd.gmk b/jdk/make/launcher/Launcher-jdk.jcmd.gmk
index 12595154ce4..9e3f7ceb13e 100644
--- a/jdk/make/launcher/Launcher-jdk.jcmd.gmk
+++ b/jdk/make/launcher/Launcher-jdk.jcmd.gmk
@@ -58,8 +58,3 @@ $(eval $(call SetupLauncher,jstat, \
$(eval $(call SetupLauncher,jcmd, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jcmd.JCmd"$(COMMA) }'))
-jdk.jcmd: $(LAUNCHERS)
-
-all: jdk.jcmd
-
-.PHONY: all jdk.jcmd
diff --git a/jdk/make/launcher/Launcher-jdk.jconsole.gmk b/jdk/make/launcher/Launcher-jdk.jconsole.gmk
index df537db5906..c67c0c0f933 100644
--- a/jdk/make/launcher/Launcher-jdk.jconsole.gmk
+++ b/jdk/make/launcher/Launcher-jdk.jconsole.gmk
@@ -32,8 +32,3 @@ $(eval $(call SetupLauncher,jconsole, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "-J-Djconsole.showOutputViewer"$(COMMA) "sun.tools.jconsole.JConsole"$(COMMA) }' \
-DAPP_CLASSPATH='{ "/lib/jconsole.jar"$(COMMA) "/lib/tools.jar"$(COMMA) "/classes" }'))
-jdk.jconsole: $(LAUNCHERS)
-
-all: jdk.jconsole
-
-.PHONY: all jdk.jconsole
diff --git a/jdk/make/launcher/Launcher-jdk.jdi.gmk b/jdk/make/launcher/Launcher-jdk.jdi.gmk
index b32d6c44d70..9d05f255626 100644
--- a/jdk/make/launcher/Launcher-jdk.jdi.gmk
+++ b/jdk/make/launcher/Launcher-jdk.jdi.gmk
@@ -29,8 +29,3 @@ $(eval $(call SetupLauncher,jdb, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.example.debug.tty.TTY"$(COMMA) }' \
-DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }'))
-jdk.jdi: $(LAUNCHERS)
-
-all: jdk.jdi
-
-.PHONY: all jdk.jdi
diff --git a/jdk/make/launcher/Launcher-jdk.jvmstat.gmk b/jdk/make/launcher/Launcher-jdk.jvmstat.gmk
index 5f5f8a1fbbe..b93ef16716e 100644
--- a/jdk/make/launcher/Launcher-jdk.jvmstat.gmk
+++ b/jdk/make/launcher/Launcher-jdk.jvmstat.gmk
@@ -28,8 +28,3 @@ include LauncherCommon.gmk
$(eval $(call SetupLauncher,jstatd, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jstatd.Jstatd"$(COMMA) }'))
-jdk.jvmstat: $(LAUNCHERS)
-
-all: jdk.jvmstat
-
-.PHONY: all jdk.jvmstat
diff --git a/jdk/make/launcher/Launcher-jdk.rmic.gmk b/jdk/make/launcher/Launcher-jdk.rmic.gmk
index 88a8471e978..2fc8742497c 100644
--- a/jdk/make/launcher/Launcher-jdk.rmic.gmk
+++ b/jdk/make/launcher/Launcher-jdk.rmic.gmk
@@ -29,8 +29,3 @@ $(eval $(call SetupLauncher,rmic, \
-DEXPAND_CLASSPATH_WILDCARDS \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.rmi.rmic.Main"$(COMMA) }'))
-jdk.rmic: $(LAUNCHERS)
-
-all: jdk.rmic
-
-.PHONY: all jdk.rmic
diff --git a/jdk/make/launcher/Launcher-jdk.runtime.gmk b/jdk/make/launcher/Launcher-jdk.runtime.gmk
index cf6be2d2467..1c868ba8503 100644
--- a/jdk/make/launcher/Launcher-jdk.runtime.gmk
+++ b/jdk/make/launcher/Launcher-jdk.runtime.gmk
@@ -49,16 +49,16 @@ ifeq ($(USE_EXTERNAL_LIBZ), true)
UNPACKEXE_ZIPOBJS := -lz
else
UNPACKEXE_CFLAGS += -I$(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8
- UNPACKEXE_ZIPOBJS := $(JDK_OUTPUTDIR)/objs/libzip/zcrc32$(OBJ_SUFFIX) \
- $(JDK_OUTPUTDIR)/objs/libzip/deflate$(OBJ_SUFFIX) \
- $(JDK_OUTPUTDIR)/objs/libzip/trees$(OBJ_SUFFIX) \
- $(JDK_OUTPUTDIR)/objs/libzip/zadler32$(OBJ_SUFFIX) \
- $(JDK_OUTPUTDIR)/objs/libzip/compress$(OBJ_SUFFIX) \
- $(JDK_OUTPUTDIR)/objs/libzip/zutil$(OBJ_SUFFIX) \
- $(JDK_OUTPUTDIR)/objs/libzip/inflate$(OBJ_SUFFIX) \
- $(JDK_OUTPUTDIR)/objs/libzip/infback$(OBJ_SUFFIX) \
- $(JDK_OUTPUTDIR)/objs/libzip/inftrees$(OBJ_SUFFIX) \
- $(JDK_OUTPUTDIR)/objs/libzip/inffast$(OBJ_SUFFIX)
+ UNPACKEXE_ZIPOBJS := $(SUPPORT_OUTPUTDIR)/native/java.base/libzip/zcrc32$(OBJ_SUFFIX) \
+ $(SUPPORT_OUTPUTDIR)/native/java.base/libzip/deflate$(OBJ_SUFFIX) \
+ $(SUPPORT_OUTPUTDIR)/native/java.base/libzip/trees$(OBJ_SUFFIX) \
+ $(SUPPORT_OUTPUTDIR)/native/java.base/libzip/zadler32$(OBJ_SUFFIX) \
+ $(SUPPORT_OUTPUTDIR)/native/java.base/libzip/compress$(OBJ_SUFFIX) \
+ $(SUPPORT_OUTPUTDIR)/native/java.base/libzip/zutil$(OBJ_SUFFIX) \
+ $(SUPPORT_OUTPUTDIR)/native/java.base/libzip/inflate$(OBJ_SUFFIX) \
+ $(SUPPORT_OUTPUTDIR)/native/java.base/libzip/infback$(OBJ_SUFFIX) \
+ $(SUPPORT_OUTPUTDIR)/native/java.base/libzip/inftrees$(OBJ_SUFFIX) \
+ $(SUPPORT_OUTPUTDIR)/native/java.base/libzip/inffast$(OBJ_SUFFIX)
endif
@@ -108,8 +108,8 @@ $(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \
LDFLAGS_linux := -lc, \
LDFLAGS_solaris := $(UNPACKEXE_LDFLAGS_solaris) -lc, \
LDFLAGS_SUFFIX := $(LIBCXX), \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/unpackexe$(OUTPUT_SUBDIR), \
- OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs/unpackexe$(OUTPUT_SUBDIR), \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/unpackexe$(OUTPUT_SUBDIR), \
+ OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/unpackexe$(OUTPUT_SUBDIR), \
PROGRAM := unpack200, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
@@ -133,15 +133,9 @@ endif
# image. The real fix would be clean up linking of unpack200 using
# -link -incremental:no
# like all other launchers.
-$(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/unpack200$(EXE_SUFFIX): $(BUILD_UNPACKEXE)
+$(SUPPORT_OUTPUTDIR)/modules_cmds/$(MODULE)/unpack200$(EXE_SUFFIX): $(BUILD_UNPACKEXE)
$(call install-file)
-LAUNCHERS += $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/unpack200$(EXE_SUFFIX)
+TARGETS += $(SUPPORT_OUTPUTDIR)/modules_cmds/$(MODULE)/unpack200$(EXE_SUFFIX)
################################################################################
-
-jdk.runtime: $(LAUNCHERS)
-
-all: jdk.runtime
-
-.PHONY: all jdk.runtime
diff --git a/jdk/make/launcher/Launcher-jdk.scripting.nashorn.gmk b/jdk/make/launcher/Launcher-jdk.scripting.nashorn.gmk
index cfb5f421a18..1a9f71c05af 100644
--- a/jdk/make/launcher/Launcher-jdk.scripting.nashorn.gmk
+++ b/jdk/make/launcher/Launcher-jdk.scripting.nashorn.gmk
@@ -28,8 +28,3 @@ include LauncherCommon.gmk
$(eval $(call SetupLauncher,jjs, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "jdk.nashorn.tools.Shell"$(COMMA) }'))
-jdk.scripting.nashorn: $(LAUNCHERS)
-
-all: jdk.scripting.nashorn
-
-.PHONY: all jdk.scripting.nashorn
diff --git a/jdk/make/launcher/Launcher-jdk.xml.bind.gmk b/jdk/make/launcher/Launcher-jdk.xml.bind.gmk
index f03de37ca17..5dd0ff0fce4 100644
--- a/jdk/make/launcher/Launcher-jdk.xml.bind.gmk
+++ b/jdk/make/launcher/Launcher-jdk.xml.bind.gmk
@@ -31,8 +31,3 @@ $(eval $(call SetupLauncher,schemagen, \
$(eval $(call SetupLauncher,xjc, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.xjc.Driver"$(COMMA) }'))
-jdk.xml.bind: $(LAUNCHERS)
-
-all: jdk.xml.bind
-
-.PHONY: all jdk.xml.bind
diff --git a/jdk/make/launcher/Launcher-jdk.xml.ws.gmk b/jdk/make/launcher/Launcher-jdk.xml.ws.gmk
index 583156372e2..4085ba1a967 100644
--- a/jdk/make/launcher/Launcher-jdk.xml.ws.gmk
+++ b/jdk/make/launcher/Launcher-jdk.xml.ws.gmk
@@ -31,8 +31,3 @@ $(eval $(call SetupLauncher,wsgen, \
$(eval $(call SetupLauncher,wsimport, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.ws.WsImport"$(COMMA) }'))
-jdk.xml.ws: $(LAUNCHERS)
-
-all: jdk.xml.ws
-
-.PHONY: all jdk.xml.ws
diff --git a/jdk/make/launcher/LauncherCommon.gmk b/jdk/make/launcher/LauncherCommon.gmk
index f8ff00c830d..40dbba918d5 100644
--- a/jdk/make/launcher/LauncherCommon.gmk
+++ b/jdk/make/launcher/LauncherCommon.gmk
@@ -23,10 +23,6 @@
# questions.
#
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
include NativeCompilation.gmk
# Prepare the find cache.
@@ -93,7 +89,7 @@ define SetupLauncher
$(call LogSetupMacroEntry,SetupLauncher($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11))
$(if $(13),$(error Internal makefile error: Too many arguments to SetupLauncher, please update CompileLaunchers.gmk))
- $1_WINDOWS_JLI_LIB := $(JDK_OUTPUTDIR)/objs/libjli/jli.lib
+ $1_WINDOWS_JLI_LIB := $(SUPPORT_OUTPUTDIR)/native/java.base/libjli/jli.lib
ifneq ($6, )
$1_WINDOWS_JLI_LIB := $6
endif
@@ -113,14 +109,14 @@ define SetupLauncher
endif
endif
- $1_LDFLAGS += -Wl,-all_load $(JDK_OUTPUTDIR)/objs/libjli_static.a \
+ $1_LDFLAGS += -Wl,-all_load $(SUPPORT_OUTPUTDIR)/native/java.base/libjli_static.a \
-framework Cocoa -framework Security -framework ApplicationServices \
-sectcreate __TEXT __info_plist $(MACOSX_PLIST_DIR)/$$($1_PLIST_FILE)
$1_LDFLAGS_SUFFIX += -pthread
endif
ifeq ($(OPENJDK_TARGET_OS), aix)
- $1_LDFLAGS_SUFFIX += -L$(JDK_OUTPUTDIR)/objs -ljli_static
+ $1_LDFLAGS_SUFFIX += -L$(SUPPORT_OUTPUTDIR)/native/$(MODULE) -ljli_static
endif
ifeq ($(USE_EXTERNAL_LIBZ), true)
@@ -129,7 +125,7 @@ define SetupLauncher
$1_OUTPUT_DIR_ARG := $9
ifeq (, $$($1_OUTPUT_DIR_ARG))
- $1_OUTPUT_DIR_ARG := $(JDK_OUTPUTDIR)/bin
+ $1_OUTPUT_DIR_ARG := $(SUPPORT_OUTPUTDIR)/modules_cmds/$(MODULE)
endif
# TODO: maybe it's better to move this if-statement out of this function
@@ -189,10 +185,10 @@ define SetupLauncher
LDFLAGS_SUFFIX := $(LDFLAGS_JDKEXE_SUFFIX) $$($1_LDFLAGS_SUFFIX), \
LDFLAGS_SUFFIX_posix := $4, \
LDFLAGS_SUFFIX_windows := $$($1_WINDOWS_JLI_LIB) \
- $(JDK_OUTPUTDIR)/objs/libjava/java.lib advapi32.lib $5, \
- LDFLAGS_SUFFIX_linux := -L$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli $(LIBDL) -lc, \
- LDFLAGS_SUFFIX_solaris := -L$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli -lthread $(LIBDL) -lc, \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/$1_objs$(OUTPUT_SUBDIR), \
+ $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib advapi32.lib $5, \
+ LDFLAGS_SUFFIX_linux := -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli $(LIBDL) -lc, \
+ LDFLAGS_SUFFIX_solaris := -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli -lthread $(LIBDL) -lc, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/$1_objs$(OUTPUT_SUBDIR), \
OUTPUT_DIR := $$($1_OUTPUT_DIR_ARG)$(OUTPUT_SUBDIR), \
PROGRAM := $1, \
DEBUG_SYMBOLS := true, \
@@ -205,14 +201,14 @@ define SetupLauncher
MANIFEST := $(JAVA_MANIFEST), \
CODESIGN := $$($1_CODESIGN))
- LAUNCHERS += $$(BUILD_LAUNCHER_$1)
+ TARGETS += $$(BUILD_LAUNCHER_$1)
ifneq (,$(filter $(OPENJDK_TARGET_OS), macosx aix))
- $$(BUILD_LAUNCHER_$1): $(JDK_OUTPUTDIR)/objs/libjli_static.a
+ $$(BUILD_LAUNCHER_$1): $(SUPPORT_OUTPUTDIR)/native/java.base/libjli_static.a
endif
ifeq ($(OPENJDK_TARGET_OS), windows)
- $$(BUILD_LAUNCHER_$1): $(JDK_OUTPUTDIR)/objs/libjava/java.lib \
+ $$(BUILD_LAUNCHER_$1): $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib \
$$($1_WINDOWS_JLI_LIB)
endif
endef
diff --git a/jdk/make/lib/Awt2dLibraries.gmk b/jdk/make/lib/Awt2dLibraries.gmk
index 0d38b332892..09a14a20d0f 100644
--- a/jdk/make/lib/Awt2dLibraries.gmk
+++ b/jdk/make/lib/Awt2dLibraries.gmk
@@ -23,7 +23,7 @@
# questions.
#
-WIN_AWT_LIB := $(JDK_OUTPUTDIR)/objs/libawt/awt.lib
+WIN_AWT_LIB := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt/awt.lib
################################################################################
@@ -66,12 +66,12 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE, \
-D "JDK_FNAME=mlib_image.dll" \
-D "JDK_INTERNAL_NAME=mlib_image" \
-D "JDK_FTYPE=0x2L", \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libmlib_image, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmlib_image, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
-$(BUILD_LIBMLIB_IMAGE): $(BUILD_LIBJAVA)
+$(BUILD_LIBMLIB_IMAGE): $(call FindLib, java.base, java)
-DESKTOP_LIBRARIES += $(BUILD_LIBMLIB_IMAGE)
+TARGETS += $(BUILD_LIBMLIB_IMAGE)
################################################################################
@@ -132,12 +132,12 @@ ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc)
$(BUILD_LIBMLIB_LDLIBS) -ljava -ljvm \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_solaris := -lc, \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libmlib_image_v, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmlib_image_v, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
- $(BUILD_LIBMLIB_IMAGE_V): $(BUILD_LIBJAVA)
+ $(BUILD_LIBMLIB_IMAGE_V): $(call FindLib, java.base, java)
- DESKTOP_LIBRARIES += $(BUILD_LIBMLIB_IMAGE_V)
+ TARGETS += $(BUILD_LIBMLIB_IMAGE_V)
endif
@@ -167,7 +167,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBAWT_EXFILES += initIDs.c awt/image/cvutils/img_colors.c
endif
-LIBAWT_CFLAGS += -I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \
+LIBAWT_CFLAGS += -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
$(addprefix -I, $(shell find $(LIBAWT_DIRS) -type d)) \
$(LIBJAVA_HEADER_FLAGS) \
$(addprefix -I, $(BUILD_LIBMLIB_IMAGE_SRC)) \
@@ -214,7 +214,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
-I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/java2d/opengl \
-I$(JDK_TOPDIR)/src/java.desktop/windows/native/include \
-I$(JDK_TOPDIR)/src/java.desktop/share/native/include \
- -I$(JDK_OUTPUTDIR)/gensrc_headers/java.base \
+ -I$(SUPPORT_OUTPUTDIR)/headers/java.base \
#
LIBAWT_EXFILES += \
java2d/d3d/D3DShaderGen.c \
@@ -259,7 +259,8 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBAWT, \
LDFLAGS_SUFFIX_linux := -ljvm $(LIBM) $(LIBDL) -ljava, \
LDFLAGS_SUFFIX_solaris := -ljvm $(LIBM) $(LIBDL) -ljava -lc, \
LDFLAGS_SUFFIX_aix :=-ljvm $(LIBM) $(LIBDL) -ljava -lm,\
- LDFLAGS_SUFFIX_macosx := -lmlib_image -ljvm $(LIBM) \
+ LDFLAGS_SUFFIX_macosx := -L$(INSTALL_LIBRARIES_HERE) \
+ -lmlib_image -ljvm $(LIBM) \
-framework Cocoa \
-framework OpenGL \
-framework JavaNativeFoundation \
@@ -281,16 +282,16 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBAWT, \
-D "JDK_FNAME=awt.dll" \
-D "JDK_INTERNAL_NAME=awt" \
-D "JDK_FTYPE=0x2L", \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
-$(BUILD_LIBAWT): $(BUILD_LIBJAVA)
+$(BUILD_LIBAWT): $(call FindLib, java.base, java)
ifeq ($(OPENJDK_TARGET_OS), macosx)
$(BUILD_LIBAWT): $(BUILD_LIBMLIB_IMAGE)
endif
-DESKTOP_LIBRARIES += $(BUILD_LIBAWT)
+TARGETS += $(BUILD_LIBAWT)
################################################################################
@@ -312,7 +313,7 @@ ifeq ($(findstring $(OPENJDK_TARGET_OS),windows macosx),)
LIBAWT_XAWT_EXCLUDES := medialib
LIBAWT_XAWT_CFLAGS := $(addprefix -I, $(shell $(FIND) $(LIBAWT_XAWT_DIRS) -type d)) \
- -I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \
+ -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
-I$(JDK_TOPDIR)/src/java.desktop/share/native/include \
-I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS)/native/include \
-I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/include \
@@ -365,21 +366,22 @@ ifeq ($(findstring $(OPENJDK_TARGET_OS),windows macosx),)
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(X_LIBS) $(LIBAWT_XAWT_LDFLAGS) \
$(call SET_SHARED_LIBRARY_ORIGIN) \
- $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
+ $(call SET_SHARED_LIBRARY_ORIGIN,/..) \
+ -L $(INSTALL_LIBRARIES_HERE), \
LDFLAGS_SUFFIX := $(LIBAWT_XAWT_LDFLAGS_SUFFIX), \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=xawt.dll" \
-D "JDK_INTERNAL_NAME=xawt" \
-D "JDK_FTYPE=0x2L", \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt_xawt, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt_xawt, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
- $(BUILD_LIBAWT_XAWT): $(BUILD_LIBJAVA)
+ $(BUILD_LIBAWT_XAWT): $(call FindLib, java.base, java)
$(BUILD_LIBAWT_XAWT): $(BUILD_LIBAWT)
- DESKTOP_LIBRARIES += $(BUILD_LIBAWT_XAWT)
+ TARGETS += $(BUILD_LIBAWT_XAWT)
endif
endif
@@ -387,7 +389,7 @@ endif
################################################################################
LIBLCMS_SRC := $(JDK_TOPDIR)/src/java.desktop/share/native/liblcms
-LIBLCMS_CPPFLAGS += -I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \
+LIBLCMS_CPPFLAGS += -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d \
-I$(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/debug \
$(LIBJAVA_HEADER_FLAGS) \
@@ -419,6 +421,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBLCMS, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/liblcms/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
+ LDFLAGS_posix := -L $(INSTALL_LIBRARIES_HERE), \
LDFLAGS_solaris := /usr/lib$(OPENJDK_TARGET_CPU_ISADIR)/libm.so.2, \
LDFLAGS_windows := $(WIN_AWT_LIB) $(WIN_JAVA_LIB), \
LDFLAGS_SUFFIX_solaris := -lawt -ljava -ljvm -lc $(LCMS_LIBS), \
@@ -430,10 +433,10 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBLCMS, \
-D "JDK_FNAME=lcms.dll" \
-D "JDK_INTERNAL_NAME=lcms" \
-D "JDK_FTYPE=0x2L", \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/liblcms, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/liblcms, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
-DESKTOP_LIBRARIES += $(BUILD_LIBLCMS)
+TARGETS += $(BUILD_LIBLCMS)
$(BUILD_LIBLCMS): $(BUILD_LIBAWT)
@@ -492,7 +495,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVAJPEG, \
OPTIMIZATION := HIGHEST, \
CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBJAVAJPEG_SRC)) \
$(LIBJAVA_HEADER_FLAGS) \
- -I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop, \
+ -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \
MAPFILE := $(BUILD_LIBJAVAJPEG_MAPFILE), \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LIBJPEG_LIBS) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
@@ -504,12 +507,12 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVAJPEG, \
-D "JDK_INTERNAL_NAME=javajpeg" \
-D "JDK_FTYPE=0x2L", \
REORDER := $(BUILD_LIBJAVAJPEG_REORDER), \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjavajpeg, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjavajpeg, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
-$(BUILD_LIBJAVAJPEG): $(BUILD_LIBJAVA)
+$(BUILD_LIBJAVAJPEG): $(call FindLib, java.base, java)
-DESKTOP_LIBRARIES += $(BUILD_LIBJAVAJPEG)
+TARGETS += $(BUILD_LIBJAVAJPEG)
################################################################################
@@ -522,7 +525,7 @@ LIBFONTMANAGER_CFLAGS := \
$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libawt \
$(JDK_TOPDIR)/src/java.desktop/share/native/common \
$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common -type d)) \
- -I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \
+ -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
$(LIBJAVA_HEADER_FLAGS) \
#
@@ -578,6 +581,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \
MAPFILE := $(BUILD_LIBFONTMANAGER_MAPFILE), \
LDFLAGS := $(subst -Xlinker -z -Xlinker defs,,$(LDFLAGS_JDKLIB)) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
+ LDFLAGS_posix := -L $(INSTALL_LIBRARIES_HERE), \
LDFLAGS_SUFFIX := $(BUILD_LIBFONTMANAGER_FONTLIB), \
LDFLAGS_SUFFIX_linux := -lawt $(LIBM) $(LIBCXX) -ljava -ljvm -lc, \
LDFLAGS_SUFFIX_solaris := $(filter-out -R%, $(X_LIBS)) \
@@ -592,7 +596,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \
-D "JDK_FNAME=fontmanager.dll" \
-D "JDK_INTERNAL_NAME=fontmanager" \
-D "JDK_FTYPE=0x2L", \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libfontmanager, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfontmanager, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT)
@@ -601,7 +605,7 @@ ifneq (, $(findstring $(OPENJDK_TARGET_OS), solaris aix))
$(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT_XAWT)
endif
-DESKTOP_LIBRARIES += $(BUILD_LIBFONTMANAGER)
+TARGETS += $(BUILD_LIBFONTMANAGER)
################################################################################
@@ -612,7 +616,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d \
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \
-I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libawt/java2d/windows \
- -I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \
+ -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
-I$(JDK_TOPDIR)/src/java.desktop/windows/native/include \
-I$(JDK_TOPDIR)/src/java.desktop/share/native/include \
$(LIBJAVA_HEADER_FLAGS) \
@@ -639,16 +643,16 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
-D "JDK_FNAME=jawt.dll" \
-D "JDK_INTERNAL_NAME=jawt" \
-D "JDK_FTYPE=0x2L", \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjawt, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjawt, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBJAWT): $(BUILD_LIBAWT)
$(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX): $(BUILD_LIBJAWT)
$(ECHO) Copying $(@F)
- $(CP) $(JDK_OUTPUTDIR)/objs/libjawt/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX) $@
+ $(CP) $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjawt/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX) $@
- DESKTOP_LIBRARIES += $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX)
+ TARGETS += $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX)
else # OPENJDK_TARGET_OS not windows
@@ -694,13 +698,14 @@ else # OPENJDK_TARGET_OS not windows
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjawt/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
+ LDFLAGS_posix := -L $(INSTALL_LIBRARIES_HERE), \
LDFLAGS_solaris := $(X_LIBS), \
LDFLAGS_SUFFIX_linux := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX), \
LDFLAGS_SUFFIX_aix := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX),\
LDFLAGS_SUFFIX_solaris := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX) -lXrender, \
LDFLAGS_SUFFIX_macosx := -Xlinker -rpath -Xlinker @loader_path $(JAWT_LIBS) \
-framework Cocoa $(LDFLAGS_JDKLIB_SUFFIX), \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjawt, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjawt, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
ifndef BUILD_HEADLESS_ONLY
@@ -715,7 +720,7 @@ else # OPENJDK_TARGET_OS not windows
endif # OPENJDK_TARGET_OS
-DESKTOP_LIBRARIES += $(BUILD_LIBJAWT)
+TARGETS += $(BUILD_LIBJAWT)
################################################################################
@@ -732,7 +737,7 @@ ifeq ($(BUILD_HEADLESS), true)
#
LIBAWT_HEADLESS_EXCLUDES := medialib
- LIBAWT_HEADLESS_CFLAGS := -I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \
+ LIBAWT_HEADLESS_CFLAGS := -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
$(addprefix -I, $(LIBAWT_HEADLESS_DIRS)) \
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d \
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/java2d/loops \
@@ -770,6 +775,7 @@ ifeq ($(BUILD_HEADLESS), true)
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt_headless/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
+ LDFLAGS_posix := -L $(INSTALL_LIBRARIES_HERE), \
LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN)., \
@@ -777,12 +783,12 @@ ifeq ($(BUILD_HEADLESS), true)
LDFLAGS_SUFFIX_linux := -ljvm -lawt -lm $(LIBDL) -ljava, \
LDFLAGS_SUFFIX_aix := -ljvm -lawt -ljava,\
LDFLAGS_SUFFIX_solaris := $(LIBDL) -ljvm -lawt -lm -ljava $(LIBCXX) -lc, \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt_headless, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt_headless, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBAWT_HEADLESS): $(BUILD_LIBAWT)
- DESKTOP_LIBRARIES += $(BUILD_LIBAWT_HEADLESS)
+ TARGETS += $(BUILD_LIBAWT_HEADLESS)
endif
endif
@@ -853,7 +859,9 @@ ifndef BUILD_HEADLESS_ONLY
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
- LIBSPLASHSCREEN_LDFLAGS_SUFFIX += $(LIBM) -lpthread -liconv -losxapp \
+ LIBSPLASHSCREEN_LDFLAGS_SUFFIX += \
+ -L$(INSTALL_LIBRARIES_HERE) \
+ $(LIBM) -lpthread -liconv -losxapp \
-framework ApplicationServices \
-framework Foundation \
-framework Cocoa \
@@ -885,10 +893,10 @@ ifndef BUILD_HEADLESS_ONLY
-D "JDK_FNAME=splashscreen.dll" \
-D "JDK_INTERNAL_NAME=splashscreen" \
-D "JDK_FTYPE=0x2L", \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsplashscreen, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsplashscreen, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
- DESKTOP_LIBRARIES += $(BUILD_LIBSPLASHSCREEN)
+ TARGETS += $(BUILD_LIBSPLASHSCREEN)
ifeq ($(OPENJDK_TARGET_OS), macosx)
$(BUILD_LIBSPLASHSCREEN): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)osxapp$(SHARED_LIBRARY_SUFFIX)
@@ -909,7 +917,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBAWT_LWAWT_CFLAGS := \
$(addprefix -I, $(LIBAWT_LWAWT_DIRS)) \
- -I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \
+ -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
-I$(JDK_TOPDIR)/src/java.desktop/macosx/native/include \
-I$(JDK_TOPDIR)/src/java.desktop/share/native/include \
-I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt/java2d/opengl \
@@ -945,7 +953,8 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
$(X_LIBS) \
$(LIBAWT_LWAWT_CFLAGS), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
- $(call SET_SHARED_LIBRARY_ORIGIN), \
+ $(call SET_SHARED_LIBRARY_ORIGIN) \
+ -L $(INSTALL_LIBRARIES_HERE), \
LDFLAGS_SUFFIX_macosx := -lawt -lmlib_image -losxapp -ljvm $(LIBM) \
-framework Accelerate \
-framework ApplicationServices \
@@ -958,10 +967,10 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
-framework JavaRuntimeSupport \
-framework OpenGL \
-framework QuartzCore -ljava, \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt_lwawt, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt_lwawt, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
- DESKTOP_LIBRARIES += $(BUILD_LIBAWT_LWAWT)
+ TARGETS += $(BUILD_LIBAWT_LWAWT)
$(BUILD_LIBAWT_LWAWT): $(BUILD_LIBAWT)
@@ -969,7 +978,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
$(BUILD_LIBAWT_LWAWT): $(BUILD_LIBOSXAPP)
- $(BUILD_LIBAWT_LWAWT): $(BUILD_LIBJAVA)
+ $(BUILD_LIBAWT_LWAWT): $(call FindLib, java.base, java)
endif
@@ -989,10 +998,11 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
-I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libosxapp \
-I$(JDK_TOPDIR)/src/java.base/share/native/libjava \
-I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libjava \
- -I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop, \
+ -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN) \
- -Xlinker -rpath -Xlinker @loader_path, \
+ -Xlinker -rpath -Xlinker @loader_path \
+ -L $(INSTALL_LIBRARIES_HERE), \
LDFLAGS_SUFFIX_macosx := -lawt -losxapp -lawt_lwawt \
-framework Cocoa \
-framework Carbon \
@@ -1000,10 +1010,10 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
-framework JavaNativeFoundation \
-framework JavaRuntimeSupport \
-ljava -ljvm, \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libosxui, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libosxui, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
- DESKTOP_LIBRARIES += $(BUILD_LIBOSXUI)
+ TARGETS += $(BUILD_LIBOSXUI)
$(BUILD_LIBOSXUI): $(BUILD_LIBAWT)
@@ -1011,7 +1021,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
$(BUILD_LIBOSXUI): $(BUILD_LIBAWT_LWAWT)
- #$(BUILD_LIBOSXUI): $(BUILD_LIBJAVA)
+ #$(BUILD_LIBOSXUI): $(call FindLib, java.base, java)
endif
diff --git a/jdk/make/lib/CoreLibraries.gmk b/jdk/make/lib/CoreLibraries.gmk
index c6328d4bd38..b77c606b8d8 100644
--- a/jdk/make/lib/CoreLibraries.gmk
+++ b/jdk/make/lib/CoreLibraries.gmk
@@ -23,7 +23,7 @@
# questions.
#
-WIN_VERIFY_LIB := $(JDK_OUTPUTDIR)/objs/libverify/verify.lib
+WIN_VERIFY_LIB := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libverify/verify.lib
##########################################################################################
# libfdlibm is statically linked with libjava below and not delivered into the
@@ -41,7 +41,7 @@ LIBFDLIBM_CFLAGS := -I$(LIBFDLIBM_SRC)
ifneq ($(OPENJDK_TARGET_OS), macosx)
$(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM, \
STATIC_LIBRARY := fdlibm, \
- OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs, \
+ OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
SRC := $(LIBFDLIBM_SRC), \
LANG := C, \
OPTIMIZATION := $(BUILD_LIBFDLIBM_OPTIMIZATION), \
@@ -49,7 +49,7 @@ ifneq ($(OPENJDK_TARGET_OS), macosx)
CFLAGS_windows_debug := -DLOGGING, \
CFLAGS_aix := -qfloat=nomaf, \
ARFLAGS := $(ARFLAGS), \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libfdlibm, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
else
@@ -58,15 +58,15 @@ else
# a plain static library.
$(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM_MAC, \
LIBRARY := fdlibm, \
- OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs/libfdlibm, \
+ OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
SRC := $(LIBFDLIBM_SRC), \
LANG := C, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \
LDFLAGS := -nostdlib -r -arch x86_64, \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libfdlibm, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
- BUILD_LIBFDLIBM := $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX)
+ BUILD_LIBFDLIBM := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX)
$(BUILD_LIBFDLIBM): $(BUILD_LIBFDLIBM_MAC)
$(call install-file)
@@ -107,10 +107,10 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY, \
-D "JDK_INTERNAL_NAME=verify" \
-D "JDK_FTYPE=0x2L", \
REORDER := $(BUILD_LIBVERIFY_REORDER), \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libverify, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libverify, \
DEBUG_SYMBOLS := true))
-BASE_LIBRARIES += $(BUILD_LIBVERIFY)
+TARGETS += $(BUILD_LIBVERIFY)
##########################################################################################
@@ -122,7 +122,7 @@ endif
LIBJAVA_CFLAGS := $(addprefix -I, $(LIBJAVA_SRC_DIRS)) \
-I$(JDK_TOPDIR)/src/java.base/share/native/libfdlibm \
- -I$(JDK_OUTPUTDIR)/gensrc_headers/java.base \
+ -I$(SUPPORT_OUTPUTDIR)/headers/java.base \
-DARCHPROPNAME='"$(OPENJDK_TARGET_CPU_OSARCH)"'
LIBJAVA_CFLAGS += -DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \
@@ -164,7 +164,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \
LDFLAGS_SUFFIX_solaris := -lsocket -lnsl -lscf $(LIBDL) $(BUILD_LIBFDLIBM) -lc, \
LDFLAGS_SUFFIX_linux := $(LIBDL) $(BUILD_LIBFDLIBM), \
LDFLAGS_SUFFIX_aix := $(LIBDL) $(BUILD_LIBFDLIBM) -lm,\
- LDFLAGS_SUFFIX_macosx := -L$(JDK_OUTPUTDIR)/objs/ -lfdlibm \
+ LDFLAGS_SUFFIX_macosx := -L$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/ -lfdlibm \
-framework CoreFoundation \
-framework Foundation \
-framework Security -framework SystemConfiguration, \
@@ -179,10 +179,10 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \
-D "JDK_INTERNAL_NAME=java" \
-D "JDK_FTYPE=0x2L", \
REORDER := $(LIBJAVA_REORDER), \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjava, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
-BASE_LIBRARIES += $(BUILD_LIBJAVA)
+TARGETS += $(BUILD_LIBJAVA)
$(BUILD_LIBJAVA): $(BUILD_LIBVERIFY)
@@ -217,7 +217,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
$(ZLIB_CPPFLAGS) \
-I$(JDK_TOPDIR)/src/java.base/share/native/libjava \
-I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libjava \
- -I$(JDK_OUTPUTDIR)/gensrc_headers/java.base, \
+ -I$(SUPPORT_OUTPUTDIR)/headers/java.base, \
CFLAGS_posix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libzip/mapfile-vers, \
REORDER := $(BUILD_LIBZIP_REORDER), \
@@ -225,8 +225,9 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
$(call SET_SHARED_LIBRARY_ORIGIN) \
$(EXPORT_ZIP_FUNCS), \
LDFLAGS_windows := -export:ZIP_Open -export:ZIP_Close -export:ZIP_FindEntry \
- -export:ZIP_ReadEntry -export:ZIP_GetNextEntry -export:ZIP_CRC32 jvm.lib \
- $(WIN_JAVA_LIB), \
+ -export:ZIP_ReadEntry -export:ZIP_GetNextEntry \
+ -export:ZIP_InflateFully -export:ZIP_CRC32 \
+ jvm.lib $(WIN_JAVA_LIB), \
LDFLAGS_SUFFIX_linux := -ljvm -ljava $(LIBZ), \
LDFLAGS_SUFFIX_solaris := -ljvm -ljava $(LIBZ) -lc, \
LDFLAGS_SUFFIX_aix := -ljvm -ljava $(LIBZ),\
@@ -236,13 +237,13 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
-D "JDK_FNAME=zip.dll" \
-D "JDK_INTERNAL_NAME=zip" \
-D "JDK_FTYPE=0x2L", \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libzip, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libzip, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBZIP): $(BUILD_LIBJAVA)
-BASE_LIBRARIES += $(BUILD_LIBZIP)
+TARGETS += $(BUILD_LIBZIP)
##########################################################################################
@@ -363,10 +364,10 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \
-D "JDK_FNAME=jli.dll" \
-D "JDK_INTERNAL_NAME=jli" \
-D "JDK_FTYPE=0x2L", \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjli, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
-BASE_LIBRARIES += $(BUILD_LIBJLI)
+TARGETS += $(BUILD_LIBJLI)
# On windows, the static library has the same suffix as the import library created by
# with the shared library, so the static library is given a different name. No harm
@@ -374,18 +375,17 @@ BASE_LIBRARIES += $(BUILD_LIBJLI)
ifeq ($(OPENJDK_TARGET_OS), windows)
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \
STATIC_LIBRARY := jli_static, \
- OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs, \
+ OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
SRC := $(BUILD_LIBJLI_SRC_DIRS), \
INCLUDE_FILES := $(BUILD_LIBJLI_FILES), \
LANG := C, \
OPTIMIZATION := HIGH, \
CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \
ARFLAGS := $(ARFLAGS), \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjli_static, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
- BUILD_LIBRARIES += $(BUILD_LIBJLI_STATIC)
- BASE_STATIC_LIBRARIES += $(BUILD_LIBJLI_STATIC)
+ TARGETS += $(BUILD_LIBJLI_STATIC)
else ifeq ($(OPENJDK_TARGET_OS), macosx)
#
@@ -394,37 +394,35 @@ else ifeq ($(OPENJDK_TARGET_OS), macosx)
# as this is first time I see it
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \
LIBRARY := jli_static, \
- OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs, \
+ OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
SRC := $(BUILD_LIBJLI_SRC_DIRS), \
INCLUDE_FILES := $(BUILD_LIBJLI_FILES), \
LANG := C, \
OPTIMIZATION := HIGH, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \
LDFLAGS := -nostdlib -r, \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjli_static, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
- $(JDK_OUTPUTDIR)/objs/libjli_static.a: $(BUILD_LIBJLI_STATIC)
+ $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a: $(BUILD_LIBJLI_STATIC)
$(call install-file)
- BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/objs/libjli_static.a
- BASE_STATIC_LIBRARIES += $(JDK_OUTPUTDIR)/objs/libjli_static.a
+ TARGETS += $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a
else ifeq ($(OPENJDK_TARGET_OS), aix)
# AIX also requires a static libjli because the compiler doesn't support '-rpath'
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC,\
STATIC_LIBRARY:=jli_static,\
- OUTPUT_DIR:=$(JDK_OUTPUTDIR)/objs,\
+ OUTPUT_DIR:=$(SUPPORT_OUTPUTDIR)/native/$(MODULE),\
SRC:=$(BUILD_LIBJLI_SRC_DIRS),\
INCLUDE_FILES:=$(BUILD_LIBJLI_FILES),\
LANG:=C,\
OPTIMIZATION:=HIGH, \
CFLAGS:=$(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS),\
ARFLAGS:=$(ARFLAGS),\
- OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjli_static))
+ OBJECT_DIR:=$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static))
- BUILD_LIBRARIES += $(BUILD_LIBJLI_STATIC)
- BASE_STATIC_LIBRARIES += $(BUILD_LIBJLI_STATIC)
+ TARGETS += $(BUILD_LIBJLI_STATIC)
endif
diff --git a/jdk/make/lib/Lib-java.base.gmk b/jdk/make/lib/Lib-java.base.gmk
index 301e31c2df8..ef5f64aea09 100644
--- a/jdk/make/lib/Lib-java.base.gmk
+++ b/jdk/make/lib/Lib-java.base.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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
@@ -32,9 +32,3 @@ $(eval $(call FillCacheFind, $(wildcard $(JDK_TOPDIR)/src/java.base/*/native \
include CoreLibraries.gmk
include NetworkingLibraries.gmk
include NioLibraries.gmk
-
-java.base: $(BASE_LIBRARIES) $(BASE_STATIC_LIBRARIES) $(NPT_LIBRARIES)
-
-all: java.base
-
-.PHONY: all java.base
diff --git a/jdk/make/lib/Lib-java.desktop.gmk b/jdk/make/lib/Lib-java.desktop.gmk
index e8661508e93..c8bc8195854 100644
--- a/jdk/make/lib/Lib-java.desktop.gmk
+++ b/jdk/make/lib/Lib-java.desktop.gmk
@@ -32,9 +32,3 @@ $(eval $(call FillCacheFind, $(wildcard $(JDK_TOPDIR)/src/java.desktop/*/native
include PlatformLibraries.gmk
include Awt2dLibraries.gmk
include SoundLibraries.gmk
-
-java.desktop: $(DESKTOP_LIBRARIES)
-
-all: java.desktop
-
-.PHONY: all java.desktop
diff --git a/jdk/make/lib/Lib-java.instrument.gmk b/jdk/make/lib/Lib-java.instrument.gmk
index a54a743af39..eea8645c482 100644
--- a/jdk/make/lib/Lib-java.instrument.gmk
+++ b/jdk/make/lib/Lib-java.instrument.gmk
@@ -32,7 +32,7 @@ LIBINSTRUMENT_SRC := $(JDK_TOPDIR)/src/java.instrument/share/native/libinstrumen
#
LIBINSTRUMENT_CFLAGS := $(CFLAGS_JDKLIB) \
$(addprefix -I, $(LIBINSTRUMENT_SRC)) \
- -I$(JDK_OUTPUTDIR)/gensrc_headers/java.instrument \
+ -I$(SUPPORT_OUTPUTDIR)/headers/java.instrument \
-I$(JDK_TOPDIR)/src/java.base/share/native/libjli \
-I$(JDK_TOPDIR)/src/java.base/share/native/libjava \
#
@@ -41,7 +41,7 @@ LIBINSTRUMENT_LDFLAGS :=
LIBINSTRUMENT_LDFLAGS_SUFFIX :=
ifeq ($(OPENJDK_TARGET_OS), windows)
- LIBINSTRUMENT_LDFLAGS += $(JDK_OUTPUTDIR)/objs/jli_static.lib $(WIN_JAVA_LIB) \
+ LIBINSTRUMENT_LDFLAGS += $(SUPPORT_OUTPUTDIR)/native/java.base/jli_static.lib $(WIN_JAVA_LIB) \
-export:Agent_OnAttach advapi32.lib
# Statically link the C runtime so that there are not dependencies on modules
# not on the search patch when invoked from the Windows system directory
@@ -68,34 +68,28 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBINSTRUMENT, \
$(LIBINSTRUMENT_LDFLAGS), \
LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/jli), \
LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/jli), \
- LDFLAGS_macosx := -Xlinker -all_load $(JDK_OUTPUTDIR)/objs/libjli_static.a \
+ LDFLAGS_macosx := -Xlinker -all_load $(SUPPORT_OUTPUTDIR)/native/java.base/libjli_static.a \
-framework Cocoa -framework Security -framework ApplicationServices, \
LDFLAGS_SUFFIX := $(LIBINSTRUMENT_LDFLAGS_SUFFIX), \
LDFLAGS_SUFFIX_macosx := -liconv $(LIBZ), \
- LDFLAGS_SUFFIX_solaris := $(LIBZ) -L $(INSTALL_LIBRARIES_HERE)/jli -ljli $(LIBDL) -lc, \
- LDFLAGS_SUFFIX_linux := $(LIBZ) -L $(INSTALL_LIBRARIES_HERE)/jli -ljli $(LIBDL), \
- LDFLAGS_SUFFIX_aix := $(LIBZ) -L$(JDK_OUTPUTDIR)/objs -ljli_static $(LIBDL),\
+ LDFLAGS_SUFFIX_solaris := $(LIBZ) -L $(call FindLibDirForModule, java.base)/jli -ljli $(LIBDL) -lc, \
+ LDFLAGS_SUFFIX_linux := $(LIBZ) -L $(call FindLibDirForModule, java.base)/jli -ljli $(LIBDL), \
+ LDFLAGS_SUFFIX_aix := $(LIBZ) -L$(SUPPORT_OUTPUTDIR)/native/java.base -ljli_static $(LIBDL),\
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=instrument.dll" \
-D "JDK_INTERNAL_NAME=instrument" \
-D "JDK_FTYPE=0x2L", \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libinstrument, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libinstrument, \
DEBUG_SYMBOLS := true))
ifneq (, $(findstring $(OPENJDK_TARGET_OS), macosx windows aix))
- $(BUILD_LIBINSTRUMENT): $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jli_static$(STATIC_LIBRARY_SUFFIX)
+ $(BUILD_LIBINSTRUMENT): $(SUPPORT_OUTPUTDIR)/native/java.base/$(LIBRARY_PREFIX)jli_static$(STATIC_LIBRARY_SUFFIX)
else
- $(BUILD_LIBINSTRUMENT): $(INSTALL_LIBRARIES_HERE)/jli/$(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX)
+ $(BUILD_LIBINSTRUMENT): $(call FindLib, java.base, jli, /jli)
endif
$(BUILD_LIBINSTRUMENT): $(BUILD_LIBJAVA)
-INSTRUMENT_LIBRARIES += $(BUILD_LIBINSTRUMENT)
+TARGETS += $(BUILD_LIBINSTRUMENT)
################################################################################
-
-java.instrument: $(INSTRUMENT_LIBRARIES)
-
-all: java.instrument
-
-.PHONY: all java.instrument
diff --git a/jdk/make/lib/Lib-java.management.gmk b/jdk/make/lib/Lib-java.management.gmk
index 2cc7b850621..375b08fb239 100644
--- a/jdk/make/lib/Lib-java.management.gmk
+++ b/jdk/make/lib/Lib-java.management.gmk
@@ -34,7 +34,7 @@ BUILD_LIBMANAGEMENT_SRC += $(JDK_TOPDIR)/src/java.management/share/native/libman
$(JDK_TOPDIR)/src/java.management/$(OPENJDK_TARGET_OS_API_DIR)/native/libmanagement
BUILD_LIBMANAGEMENT_CFLAGS := -I$(JDK_TOPDIR)/src/java.management/share/native/include \
$(addprefix -I,$(BUILD_LIBMANAGEMENT_SRC)) \
- -I$(JDK_OUTPUTDIR)/gensrc_headers/java.management \
+ -I$(SUPPORT_OUTPUTDIR)/headers/java.management \
$(LIBJAVA_HEADER_FLAGS) \
#
@@ -82,17 +82,11 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT, \
-D "JDK_FNAME=management.dll" \
-D "JDK_INTERNAL_NAME=management" \
-D "JDK_FTYPE=0x2L", \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libmanagement, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmanagement, \
DEBUG_SYMBOLS := true))
-$(BUILD_LIBMANAGEMENT): $(BUILD_LIBJAVA)
+$(BUILD_LIBMANAGEMENT): $(call FindLib, java.base, java)
-MANAGEMENT_LIBRARIES += $(BUILD_LIBMANAGEMENT)
+TARGETS += $(BUILD_LIBMANAGEMENT)
################################################################################
-
-java.management: $(MANAGEMENT_LIBRARIES)
-
-all: java.management
-
-.PHONY: all java.management
diff --git a/jdk/make/lib/Lib-java.prefs.gmk b/jdk/make/lib/Lib-java.prefs.gmk
index c034b190f41..9bfafafa96d 100644
--- a/jdk/make/lib/Lib-java.prefs.gmk
+++ b/jdk/make/lib/Lib-java.prefs.gmk
@@ -54,17 +54,11 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBPREFS, \
-D "JDK_FNAME=prefs.dll" \
-D "JDK_INTERNAL_NAME=prefs" \
-D "JDK_FTYPE=0x2L", \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libprefs, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libprefs, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
-$(BUILD_LIBPREFS): $(BUILD_LIBJAVA)
+$(BUILD_LIBPREFS): $(call FindLib, java.base, java)
-PREFS_LIBRARIES += $(BUILD_LIBPREFS)
+TARGETS += $(BUILD_LIBPREFS)
################################################################################
-
-java.prefs: $(PREFS_LIBRARIES)
-
-all: java.prefs
-
-.PHONY: all java.prefs
diff --git a/jdk/make/lib/Lib-java.security.jgss.gmk b/jdk/make/lib/Lib-java.security.jgss.gmk
index d6f986628ae..3eed76a22a1 100644
--- a/jdk/make/lib/Lib-java.security.jgss.gmk
+++ b/jdk/make/lib/Lib-java.security.jgss.gmk
@@ -40,16 +40,16 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBJ2GSS_SRC)) \
$(LIBJAVA_HEADER_FLAGS) \
- -I$(JDK_OUTPUTDIR)/gensrc_headers/java.security.jgss, \
+ -I$(SUPPORT_OUTPUTDIR)/headers/java.security.jgss, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libj2gss/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(LIBDL), \
LDFLAGS_SUFFIX_solaris := -lc, \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2gss, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libj2gss, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
- SECURITY_KERBEROS_LIBRARIES += $(BUILD_LIBJ2GSS)
+ TARGETS += $(BUILD_LIBJ2GSS)
endif
################################################################################
@@ -81,7 +81,7 @@ ifneq ($(BUILD_CRYPTO), no)
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(addprefix -I, $(BUILD_LIBKRB5_SRC)) \
- -I$(JDK_OUTPUTDIR)/gensrc_headers/java.security.jgss, \
+ -I$(SUPPORT_OUTPUTDIR)/headers/java.security.jgss, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(BUILD_LIBKRB5_LIBS), \
@@ -90,17 +90,11 @@ ifneq ($(BUILD_CRYPTO), no)
-D "JDK_FNAME=$(BUILD_LIBKRB5_NAME).dll" \
-D "JDK_INTERNAL_NAME=$(BUILD_LIBKRB5_NAME)" \
-D "JDK_FTYPE=0x2L", \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libkrb5, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libkrb5, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
- SECURITY_KERBEROS_LIBRARIES += $(BUILD_LIBKRB5)
+ TARGETS += $(BUILD_LIBKRB5)
endif
endif
################################################################################
-
-java.security.jgss: $(SECURITY_KERBEROS_LIBRARIES)
-
-all: java.security.jgss
-
-.PHONY: all java.security.jgss
diff --git a/jdk/make/lib/Lib-java.smartcardio.gmk b/jdk/make/lib/Lib-java.smartcardio.gmk
index 7b7be4510b7..1f763322995 100644
--- a/jdk/make/lib/Lib-java.smartcardio.gmk
+++ b/jdk/make/lib/Lib-java.smartcardio.gmk
@@ -31,7 +31,7 @@ LIBJ2PCSC_SRC := $(JDK_TOPDIR)/src/java.smartcardio/share/native/libj2pcsc \
$(JDK_TOPDIR)/src/java.smartcardio/$(OPENJDK_TARGET_OS_API_DIR)/native/libj2pcsc
LIBJ2PCSC_CPPFLAGS := $(addprefix -I,$(LIBJ2PCSC_SRC)) \
-I$(JDK_TOPDIR)/src/java.smartcardio/$(OPENJDK_TARGET_OS_API_DIR)/native/libj2pcsc/MUSCLE \
- -I$(JDK_OUTPUTDIR)/gensrc_headers/java.smartcardio
+ -I$(SUPPORT_OUTPUTDIR)/headers/java.smartcardio
$(eval $(call SetupNativeCompilation,BUILD_LIBJ2PCSC, \
LIBRARY := j2pcsc, \
@@ -52,15 +52,9 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJ2PCSC, \
-D "JDK_FNAME=j2pcsc.dll" \
-D "JDK_INTERNAL_NAME=j2pcsc" \
-D "JDK_FTYPE=0x2L", \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2pcsc, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libj2pcsc, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
-SECURITY_SMARTCARDIO_LIBRARIES += $(BUILD_LIBJ2PCSC)
+TARGETS += $(BUILD_LIBJ2PCSC)
################################################################################
-
-java.smartcardio: $(SECURITY_SMARTCARDIO_LIBRARIES)
-
-all: java.smartcardio
-
-.PHONY: all java.smartcardio
diff --git a/jdk/make/lib/Lib-jdk.attach.gmk b/jdk/make/lib/Lib-jdk.attach.gmk
index 2b58e173efb..046bd2ea946 100644
--- a/jdk/make/lib/Lib-jdk.attach.gmk
+++ b/jdk/make/lib/Lib-jdk.attach.gmk
@@ -35,7 +35,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBATTACH, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
- -I$(JDK_OUTPUTDIR)/gensrc_headers/jdk.attach \
+ -I$(SUPPORT_OUTPUTDIR)/headers/jdk.attach \
$(LIBJAVA_HEADER_FLAGS), \
CFLAGS_windows := /Gy, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libattach/mapfile-$(OPENJDK_TARGET_OS), \
@@ -50,17 +50,11 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBATTACH, \
LDFLAGS_windows := /ORDER:@$(JDK_TOPDIR)/make/mapfiles/libattach/reorder-windows-$(OPENJDK_TARGET_CPU), \
LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
LDFLAGS_SUFFIX_windows := $(WIN_JAVA_LIB) advapi32.lib psapi.lib, \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libattach, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libattach, \
DEBUG_SYMBOLS := true))
-$(BUILD_LIBATTACH): $(BUILD_LIBJAVA)
+$(BUILD_LIBATTACH): $(call FindLib, java.base, java)
-ATTACH_LIBRARIES += $(BUILD_LIBATTACH)
+TARGETS += $(BUILD_LIBATTACH)
################################################################################
-
-jdk.attach: $(ATTACH_LIBRARIES)
-
-all: jdk.attach
-
-.PHONY: all jdk.attach
diff --git a/jdk/make/lib/Lib-jdk.crypto.ec.gmk b/jdk/make/lib/Lib-jdk.crypto.ec.gmk
index 94267bf0d2a..db75429ab6a 100644
--- a/jdk/make/lib/Lib-jdk.crypto.ec.gmk
+++ b/jdk/make/lib/Lib-jdk.crypto.ec.gmk
@@ -65,16 +65,10 @@ ifeq ($(ENABLE_INTREE_EC), yes)
-D "JDK_FNAME=sunec.dll" \
-D "JDK_INTERNAL_NAME=sunec" \
-D "JDK_FTYPE=0x2L", \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsunec, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsunec, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
- SECURITY_SUNEC_LIBRARIES += $(BUILD_LIBSUNEC)
+ TARGETS += $(BUILD_LIBSUNEC)
endif
################################################################################
-
-jdk.crypto.ec: $(SECURITY_SUNEC_LIBRARIES)
-
-all: jdk.crypto.ec
-
-.PHONY: all jdk.crypto.ec
diff --git a/jdk/make/lib/Lib-jdk.crypto.mscapi.gmk b/jdk/make/lib/Lib-jdk.crypto.mscapi.gmk
index a1e5fc0b15e..55d5f06dfa4 100644
--- a/jdk/make/lib/Lib-jdk.crypto.mscapi.gmk
+++ b/jdk/make/lib/Lib-jdk.crypto.mscapi.gmk
@@ -47,16 +47,10 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
-D "JDK_FNAME=sunmscapi.dll" \
-D "JDK_INTERNAL_NAME=sunmscapi" \
-D "JDK_FTYPE=0x2L", \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsunmscapi, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsunmscapi, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
- SECURITY_MSCAPI_LIBRARIES += $(BUILD_LIBSUNMSCAPI)
+ TARGETS += $(BUILD_LIBSUNMSCAPI)
endif
################################################################################
-
-jdk.crypto.mscapi: $(SECURITY_MSCAPI_LIBRARIES)
-
-all: jdk.crypto.mscapi
-
-.PHONY: all jdk.crypto.mscapi
diff --git a/jdk/make/lib/Lib-jdk.crypto.pkcs11.gmk b/jdk/make/lib/Lib-jdk.crypto.pkcs11.gmk
index fd35a9d5f9b..0ee2840d65e 100644
--- a/jdk/make/lib/Lib-jdk.crypto.pkcs11.gmk
+++ b/jdk/make/lib/Lib-jdk.crypto.pkcs11.gmk
@@ -38,7 +38,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJ2PKCS11, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBJ2PKCS11_SRC)) \
$(LIBJAVA_HEADER_FLAGS) \
- -I$(JDK_OUTPUTDIR)/gensrc_headers/jdk.crypto.pkcs11, \
+ -I$(SUPPORT_OUTPUTDIR)/headers/jdk.crypto.pkcs11, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libj2pkcs11/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
@@ -49,15 +49,9 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJ2PKCS11, \
-D "JDK_FNAME=j2pkcs11.dll" \
-D "JDK_INTERNAL_NAME=j2pkcs11" \
-D "JDK_FTYPE=0x2L", \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2pkcs11, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libj2pkcs11, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
-SECURITY_PKCS11_LIBRARIES += $(BUILD_LIBJ2PKCS11)
+TARGETS += $(BUILD_LIBJ2PKCS11)
################################################################################
-
-jdk.crypto.pkcs11: $(SECURITY_PKCS11_LIBRARIES)
-
-all: jdk.crypto.pkcs11
-
-.PHONY: all jdk.crypto.pkcs11
diff --git a/jdk/make/lib/Lib-jdk.crypto.ucrypto.gmk b/jdk/make/lib/Lib-jdk.crypto.ucrypto.gmk
index d032dab08bc..f66bd4554f9 100644
--- a/jdk/make/lib/Lib-jdk.crypto.ucrypto.gmk
+++ b/jdk/make/lib/Lib-jdk.crypto.ucrypto.gmk
@@ -23,8 +23,7 @@
# questions.
#
-include $(SPEC)
-include $(JDK_TOPDIR)/make/lib/LibCommon.gmk
+include LibCommon.gmk
################################################################################
@@ -49,14 +48,8 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
$(BUILD_LIBJ2UCRYPTO): $(BUILD_LIBJAVA)
- SECURITY_UCRYPTO_LIBRARIES += $(BUILD_LIBJ2UCRYPTO)
+ TARGETS += $(BUILD_LIBJ2UCRYPTO)
endif
################################################################################
-
-jdk.crypto.ucrypto: $(SECURITY_UCRYPTO_LIBRARIES)
-
-all: jdk.crypto.ucrypto
-
-.PHONY: all jdk.crypto.ucrypto
diff --git a/jdk/make/lib/Lib-jdk.deploy.osx.gmk b/jdk/make/lib/Lib-jdk.deploy.osx.gmk
index 3b209bf8101..628c17fbced 100644
--- a/jdk/make/lib/Lib-jdk.deploy.osx.gmk
+++ b/jdk/make/lib/Lib-jdk.deploy.osx.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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
@@ -39,19 +39,19 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(LIBAPPLESCRIPTENGINE_SRC) \
- -I$(JDK_OUTPUTDIR)/gensrc_headers/jdk.deploy.osx, \
+ -I$(SUPPORT_OUTPUTDIR)/headers/jdk.deploy.osx, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := -framework Cocoa \
-framework Carbon \
-framework JavaNativeFoundation \
$(LDFLAGS_JDKLIB_SUFFIX), \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libAppleScriptEngine, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libAppleScriptEngine, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
- $(BUILD_LIBAPPLESCRIPTENGINE): $(BUILD_LIBJAVA)
+ $(BUILD_LIBAPPLESCRIPTENGINE): $(call FindLib, java.base, java)
- DEPLOY_OSX_LIBRARIES += $(BUILD_LIBAPPLESCRIPTENGINE)
+ TARGETS += $(BUILD_LIBAPPLESCRIPTENGINE)
################################################################################
@@ -59,8 +59,8 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBOSX_CFLAGS := -I$(LIBOSX_DIRS) \
-I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libosxapp \
$(LIBJAVA_HEADER_FLAGS) \
- -I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \
- -I$(JDK_OUTPUTDIR)/gensrc_headers/jdk.deploy.osx \
+ -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
+ -I$(SUPPORT_OUTPUTDIR)/headers/jdk.deploy.osx \
#
$(eval $(call SetupNativeCompilation,BUILD_LIBOSX, \
@@ -72,6 +72,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
CFLAGS := $(CFLAGS_JDKLIB) \
$(LIBOSX_CFLAGS), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
+ -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.desktop \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_macosx := \
-losxapp \
@@ -82,21 +83,15 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
-framework Security \
-framework SystemConfiguration \
$(LDFLAGS_JDKLIB_SUFFIX), \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libosx, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libosx, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
- DEPLOY_OSX_LIBRARIES += $(BUILD_LIBOSX)
+ TARGETS += $(BUILD_LIBOSX)
- $(BUILD_LIBOSX): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)osxapp$(SHARED_LIBRARY_SUFFIX)
+ $(BUILD_LIBOSX): $(call FindLib, java.desktop, osxapp)
- $(BUILD_LIBOSX): $(BUILD_LIBJAVA)
+ $(BUILD_LIBOSX): $(call FindLib, java.base, java)
################################################################################
endif
-
-jdk.deploy.osx: $(DEPLOY_OSX_LIBRARIES)
-
-all: jdk.deploy.osx
-
-.PHONY: all jdk.deploy.osx
diff --git a/jdk/make/lib/Lib-jdk.hprof.agent.gmk b/jdk/make/lib/Lib-jdk.hprof.agent.gmk
index a58687da251..040abc35680 100644
--- a/jdk/make/lib/Lib-jdk.hprof.agent.gmk
+++ b/jdk/make/lib/Lib-jdk.hprof.agent.gmk
@@ -62,10 +62,10 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBHPROF, \
-D "JDK_FNAME=hprof.dll" \
-D "JDK_INTERNAL_NAME=hprof" \
-D "JDK_FTYPE=0x2L", \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libhprof_jvmti, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libhprof_jvmti, \
DEBUG_SYMBOLS := true))
-HPROF_LIBRARIES += $(BUILD_LIBHPROF)
+TARGETS += $(BUILD_LIBHPROF)
################################################################################
@@ -88,15 +88,9 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVA_CRW_DEMO, \
-D "JDK_FNAME=java_crw_demo.dll" \
-D "JDK_INTERNAL_NAME=java_crw_demo" \
-D "JDK_FTYPE=0x2L", \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjava_crw_demo, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava_crw_demo, \
DEBUG_SYMBOLS := true))
-CRW_LIBRARIES += $(BUILD_LIBJAVA_CRW_DEMO)
+TARGETS += $(BUILD_LIBJAVA_CRW_DEMO)
################################################################################
-
-jdk.hprof.agent: $(HPROF_LIBRARIES) $(CRW_LIBRARIES)
-
-all: jdk.hprof.agent
-
-.PHONY: all jdk.hprof.agent
diff --git a/jdk/make/lib/Lib-jdk.jdi.gmk b/jdk/make/lib/Lib-jdk.jdi.gmk
index 8dc731bbf6c..e18b6ce8b35 100644
--- a/jdk/make/lib/Lib-jdk.jdi.gmk
+++ b/jdk/make/lib/Lib-jdk.jdi.gmk
@@ -36,7 +36,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
$(addprefix -I, $(LIBDT_SHMEM_SRC)) \
-I$(JDK_TOPDIR)/src/jdk.jdwp.agent/share/native/libjdwp/export \
-I$(JDK_TOPDIR)/src/jdk.jdwp.agent/share/native/include \
- -I$(JDK_OUTPUTDIR)/gensrc_headers/jdk.jdi \
+ -I$(SUPPORT_OUTPUTDIR)/headers/jdk.jdi \
#
$(eval $(call SetupNativeCompilation,BUILD_LIBDT_SHMEM, \
@@ -55,17 +55,11 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
-D "JDK_FNAME=dt_shmem.dll" \
-D "JDK_INTERNAL_NAME=dt_shmem" \
-D "JDK_FTYPE=0x2L", \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libdt_shmem, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libdt_shmem, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
- JDI_TRANSPORT_LIBRARIES += $(BUILD_LIBDT_SHMEM)
+ TARGETS += $(BUILD_LIBDT_SHMEM)
endif # OPENJDK_TARGET_OS
################################################################################
-
-jdk.jdi: $(JDI_TRANSPORT_LIBRARIES)
-
-all: jdk.jdi
-
-.PHONY: all jdk.jdi
diff --git a/jdk/make/lib/Lib-jdk.jdwp.agent.gmk b/jdk/make/lib/Lib-jdk.jdwp.agent.gmk
index 7b13248a9be..4e4c44fb699 100644
--- a/jdk/make/lib/Lib-jdk.jdwp.agent.gmk
+++ b/jdk/make/lib/Lib-jdk.jdwp.agent.gmk
@@ -55,13 +55,13 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBDT_SOCKET, \
-D "JDK_FNAME=dt_socket.dll" \
-D "JDK_INTERNAL_NAME=dt_socket" \
-D "JDK_FTYPE=0x2L", \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libdt_socket, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libdt_socket, \
DEBUG_SYMBOLS := true))
-$(BUILD_LIBDT_SOCKET): $(BUILD_LIBJAVA)
+$(BUILD_LIBDT_SOCKET): $(call FindLib, java.base, java)
# Include socket transport with JDWP agent to allow for remote debugging
-JDWP_LIBRARIES += $(BUILD_LIBDT_SOCKET)
+TARGETS += $(BUILD_LIBDT_SOCKET)
################################################################################
@@ -81,7 +81,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJDWP, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) -DJDWP_LOGGING \
$(LIBJDWP_CPPFLAGS) \
- -I$(JDK_OUTPUTDIR)/gensrc_jdwp_headers, \
+ -I$(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjdwp/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
@@ -94,17 +94,11 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJDWP, \
-D "JDK_FNAME=jdwp.dll" \
-D "JDK_INTERNAL_NAME=jdwp" \
-D "JDK_FTYPE=0x2L", \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjdwp, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjdwp, \
DEBUG_SYMBOLS := true))
-$(BUILD_LIBJDWP): $(BUILD_LIBJAVA)
+$(BUILD_LIBJDWP): $(call FindLib, java.base, java)
-JDWP_LIBRARIES += $(BUILD_LIBJDWP)
+TARGETS += $(BUILD_LIBJDWP)
################################################################################
-
-jdk.jdwp.agent: $(JDWP_LIBRARIES)
-
-all: jdk.jdwp.agent
-
-.PHONY: all jdk.jdwp.agent
diff --git a/jdk/make/lib/Lib-jdk.runtime.gmk b/jdk/make/lib/Lib-jdk.runtime.gmk
index 3ffaa72570a..fd68223185e 100644
--- a/jdk/make/lib/Lib-jdk.runtime.gmk
+++ b/jdk/make/lib/Lib-jdk.runtime.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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
@@ -36,17 +36,17 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \
OPTIMIZATION := LOW, \
CFLAGS := $(CXXFLAGS_JDKLIB) \
-DNO_ZLIB -DUNPACK_JNI -DFULL \
- -I$(JDK_OUTPUTDIR)/gensrc_headers/java.base \
+ -I$(SUPPORT_OUTPUTDIR)/headers/java.base \
-I$(JDK_TOPDIR)/src/jdk.runtime/share/native/common-unpack \
$(LIBJAVA_HEADER_FLAGS), \
CFLAGS_release := -DPRODUCT, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libunpack/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
- LDFLAGS_windows := -map:$(JDK_OUTPUTDIR)/objs/unpack.map -debug \
+ LDFLAGS_windows := -map:$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/unpack.map -debug \
jvm.lib $(WIN_JAVA_LIB), \
LDFLAGS_SUFFIX_posix := -ljvm $(LIBCXX) -ljava -lc, \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libunpack, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libunpack, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=unpack.dll" \
@@ -54,9 +54,9 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \
-D "JDK_FTYPE=0x2L", \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
-$(BUILD_LIBUNPACK): $(BUILD_LIBJAVA)
+$(BUILD_LIBUNPACK): $(call FindLib, java.base, java)
-UNPACK_LIBRARIES += $(BUILD_LIBUNPACK)
+TARGETS += $(BUILD_LIBUNPACK)
################################################################################
@@ -72,7 +72,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJSDT, \
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
$(addprefix -I, $(LIBJSDT_SRC)) \
$(LIBJAVA_HEADER_FLAGS) \
- -I$(JDK_OUTPUTDIR)/gensrc_headers/jdk.runtime, \
+ -I$(SUPPORT_OUTPUTDIR)/headers/jdk.runtime, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjsdt/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
@@ -85,17 +85,11 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJSDT, \
-D "JDK_FNAME=jsdt.dll" \
-D "JDK_INTERNAL_NAME=jsdt" \
-D "JDK_FTYPE=0x2L", \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjsdt, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjsdt, \
DEBUG_SYMBOLS := true))
-$(BUILD_LIBJSDT): $(BUILD_LIBJAVA)
+$(BUILD_LIBJSDT): $(call FindLib, java.base, java)
-JSDT_LIBRARIES += $(BUILD_LIBJSDT)
+TARGETS += $(BUILD_LIBJSDT)
################################################################################
-
-jdk.runtime: $(JSDT_LIBRARIES) $(UNPACK_LIBRARIES)
-
-all: jdk.runtime
-
-.PHONY: all jdk.runtime
diff --git a/jdk/make/lib/Lib-jdk.sctp.gmk b/jdk/make/lib/Lib-jdk.sctp.gmk
index 7afd0020be7..bbd211a854f 100644
--- a/jdk/make/lib/Lib-jdk.sctp.gmk
+++ b/jdk/make/lib/Lib-jdk.sctp.gmk
@@ -48,8 +48,8 @@ ifeq ($(OPENJDK_TARGET_OS_API), posix)
-I $(JDK_TOPDIR)/src/java.base/share/native/libnio/ch \
$(addprefix -I, $(call FindSrcDirsForLib, java.base, net)) \
$(LIBJAVA_HEADER_FLAGS) \
- -I$(JDK_OUTPUTDIR)/gensrc_headers/jdk.sctp \
- -I$(JDK_OUTPUTDIR)/gensrc_headers/java.base, \
+ -I$(SUPPORT_OUTPUTDIR)/headers/jdk.sctp \
+ -I$(SUPPORT_OUTPUTDIR)/headers/java.base, \
CFLAGS_linux := $(SCTP_WERROR), \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsctp/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
@@ -58,19 +58,13 @@ ifeq ($(OPENJDK_TARGET_OS_API), posix)
LDFLAGS_SUFFIX_posix := -lnio -lnet, \
LDFLAGS_SUFFIX_solaris := -lsocket -ljava -ljvm -lc, \
LDFLAGS_SUFFIX_macosx := -ljava -ljvm, \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsctp, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsctp, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
- SCTP_LIBRARIES += $(BUILD_LIBSCTP)
+ TARGETS += $(BUILD_LIBSCTP)
- $(BUILD_LIBSCTP): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)nio$(SHARED_LIBRARY_SUFFIX)
+ $(BUILD_LIBSCTP): $(call FindLib, java.base, nio)
endif
endif
################################################################################
-
-jdk.sctp: $(SCTP_LIBRARIES)
-
-all: jdk.sctp
-
-.PHONY: all jdk.sctp
diff --git a/jdk/make/lib/Lib-jdk.security.auth.gmk b/jdk/make/lib/Lib-jdk.security.auth.gmk
index 52151773886..21b0c81b18e 100644
--- a/jdk/make/lib/Lib-jdk.security.auth.gmk
+++ b/jdk/make/lib/Lib-jdk.security.auth.gmk
@@ -46,7 +46,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAAS, \
SRC := $(JDK_TOPDIR)/src/jdk.security.auth/$(OPENJDK_TARGET_OS_API_DIR)/native/libjaas, \
LANG := C, \
OPTIMIZATION := LOW, \
- CFLAGS := $(CFLAGS_JDKLIB) -I$(JDK_OUTPUTDIR)/gensrc_headers/jdk.security.auth, \
+ CFLAGS := $(CFLAGS_JDKLIB) -I$(SUPPORT_OUTPUTDIR)/headers/jdk.security.auth, \
MAPFILE := $(LIBJAAS_MAPFILE), \
LDFLAGS := $(filter-out -ljava, $(LDFLAGS_JDKLIB)) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
@@ -59,17 +59,11 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAAS, \
-D "JDK_FNAME=$(LIBJAAS_NAME).dll" \
-D "JDK_INTERNAL_NAME=$(LIBJAAS_NAME)" \
-D "JDK_FTYPE=0x2L", \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjaas, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjaas, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
-$(BUILD_LIBJAAS): $(BUILD_LIBJAVA)
+$(BUILD_LIBJAAS): $(call FindLib, java.base, java)
-SECURITY_JAAS_LIBRARIES += $(BUILD_LIBJAAS)
+TARGETS += $(BUILD_LIBJAAS)
################################################################################
-
-jdk.security.auth: $(SECURITY_JAAS_LIBRARIES)
-
-all: jdk.security.auth
-
-.PHONY: all jdk.security.auth
diff --git a/jdk/make/lib/LibCommon.gmk b/jdk/make/lib/LibCommon.gmk
index 885ba11c780..c257f0831dc 100644
--- a/jdk/make/lib/LibCommon.gmk
+++ b/jdk/make/lib/LibCommon.gmk
@@ -23,8 +23,6 @@
# questions.
#
-default: all
-
include $(SPEC)
include MakeBase.gmk
include NativeCompilation.gmk
@@ -34,16 +32,9 @@ include Tools.gmk
GLOBAL_VERSION_INFO_RESOURCE := $(JDK_TOPDIR)/src/java.base/windows/native/common/version.rc
-# Put the libraries here. Different locations for different target apis.
-ifeq ($(OPENJDK_TARGET_OS_API), posix)
- INSTALL_LIBRARIES_HERE := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
-else
- INSTALL_LIBRARIES_HERE := $(JDK_OUTPUTDIR)/bin
-endif
-
# Absolute paths to lib files on windows for use in LDFLAGS. Should figure out a more
# elegant solution to this.
-WIN_JAVA_LIB := $(JDK_OUTPUTDIR)/objs/libjava/java.lib
+WIN_JAVA_LIB := $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib
# Use this variable to set DEBUG_SYMBOLS true on windows for all libraries, but
# not on other platforms.
@@ -57,24 +48,45 @@ ifdef OPENJDK
endif
################################################################################
-
# Find the default set of src dirs for a native library.
# Param 1 - module name
# Param 2 - library name
-FindSrcDirsForLib = $(call uniq, $(wildcard \
- $(JDK_TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS)/native/lib$(strip $2) \
- $(JDK_TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS_API_DIR)/native/lib$(strip $2) \
- $(JDK_TOPDIR)/src/$(strip $1)/share/native/lib$(strip $2)))
+define FindSrcDirsForLib
+ $(call uniq, $(wildcard \
+ $(JDK_TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS)/native/lib$(strip $2) \
+ $(JDK_TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS_API_DIR)/native/lib$(strip $2) \
+ $(JDK_TOPDIR)/src/$(strip $1)/share/native/lib$(strip $2)))
+endef
################################################################################
+# Find lib dir for module
+# Param 1 - module name
+ifeq ($(OPENJDK_TARGET_OS_API), posix)
+ define FindLibDirForModule
+ $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)$(OPENJDK_TARGET_CPU_LIBDIR)
+ endef
+else
+ define FindLibDirForModule
+ $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)
+ endef
+endif
-# A lot of libraries are dependent on libjava. Define the name of that
-# library here to make dependency declarations to it possible in other files.
-BUILD_LIBJAVA := $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX)
+################################################################################
+# Find a library
+# Param 1 - module name
+# Param 2 - library name
+# Param 3 - subdir for library
+define FindLib
+ $(call FindLibDirForModule, $(strip $1))$(strip $3)/$(LIBRARY_PREFIX)$(strip $2)$(SHARED_LIBRARY_SUFFIX)
+endef
-# Also define the header include flags needed to compile against it.
+################################################################################
+# Define the header include flags needed to compile against it.
LIBJAVA_HEADER_FLAGS := $(addprefix -I, $(call FindSrcDirsForLib, java.base, java))
+# Put the libraries here.
+INSTALL_LIBRARIES_HERE := $(call FindLibDirForModule, $(MODULE))
+
################################################################################
# Define it here since there are multiple uses.
diff --git a/jdk/make/lib/NetworkingLibraries.gmk b/jdk/make/lib/NetworkingLibraries.gmk
index a0825b06ce2..a52d77cdd5b 100644
--- a/jdk/make/lib/NetworkingLibraries.gmk
+++ b/jdk/make/lib/NetworkingLibraries.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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
@@ -25,7 +25,7 @@
LIBNET_SRC_DIRS := $(JDK_TOPDIR)/src/java.base/share/native/libnet \
$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libnet
-LIBNET_CFLAGS += -I$(JDK_OUTPUTDIR)/gensrc_headers/java.base \
+LIBNET_CFLAGS += -I$(SUPPORT_OUTPUTDIR)/headers/java.base \
$(LIBJAVA_HEADER_FLAGS)
LIBNET_CFLAGS += $(foreach dir, $(LIBNET_SRC_DIRS), -I$(dir))
@@ -71,10 +71,10 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBNET, \
-D "JDK_FNAME=net.dll" \
-D "JDK_INTERNAL_NAME=net" \
-D "JDK_FTYPE=0x2L", \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libnet, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libnet, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBNET): $(BUILD_LIBJAVA)
-BASE_LIBRARIES += $(BUILD_LIBNET)
+TARGETS += $(BUILD_LIBNET)
diff --git a/jdk/make/lib/NioLibraries.gmk b/jdk/make/lib/NioLibraries.gmk
index 722115fdee5..946c964baf5 100644
--- a/jdk/make/lib/NioLibraries.gmk
+++ b/jdk/make/lib/NioLibraries.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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
@@ -35,7 +35,7 @@ BUILD_LIBNIO_SRC := \
BUILD_LIBNIO_CFLAGS := \
$(addprefix -I, $(BUILD_LIBNIO_SRC)) \
- -I$(JDK_OUTPUTDIR)/gensrc_headers/java.base \
+ -I$(SUPPORT_OUTPUTDIR)/headers/java.base \
$(LIBJAVA_HEADER_FLAGS) \
$(addprefix -I, $(BUILD_LIBNET_SRC))
@@ -78,7 +78,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBNIO, \
LDFLAGS_SUFFIX_solaris := -ljvm -lsocket -lposix4 $(LIBDL) \
-lsendfile -ljava -lnet -lc, \
LDFLAGS_SUFFIX_windows := jvm.lib ws2_32.lib $(WIN_JAVA_LIB) \
- $(JDK_OUTPUTDIR)/objs/libnet/net.lib \
+ $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libnet/net.lib \
advapi32.lib, \
LDFLAGS_SUFFIX_macosx := -ljava -lnet -pthread -framework CoreFoundation, \
LDFLAGS_SUFFIX :=, \
@@ -87,10 +87,10 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBNIO, \
-D "JDK_FNAME=nio.dll" \
-D "JDK_INTERNAL_NAME=nio" \
-D "JDK_FTYPE=0x2L", \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libnio, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libnio, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
-BASE_LIBRARIES += $(BUILD_LIBNIO)
+TARGETS += $(BUILD_LIBNIO)
$(BUILD_LIBNIO): $(BUILD_LIBNET)
diff --git a/jdk/make/lib/PlatformLibraries.gmk b/jdk/make/lib/PlatformLibraries.gmk
index b9135df0acb..14592213e40 100644
--- a/jdk/make/lib/PlatformLibraries.gmk
+++ b/jdk/make/lib/PlatformLibraries.gmk
@@ -23,7 +23,7 @@
# questions.
#
-##########################################################################################
+################################################################################
ifeq ($(OPENJDK_TARGET_OS), macosx)
@@ -37,7 +37,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(addprefix -I, $(LIBOSXAPP_SRC)) \
- -I$(JDK_OUTPUTDIR)/gensrc_headers_icons, \
+ -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_macosx := \
@@ -53,10 +53,10 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
-framework OpenGL \
-framework IOSurface \
-framework QuartzCore, \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libosxapp, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libosxapp, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
- DESKTOP_LIBRARIES += $(BUILD_LIBOSXAPP)
+ TARGETS += $(BUILD_LIBOSXAPP)
endif
diff --git a/jdk/make/lib/SoundLibraries.gmk b/jdk/make/lib/SoundLibraries.gmk
index 6348f7a7d7b..eb68a148b56 100644
--- a/jdk/make/lib/SoundLibraries.gmk
+++ b/jdk/make/lib/SoundLibraries.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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
@@ -28,7 +28,7 @@ LIBJSOUND_SRC_DIRS := \
$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/libjsound \
#
LIBJSOUND_CFLAGS := \
- -I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \
+ -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
$(LIBJAVA_HEADER_FLAGS) \
$(foreach dir, $(LIBJSOUND_SRC_DIRS), -I$(dir)) \
#
@@ -172,12 +172,12 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJSOUND, \
-D "JDK_FNAME=jsound.dll" \
-D "JDK_INTERNAL_NAME=jsound" \
-D "JDK_FTYPE=0x2L", \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjsound, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjsound, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBJSOUND): $(BUILD_LIBJAVA)
-DESKTOP_LIBRARIES += $(BUILD_LIBJSOUND)
+TARGETS += $(BUILD_LIBJSOUND)
##########################################################################################
@@ -208,12 +208,12 @@ ifneq ($(filter jsoundalsa, $(EXTRA_SOUND_JNI_LIBS)), )
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(ALSA_LIBS) -ljava -ljvm, \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjsoundalsa, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjsoundalsa, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBJSOUNDALSA): $(BUILD_LIBJAVA)
- DESKTOP_LIBRARIES += $(BUILD_LIBJSOUNDALSA)
+ TARGETS += $(BUILD_LIBJSOUNDALSA)
endif
@@ -240,11 +240,11 @@ ifneq ($(filter jsoundds, $(EXTRA_SOUND_JNI_LIBS)), )
-D "JDK_FNAME=jsoundds.dll" \
-D "JDK_INTERNAL_NAME=jsoundds" \
-D "JDK_FTYPE=0x2L", \
- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjsoundds, \
+ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjsoundds, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBJSOUNDDS): $(BUILD_LIBJAVA)
- DESKTOP_LIBRARIES += $(BUILD_LIBJSOUNDDS)
+ TARGETS += $(BUILD_LIBJSOUNDDS)
endif
diff --git a/jdk/make/mapfiles/libjava/mapfile-vers b/jdk/make/mapfiles/libjava/mapfile-vers
index 08466af08f3..a91eb85fe9d 100644
--- a/jdk/make/mapfiles/libjava/mapfile-vers
+++ b/jdk/make/mapfiles/libjava/mapfile-vers
@@ -274,6 +274,9 @@ SUNWprivate_1.1 {
Java_sun_misc_VM_initialize;
Java_sun_misc_VMSupport_initAgentProperties;
Java_sun_misc_VMSupport_getVMTemporaryDirectory;
+
+ Java_jdk_internal_jimage_concurrent_ConcurrentPReader_initIDs;
+ Java_jdk_internal_jimage_concurrent_ConcurrentPReader_pread;
# ZipFile.c needs this one
throwFileNotFoundException;
diff --git a/jdk/make/mapfiles/libzip/mapfile-vers b/jdk/make/mapfiles/libzip/mapfile-vers
index a44f8d90214..ad1682ff88f 100644
--- a/jdk/make/mapfiles/libzip/mapfile-vers
+++ b/jdk/make/mapfiles/libzip/mapfile-vers
@@ -72,6 +72,7 @@ SUNWprivate_1.1 {
ZIP_FindEntry;
ZIP_GetEntry;
ZIP_GetNextEntry;
+ ZIP_InflateFully;
ZIP_Lock;
ZIP_Open;
ZIP_Read;
diff --git a/jdk/make/profile-includes.txt b/jdk/make/profile-includes.txt
deleted file mode 100644
index 226b1ed9eb0..00000000000
--- a/jdk/make/profile-includes.txt
+++ /dev/null
@@ -1,255 +0,0 @@
-#
-# Copyright (c) 2012, 2014, Oracle and/or its affiliates. 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. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-PROFILE_1_JRE_BIN_FILES := \
- java$(EXE_SUFFIX) \
- keytool$(EXE_SUFFIX)
-
-PROFILE_1_JRE_LIB_FILES := \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)j2pkcs11$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jsig.diz \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)net$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)nio$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)sunec$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)verify$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)verify.diz \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)zip$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/client/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/client/$(LIBRARY_PREFIX)jsig.diz \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/client/$(LIBRARY_PREFIX)jvm$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/client/$(LIBRARY_PREFIX)jvm.diz \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/client/Xusage.txt \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/jli/$(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/jvm.cfg \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/minimal/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/minimal/$(LIBRARY_PREFIX)jsig.diz \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/minimal/$(LIBRARY_PREFIX)jvm$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/minimal/$(LIBRARY_PREFIX)jvm.diz \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/minimal/Xusage.txt \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/server/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/server/$(LIBRARY_PREFIX)jsig.diz \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/server/$(LIBRARY_PREFIX)jvm$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/server/$(LIBRARY_PREFIX)jvm.diz \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/server/Xusage.txt \
- classlist \
- ext/localedata.jar \
- ext/meta-index \
- ext/sunec.jar \
- ext/sunjce_provider.jar \
- ext/sunpkcs11.jar \
- jce.jar \
- jsse.jar \
- logging.properties \
- meta-index \
- net.properties \
- resources.jar \
- rt.jar \
- security/US_export_policy.jar \
- security/blacklist \
- security/blacklisted.certs \
- security/cacerts \
- security/java.policy \
- security/java.security \
- security/local_policy.jar \
- security/trusted.libraries \
- tzdb.dat
-
-ifndef OPENJDK
-PROFILE_1_JRE_LIB_FILES += \
- security/unlimited_policy/README.txt \
- security/unlimited_policy/US_export_policy.jar \
- security/unlimited_policy/local_policy.jar
-endif
-
-PROFILE_1_JRE_OTHER_FILES := \
- COPYRIGHT \
- LICENSE \
- README \
- THIRDPARTYLICENSEREADME.txt \
- Welcome.html \
- release
-
-PROFILE_1_JRE_JAR_FILES := \
- ext/localedata.jar \
- ext/sunec.jar \
- ext/sunjce_provider.jar \
- ext/sunpkcs11.jar \
- jce.jar \
- jsse.jar \
- resources.jar \
- rt.jar \
- security/US_export_policy.jar \
- security/local_policy.jar
-
-ifndef OPENJDK
-PROFILE_1_JRE_JAR_FILES += \
- security/unlimited_policy/US_export_policy.jar \
- security/unlimited_policy/local_policy.jar
-endif
-
-PROFILE_2_JRE_BIN_FILES := \
- rmid$(EXE_SUFFIX) \
- rmiregistry$(EXE_SUFFIX)
-
-PROFILE_2_JRE_LIB_FILES :=
-
-PROFILE_2_JRE_OTHER_FILES :=
-
-PROFILE_2_JRE_JAR_FILES :=
-
-
-PROFILE_3_JRE_BIN_FILES :=
-
-PROFILE_3_JRE_LIB_FILES := \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)hprof$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)hprof.diz \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)instrument$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)instrument.diz \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)j2gss$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)j2pcsc$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jaas_unix$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)java_crw_demo$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)java_crw_demo.diz \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jsdt$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jsdt.diz \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)management$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)management.diz \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)prefs$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)sctp$(SHARED_LIBRARY_SUFFIX) \
- jvm.hprof.txt \
- management/jmxremote.access \
- management/jmxremote.password.template \
- management/management.properties \
- management/snmp.acl.template
-
-PROFILE_3_JRE_OTHER_FILES :=
-
-PROFILE_3_JRE_JAR_FILES :=
-
-
-FULL_JRE_BIN_FILES := \
- orbd$(EXE_SUFFIX) \
- pack200$(EXE_SUFFIX) \
- policytool$(EXE_SUFFIX) \
- servertool$(EXE_SUFFIX) \
- tnameserv$(EXE_SUFFIX) \
- unpack200$(EXE_SUFFIX)
-
-FULL_JRE_LIB_FILES := \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)awt$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)awt_headless$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)awt_xawt$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)dcpr$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)dt_socket$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)dt_socket.diz \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)fontmanager$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jawt$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jdwp$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jfr$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jpeg$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jsound$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jsoundalsa$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)kcms$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)mlib_image$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)splashscreen$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)t2k$(SHARED_LIBRARY_SUFFIX) \
- $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX) \
- charsets.jar \
- ext/cldrdata.jar \
- ext/dnsns.jar \
- ext/nashorn.jar \
- ext/zipfs.jar \
- fontconfig.RedHat.5.bfc \
- fontconfig.RedHat.5.properties.src \
- fontconfig.RedHat.6.bfc \
- fontconfig.RedHat.6.properties.src \
- fontconfig.SuSE.10.bfc \
- fontconfig.SuSE.10.properties.src \
- fontconfig.SuSE.11.bfc \
- fontconfig.SuSE.11.properties.src \
- fontconfig.Turbo.bfc \
- fontconfig.Turbo.properties.src \
- fontconfig.bfc \
- fontconfig.properties.src \
- fonts/LucidaBrightDemiBold.ttf \
- fonts/LucidaBrightDemiItalic.ttf \
- fonts/LucidaBrightItalic.ttf \
- fonts/LucidaBrightRegular.ttf \
- fonts/LucidaSansDemiBold.ttf \
- fonts/LucidaSansRegular.ttf \
- fonts/LucidaTypewriterBold.ttf \
- fonts/LucidaTypewriterRegular.ttf \
- fonts/fonts.dir \
- images/cursors/cursors.properties \
- images/cursors/invalid32x32.gif \
- images/cursors/motif_CopyDrop32x32.gif \
- images/cursors/motif_CopyNoDrop32x32.gif \
- images/cursors/motif_LinkDrop32x32.gif \
- images/cursors/motif_LinkNoDrop32x32.gif \
- images/cursors/motif_MoveDrop32x32.gif \
- images/cursors/motif_MoveNoDrop32x32.gif \
- jexec \
- jfr.jar \
- oblique-fonts/LucidaSansDemiOblique.ttf \
- oblique-fonts/LucidaSansOblique.ttf \
- oblique-fonts/LucidaTypewriterBoldOblique.ttf \
- oblique-fonts/LucidaTypewriterOblique.ttf \
- oblique-fonts/fonts.dir \
- psfont.properties.ja \
- psfontj2d.properties \
- sound.properties
-
-FULL_JRE_OTHER_FILES := \
- man/ja_JP.UTF-8/man1/java.1 \
- man/ja_JP.UTF-8/man1/javaws.1 \
- man/ja_JP.UTF-8/man1/keytool.1 \
- man/ja_JP.UTF-8/man1/orbd.1 \
- man/ja_JP.UTF-8/man1/pack200.1 \
- man/ja_JP.UTF-8/man1/policytool.1 \
- man/ja_JP.UTF-8/man1/rmid.1 \
- man/ja_JP.UTF-8/man1/rmiregistry.1 \
- man/ja_JP.UTF-8/man1/servertool.1 \
- man/ja_JP.UTF-8/man1/tnameserv.1 \
- man/ja_JP.UTF-8/man1/unpack200.1 \
- man/man1/java.1 \
- man/man1/javaws.1 \
- man/man1/keytool.1 \
- man/man1/orbd.1 \
- man/man1/pack200.1 \
- man/man1/policytool.1 \
- man/man1/rmid.1 \
- man/man1/rmiregistry.1 \
- man/man1/servertool.1 \
- man/man1/tnameserv.1 \
- man/man1/unpack200.1
-
-FULL_JRE_JAR_FILES := \
- charsets.jar \
- ext/cldrdata.jar \
- ext/dnsns.jar \
- ext/nashorn.jar \
- ext/zipfs.jar \
- jfr.jar
diff --git a/jdk/make/profile-rtjar-includes.txt b/jdk/make/profile-rtjar-includes.txt
deleted file mode 100644
index 9ffdd032194..00000000000
--- a/jdk/make/profile-rtjar-includes.txt
+++ /dev/null
@@ -1,245 +0,0 @@
-#
-# Copyright (c) 2012, 2014, Oracle and/or its affiliates. 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. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Included or excluded types must take one of two forms
-# - *.class to indicate all classes; or else
-# - a full single type name e.g.
-# javax/management/remote/rmi/_RMIServer_Stub.class
-# You can not use arbitrary wildcards like _RMI*.class.
-#
-# Notes:
-# - Nested types must use $$ in place of $ as $ is the make meta-character
-# - If a package is not listed in any profile's inclusion list then it will
-# not appear in any profile. But if a package is also missing from the
-# full JRE's inclusion list then it will still be part of the full JRE.
-# This is because the full JRE's inclusion lists are only used to define
-# the exclusion lists for profiles; they are not used to define the full
-# JRE contents - that is still done with the pre-profile legacy mechanism
-# (all packagesthat can be found, less those not intended for rt.jar).
-# This was done to minimize the impact of profiles on the regular
-# non-profile build.
-#
-PROFILE_1_RTJAR_INCLUDE_PACKAGES := \
- com/sun/demo/jvmti/hprof \
- com/sun/java/util/jar/pack \
- com/sun/net/ssl \
- com/sun/nio/file \
- com/sun/security/cert/internal/x509 \
- java/io \
- java/lang \
- java/math \
- java/net \
- java/nio \
- java/security \
- java/text \
- java/time \
- java/util \
- javax/net \
- javax/script \
- javax/security \
- jdk \
- sun/invoke \
- sun/launcher \
- sun/misc \
- sun/net/ \
- sun/nio \
- sun/reflect \
- sun/security \
- sun/text \
- sun/usagetracker \
- sun/util
-
-PROFILE_1_RTJAR_INCLUDE_TYPES :=
-
-PROFILE_1_RTJAR_EXCLUDE_TYPES :=
-
-PROFILE_1_INCLUDE_METAINF_SERVICES :=
-
-
-PROFILE_2_RTJAR_INCLUDE_PACKAGES := \
- com/sun/java_cup/internal/runtime \
- com/sun/net/httpserver \
- com/sun/org/apache \
- com/sun/rmi/rmid \
- com/sun/xml/internal/stream \
- java/rmi \
- java/sql \
- javax/rmi/ssl \
- javax/sql \
- javax/transaction/xa \
- javax/xml \
- org/w3c \
- org/xml/sax \
- sun/net/httpserver \
- sun/rmi \
- sun/util/xml
-
-PROFILE_2_RTJAR_INCLUDE_TYPES :=
-
-PROFILE_2_RTJAR_EXCLUDE_TYPES :=
-
-PROFILE_2_INCLUDE_METAINF_SERVICES :=
-
-PROFILE_3_RTJAR_INCLUDE_PACKAGES := \
- com/sun/jmx \
- com/sun/jndi \
- com/sun/management \
- com/sun/naming/internal \
- com/sun/nio/sctp \
- com/sun/org/apache/xml/internal/security \
- com/sun/rowset \
- com/sun/security/auth \
- com/sun/security/jgss \
- com/sun/security/ntlm \
- com/sun/security/sasl \
- com/sun/tracing \
- jdk/management/cmm \
- java/lang/instrument \
- java/lang/management \
- java/security/acl \
- java/util/prefs \
- javax/annotation/processing \
- javax/lang/model \
- javax/management \
- javax/naming \
- javax/security/auth/kerberos \
- javax/security/sasl \
- javax/smartcardio \
- javax/sql/rowset \
- javax/tools \
- javax/xml/crypto \
- org/ietf/jgss \
- org/jcp/xml \
- sun/instrument \
- sun/management \
- sun/net/dns \
- sun/net/www/protocol/http/ntlm \
- sun/net/www/protocol/http/spnego \
- sun/nio/ch/sctp \
- sun/security/acl \
- sun/security/jgss \
- sun/security/krb5 \
- sun/security/provider/certpath/ldap \
- sun/security/smartcardio \
- sun/tracing
-
-PROFILE_3_RTJAR_INCLUDE_TYPES :=
-
-PROFILE_3_RTJAR_EXCLUDE_TYPES := \
- javax/management/remote/rmi/_RMIConnectionImpl_Tie.class \
- javax/management/remote/rmi/_RMIConnection_Stub.class \
- javax/management/remote/rmi/_RMIServerImpl_Tie.class \
- javax/management/remote/rmi/_RMIServer_Stub.class
-
-FULL_JRE_RTJAR_INCLUDE_PACKAGES := \
- com/oracle \
- com/sun/accessibility/internal/resources \
- com/sun/activation/registries \
- com/sun/awt \
- com/sun/beans \
- com/sun/corba \
- com/sun/image/codec/jpeg \
- com/sun/imageio \
- com/sun/istack \
- com/sun/java/browser \
- com/sun/java/swing \
- com/sun/jmx/remote/protocol/iiop \
- com/sun/jndi/cosnaming \
- com/sun/jndi/toolkit/corba \
- com/sun/jndi/url/corbaname \
- com/sun/jndi/url/iiop \
- com/sun/jndi/url/iiopname \
- com/sun/media/sound \
- com/sun/org/glassfish \
- com/sun/org/omg \
- com/sun/swing \
- com/sun/xml/internal/bind \
- com/sun/xml/internal/fastinfoset \
- com/sun/xml/internal/messaging \
- com/sun/xml/internal/org \
- com/sun/xml/internal/stream/buffer \
- com/sun/xml/internal/txw2 \
- com/sun/xml/internal/ws \
- java/applet \
- java/awt \
- java/beans \
- javax/accessibility \
- javax/activation \
- javax/activity \
- javax/imageio \
- javax/jws \
- javax/print \
- javax/rmi/CORBA \
- javax/sound \
- javax/swing \
- javax/xml/bind \
- javax/xml/soap \
- javax/xml/ws \
- org/omg \
- sun/applet \
- sun/audio \
- sun/awt \
- sun/corba \
- sun/datatransfer \
- sun/dc \
- sun/font \
- sun/java2d \
- sun/net/ftp \
- sun/net/smtp \
- sun/net/www/content/audio \
- sun/net/www/content/image \
- sun/net/www/content/text \
- sun/net/www/protocol/ftp \
- sun/net/www/protocol/mailto \
- sun/net/www/protocol/netdoc \
- sun/print \
- sun/security/tools/policytool \
- sun/swing \
- sun/tools/jar
-
-FULL_JRE_RTJAR_INCLUDE_TYPES := \
- javax/annotation/*.class \
- javax/management/remote/rmi/_RMIConnectionImpl_Tie.class \
- javax/management/remote/rmi/_RMIConnection_Stub.class \
- javax/management/remote/rmi/_RMIServerImpl_Tie.class \
- javax/management/remote/rmi/_RMIServer_Stub.class \
- javax/rmi/*.class \
- javax/transaction/*.class
-
-FULL_JRE_RTJAR_EXCLUDE_TYPES :=
-
-FULL_JRE_INCLUDE_METAINF_SERVICES := \
- META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin \
- META-INF/services/com.sun.tools.internal.xjc.Plugin \
- META-INF/services/javax.print.PrintServiceLookup \
- META-INF/services/javax.print.StreamPrintServiceFactory \
- META-INF/services/javax.sound.midi.spi.MidiDeviceProvider \
- META-INF/services/javax.sound.midi.spi.MidiFileReader \
- META-INF/services/javax.sound.midi.spi.MidiFileWriter \
- META-INF/services/javax.sound.midi.spi.SoundbankReader \
- META-INF/services/javax.sound.sampled.spi.AudioFileReader \
- META-INF/services/javax.sound.sampled.spi.AudioFileWriter \
- META-INF/services/javax.sound.sampled.spi.FormatConversionProvider \
- META-INF/services/javax.sound.sampled.spi.MixerProvider
diff --git a/jdk/make/rmic/Rmic-java.management.gmk b/jdk/make/rmic/Rmic-java.management.gmk
index 07a9f35eee5..57b1d221ad8 100644
--- a/jdk/make/rmic/Rmic-java.management.gmk
+++ b/jdk/make/rmic/Rmic-java.management.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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
@@ -54,7 +54,7 @@ $(eval $(call SetupRMICompilation,RMI_IIOP, \
$(eval $(call SetupRMICompilation,RMI_SRC, \
CLASSES := $(JMX_RMI_CLASSES), \
CLASSES_DIR := $(CLASSES_DIR)/java.management, \
- STUB_CLASSES_DIR := $(RMIC_GENSRC_DIR), \
+ STUB_CLASSES_DIR := $(RMIC_GENSRC_DIR)/java.management, \
RUN_V12 := true, \
KEEP_GENERATED := true))
diff --git a/jdk/make/rmic/RmicCommon.gmk b/jdk/make/rmic/RmicCommon.gmk
index 2affa75a800..4c35481691f 100644
--- a/jdk/make/rmic/RmicCommon.gmk
+++ b/jdk/make/rmic/RmicCommon.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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
@@ -31,7 +31,7 @@ include RMICompilation.gmk
##########################################################################################
-BTRMIC_CP := $(INTERIM_CORBA_JAR)$(PATH_SEP)$(JDK_OUTPUTDIR)/interim_rmic_classes$(PATH_SEP)$(INTERIM_LANGTOOLS_JAR)
+BTRMIC_CP := $(INTERIM_CORBA_JAR)$(PATH_SEP)$(BUILDTOOLS_OUTPUTDIR)/interim_rmic_classes$(PATH_SEP)$(INTERIM_LANGTOOLS_JAR)
BTRMIC_ARGS := "-Xbootclasspath/p:$(BTRMIC_CP)" -cp "$(BTRMIC_CP)"
RMIC := $(JAVA) $(BTRMIC_ARGS) sun.rmi.rmic.Main
@@ -39,6 +39,6 @@ CLASSES_DIR := $(JDK_OUTPUTDIR)/modules
# NOTE: If the smart javac dependency management is reintroduced, these classes risk
# interfering with the dependency checking. In that case they will need to be kept separate.
STUB_CLASSES_DIR := $(JDK_OUTPUTDIR)/modules
-RMIC_GENSRC_DIR := $(JDK_OUTPUTDIR)/gendocsrc_rmic
+RMIC_GENSRC_DIR := $(SUPPORT_OUTPUTDIR)/rmic
##########################################################################################
diff --git a/jdk/make/src/classes/build/tools/module/ImageBuilder.java b/jdk/make/src/classes/build/tools/module/ImageBuilder.java
new file mode 100644
index 00000000000..9f0da161a8f
--- /dev/null
+++ b/jdk/make/src/classes/build/tools/module/ImageBuilder.java
@@ -0,0 +1,514 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. 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. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.module;
+
+import jdk.internal.jimage.Archive;
+import jdk.internal.jimage.ImageFile;
+import jdk.internal.jimage.ImageModules;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.PrintWriter;
+import java.io.UncheckedIOException;
+import java.nio.ByteOrder;
+import java.nio.file.Files;
+import java.nio.file.InvalidPathException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.attribute.PosixFilePermission;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * A tool for building a runtime image.
+ *
+ * java build.tools.module.ImageBuilder --output top/modules.xml,...
+ * Possible options are:
+ * --cmds Location of native commands
+ * --configs Location of config files
+ * --help Print this usage message
+ * --classes Location of module classes files
+ * --libs Location of native libraries
+ * --mods Comma separated list of module names
+ * --output Location of the output path
+ * --endian Byte order of the target runtime; {little,big}
+ */
+class ImageBuilder {
+ static class BadArgs extends Exception {
+ private static final long serialVersionUID = 0L;
+ BadArgs(String format, Object... args) {
+ super(String.format(format, args));
+ this.format = format;
+ this.args = args;
+ }
+ BadArgs showUsage(boolean b) {
+ showUsage = b;
+ return this;
+ }
+ final String format;
+ final Object[] args;
+ boolean showUsage;
+ }
+
+ static abstract class Option {
+ final boolean hasArg;
+ final String[] aliases;
+ Option(boolean hasArg, String... aliases) {
+ this.hasArg = hasArg;
+ this.aliases = aliases;
+ }
+ boolean isHidden() {
+ return false;
+ }
+ boolean matches(String opt) {
+ for (String a : aliases) {
+ if (a.equals(opt)) {
+ return true;
+ } else if (opt.startsWith("--") && hasArg && opt.startsWith(a + "=")) {
+ return true;
+ }
+ }
+ return false;
+ }
+ boolean ignoreRest() {
+ return false;
+ }
+ abstract void process(ImageBuilder task, String opt, String arg) throws BadArgs;
+ abstract String description();
+ }
+
+ private static Path CWD = Paths.get("");
+
+ private static List splitPath(String arg, String separator)
+ throws BadArgs
+ {
+ List paths = new ArrayList<>();
+ for (String p: arg.split(separator)) {
+ if (p.length() > 0) {
+ try {
+ Path path = CWD.resolve(p);
+ if (Files.notExists(path))
+ throw new BadArgs("path not found: %s", path);
+ paths.add(path);
+ } catch (InvalidPathException x) {
+ throw new BadArgs("path not valid: %s", p);
+ }
+ }
+ }
+ return paths;
+ }
+
+ static Option[] recognizedOptions = {
+ new Option(true, "--cmds") {
+ void process(ImageBuilder task, String opt, String arg) throws BadArgs {
+ task.options.cmds = splitPath(arg, File.pathSeparator);
+ }
+ String description() { return "Location of native commands"; }
+ },
+ new Option(true, "--configs") {
+ void process(ImageBuilder task, String opt, String arg) throws BadArgs {
+ task.options.configs = splitPath(arg, File.pathSeparator);
+ }
+ String description() { return "Location of config files"; }
+ },
+ new Option(false, "--help") {
+ void process(ImageBuilder task, String opt, String arg) {
+ task.options.help = true;
+ }
+ String description() { return "Print this usage message"; }
+ },
+ new Option(true, "--classes") {
+ void process(ImageBuilder task, String opt, String arg) throws BadArgs {
+ task.options.classes = splitPath(arg, File.pathSeparator);
+ }
+ String description() { return "Location of module classes files"; }
+ },
+ new Option(true, "--libs") {
+ void process(ImageBuilder task, String opt, String arg) throws BadArgs {
+ task.options.libs = splitPath(arg, File.pathSeparator);
+ }
+ String description() { return "Location of native libraries"; }
+ },
+ new Option(true, "--mods") {
+ void process(ImageBuilder task, String opt, String arg) throws BadArgs {
+ for (String mn : arg.split(",")) {
+ if (mn.isEmpty())
+ throw new BadArgs("Module not found", mn);
+ task.options.mods.add(mn);
+ }
+ }
+ String description() { return "Comma separated list of module names"; }
+ },
+ new Option(true, "--output") {
+ void process(ImageBuilder task, String opt, String arg) throws BadArgs {
+ Path path = Paths.get(arg);
+ task.options.output = path;
+ }
+ String description() { return "Location of the output path"; }
+ },
+ new Option(true, "--endian") {
+ void process(ImageBuilder task, String opt, String arg) throws BadArgs {
+ if (arg.equals("little"))
+ task.options.endian = ByteOrder.LITTLE_ENDIAN;
+ else if (arg.equals("big"))
+ task.options.endian = ByteOrder.BIG_ENDIAN;
+ else
+ throw new BadArgs("Unknown byte order " + arg);
+ }
+ String description() { return "Byte order of the target runtime; {little,big}"; }
+ }
+ };
+
+ private final Options options = new Options();
+
+ private PrintWriter log;
+ void setLog(PrintWriter out) {
+ log = out;
+ }
+
+ Set moduleGraph = new java.util.HashSet<>();
+
+ /** Module list files */
+ private static final String BOOT_MODULES = "boot.modules";
+ private static final String EXT_MODULES = "ext.modules";
+
+ /**
+ * Result codes.
+ */
+ static final int EXIT_OK = 0, // Completed with no errors.
+ EXIT_ERROR = 1, // Completed but reported errors.
+ EXIT_CMDERR = 2, // Bad command-line arguments
+ EXIT_SYSERR = 3, // System error or resource exhaustion.
+ EXIT_ABNORMAL = 4; // terminated abnormally
+
+
+ static class Options {
+ boolean help;
+ List classes;
+ List cmds;
+ List configs;
+ List libs;
+ Set mods = new HashSet<>();
+ Path output;
+ ByteOrder endian = ByteOrder.nativeOrder(); // default, if not specified
+ }
+
+ public static void main(String[] args) throws Exception {
+ ImageBuilder builder = new ImageBuilder();
+ int rc = builder.run(args);
+ System.exit(rc);
+ }
+
+ int run(String[] args) {
+ if (log == null)
+ log = new PrintWriter(System.out);
+
+ try {
+ handleOptions(args);
+ if (options.help) {
+ showHelp();
+ return EXIT_OK;
+ }
+
+ if (options.classes == null)
+ throw new BadArgs("--classes must be specified").showUsage(true);
+
+ Path output = options.output;
+ if (output == null)
+ throw new BadArgs("--output must be specified").showUsage(true);
+ Files.createDirectories(output);
+ if (Files.list(output).findFirst().isPresent())
+ throw new BadArgs("dir not empty", output);
+
+ if (options.mods.isEmpty())
+ throw new BadArgs("--mods must be specified").showUsage(true);
+
+ if (moduleGraph.isEmpty())
+ throw new BadArgs("modules.xml must be specified").showUsage(true);
+
+ if (options.cmds == null || options.cmds.isEmpty())
+ warning("--commands is not set");
+ if (options.libs == null || options.libs.isEmpty())
+ warning("--libs is not set");
+ //if (options.configs == null || options.configs.isEmpty())
+ // warning("--configs is not set");
+
+ // additional option combination validation
+
+ boolean ok = run();
+ return ok ? EXIT_OK : EXIT_ERROR;
+ } catch (BadArgs e) {
+ reportError(e.format, e.args);
+ if (e.showUsage)
+ log.println(USAGE_SUMMARY);
+ return EXIT_CMDERR;
+ } catch (Exception x) {
+ x.printStackTrace();
+ return EXIT_ABNORMAL;
+ } finally {
+ log.flush();
+ }
+ }
+
+ private boolean run() throws IOException {
+ createImage();
+ return true;
+ }
+
+ class SimpleResolver {
+ private final Set initialMods;
+ private final Map nameToModule = new HashMap<>();
+
+ SimpleResolver(Set mods, Set graph) {
+ graph.stream()
+ .forEach(m -> nameToModule.put(m.name(), m));
+ initialMods = mods.stream()
+ .map(this::nameToModule)
+ .collect(Collectors.toSet());
+ }
+
+ /** Returns the transitive closure, in topological order */
+ List resolve() {
+ List result = new LinkedList<>();
+ Set visited = new HashSet<>();
+ Set done = new HashSet<>();
+ for (Module m : initialMods) {
+ if (!visited.contains(m))
+ visit(m, visited, result, done);
+ }
+ return result.stream()
+ .map(m -> m.name())
+ .collect(Collectors.toList());
+ }
+
+ private void visit(Module m, Set visited,
+ List result, Set done) {
+ if (visited.contains(m)) {
+ if (!done.contains(m))
+ throw new IllegalArgumentException("Cyclic detected: " +
+ m + " " + getModuleDependences(m));
+ return;
+ }
+ visited.add(m);
+ getModuleDependences(m).stream()
+ .forEach(d -> visit(d, visited, result, done));
+ done.add(m);
+ result.add(m);
+ }
+
+ private Module nameToModule(String name) {
+ Module m = nameToModule.get(name);
+ if (m == null)
+ throw new RuntimeException("No module definition for " + name);
+ return m;
+ }
+
+ private Set getModuleDependences(Module m) {
+ return m.requires().stream()
+ .map(d -> d.name())
+ .map(this::nameToModule)
+ .collect(Collectors.toSet());
+ }
+ }
+
+ private List resolve(Set mods ) {
+ return (new SimpleResolver(mods, moduleGraph)).resolve();
+ }
+
+ /**
+ * chmod ugo+x file
+ */
+ private void setExecutable(Path file) {
+ try {
+ Set perms = Files.getPosixFilePermissions(file);
+ perms.add(PosixFilePermission.OWNER_EXECUTE);
+ perms.add(PosixFilePermission.GROUP_EXECUTE);
+ perms.add(PosixFilePermission.OTHERS_EXECUTE);
+ Files.setPosixFilePermissions(file, perms);
+ } catch (IOException ioe) {
+ throw new UncheckedIOException(ioe);
+ }
+ }
+
+ private void createImage() throws IOException {
+ Collection modules = resolve(options.mods);
+ log.print(modules.stream().collect(Collectors.joining(" ")));
+ ImageFileHelper imageHelper = new ImageFileHelper(modules);
+ imageHelper.createModularImage(options.output);
+
+ // jspawnhelper, might be in lib or lib/ARCH
+ Path jspawnhelper = Paths.get("jspawnhelper");
+ Path lib = options.output.resolve("lib");
+ Optional helper = Files.walk(lib, 2)
+ .filter(f -> f.getFileName().equals(jspawnhelper))
+ .findFirst();
+ if (helper.isPresent())
+ setExecutable(helper.get());
+ }
+
+ private class ImageFileHelper {
+ final Collection modules;
+ final Set bootModules;
+ final Set extModules;
+ final Set appModules;
+ final ImageModules imf;
+
+ ImageFileHelper(Collection modules) throws IOException {
+ this.modules = modules;
+ this.bootModules = modulesFor(BOOT_MODULES).stream()
+ .filter(modules::contains)
+ .collect(Collectors.toSet());
+ this.extModules = modulesFor(EXT_MODULES).stream()
+ .filter(modules::contains)
+ .collect(Collectors.toSet());
+ this.appModules = modules.stream()
+ .filter(m -> !bootModules.contains(m) && !extModules.contains(m))
+ .collect(Collectors.toSet());
+
+ this.imf = new ImageModules(bootModules, extModules, appModules);
+ }
+
+ void createModularImage(Path output) throws IOException {
+ Set archives = modules.stream()
+ .map(this::toModuleArchive)
+ .collect(Collectors.toSet());
+ ImageFile.create(output, archives, imf, options.endian);
+ }
+
+ ModuleArchive toModuleArchive(String mn) {
+ return new ModuleArchive(mn,
+ moduleToPath(mn, options.classes, false/*true*/),
+ moduleToPath(mn, options.cmds, false),
+ moduleToPath(mn, options.libs, false),
+ moduleToPath(mn, options.configs, false));
+ }
+
+ private Path moduleToPath(String name, List paths, boolean expect) {
+ Set foundPaths = new HashSet<>();
+ if (paths != null) {
+ for (Path p : paths) {
+ Path rp = p.resolve(name);
+ if (Files.exists(rp))
+ foundPaths.add(rp);
+ }
+ }
+ if (foundPaths.size() > 1)
+ throw new RuntimeException("Found more that one path for " + name);
+ if (expect && foundPaths.size() != 1)
+ throw new RuntimeException("Expected to find classes path for " + name);
+ return foundPaths.size() == 0 ? null : foundPaths.iterator().next();
+ }
+
+ private List modulesFor(String name) throws IOException {
+ try (InputStream is = ImageBuilder.class.getResourceAsStream(name);
+ BufferedReader reader = new BufferedReader(new InputStreamReader(is))) {
+ return reader.lines().collect(Collectors.toList());
+ }
+ }
+ }
+
+ public void handleOptions(String[] args) throws BadArgs {
+ // process options
+ for (int i=0; i < args.length; i++) {
+ if (args[i].charAt(0) == '-') {
+ String name = args[i];
+ Option option = getOption(name);
+ String param = null;
+ if (option.hasArg) {
+ if (name.startsWith("--") && name.indexOf('=') > 0) {
+ param = name.substring(name.indexOf('=') + 1, name.length());
+ } else if (i + 1 < args.length) {
+ param = args[++i];
+ }
+ if (param == null || param.isEmpty() || param.charAt(0) == '-') {
+ throw new BadArgs("Missing arg for %n", name).showUsage(true);
+ }
+ }
+ option.process(this, name, param);
+ if (option.ignoreRest()) {
+ i = args.length;
+ }
+ } else {
+ // process rest of the input arguments
+ Path p = Paths.get(args[i]);
+ try {
+ moduleGraph.addAll(ModulesXmlReader.readModules(p)
+ .stream()
+ .collect(Collectors.toSet()));
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+ }
+ }
+
+ private Option getOption(String name) throws BadArgs {
+ for (Option o : recognizedOptions) {
+ if (o.matches(name)) {
+ return o;
+ }
+ }
+ throw new BadArgs("Unknown option %s", name).showUsage(true);
+ }
+
+ private void reportError(String format, Object... args) {
+ log.format("Error: " + format + "%n", args);
+ }
+
+ private void warning(String format, Object... args) {
+ log.format("Warning: " + format + "%n", args);
+ }
+
+ private static final String USAGE =
+ "ImageBuilder --output path-to-modules-xml\n";
+
+ private static final String USAGE_SUMMARY =
+ USAGE + "Use --help for a list of possible options.";
+
+ private void showHelp() {
+ log.format(USAGE);
+ log.format("Possible options are:%n");
+ for (Option o : recognizedOptions) {
+ String name = o.aliases[0].substring(1); // there must always be at least one name
+ name = name.charAt(0) == '-' ? name.substring(1) : name;
+ if (o.isHidden() || name.equals("h"))
+ continue;
+
+ log.format(" --%s\t\t\t%s%n", name, o.description());
+ }
+ }
+}
diff --git a/jdk/make/src/classes/build/tools/module/ModuleArchive.java b/jdk/make/src/classes/build/tools/module/ModuleArchive.java
new file mode 100644
index 00000000000..41d7ae1c282
--- /dev/null
+++ b/jdk/make/src/classes/build/tools/module/ModuleArchive.java
@@ -0,0 +1,240 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. 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. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.module;
+
+import jdk.internal.jimage.Archive;
+import jdk.internal.jimage.Resource;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.UncheckedIOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.function.Consumer;
+
+/**
+ * An Archive backed by an exploded representation on disk.
+ */
+public class ModuleArchive implements Archive {
+ private final Path classes;
+ private final Path cmds;
+ private final Path libs;
+ private final Path configs;
+ private final String moduleName;
+
+ public ModuleArchive(String moduleName, Path classes, Path cmds,
+ Path libs, Path configs) {
+ this.moduleName = moduleName;
+ this.classes = classes;
+ this.cmds = cmds;
+ this.libs = libs;
+ this.configs = configs;
+ }
+
+ @Override
+ public String moduleName() {
+ return moduleName;
+ }
+
+ @Override
+ public void visitResources(Consumer consumer) {
+ if (classes == null)
+ return;
+ try{
+ Files.walk(classes)
+ .sorted()
+ .filter(p -> !Files.isDirectory(p)
+ && !classes.relativize(p).toString().startsWith("_the.")
+ && !classes.relativize(p).toString().equals("javac_state"))
+ .map(this::toResource)
+ .forEach(consumer::accept);
+ } catch (IOException ioe) {
+ throw new UncheckedIOException(ioe);
+ }
+ }
+
+ private Resource toResource(Path path) {
+ try {
+ return new Resource(classes.relativize(path).toString().replace('\\','/'),
+ Files.size(path),
+ 0 /* no compression support yet */);
+ } catch (IOException ioe) {
+ throw new UncheckedIOException(ioe);
+ }
+ }
+
+ private enum Section {
+ CLASSES,
+ CMDS,
+ LIBS,
+ CONFIGS
+ }
+
+ @Override
+ public void visitEntries(Consumer consumer) {
+ try{
+ if (classes != null)
+ Files.walk(classes)
+ .sorted()
+ .filter(p -> !Files.isDirectory(p)
+ && !classes.relativize(p).toString().startsWith("_the.")
+ && !classes.relativize(p).toString().equals("javac_state"))
+ .map(p -> toEntry(p, classes, Section.CLASSES))
+ .forEach(consumer::accept);
+ if (cmds != null)
+ Files.walk(cmds)
+ .filter(p -> !Files.isDirectory(p))
+ .map(p -> toEntry(p, cmds, Section.CMDS))
+ .forEach(consumer::accept);
+ if (libs != null)
+ Files.walk(libs)
+ .filter(p -> !Files.isDirectory(p))
+ .map(p -> toEntry(p, libs, Section.LIBS))
+ .forEach(consumer::accept);
+ if (configs != null)
+ Files.walk(configs)
+ .filter(p -> !Files.isDirectory(p))
+ .map(p -> toEntry(p, configs, Section.CONFIGS))
+ .forEach(consumer::accept);
+ } catch (IOException ioe) {
+ throw new UncheckedIOException(ioe);
+ }
+ }
+
+ private static class FileEntry implements Entry {
+ private final String name;
+ private final InputStream is;
+ private final boolean isDirectory;
+ private final Section section;
+ FileEntry(String name, InputStream is,
+ boolean isDirectory, Section section) {
+ this.name = name;
+ this.is = is;
+ this.isDirectory = isDirectory;
+ this.section = section;
+ }
+ public String getName() {
+ return name;
+ }
+ public Section getSection() {
+ return section;
+ }
+ public InputStream getInputStream() {
+ return is;
+ }
+ public boolean isDirectory() {
+ return isDirectory;
+ }
+ }
+
+ private Entry toEntry(Path entryPath, Path basePath, Section section) {
+ try {
+ return new FileEntry(basePath.relativize(entryPath).toString().replace('\\', '/'),
+ Files.newInputStream(entryPath), false,
+ section);
+ } catch (IOException e) {
+ throw new UncheckedIOException(e);
+ }
+ }
+
+ @Override
+ public Consumer defaultImageWriter(Path path, OutputStream out) {
+ return new DefaultEntryWriter(path, out);
+ }
+
+ private static class DefaultEntryWriter implements Consumer {
+ private final Path root;
+ private final OutputStream out;
+
+ DefaultEntryWriter(Path root, OutputStream out) {
+ this.root = root;
+ this.out = out;
+ }
+
+ @Override
+ public void accept(Archive.Entry entry) {
+ try {
+ FileEntry e = (FileEntry)entry;
+ Section section = e.getSection();
+ String filename = e.getName();
+
+ try (InputStream in = entry.getInputStream()) {
+ switch (section) {
+ case CLASSES:
+ if (!filename.startsWith("_the.") && !filename.equals("javac_state"))
+ writeEntry(in);
+ break;
+ case LIBS:
+ writeEntry(in, destFile(nativeDir(filename), filename));
+ break;
+ case CMDS:
+ Path path = destFile("bin", filename);
+ writeEntry(in, path);
+ path.toFile().setExecutable(true);
+ break;
+ case CONFIGS:
+ writeEntry(in, destFile("conf", filename));
+ break;
+ default:
+ throw new InternalError("unexpected entry: " + filename);
+ }
+ }
+ } catch (IOException x) {
+ throw new UncheckedIOException(x);
+ }
+ }
+
+ private Path destFile(String dir, String filename) {
+ return root.resolve(dir).resolve(filename);
+ }
+
+ private static void writeEntry(InputStream in, Path dstFile) throws IOException {
+ if (Files.notExists(dstFile.getParent()))
+ Files.createDirectories(dstFile.getParent());
+ Files.copy(in, dstFile);
+ }
+
+ private void writeEntry(InputStream in) throws IOException {
+ byte[] buf = new byte[8192];
+ int n;
+ while ((n = in.read(buf)) > 0)
+ out.write(buf, 0, n);
+ }
+
+ private static String nativeDir(String filename) {
+ if (System.getProperty("os.name").startsWith("Windows")) {
+ if (filename.endsWith(".dll"))
+ return "bin";
+ else
+ return "lib";
+ } else {
+ return "lib";
+ }
+ }
+ }
+}
+
diff --git a/jdk/make/src/classes/build/tools/module/ModulesXmlReader.java b/jdk/make/src/classes/build/tools/module/ModulesXmlReader.java
index 0d1121867d2..e8b2d546a04 100644
--- a/jdk/make/src/classes/build/tools/module/ModulesXmlReader.java
+++ b/jdk/make/src/classes/build/tools/module/ModulesXmlReader.java
@@ -60,7 +60,6 @@ public class ModulesXmlReader {
private static final String DEPEND = "depend";
private static final String EXPORT = "export";
private static final String TO = "to";
- private static final String INCLUDE = "include";
private static final QName REEXPORTS = new QName("re-exports");
private static Set load(InputStream in)
throws XMLStreamException, IOException
@@ -102,8 +101,6 @@ public class ModulesXmlReader {
}
mb.require(getData(stream), reexports);
break;
- case INCLUDE:
- throw new RuntimeException("unexpected " + event);
case EXPORT:
pkg = getNextTag(stream, NAME);
break;
diff --git a/jdk/make/src/classes/build/tools/module/ModulesXmlWriter.java b/jdk/make/src/classes/build/tools/module/ModulesXmlWriter.java
index 51ad32ab9a1..00fa866424e 100644
--- a/jdk/make/src/classes/build/tools/module/ModulesXmlWriter.java
+++ b/jdk/make/src/classes/build/tools/module/ModulesXmlWriter.java
@@ -54,7 +54,6 @@ public final class ModulesXmlWriter {
private static final String DEPEND = "depend";
private static final String EXPORT = "export";
private static final String TO = "to";
- private static final String INCLUDE = "include";
private static final QName REEXPORTS = new QName("re-exports");
private static void writeXML(Set modules, Path path)
@@ -143,8 +142,6 @@ public final class ModulesXmlWriter {
.filter(e -> !e.getValue().isEmpty())
.sorted(Map.Entry.comparingByKey())
.forEach(e -> writeExportElement(xtw, e.getKey(), e.getValue(), depth+1));
- m.packages().stream().sorted()
- .forEach(p -> writeElement(xtw, INCLUDE, p, depth+1));
writeEndElement(xtw, depth);
} catch (XMLStreamException e) {
throw new RuntimeException(e);
diff --git a/jdk/make/src/classes/build/tools/module/boot.modules b/jdk/make/src/classes/build/tools/module/boot.modules
new file mode 100644
index 00000000000..396e13c4db3
--- /dev/null
+++ b/jdk/make/src/classes/build/tools/module/boot.modules
@@ -0,0 +1,35 @@
+java.base
+java.desktop
+java.activation
+java.annotations.common
+java.compiler
+java.corba
+java.instrument
+java.logging
+java.management
+java.naming
+java.prefs
+java.rmi
+java.scripting
+java.security.acl
+java.security.jgss
+java.security.sasl
+java.smartcardio
+java.sql
+java.sql.rowset
+java.xml
+java.xml.bind
+java.xml.crypto
+java.xml.soap
+java.xml.ws
+jdk.charsets
+jdk.deploy
+jdk.deploy.osx
+jdk.hprof.agent
+jdk.httpserver
+jdk.naming.rmi
+jdk.sctp
+jdk.security.auth
+jdk.security.jgss
+jdk.jfr
+jdk.snmp
diff --git a/jdk/make/src/classes/build/tools/module/ext.modules b/jdk/make/src/classes/build/tools/module/ext.modules
new file mode 100644
index 00000000000..93b8dd5b00a
--- /dev/null
+++ b/jdk/make/src/classes/build/tools/module/ext.modules
@@ -0,0 +1,9 @@
+jdk.crypto.ec
+jdk.crypto.mscapi
+jdk.crypto.pkcs11
+jdk.crypto.ucrypto
+jdk.localedata
+jdk.naming.dns
+jdk.scripting.nashorn
+jdk.zipfs
+oracle.accessbridge
diff --git a/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/ResultSet.java b/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/ResultSet.java
index d8da28384fa..f84f8835901 100644
--- a/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/ResultSet.java
+++ b/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/ResultSet.java
@@ -81,8 +81,6 @@ public class ResultSet {
"java.class.path",
"java.library.path",
"java.io.tmpdir",
- "java.ext.dirs",
- "java.endorsed.dirs",
"java.util.prefs.PreferencesFactory",
"sun.java2d.fontpath",
"sun.boot.library.path",
diff --git a/jdk/src/java.base/share/classes/META-INF/services/java.nio.file.spi.FileSystemProvider b/jdk/src/java.base/share/classes/META-INF/services/java.nio.file.spi.FileSystemProvider
new file mode 100644
index 00000000000..959e2fb36b4
--- /dev/null
+++ b/jdk/src/java.base/share/classes/META-INF/services/java.nio.file.spi.FileSystemProvider
@@ -0,0 +1 @@
+jdk.internal.jrtfs.JrtFileSystemProvider
diff --git a/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java b/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java
index cac7298ab69..dd7320b394c 100644
--- a/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java
+++ b/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. 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
@@ -130,7 +130,7 @@ final class SSLSecurity {
* this class and all the SPI classes in javax.crypto are
* loaded by the same class loader.) That is, unless they
* give us a SPI class that doesn't exist, say SSLFoo,
- * or someone has removed classes from the jsse.jar file.
+ * or someone has removed classes from the java.base module.
*/
Class> typeClassJavax;
diff --git a/jdk/src/java.base/share/classes/java/lang/System.java b/jdk/src/java.base/share/classes/java/lang/System.java
index 345cdae1df7..1871774a022 100644
--- a/jdk/src/java.base/share/classes/java/lang/System.java
+++ b/jdk/src/java.base/share/classes/java/lang/System.java
@@ -582,8 +582,6 @@ public final class System {
*
Default temp file path
*
java.compiler
*
Name of JIT compiler to use
- *
java.ext.dirs
- *
Path of extension directory or directories
*
os.name
*
Operating system name
*
os.arch
diff --git a/jdk/src/java.base/share/classes/java/net/URL.java b/jdk/src/java.base/share/classes/java/net/URL.java
index e0abaace2b5..6d50d1c4262 100644
--- a/jdk/src/java.base/share/classes/java/net/URL.java
+++ b/jdk/src/java.base/share/classes/java/net/URL.java
@@ -1106,6 +1106,11 @@ public final class URL implements java.io.Serializable {
security.checkSetFactory();
}
handlers.clear();
+
+ // ensure the core protocol handlers are loaded before setting
+ // a custom URLStreamHandlerFactory
+ ensureHandlersLoaded("jrt", "jar", "file");
+
// safe publication of URLStreamHandlerFactory with volatile write
factory = fac;
}
@@ -1219,6 +1224,16 @@ public final class URL implements java.io.Serializable {
}
+ /**
+ * Ensures that the given protocol handlers are loaded
+ */
+ private static void ensureHandlersLoaded(String... protocols) {
+ for (String protocol: protocols) {
+ getURLStreamHandler(protocol);
+ }
+ }
+
+
/**
* WriteObject is called to save the state of the URL to an
* ObjectOutputStream. The handler is not saved since it is
diff --git a/jdk/src/java.base/share/classes/java/nio/charset/spi/CharsetProvider.java b/jdk/src/java.base/share/classes/java/nio/charset/spi/CharsetProvider.java
index bc1ec91fc5a..f859245a9dc 100644
--- a/jdk/src/java.base/share/classes/java/nio/charset/spi/CharsetProvider.java
+++ b/jdk/src/java.base/share/classes/java/nio/charset/spi/CharsetProvider.java
@@ -35,8 +35,7 @@ import java.util.Iterator;
*
A charset provider is a concrete subclass of this class that has a
* zero-argument constructor and some number of associated charset
* implementation classes. Charset providers may be installed in an instance
- * of the Java platform as extensions, that is, jar files placed into any of
- * the usual extension directories. Providers may also be made available by
+ * of the Java platform as extensions. Providers may also be made available by
* adding them to the applet or application class path or by some other
* platform-specific means. Charset providers are looked up via the current
* thread's {@link java.lang.Thread#getContextClassLoader() context class
diff --git a/jdk/src/java.base/share/classes/java/nio/file/FileSystems.java b/jdk/src/java.base/share/classes/java/nio/file/FileSystems.java
index a38aaae63b6..17c295e95ef 100644
--- a/jdk/src/java.base/share/classes/java/nio/file/FileSystems.java
+++ b/jdk/src/java.base/share/classes/java/nio/file/FileSystems.java
@@ -54,7 +54,7 @@ import java.lang.reflect.Constructor;
* system class loader cannot be found then the extension class loader is used;
* if there is no extension class loader then the bootstrap class loader is used.
* Providers are typically installed by placing them in a JAR file on the
- * application class path or in the extension directory, the JAR file contains a
+ * application class path, the JAR file contains a
* provider-configuration file named {@code java.nio.file.spi.FileSystemProvider}
* in the resource directory {@code META-INF/services}, and the file lists one or
* more fully-qualified names of concrete subclass of {@link FileSystemProvider}
diff --git a/jdk/src/java.base/share/classes/java/nio/file/Files.java b/jdk/src/java.base/share/classes/java/nio/file/Files.java
index 18ef214e9a0..496b4160447 100644
--- a/jdk/src/java.base/share/classes/java/nio/file/Files.java
+++ b/jdk/src/java.base/share/classes/java/nio/file/Files.java
@@ -1581,8 +1581,8 @@ public final class Files {
* loader. If the system class loader cannot be found then the extension class
* loader is used; If the extension class loader cannot be found then the
* bootstrap class loader is used. File type detectors are typically installed
- * by placing them in a JAR file on the application class path or in the
- * extension directory, the JAR file contains a provider-configuration file
+ * by placing them in a JAR file on the application class path,
+ * the JAR file contains a provider-configuration file
* named {@code java.nio.file.spi.FileTypeDetector} in the resource directory
* {@code META-INF/services}, and the file lists one or more fully-qualified
* names of concrete subclass of {@code FileTypeDetector } that have a zero
diff --git a/jdk/src/java.base/share/classes/java/security/Security.java b/jdk/src/java.base/share/classes/java/security/Security.java
index e24c0023f77..11e1a997639 100644
--- a/jdk/src/java.base/share/classes/java/security/Security.java
+++ b/jdk/src/java.base/share/classes/java/security/Security.java
@@ -212,7 +212,7 @@ public final class Security {
// maybe check for a system property which will specify where to
// look. Someday.
String sep = File.separator;
- return new File(System.getProperty("java.home") + sep + "lib" + sep +
+ return new File(System.getProperty("java.home") + sep + "conf" + sep +
"security" + sep + filename);
}
diff --git a/jdk/src/java.base/share/classes/java/util/Currency.java b/jdk/src/java.base/share/classes/java/util/Currency.java
index 5af9c7193ca..f5f67b2e58d 100644
--- a/jdk/src/java.base/share/classes/java/util/Currency.java
+++ b/jdk/src/java.base/share/classes/java/util/Currency.java
@@ -30,6 +30,7 @@ import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileReader;
+import java.io.InputStream;
import java.io.IOException;
import java.io.Serializable;
import java.security.AccessController;
@@ -213,8 +214,11 @@ public final class Currency implements Serializable {
@Override
public Void run() {
try {
- try (DataInputStream dis = new DataInputStream(
- new BufferedInputStream(getClass().getResourceAsStream("/java/util/currency.data")))) {
+ try (InputStream in = getClass().getResourceAsStream("/java/util/currency.data")) {
+ if (in == null) {
+ throw new InternalError("Currency data not found");
+ }
+ DataInputStream dis = new DataInputStream(new BufferedInputStream(in));
if (dis.readInt() != MAGIC_NUMBER) {
throw new InternalError("Currency data is possibly corrupted");
}
diff --git a/jdk/src/java.base/share/classes/java/util/ServiceLoader.java b/jdk/src/java.base/share/classes/java/util/ServiceLoader.java
index 49b1b58d477..cf158916d07 100644
--- a/jdk/src/java.base/share/classes/java/util/ServiceLoader.java
+++ b/jdk/src/java.base/share/classes/java/util/ServiceLoader.java
@@ -46,10 +46,8 @@ import java.util.NoSuchElementException;
*
A service is a well-known set of interfaces and (usually
* abstract) classes. A service provider is a specific implementation
* of a service. The classes in a provider typically implement the interfaces
- * and subclass the classes defined in the service itself. Service providers
- * can be installed in an implementation of the Java platform in the form of
- * extensions, that is, jar files placed into any of the usual extension
- * directories. Providers can also be made available by adding them to the
+ * and subclass the classes defined in the service itself.
+ * Providers can be made available by adding them to the
* application's class path or by some other platform-specific means.
*
*
For the purpose of loading, a service is represented by a single type,
diff --git a/jdk/src/java.base/share/classes/java/util/jar/Attributes.java b/jdk/src/java.base/share/classes/java/util/jar/Attributes.java
index 37efbd47481..6d66f8c7993 100644
--- a/jdk/src/java.base/share/classes/java/util/jar/Attributes.java
+++ b/jdk/src/java.base/share/classes/java/util/jar/Attributes.java
@@ -544,10 +544,9 @@ public class Attributes implements Map
+ *
+ * @deprecated this class will be removed in a future release.
* @author Jerome Dochez
*/
+@Deprecated
public class ExtensionDependency {
/* Callbak interfaces to delegate installation of missing extensions */
diff --git a/jdk/src/java.base/share/classes/sun/misc/ExtensionInfo.java b/jdk/src/java.base/share/classes/sun/misc/ExtensionInfo.java
index 3fc17bf7339..e6aad939eb8 100644
--- a/jdk/src/java.base/share/classes/sun/misc/ExtensionInfo.java
+++ b/jdk/src/java.base/share/classes/sun/misc/ExtensionInfo.java
@@ -38,8 +38,10 @@ import java.lang.Character.*;
* This class holds all necessary information to install or
* upgrade a extension on the user's disk
*
+ * @deprecated this class will be removed in a future release.
* @author Jerome Dochez
*/
+@Deprecated
public class ExtensionInfo {
/**
diff --git a/jdk/src/java.base/share/classes/sun/misc/ExtensionInstallationException.java b/jdk/src/java.base/share/classes/sun/misc/ExtensionInstallationException.java
index 1bf6ff97d04..98ff3d3b9fe 100644
--- a/jdk/src/java.base/share/classes/sun/misc/ExtensionInstallationException.java
+++ b/jdk/src/java.base/share/classes/sun/misc/ExtensionInstallationException.java
@@ -29,9 +29,10 @@ package sun.misc;
* Exception when installation of an extension has failed for
* any reason
*
+ * @deprecated this class will be removed in a future release.
* @author Jerome Dochez
*/
-
+@Deprecated
public class ExtensionInstallationException extends Exception {
static final long serialVersionUID = 3139688306909345924L;
diff --git a/jdk/src/java.base/share/classes/sun/misc/ExtensionInstallationProvider.java b/jdk/src/java.base/share/classes/sun/misc/ExtensionInstallationProvider.java
index 0b24a13574a..438e396b2c2 100644
--- a/jdk/src/java.base/share/classes/sun/misc/ExtensionInstallationProvider.java
+++ b/jdk/src/java.base/share/classes/sun/misc/ExtensionInstallationProvider.java
@@ -30,8 +30,10 @@ package sun.misc;
* provided to the extension installation dependency mechanism to
* install new extensions on the user's disk
*
+ * @deprecated this class will be removed in a future release.
* @author Jerome Dochez
*/
+@Deprecated
public interface ExtensionInstallationProvider {
/*
diff --git a/jdk/src/java.base/share/classes/sun/misc/JarFilter.java b/jdk/src/java.base/share/classes/sun/misc/JarFilter.java
index 0af055f74cc..b4db96db08f 100644
--- a/jdk/src/java.base/share/classes/sun/misc/JarFilter.java
+++ b/jdk/src/java.base/share/classes/sun/misc/JarFilter.java
@@ -34,8 +34,10 @@ import java.io.FilenameFilter;
* This class is used in extension installation support (ExtensionDependency).
*
*
+ * @deprecated this class will be removed in a future release.
* @author Michael Colburn
*/
+@Deprecated
public class JarFilter implements FilenameFilter {
public boolean accept(File dir, String name) {
diff --git a/jdk/src/java.base/share/classes/sun/misc/Launcher.java b/jdk/src/java.base/share/classes/sun/misc/Launcher.java
index 75310f5aa0e..62590143bcd 100644
--- a/jdk/src/java.base/share/classes/sun/misc/Launcher.java
+++ b/jdk/src/java.base/share/classes/sun/misc/Launcher.java
@@ -26,17 +26,13 @@
package sun.misc;
import java.io.File;
-import java.io.IOException;
import java.io.FilePermission;
+import java.io.IOException;
import java.net.URL;
import java.net.URLClassLoader;
import java.net.MalformedURLException;
import java.net.URLStreamHandler;
import java.net.URLStreamHandlerFactory;
-import java.util.HashSet;
-import java.util.StringTokenizer;
-import java.util.Set;
-import java.util.Vector;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.security.PrivilegedExceptionAction;
@@ -46,17 +42,26 @@ import java.security.Permissions;
import java.security.Permission;
import java.security.ProtectionDomain;
import java.security.CodeSource;
-import sun.security.util.SecurityConstants;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
import sun.net.www.ParseUtil;
+import sun.security.util.SecurityConstants;
/**
* This class is used by the system to launch the main application.
Launcher */
public class Launcher {
+
+ // ensure URLClassPath for boot loader is initialized first
+ static {
+ URLClassPath ucp = BootClassPathHolder.bcp;
+ }
+
private static URLStreamHandlerFactory factory = new Factory();
private static Launcher launcher = new Launcher();
- private static String bootClassPath =
- System.getProperty("sun.boot.class.path");
public static Launcher getLauncher() {
return launcher;
@@ -129,10 +134,7 @@ public class Launcher {
* create an ExtClassLoader. The ExtClassLoader is created
* within a context that limits which files it can read
*/
- public static ExtClassLoader getExtClassLoader() throws IOException
- {
- final File[] dirs = getExtDirs();
-
+ public static ExtClassLoader getExtClassLoader() throws IOException {
try {
// Prior implementations of this doPrivileged() block supplied
// aa synthesized ACC via a call to the private method
@@ -141,11 +143,15 @@ public class Launcher {
return AccessController.doPrivileged(
new PrivilegedExceptionAction() {
public ExtClassLoader run() throws IOException {
- int len = dirs.length;
- for (int i = 0; i < len; i++) {
- MetaIndex.registerDirectory(dirs[i]);
- }
- return new ExtClassLoader(dirs);
+ // ext modules linked into image
+ String home = System.getProperty("java.home");
+ File dir = new File(new File(home, "lib"), "modules");
+ File jimage = new File(dir, "extmodules.jimage");
+
+ File jfxrt = new File(new File(home, "lib"), "jfxrt.jar");
+ File[] files = jfxrt.exists() ? new File[] {jimage, jfxrt}
+ : new File[] {jimage};
+ return new ExtClassLoader(files);
}
});
} catch (java.security.PrivilegedActionException e) {
@@ -160,87 +166,17 @@ public class Launcher {
/*
* Creates a new ExtClassLoader for the specified directories.
*/
- public ExtClassLoader(File[] dirs) throws IOException {
- super(getExtURLs(dirs), null, factory);
+ public ExtClassLoader(File[] files) throws IOException {
+ super(getExtURLs(files), null, factory);
}
- private static File[] getExtDirs() {
- String s = System.getProperty("java.ext.dirs");
- File[] dirs;
- if (s != null) {
- StringTokenizer st =
- new StringTokenizer(s, File.pathSeparator);
- int count = st.countTokens();
- dirs = new File[count];
- for (int i = 0; i < count; i++) {
- dirs[i] = new File(st.nextToken());
- }
- } else {
- dirs = new File[0];
+ private static URL[] getExtURLs(File[] files) throws IOException {
+ int len = files.length;
+ URL[] urls = new URL[len];
+ for (int i=0; i urls = new Vector();
- for (int i = 0; i < dirs.length; i++) {
- String[] files = dirs[i].list();
- if (files != null) {
- for (int j = 0; j < files.length; j++) {
- if (!files[j].equals("meta-index")) {
- File f = new File(dirs[i], files[j]);
- urls.add(getFileURL(f));
- }
- }
- }
- }
- URL[] ua = new URL[urls.size()];
- urls.copyInto(ua);
- return ua;
- }
-
- /*
- * Searches the installed extension directories for the specified
- * library name. For each extension directory, we first look for
- * the native library in the subdirectory whose name is the value
- * of the system property os.arch. Failing that, we
- * look in the extension directory itself.
- */
- public String findLibrary(String name) {
- final String libname = System.mapLibraryName(name);
- URL[] urls = super.getURLs();
- File prevDir = null;
- for (int i = 0; i < urls.length; i++) {
- // Get the ext directory from the URL
- File dir = new File(urls[i].getPath()).getParentFile();
- if (dir != null && !dir.equals(prevDir)) {
- // Look in architecture-specific subdirectory first
- // Read from the saved system properties to avoid deadlock
- final String arch = VM.getSavedProperty("os.arch");
- String pathname = AccessController.doPrivileged(
- new PrivilegedAction() {
- public String run() {
- if (arch != null) {
- File file = new File(new File(dir, arch), libname);
- if (file.exists()) {
- return file.getAbsolutePath();
- }
- }
- // Then check the extension directory
- File file = new File(dir, libname);
- if (file.exists()) {
- return file.getAbsolutePath();
- }
- return null;
- }
- });
- if (pathname != null) {
- return pathname;
- }
- }
- prevDir = dir;
- }
- return null;
+ return urls;
}
private static AccessControlContext getContext(File[] dirs)
@@ -274,8 +210,18 @@ public class Launcher {
public static ClassLoader getAppClassLoader(final ClassLoader extcl)
throws IOException
{
- final String s = System.getProperty("java.class.path");
- final File[] path = (s == null) ? new File[0] : getClassPath(s, true);
+ // modules linked into image are prepended to class path
+ String home = System.getProperty("java.home");
+ File dir = new File(new File(home, "lib"), "modules");
+ String jimage = new File(dir, "appmodules.jimage").getPath();
+
+ String cp = System.getProperty("java.class.path");
+ if (cp == null) {
+ cp = jimage;
+ } else {
+ cp = jimage + File.pathSeparator + cp;
+ }
+ final File[] path = getClassPath(cp, true);
// Note: on bugid 4256530
// Prior implementations of this doPrivileged() block supplied
@@ -287,9 +233,8 @@ public class Launcher {
return AccessController.doPrivileged(
new PrivilegedAction() {
public AppClassLoader run() {
- URL[] urls =
- (s == null) ? new URL[0] : pathToURLs(path);
- return new AppClassLoader(urls, extcl);
+ URL[] urls = pathToURLs(path);
+ return new AppClassLoader(urls, extcl);
}
});
}
@@ -320,8 +265,7 @@ public class Launcher {
/**
* allow any classes loaded from classpath to exit the VM.
*/
- protected PermissionCollection getPermissions(CodeSource codesource)
- {
+ protected PermissionCollection getPermissions(CodeSource codesource) {
PermissionCollection perms = super.getPermissions(codesource);
perms.add(new RuntimePermission("exitVM"));
return perms;
@@ -368,11 +312,12 @@ public class Launcher {
private static class BootClassPathHolder {
static final URLClassPath bcp;
static {
- URL[] urls;
- if (bootClassPath != null) {
- urls = AccessController.doPrivileged(
+ URL[] urls = AccessController.doPrivileged(
new PrivilegedAction() {
public URL[] run() {
+ String bootClassPath = System.getProperty("sun.boot.class.path");
+ if (bootClassPath == null)
+ return new URL[0];
// Skip empty path in boot class path i.e. not default to use CWD
File[] classPath = getClassPath(bootClassPath, false);
int len = classPath.length;
@@ -392,9 +337,6 @@ public class Launcher {
}
}
);
- } else {
- urls = new URL[0];
- }
bcp = new URLClassPath(urls, factory);
}
}
diff --git a/jdk/src/java.base/share/classes/sun/misc/URLClassPath.java b/jdk/src/java.base/share/classes/sun/misc/URLClassPath.java
index dca817148a5..04321d65512 100644
--- a/jdk/src/java.base/share/classes/sun/misc/URLClassPath.java
+++ b/jdk/src/java.base/share/classes/sun/misc/URLClassPath.java
@@ -25,33 +25,51 @@
package sun.misc;
-import java.util.*;
+import java.io.ByteArrayInputStream;
+import java.io.Closeable;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.HttpURLConnection;
+import java.net.JarURLConnection;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.net.URLStreamHandler;
+import java.net.URLStreamHandlerFactory;
+import java.security.AccessControlException;
+import java.security.AccessController;
+import java.security.CodeSigner;
+import java.security.Permission;
+import java.security.PrivilegedExceptionAction;
+import java.security.cert.Certificate;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.NoSuchElementException;
+import java.util.Set;
+import java.util.Stack;
+import java.util.StringTokenizer;
+import java.util.concurrent.atomic.AtomicInteger;
import java.util.jar.JarFile;
-import sun.misc.JarIndex;
-import sun.misc.InvalidJarIndexException;
-import sun.net.www.ParseUtil;
import java.util.zip.ZipEntry;
import java.util.jar.JarEntry;
import java.util.jar.Manifest;
import java.util.jar.Attributes;
import java.util.jar.Attributes.Name;
-import java.net.JarURLConnection;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLConnection;
-import java.net.HttpURLConnection;
-import java.net.URLStreamHandler;
-import java.net.URLStreamHandlerFactory;
-import java.io.*;
-import java.security.AccessController;
-import java.security.AccessControlException;
-import java.security.CodeSigner;
-import java.security.Permission;
-import java.security.PrivilegedAction;
-import java.security.PrivilegedExceptionAction;
-import java.security.cert.Certificate;
-import sun.misc.FileURLMapper;
+
+import jdk.internal.jimage.ImageLocation;
+import jdk.internal.jimage.ImageReader;
+
import sun.net.util.URLUtil;
+import sun.net.www.ParseUtil;
+import sun.net.www.protocol.jrt.JavaRuntimeURLConnection;
/**
* This class is used to maintain a search path of URLs for loading classes
@@ -60,12 +78,15 @@ import sun.net.util.URLUtil;
* @author David Connelly
*/
public class URLClassPath {
- final static String USER_AGENT_JAVA_VERSION = "UA-Java-Version";
- final static String JAVA_VERSION;
+ private static final String USER_AGENT_JAVA_VERSION = "UA-Java-Version";
+ private static final String JAVA_HOME;
+ private static final String JAVA_VERSION;
private static final boolean DEBUG;
private static final boolean DISABLE_JAR_CHECKING;
static {
+ JAVA_HOME = java.security.AccessController.doPrivileged(
+ new sun.security.action.GetPropertyAction("java.home"));
JAVA_VERSION = java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction("java.version"));
DEBUG = (java.security.AccessController.doPrivileged(
@@ -363,6 +384,10 @@ public class URLClassPath {
return new Loader(url);
}
} else {
+ if (file != null && "file".equals(url.getProtocol())) {
+ if (file.endsWith(".jimage"))
+ return new JImageLoader(url);
+ }
return new JarLoader(url, jarHandler, lmap);
}
}
@@ -980,7 +1005,6 @@ public class URLClassPath {
}
ensureOpen();
- parseExtensionsDependencies();
if (SharedSecrets.javaUtilJarAccess().jarFileHasClassPathAttribute(jar)) { // Only get manifest when necessary
Manifest man = jar.getManifest();
@@ -997,13 +1021,6 @@ public class URLClassPath {
return null;
}
- /*
- * parse the standard extension dependencies
- */
- private void parseExtensionsDependencies() throws IOException {
- ExtensionDependency.checkExtensionsDependencies(jar);
- }
-
/*
* Parses value of the Class-Path manifest attribute and returns
* an array of URLs relative to the specified base URL.
@@ -1095,4 +1112,132 @@ public class URLClassPath {
return null;
}
}
+
+ /**
+ * A Loader of classes and resources from a jimage file located in the
+ * runtime image.
+ */
+ private static class JImageLoader
+ extends Loader implements JavaRuntimeURLConnection.ResourceFinder
+ {
+ private static final AtomicInteger NEXT_INDEX = new AtomicInteger();
+
+ private final ImageReader jimage;
+ private final int index;
+
+ JImageLoader(URL url) throws IOException {
+ super(url);
+
+ // get path to image file and check that it's in the runtime
+ String urlPath = url.getFile().replace('/', File.separatorChar);
+
+ File filePath = new File(ParseUtil.decode(urlPath));
+ File home = new File(JAVA_HOME).getCanonicalFile();
+ File parent = filePath.getParentFile();
+ while (parent != null) {
+ if (parent.equals(home))
+ break;
+ parent = parent.getParentFile();
+ }
+ if (parent == null)
+ throw new IOException(filePath + " not in runtime image");
+
+ this.jimage = ImageReader.open(filePath.toString());
+ this.index = NEXT_INDEX.getAndIncrement();
+
+ // register with the jimage protocol handler
+ JavaRuntimeURLConnection.register(this);
+ }
+
+ /**
+ * Maps the given resource name to a module.
+ */
+ private String nameToModule(String name) {
+ int pos = name.lastIndexOf('/');
+ if (pos > 0) {
+ String pkg = name.substring(0, pos);
+ String module = jimage.getModule(pkg);
+ if (module != null)
+ return module;
+ }
+ // cannot map to module
+ return "UNNAMED" + index;
+ }
+
+ /**
+ * Constructs a URL for the resource name.
+ */
+ private URL toURL(String name) {
+ String module = nameToModule(name);
+ String encodedName = ParseUtil.encodePath(name, false);
+ try {
+ return new URL("jrt:/" + module + "/" + encodedName);
+ } catch (MalformedURLException e) {
+ throw new InternalError(e);
+ }
+ }
+
+ @Override
+ URL findResource(String name, boolean check) {
+ ImageLocation location = jimage.findLocation(name);
+ if (location == null)
+ return null;
+ URL url = toURL(name);
+ if (check) {
+ try {
+ URLClassPath.check(url);
+ } catch (IOException | SecurityException e) {
+ return null;
+ }
+ }
+ return url;
+ }
+
+ @Override
+ Resource getResource(String name, boolean check) {
+ ImageLocation location = jimage.findLocation(name);
+ if (location == null)
+ return null;
+ URL url = toURL(name);
+ if (check) {
+ try {
+ URLClassPath.check(url);
+ } catch (IOException | SecurityException e) {
+ return null;
+ }
+ }
+ return new Resource() {
+ @Override
+ public String getName() { return name; }
+ @Override
+ public URL getURL() { return url; }
+ @Override
+ public URL getCodeSourceURL() {
+ try {
+ return new URL("jrt:/" + nameToModule(name));
+ } catch (MalformedURLException e) {
+ throw new InternalError(e);
+ }
+ }
+ @Override
+ public InputStream getInputStream() throws IOException {
+ byte[] resource = jimage.getResource(location);
+ return new ByteArrayInputStream(resource);
+ }
+ public int getContentLength() {
+ long size = location.getUncompressedSize();
+ return (size > Integer.MAX_VALUE) ? -1 : (int)size;
+ }
+ };
+ }
+
+ @Override
+ public Resource find(String module, String name) throws IOException {
+ String m = nameToModule(name);
+ if (!m.equals(module))
+ return null;
+ // URLConnection will do the permission check
+ return getResource(name, false);
+ }
+ }
}
diff --git a/jdk/src/java.base/share/classes/sun/misc/Version.java.template b/jdk/src/java.base/share/classes/sun/misc/Version.java.template
index dd47869acbd..b6e58e387bc 100644
--- a/jdk/src/java.base/share/classes/sun/misc/Version.java.template
+++ b/jdk/src/java.base/share/classes/sun/misc/Version.java.template
@@ -38,9 +38,6 @@ public class Version {
private static final String java_runtime_name =
"@@java_runtime_name@@";
- private static final String java_profile_name =
- "@@java_profile_name@@";
-
private static final String java_runtime_version =
"@@java_runtime_version@@";
@@ -105,11 +102,6 @@ public class Version {
ps.print(java_runtime_name + " (build " + java_runtime_version);
- if (java_profile_name.length() > 0) {
- // profile name
- ps.print(", profile " + java_profile_name);
- }
-
if (java_runtime_name.indexOf("Embedded") != -1 && isHeadless) {
// embedded builds report headless state
ps.print(", headless");
diff --git a/jdk/src/java.base/share/classes/sun/net/NetProperties.java b/jdk/src/java.base/share/classes/sun/net/NetProperties.java
index 4232d854753..10075e45e3f 100644
--- a/jdk/src/java.base/share/classes/sun/net/NetProperties.java
+++ b/jdk/src/java.base/share/classes/sun/net/NetProperties.java
@@ -62,7 +62,7 @@ public class NetProperties {
throw new Error("Can't find java.home ??");
}
try {
- File f = new File(fname, "lib");
+ File f = new File(fname, "conf");
f = new File(f, "net.properties");
fname = f.getCanonicalPath();
InputStream in = new FileInputStream(fname);
diff --git a/jdk/src/java.base/share/classes/sun/net/www/protocol/jrt/Handler.java b/jdk/src/java.base/share/classes/sun/net/www/protocol/jrt/Handler.java
new file mode 100644
index 00000000000..2495cc73a36
--- /dev/null
+++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/jrt/Handler.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. 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. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.net.www.protocol.jrt;
+
+import java.io.IOException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.net.URLStreamHandler;
+
+/**
+ * Protocol handler for accessing resources in the runtime image.
+ */
+
+public class Handler extends URLStreamHandler {
+ public Handler() { }
+
+ @Override
+ protected URLConnection openConnection(URL url) throws IOException {
+ return new JavaRuntimeURLConnection(url);
+ }
+}
diff --git a/jdk/src/java.base/share/classes/sun/net/www/protocol/jrt/JavaRuntimeURLConnection.java b/jdk/src/java.base/share/classes/sun/net/www/protocol/jrt/JavaRuntimeURLConnection.java
new file mode 100644
index 00000000000..33b6840a8a5
--- /dev/null
+++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/jrt/JavaRuntimeURLConnection.java
@@ -0,0 +1,158 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. 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. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.net.www.protocol.jrt;
+
+import java.io.File;
+import java.io.FilePermission;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.security.AccessController;
+import java.security.Permission;
+import java.security.PrivilegedAction;
+import java.util.List;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import sun.misc.Resource;
+import sun.net.www.ParseUtil;
+import sun.net.www.URLConnection;
+
+/**
+ * URLConnection implementation that can be used to connect to resources
+ * contained in the runtime image.
+ */
+public class JavaRuntimeURLConnection extends URLConnection {
+
+ /**
+ * Finds resource {@code name} in module {@code module}.
+ */
+ public interface ResourceFinder {
+ Resource find(String module, String name) throws IOException;
+ }
+
+ /**
+ * The list of resource finders for jimages in the runtime image.
+ */
+ private static final List finders = new CopyOnWriteArrayList<>();
+
+ /**
+ * Called on behalf of the boot, extension and system class loaders to
+ * register a resource finder.
+ */
+ public static void register(ResourceFinder finder) {
+ finders.add(finder);
+ }
+
+ private static Resource find(String module, String name) throws IOException {
+ for (ResourceFinder finder: finders) {
+ Resource r = finder.find(module, name);
+ if (r != null) return r;
+ }
+ return null;
+ }
+
+ // the module and resource name in the URL
+ private final String module;
+ private final String name;
+
+ // the Resource when connected
+ private volatile Resource resource;
+
+ // the permission to access resources in the runtime image, created lazily
+ private static volatile Permission permission;
+
+ JavaRuntimeURLConnection(URL url) throws IOException {
+ super(url);
+ String path = url.getPath();
+ if (path.length() == 0 || path.charAt(0) != '/')
+ throw new MalformedURLException(url + " missing path or /");
+ if (path.length() == 1) {
+ this.module = null;
+ this.name = null;
+ } else {
+ int pos = path.indexOf('/', 1);
+ if (pos == -1) {
+ this.module = path.substring(1);
+ this.name = null;
+ } else {
+ this.module = path.substring(1, pos);
+ this.name = ParseUtil.decode(path.substring(pos+1));
+ }
+ }
+ }
+
+ @Override
+ public synchronized void connect() throws IOException {
+ if (!connected) {
+ if (name == null) {
+ String s = (module == null) ? "" : module;
+ throw new IOException("cannot connect to jrt:/" + s);
+ }
+ resource = find(module, name);
+ if (resource == null)
+ throw new IOException(module + "/" + name + " not found");
+ connected = true;
+ }
+ }
+
+ @Override
+ public InputStream getInputStream() throws IOException {
+ connect();
+ return resource.getInputStream();
+ }
+
+ @Override
+ public long getContentLengthLong() {
+ try {
+ connect();
+ return resource.getContentLength();
+ } catch (IOException ioe) {
+ return -1L;
+ }
+ }
+
+ @Override
+ public int getContentLength() {
+ long len = getContentLengthLong();
+ return len > Integer.MAX_VALUE ? -1 : (int)len;
+ }
+
+ @Override
+ public Permission getPermission() throws IOException {
+ Permission p = permission;
+ if (p == null) {
+ // using lambda expression here leads to recursive initialization
+ PrivilegedAction pa = new PrivilegedAction() {
+ public String run() { return System.getProperty("java.home"); }
+ };
+ String home = AccessController.doPrivileged(pa);
+ p = new FilePermission(home + File.separator + "-", "read");
+ permission = p;
+ }
+ return p;
+ }
+}
diff --git a/jdk/src/java.base/share/classes/sun/security/jca/ProviderConfig.java b/jdk/src/java.base/share/classes/sun/security/jca/ProviderConfig.java
index edbc899f076..620b2cb5d39 100644
--- a/jdk/src/java.base/share/classes/sun/security/jca/ProviderConfig.java
+++ b/jdk/src/java.base/share/classes/sun/security/jca/ProviderConfig.java
@@ -51,7 +51,7 @@ final class ProviderConfig {
// config file argument of the SunPKCS11-Solaris provider
private static final String P11_SOL_ARG =
- "${java.home}/lib/security/sunpkcs11-solaris.cfg";
+ "${java.home}/conf/security/sunpkcs11-solaris.cfg";
// maximum number of times to try loading a provider before giving up
private final static int MAX_LOAD_TRIES = 30;
diff --git a/jdk/src/java.base/share/classes/sun/security/provider/PolicyFile.java b/jdk/src/java.base/share/classes/sun/security/provider/PolicyFile.java
index 70fae4361fa..ccc8847b300 100644
--- a/jdk/src/java.base/share/classes/sun/security/provider/PolicyFile.java
+++ b/jdk/src/java.base/share/classes/sun/security/provider/PolicyFile.java
@@ -77,7 +77,7 @@ import sun.net.www.ParseUtil;
* auth.policy.url.1, auth.policy.url.2, ...,
* auth.policy.url.X". These properties are set
* in the Java security properties file, which is located in the file named
- * <JAVA_HOME>/lib/security/java.security.
+ * <JAVA_HOME>/conf/security/java.security.
* <JAVA_HOME> refers to the value of the java.home system property,
* and specifies the directory where the JRE is installed.
* Each property value specifies a URL pointing to a
@@ -318,7 +318,7 @@ public class PolicyFile extends java.security.Policy {
* you don't find one. Each of these specify a policy file.
*
* if none of these could be loaded, use a builtin static policy
- * equivalent to the default lib/security/java.policy file.
+ * equivalent to the default conf/security/java.policy file.
*
* if the system property "java.policy" or "java.auth.policy" is defined
* (which is the
@@ -468,7 +468,7 @@ public class PolicyFile extends java.security.Policy {
* Caller did not specify URL via Policy.getInstance.
* Read from URLs listed in the java.security properties file.
*
- * We call initPolicyFile with POLICY , POLICY_URL and then
+ * We call initPolicyFile with POLICY, POLICY_URL and then
* call it with AUTH_POLICY and AUTH_POLICY_URL
* So first we will process the JAVA standard policy
* and then process the JAVA AUTH Policy.
@@ -709,26 +709,6 @@ public class PolicyFile extends java.security.Policy {
// No need to sync because noone has access to newInfo yet
newInfo.policyEntries.add(pe);
- // Add AllPermissions for standard extensions
- String[] extCodebases = PolicyParser.parseExtDirs(
- PolicyParser.EXTDIRS_EXPANSION, 0);
- if (extCodebases != null && extCodebases.length > 0) {
- for (int i = 0; i < extCodebases.length; i++) {
- try {
- pe = new PolicyEntry(canonicalizeCodebase(
- new CodeSource(new URL(extCodebases[i]),
- (Certificate[]) null), false ));
- pe.add(SecurityConstants.ALL_PERMISSION);
-
- // No need to sync because noone has access to
- // newInfo yet
- newInfo.policyEntries.add(pe);
- } catch (Exception e) {
- // this is probably bad (though not dangerous).
- // What should we do?
- }
- }
- }
return null;
}
});
diff --git a/jdk/src/java.base/share/classes/sun/security/provider/PolicyParser.java b/jdk/src/java.base/share/classes/sun/security/provider/PolicyParser.java
index 02a41875ec7..c22f5a4eac7 100644
--- a/jdk/src/java.base/share/classes/sun/security/provider/PolicyParser.java
+++ b/jdk/src/java.base/share/classes/sun/security/provider/PolicyParser.java
@@ -83,14 +83,6 @@ import sun.security.util.ResourcesMgr;
public class PolicyParser {
- private static final String EXTDIRS_PROPERTY = "java.ext.dirs";
- private static final String OLD_EXTDIRS_EXPANSION =
- "${" + EXTDIRS_PROPERTY + "}";
-
- // package-private: used by PolicyFile for static policy
- static final String EXTDIRS_EXPANSION = "${{" + EXTDIRS_PROPERTY + "}}";
-
-
private Vector grantEntries;
private Map domainEntries;
@@ -576,35 +568,8 @@ public class PolicyParser {
try {
if (e.signedBy != null) e.signedBy = expand(e.signedBy);
if (e.codeBase != null) {
-
- // For backward compatibility with 1.4
- if (e.codeBase.equals(OLD_EXTDIRS_EXPANSION)) {
- e.codeBase = EXTDIRS_EXPANSION;
- }
- int es;
- if ((es=e.codeBase.indexOf(EXTDIRS_EXPANSION)) < 0) {
- e.codeBase = expand(e.codeBase, true).replace
- (File.separatorChar, '/');
- } else {
- // expand the system property "java.ext.dirs",
- // parse it into its path components,
- // and then create a grant entry for each component
- String[] extDirs = parseExtDirs(e.codeBase, es);
- if (extDirs != null && extDirs.length > 0) {
- for (int i = 0; i < extDirs.length; i++) {
- GrantEntry newGe = (GrantEntry)e.clone();
- newGe.codeBase = extDirs[i];
- add(newGe);
-
- if (debug != null) {
- debug.println("creating policy entry for " +
- "expanded java.ext.dirs path:\n\t\t" +
- extDirs[i]);
- }
- }
- }
- ignoreEntry = true;
- }
+ e.codeBase = expand(e.codeBase, true).replace
+ (File.separatorChar, '/');
}
} catch (PropertyExpander.ExpandException peee) {
if (debug != null) {
@@ -713,41 +678,6 @@ public class PolicyParser {
return properties;
}
- // package-private: used by PolicyFile for static policy
- static String[] parseExtDirs(String codebase, int start) {
-
- String s = System.getProperty(EXTDIRS_PROPERTY);
- String globalPrefix = (start > 0 ? codebase.substring(0, start) : "file:");
- int end = start + EXTDIRS_EXPANSION.length();
- String globalSuffix = (end < codebase.length() ? codebase.substring(end) :
- (String) null);
-
- String[] dirs = null;
- String localSuffix;
- if (s != null) {
- StringTokenizer st =
- new StringTokenizer(s, File.pathSeparator);
- int count = st.countTokens();
- dirs = new String[count];
- for (int i = 0; i < count; i++) {
- File file = new File(st.nextToken());
- dirs[i] = sun.net.www.ParseUtil.encodePath
- (file.getAbsolutePath());
-
- if (!dirs[i].startsWith("/")) {
- dirs[i] = "/" + dirs[i];
- }
-
- localSuffix = (globalSuffix == null ?
- (dirs[i].endsWith("/") ? "*" : "/*") :
- globalSuffix);
-
- dirs[i] = globalPrefix + dirs[i] + localSuffix;
- }
- }
- return dirs;
- }
-
private boolean peekAndMatch(String expect)
throws ParsingException, IOException
{
diff --git a/jdk/src/java.base/share/classes/sun/util/logging/PlatformLogger.java b/jdk/src/java.base/share/classes/sun/util/logging/PlatformLogger.java
index 37d0409e24e..4e8c48a1eac 100644
--- a/jdk/src/java.base/share/classes/sun/util/logging/PlatformLogger.java
+++ b/jdk/src/java.base/share/classes/sun/util/logging/PlatformLogger.java
@@ -71,10 +71,10 @@ import sun.misc.SharedSecrets;
* java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
*
* Limitation:
- * /lib/logging.properties is the system-wide logging
+ * /conf/logging.properties is the system-wide logging
* configuration defined in the specification and read in the
* default case to configure any java.util.logging.Logger instances.
- * Platform loggers will not detect if /lib/logging.properties
+ * Platform loggers will not detect if /conf/logging.properties
* is modified. In other words, unless the java.util.logging API
* is used at runtime or the logging system properties is set,
* the platform loggers will use the default setting described above.
diff --git a/jdk/src/java.base/share/conf/security/java.policy b/jdk/src/java.base/share/conf/security/java.policy
index db986145e97..3cfcb22a1c0 100644
--- a/jdk/src/java.base/share/conf/security/java.policy
+++ b/jdk/src/java.base/share/conf/security/java.policy
@@ -1,31 +1,25 @@
// permissions required by each component
-grant codeBase "file:${java.home}/lib/ext/zipfs.jar" {
+grant codeBase "jrt:/jdk.zipfs" {
permission java.io.FilePermission "<>", "read,write,delete";
permission java.lang.RuntimePermission "fileSystemProvider";
permission java.util.PropertyPermission "*", "read";
};
-grant codeBase "file:${java.home}/lib/ext/cldrdata.jar" {
+grant codeBase "jrt:/jdk.localedata" {
permission java.lang.RuntimePermission "accessClassInPackage.sun.text.*";
permission java.lang.RuntimePermission "accessClassInPackage.sun.util.*";
permission java.util.PropertyPermission "*", "read";
};
-grant codeBase "file:${java.home}/lib/ext/localedata.jar" {
- permission java.lang.RuntimePermission "accessClassInPackage.sun.text.*";
- permission java.lang.RuntimePermission "accessClassInPackage.sun.util.*";
- permission java.util.PropertyPermission "*", "read";
-};
-
-grant codeBase "file:${java.home}/lib/ext/dnsns.jar" {
+grant codeBase "jrt:/jdk.naming.dns" {
permission java.security.AllPermission;
};
-grant codeBase "file:${java.home}/lib/ext/nashorn.jar" {
+grant codeBase "jrt:/jdk.scripting.nashorn" {
permission java.security.AllPermission;
};
-grant codeBase "file:${java.home}/lib/ext/ucrypto.jar" {
+grant codeBase "jrt:/jdk.crypto.ucrypto" {
permission java.lang.RuntimePermission "accessClassInPackage.sun.security.*";
permission java.lang.RuntimePermission "accessClassInPackage.sun.nio.ch";
permission java.lang.RuntimePermission "loadLibrary.j2ucrypto";
@@ -34,10 +28,10 @@ grant codeBase "file:${java.home}/lib/ext/ucrypto.jar" {
permission java.security.SecurityPermission "putProviderProperty.OracleUcrypto";
permission java.security.SecurityPermission "clearProviderProperties.OracleUcrypto";
permission java.security.SecurityPermission "removeProviderProperty.OracleUcrypto";
- permission java.io.FilePermission "${java.home}/lib/security/ucrypto-solaris.cfg", "read";
+ permission java.io.FilePermission "${java.home}/conf/security/ucrypto-solaris.cfg", "read";
};
-grant codeBase "file:${java.home}/lib/ext/sunec.jar" {
+grant codeBase "jrt:/jdk.crypto.ec" {
permission java.lang.RuntimePermission "accessClassInPackage.sun.security.*";
permission java.lang.RuntimePermission "loadLibrary.sunec";
permission java.util.PropertyPermission "*", "read";
@@ -46,16 +40,7 @@ grant codeBase "file:${java.home}/lib/ext/sunec.jar" {
permission java.security.SecurityPermission "removeProviderProperty.SunEC";
};
-grant codeBase "file:${java.home}/lib/ext/sunjce_provider.jar" {
- permission java.lang.RuntimePermission "accessClassInPackage.sun.misc";
- permission java.lang.RuntimePermission "accessClassInPackage.sun.security.*";
- permission java.util.PropertyPermission "*", "read";
- permission java.security.SecurityPermission "putProviderProperty.SunJCE";
- permission java.security.SecurityPermission "clearProviderProperties.SunJCE";
- permission java.security.SecurityPermission "removeProviderProperty.SunJCE";
-};
-
-grant codeBase "file:${java.home}/lib/ext/sunpkcs11.jar" {
+grant codeBase "jrt:/jdk.crypto.pkcs11" {
permission java.lang.RuntimePermission "accessClassInPackage.sun.security.*";
permission java.lang.RuntimePermission "accessClassInPackage.sun.nio.ch";
permission java.lang.RuntimePermission "loadLibrary.j2pkcs11";
diff --git a/jdk/src/java.base/share/conf/security/java.security b/jdk/src/java.base/share/conf/security/java.security
index 8e44c319f23..63337482fc8 100644
--- a/jdk/src/java.base/share/conf/security/java.security
+++ b/jdk/src/java.base/share/conf/security/java.security
@@ -66,8 +66,8 @@
# List of providers and their preference orders (see above):
#
#ifdef solaris
-security.provider.tbd=com.oracle.security.ucrypto.UcryptoProvider ${java.home}/lib/security/ucrypto-solaris.cfg
-security.provider.tbd=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/sunpkcs11-solaris.cfg
+security.provider.tbd=com.oracle.security.ucrypto.UcryptoProvider ${java.home}/conf/security/ucrypto-solaris.cfg
+security.provider.tbd=sun.security.pkcs11.SunPKCS11 ${java.home}/conf/security/sunpkcs11-solaris.cfg
#endif
security.provider.tbd=sun.security.provider.Sun
security.provider.tbd=sun.security.rsa.SunRsaSign
@@ -162,7 +162,7 @@ policy.provider=sun.security.provider.PolicyFile
# The default is to have a single system-wide policy file,
# and a policy file in the user's home directory.
-policy.url.1=file:${java.home}/lib/security/java.policy
+policy.url.1=file:${java.home}/conf/security/java.policy
policy.url.2=file:${user.home}/.java.policy
# whether or not we expand properties in the policy file
@@ -219,12 +219,14 @@ package.access=sun.,\
com.sun.org.apache.xml.internal.serializer.utils.,\
com.sun.org.apache.xml.internal.utils.,\
com.sun.org.glassfish.,\
+ com.sun.tools.script.,\
com.oracle.xmlns.internal.,\
com.oracle.webservices.internal.,\
org.jcp.xml.dsig.internal.,\
jdk.internal.,\
jdk.nashorn.internal.,\
jdk.nashorn.tools.,\
+ jdk.tools.jimage.,\
com.sun.activation.registries.,\
#ifdef macosx
apple.,\
@@ -268,12 +270,14 @@ package.definition=sun.,\
com.sun.org.apache.xml.internal.serializer.utils.,\
com.sun.org.apache.xml.internal.utils.,\
com.sun.org.glassfish.,\
+ com.sun.tools.script.,\
com.oracle.xmlns.internal.,\
com.oracle.webservices.internal.,\
org.jcp.xml.dsig.internal.,\
jdk.internal.,\
jdk.nashorn.internal.,\
jdk.nashorn.tools.,\
+ jdk.tools.jimage.,\
com.sun.activation.registries.,\
#ifdef macosx
apple.,\
diff --git a/jdk/src/java.base/share/native/libjava/System.c b/jdk/src/java.base/share/native/libjava/System.c
index 5c364602322..d09af8ff78a 100644
--- a/jdk/src/java.base/share/native/libjava/System.c
+++ b/jdk/src/java.base/share/native/libjava/System.c
@@ -314,7 +314,6 @@ Java_java_lang_System_initProperties(JNIEnv *env, jclass cla, jobject props)
// to all protocols
if (sprops->exceptionList) {
PUTPROP(props, "http.nonProxyHosts", sprops->exceptionList);
- // HTTPS: implementation in jsse.jar uses http.nonProxyHosts
PUTPROP(props, "ftp.nonProxyHosts", sprops->exceptionList);
PUTPROP(props, "socksNonProxyHosts", sprops->exceptionList);
}
diff --git a/jdk/src/java.base/share/native/libzip/zip_util.c b/jdk/src/java.base/share/native/libzip/zip_util.c
index de0bb1de9c3..51ee1d5276f 100644
--- a/jdk/src/java.base/share/native/libzip/zip_util.c
+++ b/jdk/src/java.base/share/native/libzip/zip_util.c
@@ -1411,6 +1411,7 @@ InflateFully(jzfile *zip, jzentry *entry, void *buf, char **msg)
}
} while (strm.avail_in > 0);
}
+
inflateEnd(&strm);
return JNI_TRUE;
}
@@ -1482,3 +1483,52 @@ ZIP_ReadEntry(jzfile *zip, jzentry *entry, unsigned char *buf, char *entryname)
return JNI_TRUE;
}
+
+jboolean JNICALL
+ZIP_InflateFully(void *inBuf, jlong inLen, void *outBuf, jlong outLen, char **pmsg)
+{
+ z_stream strm;
+ int i = 0;
+ memset(&strm, 0, sizeof(z_stream));
+
+ *pmsg = 0; /* Reset error message */
+
+ if (inflateInit2(&strm, MAX_WBITS) != Z_OK) {
+ *pmsg = strm.msg;
+ return JNI_FALSE;
+ }
+
+ strm.next_out = (Bytef *) outBuf;
+ strm.avail_out = (uInt)outLen;
+ strm.next_in = (Bytef *) inBuf;
+ strm.avail_in = (uInt)inLen;
+
+ do {
+ switch (inflate(&strm, Z_PARTIAL_FLUSH)) {
+ case Z_OK:
+ break;
+ case Z_STREAM_END:
+ if (strm.total_out != outLen) {
+ *pmsg = "INFLATER_inflateFully: Unexpected end of stream";
+ inflateEnd(&strm);
+ return JNI_FALSE;
+ }
+ break;
+ case Z_DATA_ERROR:
+ *pmsg = "INFLATER_inflateFully: Compressed data corrupted";
+ inflateEnd(&strm);
+ return JNI_FALSE;
+ case Z_MEM_ERROR:
+ *pmsg = "INFLATER_inflateFully: out of memory";
+ inflateEnd(&strm);
+ return JNI_FALSE;
+ default:
+ *pmsg = "INFLATER_inflateFully: internal error";
+ inflateEnd(&strm);
+ return JNI_FALSE;
+ }
+ } while (strm.avail_in > 0);
+
+ inflateEnd(&strm);
+ return JNI_TRUE;
+}
diff --git a/jdk/src/java.base/share/native/libzip/zip_util.h b/jdk/src/java.base/share/native/libzip/zip_util.h
index a64668cd6d9..1287d3aa29e 100644
--- a/jdk/src/java.base/share/native/libzip/zip_util.h
+++ b/jdk/src/java.base/share/native/libzip/zip_util.h
@@ -272,4 +272,8 @@ jint ZIP_Read(jzfile *zip, jzentry *entry, jlong pos, void *buf, jint len);
void ZIP_FreeEntry(jzfile *zip, jzentry *ze);
jlong ZIP_GetEntryDataOffset(jzfile *zip, jzentry *entry);
jzentry * ZIP_GetEntry2(jzfile *zip, char *name, jint ulen, jboolean addSlash);
+
+jboolean JNICALL
+ZIP_InflateFully(void *inBuf, jlong inLen, void *outBuf, jlong outLen, char **pmsg);
+
#endif /* !_ZIP_H_ */
diff --git a/jdk/src/java.base/unix/native/libjava/ConcurrentPReader_md.c b/jdk/src/java.base/unix/native/libjava/ConcurrentPReader_md.c
new file mode 100644
index 00000000000..1bb49d82229
--- /dev/null
+++ b/jdk/src/java.base/unix/native/libjava/ConcurrentPReader_md.c
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. 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. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#include
+#include
+
+#include "jni.h"
+#include "jni_util.h"
+#include "jlong.h"
+#include "jdk_internal_jimage_concurrent_ConcurrentPReader.h"
+
+#ifdef _ALLBSD_SOURCE
+ #define pread64 pread
+#endif
+
+#define RESTARTABLE(_cmd, _result) do { \
+ do { \
+ _result = _cmd; \
+ } while((_result == -1) && (errno == EINTR)); \
+} while(0)
+
+static jfieldID fd_fdID;
+
+JNIEXPORT void JNICALL
+Java_jdk_internal_jimage_concurrent_ConcurrentPReader_initIDs(JNIEnv *env, jclass clazz)
+{
+ CHECK_NULL(clazz = (*env)->FindClass(env, "java/io/FileDescriptor"));
+ CHECK_NULL(fd_fdID = (*env)->GetFieldID(env, clazz, "fd", "I"));
+}
+
+JNIEXPORT jint JNICALL
+Java_jdk_internal_jimage_concurrent_ConcurrentPReader_pread(JNIEnv *env, jclass clazz,
+ jobject fdo, jlong address,
+ jint len, jlong offset)
+{
+ jint fd = (*env)->GetIntField(env, fdo, fd_fdID);
+ void *buf = (void *)jlong_to_ptr(address);
+ int res;
+ RESTARTABLE(pread64(fd, buf, len, offset), res);
+ if (res == -1) {
+ JNU_ThrowIOExceptionWithLastError(env, "pread failed");
+ }
+ return res;
+}
diff --git a/jdk/src/java.base/windows/conf/security/java.policy b/jdk/src/java.base/windows/conf/security/java.policy
index 590e5df3081..01d7bef3f43 100644
--- a/jdk/src/java.base/windows/conf/security/java.policy
+++ b/jdk/src/java.base/windows/conf/security/java.policy
@@ -1,5 +1,5 @@
-grant codeBase "file:${java.home}/lib/ext/sunmscapi.jar" {
- Permission java.lang.RuntimePermission "accessClassInPackage.sun.security.*";
+grant codeBase "jrt:/jdk.crypto.mscapi" {
+ permission java.lang.RuntimePermission "accessClassInPackage.sun.security.*";
permission java.lang.RuntimePermission "loadLibrary.sunmscapi";
permission java.util.PropertyPermission "*", "read";
permission java.security.SecurityPermission "putProviderProperty.SunMSCAPI";
diff --git a/jdk/src/java.base/windows/native/libjava/ConcurrentPReader_md.c b/jdk/src/java.base/windows/native/libjava/ConcurrentPReader_md.c
new file mode 100644
index 00000000000..29df5384abd
--- /dev/null
+++ b/jdk/src/java.base/windows/native/libjava/ConcurrentPReader_md.c
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. 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. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#include
+
+#include "jni_util.h"
+#include "jlong.h"
+#include "jdk_internal_jimage_concurrent_ConcurrentPReader.h"
+
+static jfieldID handle_fdID;
+
+JNIEXPORT void JNICALL
+Java_jdk_internal_jimage_concurrent_ConcurrentPReader_initIDs(JNIEnv *env, jclass clazz)
+{
+ CHECK_NULL(clazz = (*env)->FindClass(env, "java/io/FileDescriptor"));
+ CHECK_NULL(handle_fdID = (*env)->GetFieldID(env, clazz, "handle", "J"));
+}
+
+JNIEXPORT jint JNICALL
+Java_jdk_internal_jimage_concurrent_ConcurrentPReader_pread(JNIEnv *env, jclass clazz,
+ jobject fdo, jlong address,
+ jint len, jlong offset)
+{
+ OVERLAPPED ov;
+ DWORD nread;
+ BOOL result;
+
+ jlong handle = (*env)->GetLongField(env, fdo, handle_fdID);
+ void *buf = (void *)jlong_to_ptr(address);
+
+ ZeroMemory(&ov, sizeof(ov));
+ ov.Offset = (DWORD)offset;
+ ov.OffsetHigh = (DWORD)(offset >> 32);
+
+ result = ReadFile(handle, (LPVOID)buf, len, &nread, &ov);
+ if (result == 0) {
+ JNU_ThrowIOExceptionWithLastError(env, "ReadFile failed");
+ }
+
+ return nread;
+}
+
diff --git a/jdk/src/java.desktop/share/classes/com/sun/media/sound/JDK13Services.java b/jdk/src/java.desktop/share/classes/com/sun/media/sound/JDK13Services.java
index 3805bb8848c..be36779345a 100644
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/JDK13Services.java
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/JDK13Services.java
@@ -64,7 +64,7 @@ public final class JDK13Services {
/**
* Filename of the properties file for default provider properties. This
- * file is searched in the subdirectory "lib" of the JRE directory (this
+ * file is searched in the subdirectory "conf" of the JRE directory (this
* behaviour is hardcoded).
*/
private static final String PROPERTIES_FILENAME = "sound.properties";
diff --git a/jdk/src/java.desktop/share/classes/com/sun/media/sound/JSSecurityManager.java b/jdk/src/java.desktop/share/classes/com/sun/media/sound/JSSecurityManager.java
index 6614b088cf3..8382f15e8c2 100644
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/JSSecurityManager.java
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/JSSecurityManager.java
@@ -81,7 +81,7 @@ final class JSSecurityManager {
@param properties The properties bundle to store the values of the
properties file.
@param filename The filename of the properties file to load. This
- filename is interpreted as relative to the subdirectory "lib" in
+ filename is interpreted as relative to the subdirectory "conf" in
the JRE directory.
*/
static void loadProperties(final Properties properties,
@@ -117,7 +117,7 @@ final class JSSecurityManager {
if (fname == null) {
throw new Error("Can't find java.home ??");
}
- File f = new File(fname, "lib");
+ File f = new File(fname, "conf");
f = new File(f, filename);
fname = f.getCanonicalPath();
InputStream in = new FileInputStream(fname);
diff --git a/jdk/src/java.desktop/share/classes/java/awt/Toolkit.java b/jdk/src/java.desktop/share/classes/java/awt/Toolkit.java
index 2fc0910cc96..985c946f422 100644
--- a/jdk/src/java.desktop/share/classes/java/awt/Toolkit.java
+++ b/jdk/src/java.desktop/share/classes/java/awt/Toolkit.java
@@ -730,7 +730,7 @@ public abstract class Toolkit {
if (properties.size() == 0) {
try {
File propsFile = new File(
- System.getProperty("java.home") + sep + "lib" +
+ System.getProperty("java.home") + sep + "conf" +
sep + "accessibility.properties");
FileInputStream in =
new FileInputStream(propsFile);
diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/spi/IIORegistry.java b/jdk/src/java.desktop/share/classes/javax/imageio/spi/IIORegistry.java
index ca83967bad9..445f03323d7 100644
--- a/jdk/src/java.desktop/share/classes/javax/imageio/spi/IIORegistry.java
+++ b/jdk/src/java.desktop/share/classes/javax/imageio/spi/IIORegistry.java
@@ -64,10 +64,8 @@ import java.util.ServiceConfigurationError;
* ImageWriter, ImageTranscoder,
* ImageInputStream, and ImageOutputStream.
*
- *
Service providers found on the system classpath (typically
- * the lib/ext directory in the Java
- * installation directory) are automatically loaded as soon as this class is
- * instantiated.
+ * Service providers found from the Java platform are automatically
+ * loaded as soon as this class is instantiated.
*
*
When the registerApplicationClasspathSpis method
* is called, service provider instances declared in the
@@ -227,9 +225,7 @@ public final class IIORegistry extends ServiceRegistry {
private void registerInstalledProviders() {
/*
- We need to load installed providers from the
- system classpath (typically the lib/ext
- directory in in the Java installation directory)
+ We need to load installed providers
in the privileged mode in order to
be able read corresponding jar files even if
file read capability is restricted (like the
diff --git a/jdk/src/java.desktop/share/classes/javax/sound/midi/MidiSystem.java b/jdk/src/java.desktop/share/classes/javax/sound/midi/MidiSystem.java
index 4eee72a9d0a..aa8d46b0360 100644
--- a/jdk/src/java.desktop/share/classes/javax/sound/midi/MidiSystem.java
+++ b/jdk/src/java.desktop/share/classes/javax/sound/midi/MidiSystem.java
@@ -65,7 +65,7 @@ import com.sun.media.sound.ReferenceCountingDevice;
* Properties can be used to specify default MIDI devices. Both system
* properties and a properties file are considered. The "sound.properties"
* properties file is read from an implementation-specific location (typically
- * it is the {@code lib} directory in the Java installation directory). If a
+ * it is the {@code conf} directory in the Java installation directory). If a
* property exists both as a system property and in the properties file, the
* system property takes precedence. If none is specified, a suitable default is
* chosen among the available devices. The syntax of the properties file is
diff --git a/jdk/src/java.desktop/share/classes/javax/sound/sampled/AudioSystem.java b/jdk/src/java.desktop/share/classes/javax/sound/sampled/AudioSystem.java
index db528aebb83..8283b9dd4ac 100644
--- a/jdk/src/java.desktop/share/classes/javax/sound/sampled/AudioSystem.java
+++ b/jdk/src/java.desktop/share/classes/javax/sound/sampled/AudioSystem.java
@@ -61,7 +61,7 @@ import com.sun.media.sound.JDK13Services;
* Properties can be used to specify the default mixer for specific line types.
* Both system properties and a properties file are considered. The
* "sound.properties" properties file is read from an implementation-specific
- * location (typically it is the {@code lib} directory in the Java installation
+ * location (typically it is the {@code conf} directory in the Java installation
* directory). If a property exists both as a system property and in the
* properties file, the system property takes precedence. If none is specified,
* a suitable default is chosen among the available devices. The syntax of the
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/UIManager.java b/jdk/src/java.desktop/share/classes/javax/swing/UIManager.java
index 44e9decfc26..7af3e332e94 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/UIManager.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/UIManager.java
@@ -106,7 +106,7 @@ import sun.awt.AWTAccessor;
* use its value as the default look and feel class name. The location
* that is checked for swing.properties may vary depending
* upon the implementation of the Java platform. Typically the
- * swing.properties file is located in the lib
+ * swing.properties file is located in the conf
* subdirectory of the Java installation directory.
* Refer to the release notes of the implementation being used for
* further details.
@@ -281,7 +281,7 @@ public class UIManager implements Serializable
/**
* The location of the swing.properties property file is
* implementation-specific.
- * It is typically located in the lib subdirectory of the Java
+ * It is typically located in the conf subdirectory of the Java
* installation directory. This method returns a bogus filename
* if java.home isn't defined.
*/
@@ -293,7 +293,7 @@ public class UIManager implements Serializable
if (javaHome == null) {
javaHome = "";
}
- return javaHome + sep + "lib" + sep + "swing.properties";
+ return javaHome + sep + "conf" + sep + "swing.properties";
}
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/multi/doc-files/multi_tsc.html b/jdk/src/java.desktop/share/classes/javax/swing/plaf/multi/doc-files/multi_tsc.html
index 3ae0bf2c6c0..512b1a581ea 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/multi/doc-files/multi_tsc.html
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/multi/doc-files/multi_tsc.html
@@ -153,7 +153,7 @@ the Multiplexing look and feel.
It's easy to use auxiliary look and feels with Swing. To instruct
Swing to use the Multiplexing look and feel, all an application
-has to do is modify the $JDKHOME/lib/swing.properties
+has to do is modify the $JDKHOME/conf/swing.properties
file to include a definition of the swing.auxiliarylaf
property. Swing treats the swing.auxiliarylaf
property as a comma-separated list of LookAndFeel
@@ -179,7 +179,7 @@ is named com.smellco.OlfactoryLookAndFeel.
To tell Swing to use both these look and feels
-- and to use a default look and feel at the same time -- your application
-could simply add the following line to the $JDKHOME/lib/swing.properties file:
+could simply add the following line to the $JDKHOME/conf/swing.properties file:
@@ -472,7 +472,7 @@ and Feel
To do that, all the user has to do is modify
- the $JDKHOME/lib/swing.properties
+ the $JDKHOME/conf/swing.properties
file to include a definition of the swing.plaf.multiplexinglaf
property. Swing then treats the swing.plaf.multiplexinglaf
property as a LookAndFeel
@@ -483,7 +483,7 @@ and Feel
that is a better match for their needs than the Multiplexing
look and feel
(javax.swing.plaf.multi.MultiLookAndFeel),
- the user could include the following line in $JDKHOME/lib/swing.properties:
+ the user could include the following line in $JDKHOME/conf/swing.properties:
* If neither of these properties is defined then the LogManager uses its
* default configuration. The default configuration is typically loaded from the
- * properties file "{@code lib/logging.properties}" in the Java installation
+ * properties file "{@code conf/logging.properties}" in the Java installation
* directory.
*
* The properties for loggers and Handlers will have names starting
@@ -1210,7 +1210,7 @@ public class LogManager {
if (fname == null) {
throw new Error("Can't find java.home ??");
}
- File f = new File(fname, "lib");
+ File f = new File(fname, "conf");
f = new File(f, "logging.properties");
fname = f.getCanonicalPath();
}
diff --git a/jdk/src/java.management/share/classes/com/sun/jmx/remote/security/FileLoginModule.java b/jdk/src/java.management/share/classes/com/sun/jmx/remote/security/FileLoginModule.java
index ccea59aa570..93ce806cf1c 100644
--- a/jdk/src/java.management/share/classes/com/sun/jmx/remote/security/FileLoginModule.java
+++ b/jdk/src/java.management/share/classes/com/sun/jmx/remote/security/FileLoginModule.java
@@ -65,7 +65,7 @@ import sun.management.jmxremote.ConnectorBootstrap;
* associated cleartext password. By default, the following password file is
* used:
*
* A different password file can be specified via the passwordFile
* configuration option.
@@ -113,7 +113,7 @@ public class FileLoginModule implements LoginModule {
// Location of the default password file
private static final String DEFAULT_PASSWORD_FILE_NAME =
AccessController.doPrivileged(new GetPropertyAction("java.home")) +
- File.separatorChar + "lib" +
+ File.separatorChar + "conf" +
File.separatorChar + "management" + File.separatorChar +
ConnectorBootstrap.DefaultValues.PASSWORD_FILE_NAME;
diff --git a/jdk/src/java.management/share/classes/com/sun/jmx/remote/security/JMXPluggableAuthenticator.java b/jdk/src/java.management/share/classes/com/sun/jmx/remote/security/JMXPluggableAuthenticator.java
index ab603ef5b1f..f7ab5d70fb6 100644
--- a/jdk/src/java.management/share/classes/com/sun/jmx/remote/security/JMXPluggableAuthenticator.java
+++ b/jdk/src/java.management/share/classes/com/sun/jmx/remote/security/JMXPluggableAuthenticator.java
@@ -66,7 +66,7 @@ import com.sun.jmx.remote.util.EnvHelp;
*
*
To override the default configuration use the
* com.sun.management.jmxremote.login.config management property
- * described in the JRE/lib/management/management.properties file.
+ * described in the JRE/conf/management/management.properties file.
* Set this property to the name of a JAAS configuration entry and ensure that
* the entry is loaded by the installed {@link Configuration}. In addition,
* ensure that the authentication mechanisms specified in the entry acquire
diff --git a/jdk/src/java.management/share/classes/sun/management/Agent.java b/jdk/src/java.management/share/classes/sun/management/Agent.java
index 6a8f710ecc0..226986be994 100644
--- a/jdk/src/java.management/share/classes/sun/management/Agent.java
+++ b/jdk/src/java.management/share/classes/sun/management/Agent.java
@@ -165,7 +165,7 @@ public class Agent {
// Load the management properties from the config file
// if config file is not specified readConfiguration implicitly
- // reads /lib/management/management.properties
+ // reads /conf/management/management.properties
String fname = System.getProperty(CONFIG_FILE);
readConfiguration(fname, configProps);
@@ -404,7 +404,7 @@ public class Agent {
throw new Error("Can't find java.home ??");
}
StringBuilder defaultFileName = new StringBuilder(home);
- defaultFileName.append(File.separator).append("lib");
+ defaultFileName.append(File.separator).append("conf");
defaultFileName.append(File.separator).append("management");
defaultFileName.append(File.separator).append("management.properties");
// Set file name
diff --git a/jdk/src/java.management/share/classes/sun/management/jmxremote/ConnectorBootstrap.java b/jdk/src/java.management/share/classes/sun/management/jmxremote/ConnectorBootstrap.java
index a2f05634c62..4ee5d504a10 100644
--- a/jdk/src/java.management/share/classes/sun/management/jmxremote/ConnectorBootstrap.java
+++ b/jdk/src/java.management/share/classes/sun/management/jmxremote/ConnectorBootstrap.java
@@ -615,11 +615,11 @@ public final class ConnectorBootstrap {
/**
* Compute the full path name for a default file.
* @param basename basename (with extension) of the default file.
- * @return ${JRE}/lib/management/${basename}
+ * @return ${JRE}/conf/management/${basename}
**/
private static String getDefaultFileName(String basename) {
final String fileSeparator = File.separator;
- return System.getProperty("java.home") + fileSeparator + "lib" +
+ return System.getProperty("java.home") + fileSeparator + "conf" +
fileSeparator + "management" + fileSeparator +
basename;
}
diff --git a/jdk/src/java.management/share/conf/jmxremote.access b/jdk/src/java.management/share/conf/jmxremote.access
index ce80b47a1a8..a09e008fe34 100644
--- a/jdk/src/java.management/share/conf/jmxremote.access
+++ b/jdk/src/java.management/share/conf/jmxremote.access
@@ -8,9 +8,9 @@
# passwords. To be functional, a role must have an entry in
# both the password and the access files.
#
-# The default location of this file is $JRE/lib/management/jmxremote.access
-# You can specify an alternate location by specifying a property in
-# the management config file $JRE/lib/management/management.properties
+# The default location of this file is $JRE/conf/management/jmxremote.access
+# You can specify an alternate location by specifying a property in
+# the management config file $JRE/conf/management/management.properties
# (See that file for details)
#
# The file format for password and access files is syntactically the same
@@ -69,7 +69,7 @@
#
#
# Default access control entries:
-# o The "monitorRole" role has readonly access.
+# o The "monitorRole" role has readonly access.
# o The "controlRole" role has readwrite access and can create the standard
# Timer and Monitor MBeans defined by the JMX API.
diff --git a/jdk/src/java.management/share/conf/jmxremote.password.template b/jdk/src/java.management/share/conf/jmxremote.password.template
index a7e7daac554..13dfd2578bb 100644
--- a/jdk/src/java.management/share/conf/jmxremote.password.template
+++ b/jdk/src/java.management/share/conf/jmxremote.password.template
@@ -19,9 +19,9 @@
# access for each role. To be functional, a role must have an entry
# in both the password and the access files.
#
-# Default location of this file is $JRE/lib/management/jmxremote.password
-# You can specify an alternate location by specifying a property in
-# the management config file $JRE/lib/management/management.properties
+# Default location of this file is $JRE/conf/management/jmxremote.password
+# You can specify an alternate location by specifying a property in
+# the management config file $JRE/conf/management/management.properties
# or by specifying a system property (See that file for details).
@@ -30,7 +30,7 @@
##############################################################
# Since there are cleartext passwords stored in this file,
# this file must be readable by ONLY the owner,
-# otherwise the program will exit with an error.
+# otherwise the program will exit with an error.
#
# The file format for password and access files is syntactically the same
# as the Properties file format. The syntax is described in the Javadoc
diff --git a/jdk/src/java.management/share/conf/management.properties b/jdk/src/java.management/share/conf/management.properties
index db08b780ebd..529fd3b099c 100644
--- a/jdk/src/java.management/share/conf/management.properties
+++ b/jdk/src/java.management/share/conf/management.properties
@@ -10,7 +10,7 @@
#
# The default Management Configuration file is:
#
-# $JRE/lib/management/management.properties
+# $JRE/conf/management/management.properties
#
# Another location for the Management Configuration File can be specified
# by the following property on the Java command line:
@@ -110,7 +110,7 @@
# com.sun.management.snmp.acl.file=filepath
# Specifies location for ACL file
# This is optional - default location is
-# $JRE/lib/management/snmp.acl
+# $JRE/conf/management/snmp.acl
#
# If the property "com.sun.management.snmp.acl" is set to false,
# then this property and the ACL file are ignored.
@@ -289,7 +289,7 @@
# com.sun.management.jmxremote.password.file=filepath
# Specifies location for password file
# This is optional - default location is
-# $JRE/lib/management/jmxremote.password
+# $JRE/conf/management/jmxremote.password
#
# If the property "com.sun.management.jmxremote.authenticate" is set to
# false, then this property and the password & access files are ignored.
@@ -306,7 +306,7 @@
# com.sun.management.jmxremote.access.file=filepath
# Specifies location for access file
# This is optional - default location is
-# $JRE/lib/management/jmxremote.access
+# $JRE/conf/management/jmxremote.access
#
# If the property "com.sun.management.jmxremote.authenticate" is set to
# false, then this property and the password & access files are ignored.
diff --git a/jdk/src/java.management/share/conf/snmp.acl.template b/jdk/src/java.management/share/conf/snmp.acl.template
index 0e766764f5e..cb9547bdcc9 100644
--- a/jdk/src/java.management/share/conf/snmp.acl.template
+++ b/jdk/src/java.management/share/conf/snmp.acl.template
@@ -10,12 +10,12 @@
# ----------------------------------------------------------------------
############################################################
-# SNMP Access Control List File
+# SNMP Access Control List File
############################################################
#
-# Default location of this file is $JRE/lib/management/snmp.acl.
-# You can specify an alternate location by specifying a property in
-# the management config file $JRE/lib/management/management.properties
+# Default location of this file is $JRE/conf/management/snmp.acl.
+# You can specify an alternate location by specifying a property in
+# the management config file $JRE/conf/management/management.properties
# or by specifying a system property (See that file for details).
#
@@ -23,10 +23,10 @@
##############################################################
# File permissions of the snmp.acl file
##############################################################
-#
+#
# Since there are cleartext community strings stored in this file,
# this ACL file must be readable by ONLY the owner,
-# otherwise the program will exit with an error.
+# otherwise the program will exit with an error.
#
##############################################################
# Format of the acl group
@@ -41,8 +41,8 @@
# Each can be expressed as any one of the following:
# - hostname: hubble
# - ip v4 and v6 addresses: 123.456.789.12 , fe80::a00:20ff:fe9b:ea82
-# - ip v4 and v6 netmask prefix notation: 123.456.789.0/24,
-# fe80::a00:20ff:fe9b:ea82/64
+# - ip v4 and v6 netmask prefix notation: 123.456.789.0/24,
+# fe80::a00:20ff:fe9b:ea82/64
# see RFC 2373 (http://www.ietf.org/rfc/rfc2373.txt)
#
# An example of two community groups for multiple hosts:
@@ -58,7 +58,7 @@
# managers = hubble, telescope
# }
# }
-#
+#
##############################################################
# Format of the trap group
##############################################################
@@ -84,7 +84,7 @@
#
# Update the community strings (public and private) below
# before copying this template file
-#
+#
# Common SNMP ACL Example
# ------------------------
#
@@ -100,11 +100,11 @@
# managers = localhost
# }
# }
-#
-#
+#
+#
# trap = {
# {
# trap-community = public
-# hosts = localhost
+# hosts = localhost
# }
# }
diff --git a/jdk/src/java.naming/share/classes/com/sun/naming/internal/ResourceManager.java b/jdk/src/java.naming/share/classes/com/sun/naming/internal/ResourceManager.java
index 09be7ca7cd1..f783a13f316 100644
--- a/jdk/src/java.naming/share/classes/com/sun/naming/internal/ResourceManager.java
+++ b/jdk/src/java.naming/share/classes/com/sun/naming/internal/ResourceManager.java
@@ -60,9 +60,9 @@ public final class ResourceManager {
private static final String APP_RESOURCE_FILE_NAME = "jndi.properties";
/*
- * Name of properties file in /lib.
+ * Name of properties file in /conf.
*/
- private static final String JRELIB_PROPERTY_FILE_NAME = "jndi.properties";
+ private static final String JRE_CONF_PROPERTY_FILE_NAME = "jndi.properties";
/*
* Internal environment property, that when set to "true", disables
@@ -474,7 +474,7 @@ public final class ResourceManager {
/*
* Returns the Hashtable (never null) that results from merging
* all application resource files available to this thread's
- * context class loader. The properties file in /lib
+ * context class loader. The properties file in /conf
* is also merged in. The results are cached.
*
* SECURITY NOTES:
@@ -523,9 +523,9 @@ public final class ResourceManager {
}
}
- // Merge in properties from file in /lib.
+ // Merge in properties from file in /conf.
InputStream istream =
- helper.getJavaHomeLibStream(JRELIB_PROPERTY_FILE_NAME);
+ helper.getJavaHomeConfStream(JRE_CONF_PROPERTY_FILE_NAME);
if (istream != null) {
try {
Properties props = new Properties();
diff --git a/jdk/src/java.naming/share/classes/com/sun/naming/internal/VersionHelper.java b/jdk/src/java.naming/share/classes/com/sun/naming/internal/VersionHelper.java
index 2a9db220af0..6220e1e0128 100644
--- a/jdk/src/java.naming/share/classes/com/sun/naming/internal/VersionHelper.java
+++ b/jdk/src/java.naming/share/classes/com/sun/naming/internal/VersionHelper.java
@@ -159,12 +159,12 @@ public final class VersionHelper {
}
/*
- * Returns an input stream for a file in /lib,
+ * Returns an input stream for a file in /conf,
* or null if it cannot be located or opened.
*
* @param filename The file name, sans directory.
*/
- InputStream getJavaHomeLibStream(String filename) {
+ InputStream getJavaHomeConfStream(String filename) {
PrivilegedAction act = () -> {
try {
String javahome = System.getProperty("java.home");
@@ -172,7 +172,7 @@ public final class VersionHelper {
return null;
}
String pathname = javahome + File.separator +
- "lib" + File.separator + filename;
+ "conf" + File.separator + filename;
return new FileInputStream(pathname);
} catch (Exception e) {
return null;
diff --git a/jdk/src/java.naming/share/classes/javax/naming/Context.java b/jdk/src/java.naming/share/classes/javax/naming/Context.java
index 3f1b759b424..8ff5b041eb5 100644
--- a/jdk/src/java.naming/share/classes/javax/naming/Context.java
+++ b/jdk/src/java.naming/share/classes/javax/naming/Context.java
@@ -207,11 +207,9 @@ import java.util.Hashtable;
* {@link ClassLoader#getResources ClassLoader.getResources()})
* all application resource files named jndi.properties
* in the classpath.
- * In addition, if the file java.home/lib/jndi.properties
- * exists and is readable,
+ * In addition, if the Java installation directory contains a built-in
+ * properties file, typically conf/jndi.properties,
* JNDI treats it as an additional application resource file.
- * (java.home indicates the
- * directory named by the java.home system property.)
* All of the properties contained in these files are placed
* into the environment of the initial context. This environment
* is then inherited by other contexts.
diff --git a/jdk/src/jdk.dev/share/classes/com/sun/tools/script/shell/Main.java b/jdk/src/java.scripting/share/classes/com/sun/tools/script/shell/Main.java
similarity index 99%
rename from jdk/src/jdk.dev/share/classes/com/sun/tools/script/shell/Main.java
rename to jdk/src/java.scripting/share/classes/com/sun/tools/script/shell/Main.java
index a6b19a6ca06..9e7a0cac1f3 100644
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/script/shell/Main.java
+++ b/jdk/src/java.scripting/share/classes/com/sun/tools/script/shell/Main.java
@@ -474,9 +474,8 @@ public class Main {
* know the class loader used by a specific engine, we
* can't configure correct loader.
*/
- ClassLoader parent = Main.class.getClassLoader();
URL[] urls = pathToURLs(classPath);
- URLClassLoader loader = new URLClassLoader(urls, parent);
+ URLClassLoader loader = new URLClassLoader(urls);
Thread.currentThread().setContextClassLoader(loader);
}
diff --git a/jdk/src/jdk.dev/share/classes/com/sun/tools/script/shell/init.js b/jdk/src/java.scripting/share/classes/com/sun/tools/script/shell/init.js
similarity index 100%
rename from jdk/src/jdk.dev/share/classes/com/sun/tools/script/shell/init.js
rename to jdk/src/java.scripting/share/classes/com/sun/tools/script/shell/init.js
diff --git a/jdk/src/jdk.dev/share/classes/com/sun/tools/script/shell/messages.properties b/jdk/src/java.scripting/share/classes/com/sun/tools/script/shell/messages.properties
similarity index 100%
rename from jdk/src/jdk.dev/share/classes/com/sun/tools/script/shell/messages.properties
rename to jdk/src/java.scripting/share/classes/com/sun/tools/script/shell/messages.properties
diff --git a/jdk/src/java.scripting/share/classes/javax/script/ScriptEngineManager.java b/jdk/src/java.scripting/share/classes/javax/script/ScriptEngineManager.java
index b2af53e5bc3..e4d75c6a1fe 100644
--- a/jdk/src/java.scripting/share/classes/javax/script/ScriptEngineManager.java
+++ b/jdk/src/java.scripting/share/classes/javax/script/ScriptEngineManager.java
@@ -66,8 +66,7 @@ public class ScriptEngineManager {
* ScriptEngineFactory visible to the given
* ClassLoader using the service provider mechanism.
* If loader is null, the script engine factories that are
- * bundled with the platform and that are in the usual extension
- * directories (installed extensions) are loaded.
+ * bundled with the platform are loaded.
*
* @param loader ClassLoader used to discover script engine factories.
*/
diff --git a/jdk/src/java.security.jgss/share/classes/javax/security/auth/kerberos/package-info.java b/jdk/src/java.security.jgss/share/classes/javax/security/auth/kerberos/package-info.java
index 01d4b5399b5..bcf1856f245 100644
--- a/jdk/src/java.security.jgss/share/classes/javax/security/auth/kerberos/package-info.java
+++ b/jdk/src/java.security.jgss/share/classes/javax/security/auth/kerberos/package-info.java
@@ -45,7 +45,7 @@
* file. If none of these system properties are set, the {@code krb5.conf}
* file is searched for in an implementation-specific manner. Typically,
* an implementation will first look for a {@code krb5.conf} file in
- * {@code /lib/security} and failing that, in an OS-specific
+ * {@code /conf/security} and failing that, in an OS-specific
* location.
*
* The {@code krb5.conf} file is formatted in the Windows INI file style,
diff --git a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/Config.java b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/Config.java
index 7779cf0a4db..26722f2b885 100644
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/Config.java
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/Config.java
@@ -737,7 +737,7 @@ public class Config {
*
* If the system property "java.security.krb5.conf" is defined, we'll
* use its value, no matter if the file exists or not. Otherwise, we
- * will look at $JAVA_HOME/lib/security directory with "krb5.conf" name,
+ * will look at $JAVA_HOME/conf/security directory with "krb5.conf" name,
* and return it if the file exists.
*
* The method returns null if it cannot find a Java config file.
@@ -746,7 +746,7 @@ public class Config {
String name = getProperty("java.security.krb5.conf");
if (name == null) {
name = getProperty("java.home") + File.separator +
- "lib" + File.separator + "security" +
+ "conf" + File.separator + "security" +
File.separator + "krb5.conf";
if (!fileExists(name)) {
name = null;
diff --git a/jdk/src/jdk.crypto.ec/share/classes/sun/security/ec/SunEC.java b/jdk/src/jdk.crypto.ec/share/classes/sun/security/ec/SunEC.java
index 15c7b438b8b..3b1591fb9e8 100644
--- a/jdk/src/jdk.crypto.ec/share/classes/sun/security/ec/SunEC.java
+++ b/jdk/src/jdk.crypto.ec/share/classes/sun/security/ec/SunEC.java
@@ -37,12 +37,11 @@ import sun.security.action.PutAllAction;
* IMPLEMENTATION NOTE:
* The Java classes in this provider access a native ECC implementation
* via JNI to a C++ wrapper class which in turn calls C functions.
- * The Java classes are packaged into the signed sunec.jar in the JRE
- * extensions directory and the C++ and C functions are packaged into
- * libsunec.so or sunec.dll in the JRE native libraries directory.
- * If the native library is not present then this provider is registered
- * with support for fewer ECC algorithms (KeyPairGenerator, Signature and
- * KeyAgreement are omitted).
+ * The Java classes are packaged into the jdk.crypto.sunec module and the
+ * C++ and C functions are packaged into libsunec.so or sunec.dll in the
+ * JRE native libraries directory. If the native library is not present
+ * then this provider is registered with support for fewer ECC algorithms
+ * (KeyPairGenerator, Signature and KeyAgreement are omitted).
*
* @since 1.7
*/
diff --git a/jdk/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/Config.java b/jdk/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/Config.java
index 67dc8a33e4f..7d07103a289 100644
--- a/jdk/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/Config.java
+++ b/jdk/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/Config.java
@@ -35,8 +35,6 @@ import java.security.*;
import sun.security.action.GetPropertyAction;
import sun.security.util.PropertyExpander;
-import sun.security.pkcs11.wrapper.*;
-
/**
* Configuration container and file parsing.
*
diff --git a/jdk/src/jdk.dev/share/classes/jdk/tools/jimage/JImageTask.java b/jdk/src/jdk.dev/share/classes/jdk/tools/jimage/JImageTask.java
new file mode 100644
index 00000000000..9bb21633dba
--- /dev/null
+++ b/jdk/src/jdk.dev/share/classes/jdk/tools/jimage/JImageTask.java
@@ -0,0 +1,596 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. 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. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.tools.jimage;
+
+import java.io.BufferedOutputStream;
+import java.io.DataOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import jdk.internal.jimage.BasicImageReader;
+import jdk.internal.jimage.BasicImageWriter;
+import jdk.internal.jimage.ImageHeader;
+import jdk.internal.jimage.ImageLocation;
+import jdk.internal.jimage.PackageModuleMap;
+
+class JImageTask {
+ static class BadArgs extends Exception {
+ static final long serialVersionUID = 8765093759964640723L; // ## re-generate
+ final String key;
+ final Object[] args;
+ boolean showUsage;
+
+ BadArgs(String key, Object... args) {
+ super(JImageTask.getMessage(key, args));
+ this.key = key;
+ this.args = args;
+ }
+
+ BadArgs showUsage(boolean b) {
+ showUsage = b;
+ return this;
+ }
+ }
+
+ static abstract class Option {
+ final boolean hasArg;
+ final String[] aliases;
+
+ Option(boolean hasArg, String... aliases) {
+ this.hasArg = hasArg;
+ this.aliases = aliases;
+ }
+
+ boolean isHidden() {
+ return false;
+ }
+
+ boolean matches(String opt) {
+ for (String a : aliases) {
+ if (a.equals(opt)) {
+ return true;
+ } else if (opt.startsWith("--") && hasArg && opt.startsWith(a + "=")) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ boolean ignoreRest() {
+ return false;
+ }
+
+ abstract void process(JImageTask task, String opt, String arg) throws BadArgs;
+ }
+
+ static abstract class HiddenOption extends Option {
+ HiddenOption(boolean hasArg, String... aliases) {
+ super(hasArg, aliases);
+ }
+
+ @Override
+ boolean isHidden() {
+ return true;
+ }
+ }
+
+ static Option[] recognizedOptions = {
+ new Option(true, "--dir") {
+ @Override
+ void process(JImageTask task, String opt, String arg) throws BadArgs {
+ task.options.directory = arg;
+ }
+ },
+ new HiddenOption(false, "--fullversion") {
+ @Override
+ void process(JImageTask task, String opt, String arg) {
+ task.options.fullVersion = true;
+ }
+ },
+ new Option(false, "--help") {
+ @Override
+ void process(JImageTask task, String opt, String arg) {
+ task.options.help = true;
+ }
+ },
+ new Option(false, "--verbose") {
+ @Override
+ void process(JImageTask task, String opt, String arg) throws BadArgs {
+ task.options.verbose = true;
+ }
+ },
+ new Option(false, "--version") {
+ @Override
+ void process(JImageTask task, String opt, String arg) {
+ task.options.version = true;
+ }
+ },
+ };
+
+ static class Options {
+ Task task = Task.LIST;
+ String directory = ".";
+ boolean fullVersion;
+ boolean help;
+ boolean verbose;
+ boolean version;
+ List jimages = new LinkedList<>();
+ }
+
+ private static final String PROGNAME = "jimage";
+ private final Options options = new Options();
+
+ enum Task {
+ RECREATE,
+ EXTRACT,
+ INFO,
+ LIST,
+ VERIFY
+ };
+
+ private String pad(String string, int width, boolean justifyRight) {
+ int length = string.length();
+
+ if (length == width) {
+ return string;
+ }
+
+ if (length > width) {
+ return string.substring(0, width);
+ }
+
+ int padding = width - length;
+
+ StringBuilder sb = new StringBuilder(width);
+ if (justifyRight) {
+ for (int i = 0; i < padding; i++) {
+ sb.append(' ');
+ }
+ }
+
+ sb.append(string);
+
+ if (!justifyRight) {
+ for (int i = 0; i < padding; i++) {
+ sb.append(' ');
+ }
+ }
+
+ return sb.toString();
+ }
+
+ private String pad(String string, int width) {
+ return pad(string, width, false);
+ }
+
+ private String pad(long value, int width) {
+ return pad(Long.toString(value), width, true);
+ }
+
+ private static final int EXIT_OK = 0; // No errors.
+ private static final int EXIT_ERROR = 1; // Completed but reported errors.
+ private static final int EXIT_CMDERR = 2; // Bad command-line arguments and/or switches.
+ private static final int EXIT_SYSERR = 3; // System error or resource exhaustion.
+ private static final int EXIT_ABNORMAL = 4; // Terminated abnormally.
+
+ int run(String[] args) {
+ if (log == null) {
+ log = new PrintWriter(System.out);
+ }
+
+ try {
+ handleOptions(args);
+ if (options.help) {
+ showHelp();
+ }
+ if (options.version || options.fullVersion) {
+ showVersion(options.fullVersion);
+ }
+ boolean ok = run();
+ return ok ? EXIT_OK : EXIT_ERROR;
+ } catch (BadArgs e) {
+ reportError(e.key, e.args);
+ if (e.showUsage) {
+ log.println(getMessage("main.usage.summary", PROGNAME));
+ }
+ return EXIT_CMDERR;
+ } catch (Exception x) {
+ x.printStackTrace();
+ return EXIT_ABNORMAL;
+ } finally {
+ log.flush();
+ }
+ }
+
+ static final String MODULES_ENTRY = PackageModuleMap.MODULES_ENTRY;
+ static final String PACKAGES_ENTRY = "/" + PackageModuleMap.PACKAGES_ENTRY;
+
+ private void recreate() throws IOException, BadArgs {
+ File directory = new File(options.directory);
+ Path dirPath = directory.toPath();
+ int chop = dirPath.toString().length() + 1;
+
+ if (!directory.isDirectory()) {
+ throw new BadArgs("err.not.a.dir", directory.getAbsolutePath());
+ }
+
+ if (options.jimages.isEmpty()) {
+ throw new BadArgs("err.jimage.not.specified");
+ } else if (options.jimages.size() != 1) {
+ throw new BadArgs("err.only.one.jimage");
+ }
+
+ File jimage = options.jimages.get(0);
+ final List files = new ArrayList<>();
+ final BasicImageWriter writer = new BasicImageWriter();
+ final Long longZero = 0L;
+
+ // Note: code sensitive to Netbeans parser crashing.
+ long total = Files.walk(dirPath).reduce(longZero, (Long offset, Path path) -> {
+ long size = 0;
+ String pathString = path.toString();
+
+ if (pathString.length() < chop || pathString.startsWith(".")) {
+ return 0L;
+ }
+
+ String name = pathString.substring(chop).replace('\\','/');
+
+ File file = path.toFile();
+
+ if (file.isFile()) {
+ if (options.verbose) {
+ log.println(name);
+ }
+
+ if (name.endsWith(MODULES_ENTRY) || name.endsWith(PACKAGES_ENTRY)) {
+ try {
+ try (Stream lines = Files.lines(path)) {
+ size = lines.peek(s -> writer.addString(s)).count() * 4;
+ }
+ } catch (IOException ex) {
+ // Caught again when writing file.
+ size = 0;
+ }
+ } else {
+ size = file.length();
+ }
+
+ writer.addLocation(name, offset, 0L, size);
+ files.add(file);
+ }
+
+ return offset + size;
+ },
+ (Long offsetL, Long offsetR) -> { return longZero; } );
+
+ if (jimage.createNewFile()) {
+ try (OutputStream os = Files.newOutputStream(jimage.toPath());
+ BufferedOutputStream bos = new BufferedOutputStream(os);
+ DataOutputStream out = new DataOutputStream(bos)) {
+
+ byte[] index = writer.getBytes();
+ out.write(index, 0, index.length);
+
+ for (File file : files) {
+ try {
+ Path path = file.toPath();
+ String name = path.toString();
+
+ if (name.endsWith(MODULES_ENTRY) || name.endsWith(PACKAGES_ENTRY)) {
+ for (String line: Files.readAllLines(path)) {
+ int off = writer.addString(line);
+ out.writeInt(off);
+ }
+ } else {
+ Files.copy(path, out);
+ }
+ } catch (IOException ex) {
+ throw new BadArgs("err.cannot.read.file", file.getName());
+ }
+ }
+ }
+ } else {
+ throw new BadArgs("err.jimage.already.exists", jimage.getName());
+ }
+
+ }
+
+ private void title(File file, BasicImageReader reader) {
+ log.println("jimage: " + file.getName());
+ }
+
+ private void listTitle(File file, BasicImageReader reader) {
+ title(file, reader);
+
+ if (options.verbose) {
+ log.print(pad("Offset", OFFSET_WIDTH + 1));
+ log.print(pad("Size", SIZE_WIDTH + 1));
+ log.print(pad("Compressed", COMPRESSEDSIZE_WIDTH + 1));
+ log.println(" Entry");
+ }
+ }
+
+ private interface JImageAction {
+ public void apply(File file, BasicImageReader reader) throws IOException, BadArgs;
+ }
+
+ private interface ResourceAction {
+ public void apply(BasicImageReader reader, String name, ImageLocation location) throws IOException, BadArgs;
+ }
+
+ private void extract(BasicImageReader reader, String name, ImageLocation location) throws IOException, BadArgs {
+ File directory = new File(options.directory);
+ byte[] bytes = reader.getResource(location);
+ File resource = new File(directory, name);
+ File parent = resource.getParentFile();
+
+ if (parent.exists()) {
+ if (!parent.isDirectory()) {
+ throw new BadArgs("err.cannot.create.dir", parent.getAbsolutePath());
+ }
+ } else if (!parent.mkdirs()) {
+ throw new BadArgs("err.cannot.create.dir", parent.getAbsolutePath());
+ }
+
+ if (name.endsWith(MODULES_ENTRY) || name.endsWith(PACKAGES_ENTRY)) {
+ List names = reader.getNames(bytes);
+ Files.write(resource.toPath(), names);
+ } else {
+ Files.write(resource.toPath(), bytes);
+ }
+ }
+
+ private static final int NAME_WIDTH = 40;
+ private static final int NUMBER_WIDTH = 12;
+ private static final int OFFSET_WIDTH = NUMBER_WIDTH;
+ private static final int SIZE_WIDTH = NUMBER_WIDTH;
+ private static final int COMPRESSEDSIZE_WIDTH = NUMBER_WIDTH;
+
+ private void print(String entry, ImageLocation location) {
+ log.print(pad(location.getContentOffset(), OFFSET_WIDTH) + " ");
+ log.print(pad(location.getUncompressedSize(), SIZE_WIDTH) + " ");
+ log.print(pad(location.getCompressedSize(), COMPRESSEDSIZE_WIDTH) + " ");
+ log.println(entry);
+ }
+
+ private void print(BasicImageReader reader, String entry) {
+ if (options.verbose) {
+ print(entry, reader.findLocation(entry));
+ } else {
+ log.println(entry);
+ }
+ }
+
+ private void info(File file, BasicImageReader reader) {
+ ImageHeader header = reader.getHeader();
+
+ log.println(" Major Version: " + header.getMajorVersion());
+ log.println(" Minor Version: " + header.getMinorVersion());
+ log.println(" Location Count: " + header.getLocationCount());
+ log.println(" Offsets Size: " + header.getOffsetsSize());
+ log.println(" Redirects Size: " + header.getRedirectSize());
+ log.println(" Locations Size: " + header.getLocationsSize());
+ log.println(" Strings Size: " + header.getStringsSize());
+ log.println(" Index Size: " + header.getIndexSize());
+ }
+
+ private void list(BasicImageReader reader, String name, ImageLocation location) {
+ print(reader, name);
+ }
+
+ void verify(BasicImageReader reader, String name, ImageLocation location) {
+ if (name.endsWith(".class")) {
+ byte[] bytes;
+ try {
+ bytes = reader.getResource(location);
+ } catch (IOException ex) {
+ log.println(ex);
+ bytes = null;
+ }
+
+ if (bytes == null || bytes.length <= 4 ||
+ (bytes[0] & 0xFF) != 0xCA ||
+ (bytes[1] & 0xFF) != 0xFE ||
+ (bytes[2] & 0xFF) != 0xBA ||
+ (bytes[3] & 0xFF) != 0xBE) {
+ log.print(" NOT A CLASS: ");
+ print(reader, name);
+ }
+ }
+ }
+
+ private void iterate(JImageAction jimageAction, ResourceAction resourceAction) throws IOException, BadArgs {
+ for (File file : options.jimages) {
+ if (!file.exists() || !file.isFile()) {
+ throw new BadArgs("err.not.a.jimage", file.getName());
+ }
+
+ String path = file.getCanonicalPath();
+ BasicImageReader reader = BasicImageReader.open(path);
+
+ if (jimageAction != null) {
+ jimageAction.apply(file, reader);
+ }
+
+ if (resourceAction != null) {
+ String[] entryNames = reader.getEntryNames(true);
+
+ for (String name : entryNames) {
+ ImageLocation location = reader.findLocation(name);
+ resourceAction.apply(reader, name, location);
+ }
+ }
+ }
+ }
+
+ private boolean run() throws IOException, BadArgs {
+ switch (options.task) {
+ case RECREATE:
+ recreate();
+ break;
+ case EXTRACT:
+ iterate(null, this::extract);
+ break;
+ case INFO:
+ iterate(this::info, null);
+ break;
+ case LIST:
+ iterate(this::listTitle, this::list);
+ break;
+ case VERIFY:
+ iterate(this::title, this::verify);
+ break;
+ default:
+ throw new BadArgs("err.invalid.task", options.task.name()).showUsage(true);
+ }
+ return true;
+ }
+
+ private PrintWriter log;
+ void setLog(PrintWriter out) {
+ log = out;
+ }
+ public void handleOptions(String[] args) throws BadArgs {
+ // process options
+ int first = 0;
+
+ if (args.length == 0) {
+ return;
+ }
+
+ String arg = args[first];
+
+ if (!arg.startsWith("-")) {
+ try {
+ options.task = Enum.valueOf(Task.class, arg.toUpperCase());
+ first++;
+ } catch (IllegalArgumentException e) {
+ throw new BadArgs("err.invalid.task", arg).showUsage(true);
+ }
+ }
+
+ for (int i = first; i < args.length; i++) {
+ arg = args[i];
+
+ if (arg.charAt(0) == '-') {
+ Option option = getOption(arg);
+ String param = null;
+
+ if (option.hasArg) {
+ if (arg.startsWith("--") && arg.indexOf('=') > 0) {
+ param = arg.substring(arg.indexOf('=') + 1, arg.length());
+ } else if (i + 1 < args.length) {
+ param = args[++i];
+ }
+
+ if (param == null || param.isEmpty() || param.charAt(0) == '-') {
+ throw new BadArgs("err.missing.arg", arg).showUsage(true);
+ }
+ }
+
+ option.process(this, arg, param);
+
+ if (option.ignoreRest()) {
+ i = args.length;
+ }
+ } else {
+ File file = new File(arg);
+ options.jimages.add(file);
+ }
+ }
+ }
+
+ private Option getOption(String name) throws BadArgs {
+ for (Option o : recognizedOptions) {
+ if (o.matches(name)) {
+ return o;
+ }
+ }
+ throw new BadArgs("err.unknown.option", name).showUsage(true);
+ }
+
+ private void reportError(String key, Object... args) {
+ log.println(getMessage("error.prefix") + " " + getMessage(key, args));
+ }
+
+ private void warning(String key, Object... args) {
+ log.println(getMessage("warn.prefix") + " " + getMessage(key, args));
+ }
+
+ private void showHelp() {
+ log.println(getMessage("main.usage", PROGNAME));
+ for (Option o : recognizedOptions) {
+ String name = o.aliases[0].substring(1); // there must always be at least one name
+ name = name.charAt(0) == '-' ? name.substring(1) : name;
+ if (o.isHidden() || name.equals("h")) {
+ continue;
+ }
+ log.println(getMessage("main.opt." + name));
+ }
+ }
+
+ private void showVersion(boolean full) {
+ log.println(version(full ? "full" : "release"));
+ }
+
+ private String version(String key) {
+ return System.getProperty("java.version");
+ }
+
+ static String getMessage(String key, Object... args) {
+ try {
+ return MessageFormat.format(ResourceBundleHelper.bundle.getString(key), args);
+ } catch (MissingResourceException e) {
+ throw new InternalError("Missing message: " + key);
+ }
+ }
+
+ private static class ResourceBundleHelper {
+ static final ResourceBundle bundle;
+
+ static {
+ Locale locale = Locale.getDefault();
+ try {
+ bundle = ResourceBundle.getBundle("jdk.tools.jimage.resources.jimage", locale);
+ } catch (MissingResourceException e) {
+ throw new InternalError("Cannot find jimage resource bundle for locale " + locale);
+ }
+ }
+ }
+}
diff --git a/jdk/src/jdk.dev/share/classes/jdk/tools/jimage/Main.java b/jdk/src/jdk.dev/share/classes/jdk/tools/jimage/Main.java
new file mode 100644
index 00000000000..7191a71f625
--- /dev/null
+++ b/jdk/src/jdk.dev/share/classes/jdk/tools/jimage/Main.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. 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. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.tools.jimage;
+
+import java.io.PrintWriter;
+
+
+public class Main {
+ public static void main(String[] args) throws Exception {
+ JImageTask t = new JImageTask();
+ int rc = t.run(args);
+ System.exit(rc);
+ }
+
+ /**
+ * Entry point that does not call System.exit.
+ *
+ * @param args command line arguments
+ * @param out output stream
+ * @return an exit code. 0 means success, non-zero means an error occurred.
+ */
+ public static int run(String[] args, PrintWriter out) {
+ JImageTask t = new JImageTask();
+ t.setLog(out);
+ return t.run(args);
+ }
+}
diff --git a/jdk/src/jdk.dev/share/classes/jdk/tools/jimage/resources/jimage.properties b/jdk/src/jdk.dev/share/classes/jdk/tools/jimage/resources/jimage.properties
new file mode 100644
index 00000000000..f47e1aaf9eb
--- /dev/null
+++ b/jdk/src/jdk.dev/share/classes/jdk/tools/jimage/resources/jimage.properties
@@ -0,0 +1,45 @@
+main.usage.summary=\
+Usage: {0} jimage...\n\
+use --help for a list of possible options
+
+main.usage=\
+Usage: {0} jimage...\n\
+\n\
+\ extract - Extract all jimage entries into separate files into the directory\n\
+\ specified by --dir= (default='.')\n\
+\ recreate - Reconstructs a jimage from an extracted directory (--dir)\n\
+\ info - Prints information specified in the jimage header.\n\
+\ list - Prints the names of all the entries in the jimage. When used with\n\
+\ --verbose will also print entry attributes ex. size and offset.\n\
+\ verify - Reports errors on any .class entries that don't verify as classes.\n\
+\n\
+Possible options include:
+
+error.prefix=Error:
+warn.prefix=Warning:
+
+main.opt.dir=\
+\ --dir Target directory for create/expand
+
+main.opt.verbose=\
+\ --verbose Verbose listing
+
+main.opt.help=\
+\ --help Print this usage message
+
+main.opt.version=\
+\ --version Version information
+
+err.invalid.task=task must be list|expand|info|verify: {0}
+err.not.a.dir=not a directory: {0}
+err.jimage.not.specified=no jimage specified
+err.only.one.jimage=only one jimage should be specified
+err.jimage.already.exists=jimage already exists: {0}
+err.cannot.read.file=cannot read file: {0}
+err.cannot.create.dir=cannot create directory: {0}
+err.not.a.jimage=not a jimage file: {0}
+err.unknown.option=unknown option: {0}
+err.missing.arg=no value given for {0}
+err.internal.error=internal error: {0} {1} {2}
+err.invalid.arg.for.option=invalid argument for option: {0}
+err.option.unsupported={0} not supported: {1}
diff --git a/jdk/src/jdk.localedata/META-INF/localedata-services/sun.util.locale.provider.LocaleDataMetaInfo b/jdk/src/jdk.localedata/META-INF/localedata-services/sun.util.locale.provider.LocaleDataMetaInfo
deleted file mode 100644
index ea327d5c468..00000000000
--- a/jdk/src/jdk.localedata/META-INF/localedata-services/sun.util.locale.provider.LocaleDataMetaInfo
+++ /dev/null
@@ -1 +0,0 @@
-sun.util.resources.provider.NonEnLocaleDataMetaInfo
diff --git a/jdk/src/jdk.localedata/META-INF/cldrdata-services/sun.util.locale.provider.LocaleDataMetaInfo b/jdk/src/jdk.localedata/share/classes/META-INF/services/sun.util.locale.provider.LocaleDataMetaInfo
similarity index 51%
rename from jdk/src/jdk.localedata/META-INF/cldrdata-services/sun.util.locale.provider.LocaleDataMetaInfo
rename to jdk/src/jdk.localedata/share/classes/META-INF/services/sun.util.locale.provider.LocaleDataMetaInfo
index 07d15578e88..203d80fdcec 100644
--- a/jdk/src/jdk.localedata/META-INF/cldrdata-services/sun.util.locale.provider.LocaleDataMetaInfo
+++ b/jdk/src/jdk.localedata/share/classes/META-INF/services/sun.util.locale.provider.LocaleDataMetaInfo
@@ -1 +1,2 @@
+sun.util.resources.provider.NonEnLocaleDataMetaInfo
sun.util.resources.cldr.provider.CLDRLocaleDataMetaInfo
diff --git a/jdk/src/jdk.rmic/share/classes/sun/rmi/rmic/BatchEnvironment.java b/jdk/src/jdk.rmic/share/classes/sun/rmi/rmic/BatchEnvironment.java
index 0e4cb6a70e6..0a4e5435e5f 100644
--- a/jdk/src/jdk.rmic/share/classes/sun/rmi/rmic/BatchEnvironment.java
+++ b/jdk/src/jdk.rmic/share/classes/sun/rmi/rmic/BatchEnvironment.java
@@ -70,17 +70,16 @@ public class BatchEnvironment extends sun.tools.javac.BatchEnvironment {
* Create a ClassPath object for rmic from a class path string.
*/
public static ClassPath createClassPath(String classPathString) {
- ClassPath[] paths = classPaths(null, classPathString, null, null);
+ ClassPath[] paths = classPaths(null, classPathString, null);
return paths[1];
}
/**
* Create a ClassPath object for rmic from the relevant command line
- * options for class path, boot class path, and extension directories.
+ * options for class path and boot class path.
*/
public static ClassPath createClassPath(String classPathString,
- String sysClassPathString,
- String extDirsString)
+ String sysClassPathString)
{
/**
* Previously, this method delegated to the
@@ -108,13 +107,6 @@ public class BatchEnvironment extends sun.tools.javac.BatchEnvironment {
*/
path.expandJarClassPaths(true);
- if (extDirsString == null) {
- extDirsString = System.getProperty("java.ext.dirs");
- }
- if (extDirsString != null) {
- path.addDirectories(extDirsString);
- }
-
/*
* In the application class path, an empty element means
* the current working directory.
@@ -389,7 +381,8 @@ public class BatchEnvironment extends sun.tools.javac.BatchEnvironment {
/* File is an ordinay file */
String arcname = file.toLowerCase();
if (! (arcname.endsWith(".zip") ||
- arcname.endsWith(".jar"))) {
+ arcname.endsWith(".jar") ||
+ arcname.endsWith(".jimage"))) {
/* File name don't have right extension */
// if (warn)
// log.warning(Position.NOPOS,
diff --git a/jdk/src/jdk.rmic/share/classes/sun/rmi/rmic/Main.java b/jdk/src/jdk.rmic/share/classes/sun/rmi/rmic/Main.java
index 5ce94a7e259..de93258d7c8 100644
--- a/jdk/src/jdk.rmic/share/classes/sun/rmi/rmic/Main.java
+++ b/jdk/src/jdk.rmic/share/classes/sun/rmi/rmic/Main.java
@@ -68,7 +68,6 @@ import java.util.Properties;
public class Main implements sun.rmi.rmic.Constants {
String sourcePathArg;
String sysClassPathArg;
- String extDirsArg;
String classPathString;
File destDir;
int flags;
@@ -187,7 +186,6 @@ public class Main implements sun.rmi.rmic.Constants {
public boolean parseArgs(String argv[]) {
sourcePathArg = null;
sysClassPathArg = null;
- extDirsArg = null;
classPathString = null;
destDir = null;
@@ -300,21 +298,6 @@ public class Main implements sun.rmi.rmic.Constants {
usage();
return false;
}
- } else if (argv[i].equals("-extdirs")) {
- if ((i + 1) < argv.length) {
- if (extDirsArg != null) {
- error("rmic.option.already.seen", "-extdirs");
- usage();
- return false;
- }
- argv[i] = null;
- extDirsArg = argv[++i];
- argv[i] = null;
- } else {
- error("rmic.option.requires.argument", "-extdirs");
- usage();
- return false;
- }
} else if (argv[i].equals("-d")) {
if ((i + 1) < argv.length) {
if (destDir != null) {
@@ -499,8 +482,7 @@ public class Main implements sun.rmi.rmic.Constants {
ClassPath classPath =
BatchEnvironment.createClassPath(classPathString,
- sysClassPathArg,
- extDirsArg);
+ sysClassPathArg);
BatchEnvironment result = null;
try {
Class>[] ctorArgTypes = {OutputStream.class,ClassPath.class,Main.class};
@@ -659,7 +641,6 @@ public class Main implements sun.rmi.rmic.Constants {
sourcePathArg = null;
sysClassPathArg = null;
- extDirsArg = null;
classPathString = null;
destDir = null;
classes = null;
diff --git a/jdk/src/jdk.rmic/share/classes/sun/rmi/rmic/RMIGenerator.java b/jdk/src/jdk.rmic/share/classes/sun/rmi/rmic/RMIGenerator.java
index f139218ff4e..4dc745ff8ab 100644
--- a/jdk/src/jdk.rmic/share/classes/sun/rmi/rmic/RMIGenerator.java
+++ b/jdk/src/jdk.rmic/share/classes/sun/rmi/rmic/RMIGenerator.java
@@ -140,7 +140,7 @@ public class RMIGenerator implements RMIConstants, Generator {
if (env.verbose()) {
env.output(Main.getText("rmic.wrote", stubFile.getPath()));
}
- env.parseFile(new ClassFile(stubFile));
+ env.parseFile(ClassFile.newClassFile(stubFile));
} catch (IOException e) {
env.error(0, "cant.write", stubFile.toString());
return;
@@ -161,7 +161,7 @@ public class RMIGenerator implements RMIConstants, Generator {
env.output(Main.getText("rmic.wrote",
skeletonFile.getPath()));
}
- env.parseFile(new ClassFile(skeletonFile));
+ env.parseFile(ClassFile.newClassFile(skeletonFile));
} catch (IOException e) {
env.error(0, "cant.write", stubFile.toString());
return;
diff --git a/jdk/src/jdk.rmic/share/classes/sun/rmi/rmic/resources/rmic.properties b/jdk/src/jdk.rmic/share/classes/sun/rmi/rmic/resources/rmic.properties
index 7220b813e32..b6f7ec9bf19 100644
--- a/jdk/src/jdk.rmic/share/classes/sun/rmi/rmic/resources/rmic.properties
+++ b/jdk/src/jdk.rmic/share/classes/sun/rmi/rmic/resources/rmic.properties
@@ -98,7 +98,6 @@ rmic.usage=Usage: {0} \
\n -verbose Output messages about what the compiler is doing\
\n -classpath Specify where to find input class files\
\n -bootclasspath Override location of bootstrap class files\
-\n -extdirs Override location of installed extensions\
\n -d Specify where to place generated class files\
\n -J Pass argument to the java interpreter\
\n
diff --git a/jdk/src/jdk.rmic/share/classes/sun/tools/java/ClassFile.java b/jdk/src/jdk.rmic/share/classes/sun/tools/java/ClassFile.java
index 37a7bed3c49..eacea99552a 100644
--- a/jdk/src/jdk.rmic/share/classes/sun/tools/java/ClassFile.java
+++ b/jdk/src/jdk.rmic/share/classes/sun/tools/java/ClassFile.java
@@ -29,134 +29,93 @@ import java.io.File;
import java.io.InputStream;
import java.io.FileInputStream;
import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
import java.util.zip.*;
/**
- * This class is used to represent a file loaded from the class path, and
- * can either be a regular file or a zip file entry.
+ * Abstract class to represent a class file.
*
* WARNING: The contents of this source file are not part of any
* supported API. Code that depends on them does so at its own risk:
* they are subject to change or removal without notice.
*/
public
-class ClassFile {
- /*
- * Non-null if this represents a regular file
- */
- private File file;
-
- /*
- * Non-null if this represents a zip file entry
- */
- private ZipFile zipFile;
- private ZipEntry zipEntry;
-
+abstract class ClassFile {
/**
- * Constructor for instance representing a regular file
+ * Factory method to create a ClassFile backed by a File.
+ *
+ * @param file a File object
+ * @return a new ClassFile
*/
- public ClassFile(File file) {
- this.file = file;
+ public static ClassFile newClassFile(File file) {
+ return new FileClassFile(file);
}
/**
- * Constructor for instance representing a zip file entry
+ * Factory method to create a ClassFile backed by a ZipEntry.
+ *
+ * @param zf a ZipFile
+ * @param ze a ZipEntry within the zip file
+ * @return a new ClassFile
*/
- public ClassFile(ZipFile zf, ZipEntry ze) {
- this.zipFile = zf;
- this.zipEntry = ze;
+ public static ClassFile newClassFile(ZipFile zf, ZipEntry ze) {
+ return new ZipClassFile(zf, ze);
+ }
+
+ /**
+ * Factory method to create a ClassFile backed by a nio Path.
+ *
+ * @param path nio Path object
+ * @return a new ClassFile
+ */
+ public static ClassFile newClassFile(Path path) {
+ return Files.exists(path)? new PathClassFile(path) : null;
}
/**
* Returns true if this is zip file entry
*/
- public boolean isZipped() {
- return zipFile != null;
- }
+ public abstract boolean isZipped();
/**
* Returns input stream to either regular file or zip file entry
*/
- public InputStream getInputStream() throws IOException {
- if (file != null) {
- return new FileInputStream(file);
- } else {
- try {
- return zipFile.getInputStream(zipEntry);
- } catch (ZipException e) {
- throw new IOException(e.getMessage());
- }
- }
- }
+ public abstract InputStream getInputStream() throws IOException;
/**
* Returns true if file exists.
*/
- public boolean exists() {
- return file != null ? file.exists() : true;
- }
+ public abstract boolean exists();
/**
* Returns true if this is a directory.
*/
- public boolean isDirectory() {
- return file != null ? file.isDirectory() :
- zipEntry.getName().endsWith("/");
- }
+ public abstract boolean isDirectory();
/**
* Return last modification time
*/
- public long lastModified() {
- return file != null ? file.lastModified() : zipEntry.getTime();
- }
+ public abstract long lastModified();
/**
* Get file path. The path for a zip file entry will also include
* the zip file name.
*/
- public String getPath() {
- if (file != null) {
- return file.getPath();
- } else {
- return zipFile.getName() + "(" + zipEntry.getName() + ")";
- }
- }
+ public abstract String getPath();
/**
* Get name of file entry excluding directory name
*/
- public String getName() {
- return file != null ? file.getName() : zipEntry.getName();
- }
+ public abstract String getName();
-//JCOV
/**
* Get absolute name of file entry
*/
- public String getAbsoluteName() {
- String absoluteName;
- if (file != null) {
- try {
- absoluteName = file.getCanonicalPath();
- } catch (IOException e) {
- absoluteName = file.getAbsolutePath();
- }
- } else {
- absoluteName = zipFile.getName() + "(" + zipEntry.getName() + ")";
- }
- return absoluteName;
- }
-// end JCOV
+ public abstract String getAbsoluteName();
/**
* Get length of file
*/
- public long length() {
- return file != null ? file.length() : zipEntry.getSize();
- }
-
- public String toString() {
- return (file != null) ? file.toString() : zipEntry.toString();
- }
+ public abstract long length();
}
diff --git a/jdk/src/jdk.rmic/share/classes/sun/tools/java/ClassPath.java b/jdk/src/jdk.rmic/share/classes/sun/tools/java/ClassPath.java
index ae917d0553e..4d366fb8dd0 100644
--- a/jdk/src/jdk.rmic/share/classes/sun/tools/java/ClassPath.java
+++ b/jdk/src/jdk.rmic/share/classes/sun/tools/java/ClassPath.java
@@ -25,11 +25,23 @@
package sun.tools.java;
-import java.util.Enumeration;
-import java.util.Hashtable;
import java.io.File;
import java.io.IOException;
+import java.io.UncheckedIOException;
import java.util.zip.*;
+import java.util.Enumeration;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Set;
+import java.util.LinkedHashSet;
+import java.net.URI;
+import java.nio.file.DirectoryStream;
+import java.nio.file.Files;
+import java.nio.file.FileSystem;
+import java.nio.file.FileSystems;
+import java.nio.file.Path;
+import java.nio.file.spi.FileSystemProvider;
/**
* This class is used to represent a class path, which can contain both
@@ -41,6 +53,11 @@ import java.util.zip.*;
*/
public
class ClassPath {
+ private static final String JIMAGE_EXT = ".jimage";
+ private FileSystem getJrtFileSystem() {
+ return FileSystems.getFileSystem(URI.create("jrt:/"));
+ }
+
static final char dirSeparator = File.pathSeparatorChar;
/**
@@ -105,27 +122,33 @@ class ClassPath {
// Build the class path
ClassPathEntry[] path = new ClassPathEntry[n+1];
int len = pathstr.length();
+ boolean jrtAdded = false;
for (i = n = 0; i < len; i = j + 1) {
if ((j = pathstr.indexOf(dirSeparator, i)) == -1) {
j = len;
}
if (i == j) {
- path[n] = new ClassPathEntry();
- path[n++].dir = new File(".");
+ path[n++] = new DirClassPathEntry(new File("."));
} else {
- File file = new File(pathstr.substring(i, j));
+ String filename = pathstr.substring(i, j);
+ File file = new File(filename);
if (file.isFile()) {
- try {
- ZipFile zip = new ZipFile(file);
- path[n] = new ClassPathEntry();
- path[n++].zip = zip;
- } catch (ZipException e) {
- } catch (IOException e) {
- // Ignore exceptions, at least for now...
+ if (filename.endsWith(JIMAGE_EXT)) {
+ if (jrtAdded) continue;
+ FileSystem fs = getJrtFileSystem();
+ path[n++] = new JrtClassPathEntry(fs);
+ jrtAdded = true;
+ } else {
+ try {
+ ZipFile zip = new ZipFile(file);
+ path[n++] = new ZipClassPathEntry(zip);
+ } catch (ZipException e) {
+ } catch (IOException e) {
+ // Ignore exceptions, at least for now...
+ }
}
} else {
- path[n] = new ClassPathEntry();
- path[n++].dir = file;
+ path[n++] = new DirClassPathEntry(file);
}
}
}
@@ -150,20 +173,26 @@ class ClassPath {
// Build the class path
ClassPathEntry[] path = new ClassPathEntry[patharray.length];
int n = 0;
+ boolean jrtAdded = false;
for (String name : patharray) {
File file = new File(name);
if (file.isFile()) {
- try {
- ZipFile zip = new ZipFile(file);
- path[n] = new ClassPathEntry();
- path[n++].zip = zip;
- } catch (ZipException e) {
- } catch (IOException e) {
- // Ignore exceptions, at least for now...
- }
+ if (name.endsWith(JIMAGE_EXT)) {
+ if (jrtAdded) continue;
+ FileSystem fs = getJrtFileSystem();
+ path[n++] = new JrtClassPathEntry(fs);
+ jrtAdded = true;
+ } else {
+ try {
+ ZipFile zip = new ZipFile(file);
+ path[n++] = new ZipClassPathEntry(zip);
+ } catch (ZipException e) {
+ } catch (IOException e) {
+ // Ignore exceptions, at least for now...
+ }
+ }
} else {
- path[n] = new ClassPathEntry();
- path[n++].dir = file;
+ path[n++] = new DirClassPathEntry(file);
}
}
// Trim class path to exact size
@@ -202,29 +231,9 @@ class ClassPath {
name = subdir; // Note: isDirectory==true & basename==""
}
for (int i = 0; i < path.length; i++) {
- if (path[i].zip != null) {
- String newname = name.replace(File.separatorChar, '/');
- ZipEntry entry = path[i].zip.getEntry(newname);
- if (entry != null) {
- return new ClassFile(path[i].zip, entry);
- }
- } else {
- File file = new File(path[i].dir.getPath(), name);
- String list[] = path[i].getFiles(subdir);
- if (isDirectory) {
- if (list.length > 0) {
- return new ClassFile(file);
- }
- } else {
- for (int j = 0; j < list.length; j++) {
- if (basename.equals(list[j])) {
- // Don't bother checking !file.isDir,
- // since we only look for names which
- // cannot already be packages (foo.java, etc).
- return new ClassFile(file);
- }
- }
- }
+ ClassFile cf = path[i].getFile(name, subdir, basename, isDirectory);
+ if (cf != null) {
+ return cf;
}
}
return null;
@@ -236,27 +245,7 @@ class ClassPath {
public Enumeration getFiles(String pkg, String ext) {
Hashtable files = new Hashtable<>();
for (int i = path.length; --i >= 0; ) {
- if (path[i].zip != null) {
- Enumeration extends ZipEntry> e = path[i].zip.entries();
- while (e.hasMoreElements()) {
- ZipEntry entry = (ZipEntry)e.nextElement();
- String name = entry.getName();
- name = name.replace('/', File.separatorChar);
- if (name.startsWith(pkg) && name.endsWith(ext)) {
- files.put(name, new ClassFile(path[i].zip, entry));
- }
- }
- } else {
- String[] list = path[i].getFiles(pkg);
- for (int j = 0; j < list.length; j++) {
- String name = list[j];
- if (name.endsWith(ext)) {
- name = pkg + File.separatorChar + name;
- File file = new File(path[i].dir.getPath(), name);
- files.put(name, new ClassFile(file));
- }
- }
- }
+ path[i].fillFiles(pkg, ext, files);
}
return files.elements();
}
@@ -266,9 +255,7 @@ class ClassPath {
*/
public void close() throws IOException {
for (int i = path.length; --i >= 0; ) {
- if (path[i].zip != null) {
- path[i].zip.close();
- }
+ path[i].close();
}
}
@@ -281,34 +268,216 @@ class ClassPath {
}
/**
- * A class path entry, which can either be a directory or an open zip file.
+ * A class path entry, which can either be a directory or an open zip file or an open jimage filesystem.
*/
-class ClassPathEntry {
- File dir;
- ZipFile zip;
+abstract class ClassPathEntry {
+ abstract ClassFile getFile(String name, String subdir, String basename, boolean isDirectory);
+ abstract void fillFiles(String pkg, String ext, Hashtable files);
+ abstract void close() throws IOException;
+}
- Hashtable subdirs = new Hashtable<>(29); // cache of sub-directory listings:
- String[] getFiles(String subdir) {
+// a ClassPathEntry that represents a directory
+final class DirClassPathEntry extends ClassPathEntry {
+ private final File dir;
+
+ DirClassPathEntry(File dir) {
+ this.dir = dir;
+ }
+
+ private final Hashtable subdirs = new Hashtable<>(29); // cache of sub-directory listings:
+ private String[] getFiles(String subdir) {
String files[] = subdirs.get(subdir);
if (files == null) {
- // search the directory, exactly once
- File sd = new File(dir.getPath(), subdir);
- if (sd.isDirectory()) {
- files = sd.list();
- if (files == null) {
- // should not happen, but just in case, fail silently
- files = new String[0];
- }
- if (files.length == 0) {
- String nonEmpty[] = { "" };
- files = nonEmpty;
- }
- } else {
- files = new String[0];
- }
+ files = computeFiles(subdir);
subdirs.put(subdir, files);
}
return files;
}
+ private String[] computeFiles(String subdir) {
+ File sd = new File(dir.getPath(), subdir);
+ String[] files = null;
+ if (sd.isDirectory()) {
+ files = sd.list();
+ if (files == null) {
+ // should not happen, but just in case, fail silently
+ files = new String[0];
+ }
+ if (files.length == 0) {
+ String nonEmpty[] = { "" };
+ files = nonEmpty;
+ }
+ } else {
+ files = new String[0];
+ }
+ return files;
+ }
+
+ ClassFile getFile(String name, String subdir, String basename, boolean isDirectory) {
+ File file = new File(dir.getPath(), name);
+ String list[] = getFiles(subdir);
+ if (isDirectory) {
+ if (list.length > 0) {
+ return ClassFile.newClassFile(file);
+ }
+ } else {
+ for (int j = 0; j < list.length; j++) {
+ if (basename.equals(list[j])) {
+ // Don't bother checking !file.isDir,
+ // since we only look for names which
+ // cannot already be packages (foo.java, etc).
+ return ClassFile.newClassFile(file);
+ }
+ }
+ }
+ return null;
+ }
+
+ void fillFiles(String pkg, String ext, Hashtable files) {
+ String[] list = getFiles(pkg);
+ for (int j = 0; j < list.length; j++) {
+ String name = list[j];
+ if (name.endsWith(ext)) {
+ name = pkg + File.separatorChar + name;
+ File file = new File(dir.getPath(), name);
+ files.put(name, ClassFile.newClassFile(file));
+ }
+ }
+ }
+
+ void close() throws IOException {
+ }
+}
+
+// a ClassPathEntry that represents a .zip or a .jar file
+final class ZipClassPathEntry extends ClassPathEntry {
+ private final ZipFile zip;
+
+ ZipClassPathEntry(ZipFile zip) {
+ this.zip = zip;
+ }
+
+ void close() throws IOException {
+ zip.close();
+ }
+
+ ClassFile getFile(String name, String subdir, String basename, boolean isDirectory) {
+ String newname = name.replace(File.separatorChar, '/');
+ ZipEntry entry = zip.getEntry(newname);
+ return entry != null? ClassFile.newClassFile(zip, entry) : null;
+ }
+
+ void fillFiles(String pkg, String ext, Hashtable files) {
+ Enumeration extends ZipEntry> e = zip.entries();
+ while (e.hasMoreElements()) {
+ ZipEntry entry = (ZipEntry)e.nextElement();
+ String name = entry.getName();
+ name = name.replace('/', File.separatorChar);
+ if (name.startsWith(pkg) && name.endsWith(ext)) {
+ files.put(name, ClassFile.newClassFile(zip, entry));
+ }
+ }
+ }
+}
+
+// a ClassPathEntry that represents jrt file system
+final class JrtClassPathEntry extends ClassPathEntry {
+ private final FileSystem fs;
+ // module directory paths in jrt fs
+ private final Set jrtModules;
+ // package name to package directory path mapping (lazily filled)
+ private final Map pkgDirs;
+
+ JrtClassPathEntry(FileSystem fs) {
+ this.fs = fs;
+ this.jrtModules = new LinkedHashSet<>();
+ this.pkgDirs = new HashMap<>();
+
+ // fill in module directories at the root dir
+ Path root = fs.getPath("/");
+ try {
+ try (DirectoryStream stream = Files.newDirectoryStream(root)) {
+ for (Path entry: stream) {
+ if (Files.isDirectory(entry))
+ jrtModules.add(entry);
+ }
+ }
+ } catch (IOException ioExp) {
+ throw new UncheckedIOException(ioExp);
+ }
+ }
+
+ void close() throws IOException {
+ }
+
+ // from pkgName (internal separator '/') to it's Path in jrtfs
+ synchronized Path getPackagePath(String pkgName) throws IOException {
+ // check the cache first
+ if (pkgDirs.containsKey(pkgName)) {
+ return pkgDirs.get(pkgName);
+ }
+
+ for (Path modPath : jrtModules) {
+ Path pkgDir = fs.getPath(modPath.toString(), pkgName);
+ // check if package directory is under any of the known modules
+ if (Files.exists(pkgDir)) {
+ // it is a package directory only if contains atleast one .class file
+ try (DirectoryStream stream = Files.newDirectoryStream(pkgDir)) {
+ for (Path p : stream) {
+ if (Files.isRegularFile(p) && p.toString().endsWith(".class")) {
+ // cache package-to-package dir mapping for future
+ pkgDirs.put(pkgName, pkgDir);
+ return pkgDir;
+ }
+ }
+ }
+ }
+ }
+
+ return null;
+ }
+
+ // fully qualified (internal) class name to it's Path in jrtfs
+ Path getClassPath(String clsName) throws IOException {
+ int index = clsName.lastIndexOf('/');
+ if (index == -1) {
+ return null;
+ }
+ Path pkgPath = getPackagePath(clsName.substring(0, index));
+ return pkgPath == null? null : fs.getPath(pkgPath + "/" + clsName.substring(index + 1));
+ }
+
+ ClassFile getFile(String name, String subdir, String basename, boolean isDirectory) {
+ try {
+ name = name.replace(File.separatorChar, '/');
+ Path cp = getClassPath(name);
+ return cp == null? null : ClassFile.newClassFile(cp);
+ } catch (IOException ioExp) {
+ throw new UncheckedIOException(ioExp);
+ }
+ }
+
+ void fillFiles(String pkg, String ext, Hashtable files) {
+ Path dir;
+ try {
+ dir = getPackagePath(pkg);
+ if (dir == null) {
+ return;
+ }
+ } catch (IOException ioExp) {
+ throw new UncheckedIOException(ioExp);
+ }
+
+ try (DirectoryStream stream = Files.newDirectoryStream(dir)) {
+ for (Path p : stream) {
+ String name = p.toString();
+ name = name.replace('/', File.separatorChar);
+ if (name.startsWith(pkg) && name.endsWith(ext)) {
+ files.put(name, ClassFile.newClassFile(p));
+ }
+ }
+ } catch (IOException ioExp) {
+ throw new UncheckedIOException(ioExp);
+ }
+ }
}
diff --git a/jdk/src/jdk.rmic/share/classes/sun/tools/java/FileClassFile.java b/jdk/src/jdk.rmic/share/classes/sun/tools/java/FileClassFile.java
new file mode 100644
index 00000000000..df8bb40d4a7
--- /dev/null
+++ b/jdk/src/jdk.rmic/share/classes/sun/tools/java/FileClassFile.java
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. 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. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.tools.java;
+
+import java.io.File;
+import java.io.InputStream;
+import java.io.FileInputStream;
+import java.io.IOException;
+
+/**
+ * This class is used to represent a file loaded from the class path, and
+ * is a regular file.
+ *
+ * WARNING: The contents of this source file are not part of any
+ * supported API. Code that depends on them does so at its own risk:
+ * they are subject to change or removal without notice.
+ */
+final
+class FileClassFile extends ClassFile {
+ private final File file;
+
+ /**
+ * Constructor for instance representing a regular file
+ */
+ public FileClassFile(File file) {
+ this.file = file;
+ }
+
+ @Override
+ public boolean isZipped() {
+ return false;
+ }
+
+ @Override
+ public InputStream getInputStream() throws IOException {
+ return new FileInputStream(file);
+ }
+
+ @Override
+ public boolean exists() {
+ return file.exists();
+ }
+
+ @Override
+ public boolean isDirectory() {
+ return file.isDirectory();
+ }
+
+ @Override
+ public long lastModified() {
+ return file.lastModified();
+ }
+
+ @Override
+ public String getPath() {
+ return file.getPath();
+ }
+
+ @Override
+ public String getName() {
+ return file.getName();
+ }
+
+//JCOV
+ @Override
+ public String getAbsoluteName() {
+ String absoluteName;
+ try {
+ absoluteName = file.getCanonicalPath();
+ } catch (IOException e) {
+ absoluteName = file.getAbsolutePath();
+ }
+ return absoluteName;
+ }
+// end JCOV
+
+ @Override
+ public long length() {
+ return file.length();
+ }
+
+ @Override
+ public String toString() {
+ return file.toString();
+ }
+}
diff --git a/jdk/src/jdk.rmic/share/classes/sun/tools/java/PathClassFile.java b/jdk/src/jdk.rmic/share/classes/sun/tools/java/PathClassFile.java
new file mode 100644
index 00000000000..315c0bd77df
--- /dev/null
+++ b/jdk/src/jdk.rmic/share/classes/sun/tools/java/PathClassFile.java
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. 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. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.tools.java;
+
+import java.io.InputStream;
+import java.io.IOException;
+import java.io.UncheckedIOException;
+import java.nio.file.attribute.BasicFileAttributes;
+import java.nio.file.Files;
+import java.nio.file.Path;
+
+/**
+ * This class is used to represent a file loaded from the class path, and
+ * is represented by nio Path.
+ *
+ * WARNING: The contents of this source file are not part of any
+ * supported API. Code that depends on them does so at its own risk:
+ * they are subject to change or removal without notice.
+ */
+final
+class PathClassFile extends ClassFile {
+ private final Path path;
+ private final BasicFileAttributes attrs;
+
+ /**
+ * Constructor for instance representing a Path
+ */
+ public PathClassFile(Path path) {
+ this.path = path;
+ try {
+ this.attrs = Files.readAttributes(path, BasicFileAttributes.class);
+ } catch (IOException ioExp) {
+ throw new UncheckedIOException(ioExp);
+ }
+ }
+
+ @Override
+ public boolean isZipped() {
+ return false;
+ }
+
+ @Override
+ public InputStream getInputStream() throws IOException {
+ return Files.newInputStream(path);
+ }
+
+ @Override
+ public boolean exists() {
+ return true;
+ }
+
+ @Override
+ public boolean isDirectory() {
+ return attrs.isDirectory();
+ }
+
+ @Override
+ public long lastModified() {
+ return attrs.lastModifiedTime().toMillis();
+ }
+
+ @Override
+ public String getPath() {
+ return path.toUri().toString();
+ }
+
+ @Override
+ public String getName() {
+ return path.getFileName().toString();
+ }
+
+//JCOV
+ @Override
+ public String getAbsoluteName() {
+ return path.toAbsolutePath().toUri().toString();
+ }
+// end JCOV
+
+ @Override
+ public long length() {
+ return attrs.size();
+ }
+
+ @Override
+ public String toString() {
+ return path.toString();
+ }
+}
diff --git a/jdk/src/jdk.rmic/share/classes/sun/tools/java/ZipClassFile.java b/jdk/src/jdk.rmic/share/classes/sun/tools/java/ZipClassFile.java
new file mode 100644
index 00000000000..4e68b3d1a6e
--- /dev/null
+++ b/jdk/src/jdk.rmic/share/classes/sun/tools/java/ZipClassFile.java
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. 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. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.tools.java;
+
+import java.io.File;
+import java.io.InputStream;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.zip.*;
+
+/**
+ * This class is used to represent a file loaded from the class path, and
+ * is a zip file entry.
+ *
+ * WARNING: The contents of this source file are not part of any
+ * supported API. Code that depends on them does so at its own risk:
+ * they are subject to change or removal without notice.
+ */
+final
+class ZipClassFile extends ClassFile {
+ private final ZipFile zipFile;
+ private final ZipEntry zipEntry;
+
+ /**
+ * Constructor for instance representing a zip file entry
+ */
+ public ZipClassFile(ZipFile zf, ZipEntry ze) {
+ this.zipFile = zf;
+ this.zipEntry = ze;
+ }
+
+ @Override
+ public boolean isZipped() {
+ return true;
+ }
+
+ @Override
+ public InputStream getInputStream() throws IOException {
+ try {
+ return zipFile.getInputStream(zipEntry);
+ } catch (ZipException e) {
+ throw new IOException(e.getMessage());
+ }
+ }
+
+ @Override
+ public boolean exists() {
+ return true;
+ }
+
+ @Override
+ public boolean isDirectory() {
+ return zipEntry.getName().endsWith("/");
+ }
+
+ @Override
+ public long lastModified() {
+ return zipEntry.getTime();
+ }
+
+ @Override
+ public String getPath() {
+ return zipFile.getName() + "(" + zipEntry.getName() + ")";
+ }
+
+ @Override
+ public String getName() {
+ return zipEntry.getName();
+ }
+
+//JCOV
+ @Override
+ public String getAbsoluteName() {
+ return zipFile.getName() + "(" + zipEntry.getName() + ")";
+ }
+// end JCOV
+
+ @Override
+ public long length() {
+ return zipEntry.getSize();
+ }
+
+ @Override
+ public String toString() {
+ return zipEntry.toString();
+ }
+}
diff --git a/jdk/src/jdk.rmic/share/classes/sun/tools/javac/BatchEnvironment.java b/jdk/src/jdk.rmic/share/classes/sun/tools/javac/BatchEnvironment.java
index e20b386d325..ae1b45a2030 100644
--- a/jdk/src/jdk.rmic/share/classes/sun/tools/javac/BatchEnvironment.java
+++ b/jdk/src/jdk.rmic/share/classes/sun/tools/javac/BatchEnvironment.java
@@ -160,17 +160,15 @@ class BatchEnvironment extends Environment implements ErrorConsumer {
static BatchEnvironment create(OutputStream out,
String srcPathString,
String classPathString,
- String sysClassPathString,
- String extDirsString){
+ String sysClassPathString) {
ClassPath[] classPaths = classPaths(srcPathString, classPathString,
- sysClassPathString, extDirsString);
+ sysClassPathString);
return new BatchEnvironment(out, classPaths[0], classPaths[1]);
}
protected static ClassPath[] classPaths(String srcPathString,
String classPathString,
- String sysClassPathString,
- String extDirsString) {
+ String sysClassPathString) {
// Create our source classpath and our binary classpath
ClassPath sourcePath;
ClassPath binaryPath;
@@ -196,30 +194,6 @@ class BatchEnvironment extends Environment implements ErrorConsumer {
}
appendPath(binaryPathBuffer, sysClassPathString);
- if (extDirsString == null) {
- extDirsString = System.getProperty("java.ext.dirs");
- }
- if (extDirsString != null) {
- StringTokenizer st = new StringTokenizer(extDirsString,
- File.pathSeparator);
- while (st.hasMoreTokens()) {
- String dirName = st.nextToken();
- File dir = new File(dirName);
- if (!dirName.endsWith(File.separator)) {
- dirName += File.separator;
- }
- if (dir.isDirectory()) {
- String[] files = dir.list();
- for (int i = 0; i < files.length; ++i) {
- String name = files[i];
- if (name.endsWith(".jar")) {
- appendPath(binaryPathBuffer, dirName + name);
- }
- }
- }
- }
- }
-
appendPath(binaryPathBuffer, classPathString);
sourcePath = new ClassPath(srcPathString);
@@ -718,7 +692,7 @@ class BatchEnvironment extends Environment implements ErrorConsumer {
// Couldn't find the source, try the one mentioned in the binary
if (bc.getSource() != null) {
- srcfile = new ClassFile(new File((String)bc.getSource()));
+ srcfile = ClassFile.newClassFile(new File((String)bc.getSource()));
// Look for the source file
srcfile = pkg.getSourceFile(srcfile.getName());
if ((srcfile != null) && srcfile.exists()) {
@@ -863,7 +837,7 @@ class BatchEnvironment extends Environment implements ErrorConsumer {
}
if (srcfile == null) {
String fn = (String)c.getClassDefinition().getSource();
- srcfile = new ClassFile(new File(fn));
+ srcfile = ClassFile.newClassFile(new File(fn));
}
} else {
// Get a source file name from the package
diff --git a/jdk/src/jdk.rmic/share/classes/sun/tools/javac/Main.java b/jdk/src/jdk.rmic/share/classes/sun/tools/javac/Main.java
index f7015dbd36e..835158c80b3 100644
--- a/jdk/src/jdk.rmic/share/classes/sun/tools/javac/Main.java
+++ b/jdk/src/jdk.rmic/share/classes/sun/tools/javac/Main.java
@@ -197,7 +197,6 @@ class Main implements Constants {
String sourcePathArg = null;
String classPathArg = null;
String sysClassPathArg = null;
- String extDirsArg = null;
boolean verbosePath = false;
String targetArg = null;
@@ -342,17 +341,6 @@ class Main implements Constants {
usage_error();
return false; // Stop processing now
}
- } else if (argv[i].equals("-extdirs")) {
- if ((i + 1) < argv.length) {
- if (extDirsArg != null) {
- error("main.option.already.seen","-extdirs");
- }
- extDirsArg = argv[++i];
- } else {
- error("main.option.requires.argument","-extdirs");
- usage_error();
- return false; // Stop processing now
- }
} else if (argv[i].equals("-encoding")) {
if ((i + 1) < argv.length) {
if (encoding!=null)
@@ -475,8 +463,7 @@ class Main implements Constants {
BatchEnvironment env = BatchEnvironment.create(out,
sourcePathArg,
classPathArg,
- sysClassPathArg,
- extDirsArg);
+ sysClassPathArg);
if (verbosePath) {
output(getText("main.path.msg",
env.sourcePath.toString(),
@@ -503,7 +490,7 @@ class Main implements Constants {
for (Enumeration e = v.elements() ; e.hasMoreElements() ;) {
File file = new File(e.nextElement());
try {
- env.parseFile(new ClassFile(file));
+ env.parseFile(ClassFile.newClassFile(file));
} catch (FileNotFoundException ee) {
env.error(0, "cant.read", file.getPath());
exitStatus = EXIT_CMDERR;
diff --git a/jdk/src/sample/share/jmx/jmx-scandir/index.html b/jdk/src/sample/share/jmx/jmx-scandir/index.html
index 4fd2ae65165..835e7a1cff6 100644
--- a/jdk/src/sample/share/jmx/jmx-scandir/index.html
+++ b/jdk/src/sample/share/jmx/jmx-scandir/index.html
@@ -36,9 +36,9 @@
JMX(TM) "scandir" Example
-
+
JavaTM Management Extensions (JMXTM) scandir Example
The JMX scandir example is an application that
@@ -59,7 +59,7 @@
solutions used when implementing a monitoring and
management interface for an application with JMX
Technology.
-
This example is an advanced JMX example, which presents
+
This example is an advanced JMX example, which presents
advanced JMX concepts. It is assumed that the reader is already
familiar with the JMX API. Newcomers to JMX Technology are
invited to have a look at the
In order to build the example,
you may need to copy the jmx-scandir
- directory to somewhere where you have write permissions.
+ directory to somewhere where you have write permissions.
In that case, you will need to update the nbjdk.home variable
- in the copied build.properties
- file located at the root of the copied project directory.
+ in the copied build.properties
+ file located at the root of the copied project directory.
Please make sure that this variable points to the JDK 6 home directory.
The JMX scandir example is built around the
following MBeans:
@@ -184,9 +184,9 @@ title="The ScanDirConfigMXBean is in charge of the configuration"
load/save the configuration to/from an XML file. It
will also let you modify that configuration - by e.g.
creating new directory scanners in there.
- The corresponding MBeans will be created later, only
+ The corresponding MBeans will be created later, only
when you later
- ask the ScanManagerMXBean to apply the
@@ -220,14 +220,14 @@ title="A ResultRecord contains information about a file matching the criteria of
The ResultLogManagerMXBean can be configured to log
such records to a flat file, or into a log held in memory, or
both. Both logs (file and memory) can be configured with a
- maximum capacity.
+ maximum capacity.
When the maximum capacity of the memory
log is reached, its first entry (i.e. its oldest entry) is
removed to make place for the latest one.
When the maximum
capacity of the file log is reached, the file is
renamed by appending a tilde '~' to its name and a
- new result log is created.
+ new result log is created.
The ResultLogManagerMXBean
will let you interactively clear these result logs, change their
capacity, and decide where (memory or file) to log.
@@ -246,7 +246,7 @@ title="A ResultRecord contains information about a file matching the criteria of
a single mail to each owner of matching files, containing
the list of files they should consider deleting).
The ResultLogManagerMXBean is a singleton
- MBean created by the ScanManagerMXBean
@@ -258,10 +258,10 @@ title="The ScanDirConfigMXBean is in charge of the configuration"
An application main() method is
- provided in the ScanDirAgent class. The main() simply registers
- a ScanDirAgent class. The main() simply registers
+ a ScanManagerMXBean in the platform MBeanServer, and
@@ -281,15 +281,15 @@ title="The ScanDirConfigMXBean is in charge of the configuration"
If the property scandir.config.file is
defined, the default application file will be the
file pointed to by this property. If that file
- doesn't exist, it will be created when
+ doesn't exist, it will be created when
ScanDirConfigMXBean.save() is
invoked.
Otherwise the application config file is
assumed to be a file called jmx-scandir.xml,
located in the user's directory (as defined by
- the System property user.home).
- If that file doesn't exists, it will be created when
+ the System property user.home).
+ If that file doesn't exists, it will be created when
ScanDirConfigMXBean.save() is
invoked.
@@ -299,8 +299,8 @@ title="The ScanDirConfigMXBean is in charge of the configuration"
With ScanDirAgent defined as the project's
- main class. Hence when you invoke from the NetBeans IDE
- Run Project on the jmx-scandir project,
+ main class. Hence when you invoke from the NetBeans IDE
+ Run Project on the jmx-scandir project,
or Run file on the ScanDirAgent, the
application starts with the test configuration provided in
src subdirectory.
This section discusses some common patterns and
design choices that this example demonstrates, and some pitfalls that
it avoids.
@@ -392,14 +392,14 @@ href="http://weblogs.java.net/blog/emcmanus/archive/2006/06/intermxbean_ref.html
title="Inter-MXBean references"
>Inter-MXBean References.
-
Hint: In order to simplify the task of coding a
+
Hint: In order to simplify the task of coding a
JMX programmatic client, we recommend that getters, setters, and
- operations defined in MBean and MXBean interfaces throw
+ operations defined in MBean and MXBean interfaces throw
IOException. Proxy objects will then be able
to rethrow directly any IOException received from
their underlying MBean Server connection, without wrapping
them into UndeclaredThrowableExceptions.
- Since the life cycle of the proxy object is not directly tied to
+ Since the life cycle of the proxy object is not directly tied to
the life cycle of the MBean it proxies, you may also want to
have all methods in the MBean or MXBean interface throw
InstanceNotFoundException or more generally
@@ -510,7 +510,7 @@ title="ScanManager.java"
the application MBeans are modeling objects
which are conceptually contained within
each other in a tree-like structure.
- For instance, most MBean names defined by
+ For instance, most MBean names defined by
J2EE Management (JSR 77) follow
this scheme.
@@ -519,7 +519,7 @@ title="ScanManager.java"
return ObjectName or
ObjectName[] values. The ObjectNames
point to the MBeans which are related to that
- object. For instance , GlassFish
@@ -604,7 +604,7 @@ title="Inter-MXBean references"
Sometimes also, an MBean may need to perform some
checks before being registered, or will need
- to carry out some actions right after it has been
+ to carry out some actions right after it has been
successfully registered in the MBeanServer.
@@ -617,13 +617,13 @@ title="Inter-MXBean references"
for it is to implement the MBeanRegistration
interface.
-
The MBeanRegistration interface is a callback
- interface which defines pre and post registration and
+
The MBeanRegistration interface is a callback
+ interface which defines pre and post registration and
unregistration callbacks.
When an MBean implementing this interface is created
- (with createMBean) or registered
+ (with createMBean) or registered
(with registerMBean) in an MBeanServer,
the MBeanServer will call the preRegister
and postRegister method implemented by
@@ -631,17 +631,17 @@ title="Inter-MXBean references"
has an MBeanServer and ObjectName
parameter, which are passed by the MBeanServer to the
MBean. The MBean can store the reference it is being passed
- in a private instance variable for later use.
+ in a private instance variable for later use.
Most of the MXBeans we have defined in this example
implement the MBeanRegistration interface. The table
below show how our MBeans use this interface to control
- their own names, make sanity checks, perform
+ their own names, make sanity checks, perform
initialization steps or cleanup actions.
The The ScanManagerMXBean needs a reference
to the MBeanServer in order to create and
- register other MBeans, such as the
+ register other MBeans, such as the
ResultLogManagerMXBean, and the
+ >ResultLogManagerMXBean, and the
The The ScanManagerMXBean will throw
an IllegalArgumentException in preRegister
if the ObjectName it is being passed is
- illegal. Throwing an exception in
+ illegal. Throwing an exception in
preRegister makes the registration fail.
@@ -692,9 +692,9 @@ title="The ScanManagerMXBean is the main MBean of the scandir application"
href="dist/javadoc/com/sun/jmx/examples/scandir/ScanDirConfigMXBean.html"
title="The ScanDirConfigMXBean is in charge of the configuration"
>ScanDirConfigMXBean propagates the
- value of the name= property of
+ value of the name= property of
the ObjectName it is given into its
- ScanManagerConfig bean.
+ ScanManagerConfig bean.
@@ -704,19 +704,19 @@ title="The ScanDirConfigMXBean is in charge of the configuration"
preRegister
The name that is returned by preRegister
is the ObjectName with which the MBean will be
- eventually registered.
+ eventually registered.
The ScanDirConfigMXBean is able to suggest
a value for its own ObjectName if none was
- provided. Similarly, the ScanManagerMXBean
+ >ScanManagerMXBean
always returns its singleton ObjectName
- defined by ScanManagerMXBean.SCAN_MANAGER_NAME.
@@ -736,7 +736,7 @@ title="The ScanDirConfigMXBean is in charge of the configuration"
known that the registration was successful.
postRegister
-
The postRegister method
+
The postRegister method
can be used to implement
initialization steps that need to be done once it
is known that the registration was successful, or to
@@ -745,11 +745,11 @@ title="The ScanDirConfigMXBean is in charge of the configuration"
The postRegister method has a Boolean parameter
which tells the MBean whether it was or wasn't
successfully registered in the MBeanServer.
- The ScanManagerMXBean uses postRegister to create
- and register other MBeans, such as the
+ and register other MBeans, such as the
check whether the MBean can be deregistered
preDeregister
-
The The ScanManagerMXBean uses this method to verify
- that its state allows it to be deregistered.
+ that its state allows it to be deregistered.
In particular, it will refuse to be deregistered
if it is in the RUNNING or SCHEDULED state.
If preDeregister throws an exception, the unregisterMBean
call will fail and the MBean will remain registered in
- the MBeanServer.
+ the MBeanServer.
Take particular care when implementing business logic
- in this method: if the logic you implement has an
- unfortunate bug which makes it always throw an
+ in this method: if the logic you implement has an
+ unfortunate bug which makes it always throw an
exception, you will never be able to unregister
that MBean.
@@ -788,19 +788,19 @@ title="The ScanManagerMXBean is the main MBean of the scandir application"
it fails
preDeregister
-
The The ScanManagerMXBean uses this method to unregister
all the other MBeans it has created and registered in the
MBeanServer. This includes the ResultLogManagerMXBean, the
+ >ResultLogManagerMXBean, the
ScanDirConfigMXBeans it has created, and the
+ >ScanDirConfigMXBeans it has created, and the
postDeregister is only called if the MBean was succesfully
unregistered.
- The ScanManagerMXBean uses this method to cancel
its internal java.util.Timer.
@@ -834,25 +834,25 @@ title="The ScanManagerMXBean is the main MBean of the scandir application"
instance registered in a given MBeanServer.
A singleton MBean usually has a well-known name,
which can be defined as a constant. In that case,
- clients no longer need to call new ObjectName(...)
+ clients no longer need to call new ObjectName(...)
and catch the declared MalformedObjectNameException.
There are already quite a few examples of singleton
- MBeans in the java.lang.management API. The
+ MBeans in the java.lang.management API. The
ThreadingMXBean, ClassLoadingMXBean, RuntimeMXBean, etc.
are all singleton MBeans.
In this example, we have two singleton MBeans:
- The ScanManagerMXBean and the
+ >ScanManagerMXBean and the
ResultLogManagerMXBean. But in fact,
- the only real singleton MBean is the
- ScanManagerMXBean. The
+ the only real singleton MBean is the
+ ScanManagerMXBean. The
ResultLogManagerMXBean just happens to
be a singleton MBean because it has a 1-1 relationship
with the ScanManagerMXBean.
@@ -861,15 +861,15 @@ title="The ResultLogManagerMXBean is in charge of managing result logs"
singleton MBean pattern in this way:
-
The ScanManagerMXBean name has a single
+
The ScanManagerMXBean name has a single
key property: type=ScanManagerMXBean.
Its name is defined by an ObjectName constant called
SCAN_MANAGER_NAME in the ScanManager class
-
The ScanManagerMXBean enforces its status of
+
The ScanManagerMXBean enforces its status of
singleton MBean. It will refuse to be registered
with a name other than
the SCAN_MANAGER_NAME. You can therefore depend on
- the fact that the ScanManagerMXBean will always
+ the fact that the ScanManagerMXBean will always
be registered with its singleton SCAN_MANAGER_NAME
(see preRegister)
@@ -879,18 +879,18 @@ title="The ResultLogManagerMXBean is in charge of managing result logs"
its singleton SCAN_MANAGER_NAME
(see preRegister).
-
The ScanManager class has a no-arg static
+
The ScanManager class has a no-arg static
register method that will register
the singleton instance in the Platform MBeanServer.
This static register method returns
a proxy to the registered singleton.
-
The ScanManager class has also a static
+
The ScanManager class has also a static
register method that will create
a singleton instance in a (possibly remote)
- MBeanServerConnection - using
+ MBeanServerConnection - using
createMBean.
- This static register method
+ This static register method
also returns a proxy to the registered singleton.
Only the MBeanServer has a reference to the
@@ -906,7 +906,7 @@ title="The ResultLogManagerMXBean is in charge of managing result logs"
>ResultLogManagerMXBean
has a much more relaxed implementation of the pattern:
It simply provides its own singleton name if it is
- registered with a null ObjectName, but will not enforce
+ registered with a null ObjectName, but will not enforce
the use of that name.
Note that all singleton MBean names in this example
@@ -923,16 +923,16 @@ title="The ResultLogManagerMXBean is in charge of managing result logs"
In this example, we have decided to follow a simple
pattern:
The ScanManagerMXBean will then
- in turn register any other MBean that the
+ in turn register any other MBean that the
application might need:
It creates and registers the singleton
@@ -948,14 +948,14 @@ title="The ScanDirConfigMXBean is in charge of the configuration"
>ScanDirConfigMXBean
which loads the initial configuration
It lets you create alternate
ScanDirConfigMXBean, to
which you can later switch in order
to apply a new alternate configuration.
@@ -963,7 +963,7 @@ title="A DirectoryScannerMXBean looks for file matching a given set of criteria,
When a new configuration is applied (or if the
- current configuration is reapplied), the
+ current configuration is reapplied), the
ScanManagerMXBean will unregister
any DirectoryScannerMXBeans it has
previously registered, and will re-create
@@ -984,11 +984,11 @@ title="A DirectoryScannerMXBean looks for file matching a given set of criteria,
method).
You will note that the ScanManagerMXBean
- will only allow itself to be deregistered if it can be
+ will only allow itself to be deregistered if it can be
closed - that is if there's no other action in
- progress.
+ progress.
This is to make sure that the deregistration of
- dependent MBeans will work smoothly.
+ dependent MBeans will work smoothly.
The deregistration of related MBeans will happen
in the ScanManager.preDeregister
@@ -1007,13 +1007,13 @@ title="A DirectoryScannerMXBean looks for file matching a given set of criteria,
Handling the LifeCycle of all the application's
MBeans in a single MBean is usually a good design
- pattern, especially if the application is a
+ pattern, especially if the application is a
module which is intended to share a JVM - or
an MBeanServer - with other modules.
This is specially useful if the application needs to
- be loaded and unloaded on demand: in that
- case, simply registering or unregistering the top level
+ be loaded and unloaded on demand: in that
+ case, simply registering or unregistering the top level
MBean (in our example the ScanManagerMXBean) does
the trick.
@@ -1021,29 +1021,29 @@ title="A DirectoryScannerMXBean looks for file matching a given set of criteria,
Emitting Notifications
In order to emit notifications, an MBean must be
- an instance of NotificationEmitter.
- The NotificationEmitter interface defines methods
+ an instance of NotificationEmitter.
+ The NotificationEmitter interface defines methods
that the MBeanServer will call on the MBean in order
to register NotificationListeners with the MBean.
It is worth noting that the MBean may not be
invoked each time a JMX client wants to register
a listener. For instance, the RMIConnectorServer
- registers only once a single listener with each MBean
+ registers only once a single listener with each MBean
which is a NotificationEmitter.
In that specific case, the listener may even be registered
with the MBean before any client has actually subscribed
for notifications from that particular MBean.
-
An MBean can therefore make no assumption about
+
An MBean can therefore make no assumption about
which client or how many clients have registered for
notifications.
It is also worth noting that the logic of the
methods defined in NotificationEmitter would not
be trivial to implement from scratch. Fortunately
- the JMX API defines a helper class, called
- NotificationBroadcasterSupport, which
+ the JMX API defines a helper class, called
+ NotificationBroadcasterSupport, which
provides an implementation for these methods.
There are actually three ways for an MBean to
@@ -1061,7 +1061,7 @@ title="A DirectoryScannerMXBean looks for file matching a given set of criteria,
then override its getNotificationInfo method
which returns the MBeanNotificationInfo[] array
that should be included in your MBean's MBeanInfo
- and that's it.
+ and that's it.
You just need to call the sendNotification method
inherited from NotificationBroadcasterSupport whenever
your MBean needs to send a notification.
@@ -1072,67 +1072,67 @@ title="The ScanDirConfigMXBean is in charge of the configuration"
>ScanDirConfigMXBean and ResultLogManagerMXBean extend
+ >ResultLogManagerMXBean extend
NotificationBroadcasterSupport in order
to send notifications.
-
The Delegation Pattern: delegating to a
+
The Delegation Pattern: delegating to a
NotificationBroadcasterSupport delegate
There may be cases however where delegating to a
- wrapped NotificationBroadcasterSupport
- object may be preferred to extending
+ wrapped NotificationBroadcasterSupport
+ object may be preferred to extending
NotificationBroadcasterSupport.
For instance, if your MBeans already derive from
some base class, extending NotificationBroadcasterSupport
might not be an option.
-
Similarly, if you do not want to have the inherited
+
Similarly, if you do not want to have the inherited
public void sendNotification(Notification notification)
method appear in the Javadoc of the concrete class of your
MBean, you may want to consider using the delegation
- pattern instead of extending
+ pattern instead of extending
NotificationBroadcasterSupport
-
In our example both the In our example both the ScanManagerMXBean and the DirectoryScannerMXBean use the delegation
- pattern rather than extending
+ >DirectoryScannerMXBean use the delegation
+ pattern rather than extending
NotificationBroadcasterSupport.
In the end, choosing between one or the other method
- is more a question of taste, although the delegation
+ is more a question of taste, although the delegation
pattern could be considered more flexible since it
doesn't require extending any given superclass.
It may be also worth noting that some tools like
- the JMX Module of NetBeans IDE, will be able to
+ >NetBeans IDE, will be able to
generate for you all the code that delegates to a
wrapped NotificationBroadcasterSupport.
-
+
Implementing NotificationEmitter from scratch
This is the last possibility for an MBean that
- needs to send notifications: simply implement
+ needs to send notifications: simply implement
NotificationEmitter from scratch. This is highly
- discouraged since that logic is not trivial, and
- already provided by
+ discouraged since that logic is not trivial, and
+ already provided by
NotificationBroadcasterSupport anyway.
-
+
Beware of Synchronization Locks
-
+
One thing you must keep in mind when sending
notifications is not to send them from within
a synchronized block, or while holding a lock on
@@ -1140,10 +1140,10 @@ href="http://www.netbeans.org"
Indeed, what happens when you send a notification
may vary greatly depending on whether the client
which has registered for notifications has done
- so through a JMXConnector (like the
+ so through a JMXConnector (like the
JMXRMIConnector)
or through a direct reference to the MBeanServer
- (by calling
+ (by calling
MBeanServer.addNotificationListener).
In this latter case, the listener will be invoked
@@ -1152,7 +1152,7 @@ href="http://www.netbeans.org"
code of that listener now re-enters your MBean through a
call that flows through a JMXConnector, a deadlock
could occur. It is therefore very important to release
- any lock you may have before calling
+ any lock you may have before calling
sendNotification.
An easy way to do that is demonstrated in the
ScanManager class. The ScanManager
@@ -1160,20 +1160,20 @@ href="http://www.netbeans.org"
When a notification needs to be sent (e.g. because the
ScanManager state is being switched), the notification
is simply prepared and put into the pending notification
- queue.
- The notification queue is then processed later on,
+ queue.
+ The notification queue is then processed later on,
at the end of the method, when the processing is finally
completed and all the locks have been released.
At this point the notification queue might already
have been emptied by another thread - in which case
the pending notifications will have already been
- removed from the queue. Which thread actually gets
- to send the notifications is of no importance. The
+ removed from the queue. Which thread actually gets
+ to send the notifications is of no importance. The
important point is that all the locks detained by
your MBean code in that thread were released before
the notification was sent.
-
In our example the ScanManager class
+
In our example the ScanManager class
ensures this by:
Only calling sendNotification
@@ -1183,14 +1183,14 @@ href="http://www.netbeans.org"
Only calling sendQueuedNotifications
when all locks have been released.
-
Never calling a method that calls
+
Never calling a method that calls
sendQueuedNotifications from within
a synchronized block.
Indeed, if you code your own subclass, a generic
client, like jconsole, will not be able to receive
- that notification unless it has that custom
+ that notification unless it has that custom
subclass in its classpath.
If you want your application to be interoperable, it is
therefore preferable not to subclass any of the standard
- Notification classes. You can define your own
+ Notification classes. You can define your own
Notification type string, and if you need to send
- additional data, you can put a CompositeData, or a
- HashMap of serializable standard types in the
+ additional data, you can put a CompositeData, or a
+ HashMap of serializable standard types in the
Notification's user data fields.
-
In this example, we are using directly the
+
In this example, we are using directly the
standard notification classes:
A common practice when designing a management application is
- to have an MBean, or a set of MBeans, dedicated to configuration.
+ to have an MBean, or a set of MBeans, dedicated to configuration.
Separating configuration from control and monitoring allows
- more appropriate logic, and often simplifies the design and
+ more appropriate logic, and often simplifies the design and
implementation of the management interface.
@@ -1312,16 +1312,16 @@ href="dist/javadoc/com/sun/jmx/examples/scandir/ScanDirConfigMXBean.html"
title="The ScanDirConfigMXBean is in charge of the configuration"
>ScanDirConfigMXBean is dedicated to the application configuration.
-
The ScanDirConfigMXBean will let you interactively
+
The ScanDirConfigMXBean will let you interactively
modify, save, or load the application configuration. The modifications
will not be taken into account until it is applied, by invoking
- applyConfiguration on the applyConfiguration on the ScanManagerMXBean.
+ >ScanManagerMXBean.
It is also possible to create many configurations, by creating as
many ScanDirConfigMXBeans, and then to choose and apply
- one of these configurations by calling
+ one of these configurations by calling
ScanManagerMXBean.setConfigurationMBean and then
ScanManagerMXBean.applyConfiguration.
@@ -1331,26 +1331,26 @@ title="The ScanManagerMXBean is the main MBean of the scandir application"
In order to save and store the application configuration data, the
ScanDirConfigMXBean uses a set of XML serializable Java beans
- defined in the com.sun.jmx.examples.scandir.config package. These beans are very
simple Java beans which have been lightly annotated for XML binding.
It is worth noting that these same beans can also be handled by the
- MXBean framework (our beans don't contain recursive data structures) and can
+ MXBean framework (our beans don't contain recursive data structures) and can
therefore be used directly as attributes and parameters of MXBeans, without
needing to be Java-serializable (the MXBean framework transform them in
CompositeData objects - which are serializable).
-
The same The same ScanManagerConfig bean that we use to read from and write to the
XML configuration file is thus also used as attribute of the ScanDirConfigMXBean. It is transformed into a CompositeData
+ >ScanDirConfigMXBean. It is transformed into a CompositeData
by the MXBean framework, and can be easily introspected with
jconsole.
@@ -1358,7 +1358,7 @@ title="The ScanDirConfigMXBean is in charge of the configuration"
MBeans Must Be Thread-Safe
A question often asked by newcomers to JMX technology
- is whether the MBeanServer is thread-safe. Well, the MBeanServer is
+ is whether the MBeanServer is thread-safe. Well, the MBeanServer is
thread safe, but it doesn't put any locks on the MBeans it contains. The
MBeans can be concurrently accessed by multiple threads, and must therefore
take care of their own thread safety.
@@ -1382,19 +1382,19 @@ title="The ScanDirConfigMXBean is in charge of the configuration"
MBean will have any side effect. Maybe that MBean will make
further calls to other MBeans which will in turn try to call
your MBean, or maybe it will emit a
- notification, and we'll be back to the considerations just
+ notification, and we'll be back to the considerations just
above.
Another means of implementing thread-safe code is to use semaphores.
- The ScanManagerMXBean uses a semaphore called
sequencer to ensure
that critical code sections are not executed concurrently. In this
MBean, we use Semaphore.tryAcquire to lock the sequencer
- semaphore before entering the critical section. If the
+ semaphore before entering the critical section. If the
Semaphore.tryAcquire returns true then we enter the critical
section. If it returns false, we throw an IllegalStateException, stating
that we couldn't acquire the lock. The code looks like this:
@@ -1416,21 +1416,21 @@ title="The ScanManagerMXBean is the main MBean of the scandir application"
the calling code will get the IllegalStateException
instead of being blocked on the deadlocked lock.
-
It is worth noting that each of these techniques has its own
+
It is worth noting that each of these techniques has its own
advantages and disadvantages - which can make one of them more or less
appropriate depending on the inner logic of the MBean you're implementing.
-
Careful readers will also have noted that we used
- IllegalStateException directly, instead of defining
+
Careful readers will also have noted that we used
+ IllegalStateException directly, instead of defining
our own subclass of RuntimeException, which could have had a more
precise semantics. If you define a new exception for your JMX application,
you must keep in mind that your client will need to have the class
- of your exception in its classpath to get that exception.
+ of your exception in its classpath to get that exception.
Otherwise your client will get a completely different exception, indicating a
deserialization issue.
-
+
Waiting for Notifications
Implementing code that needs to wait for notifications is sometimes
@@ -1450,9 +1450,9 @@ title="The ScanManagerMXBean is the main MBean of the scandir application"
is not always trivial. However, there's a very easy way to do that: use
a blocking queue of notifications.
- final BlockingQueue<Notification> notifQueue =
+ final BlockingQueue<Notification> notifQueue =
new LinkedBlockingQueue<Notification>();
-
+
final NotificationListener listener = new NotificationListener() {
public void handleNotification(Notification notification,
Object handback) {
@@ -1482,13 +1482,13 @@ title="The ScanManagerMXBean is the main MBean of the scandir application"
....
Holding hard references to other MBeans: proxy or direct reference?
We have seen that MXBeans will let you return proxy references to other
@@ -1500,7 +1500,7 @@ title="The ScanDirAgent class defines a main method for the scandir application"
only held by the MBeanServer. It is a better design
to hold a reference to a proxy, rather than to hold
a hard reference to an MBean. However there are two cases
- when holding a hard reference might be preferred:
+ when holding a hard reference might be preferred:
When MBean A needs to call a method of method B which
is not part of its MBean interface
@@ -1513,51 +1513,51 @@ title="The ScanDirAgent class defines a main method for the scandir application"
and the application can ensure that the life cycle
of each MBean is consistent with regard to the other.
-
In our example, the In our example, the ScanManagerMXBean holds only proxy references to the ScanDirConfigMXBean and the ScanManagerMXBean holds only proxy references to the ScanDirConfigMXBean and the DirectoryScannerMXBeans.
- However it holds a direct reference to the ResultLogManager. This makes it possible to pass a direct
- reference to the DirectoryScannerMXBeans,
+ However it holds a direct reference to the ResultLogManager. This makes it possible to pass a direct
+ reference to the DirectoryScannerMXBeans,
which can then log their results
more efficiently, and would also make it possible to remove
- the log method from the ResultLogManagerMXBean interface - leaving it in the
+ the log method from the ResultLogManagerMXBean interface - leaving it in the
ResultLogManager class (possibly as a package method)
should we wish to do so.
-
+
Agent Class
-
The The ScanDirAgent is the Agent class for the scandir application.
- This class contains the main method to start a standalone
+ This class contains the main method to start a standalone
scandir application.
- When the ScanManagerMXBean state is switched to
- ScanManagerMXBean.ScanState.CLOSED, the
+ When the ScanManagerMXBean state is switched to
+ ScanManagerMXBean.ScanState.CLOSED, the
ScanManagerMXBean is unregistered, and the application
terminates (i.e. the main thread completes).
-
Standalone JMX applications usually have an Agent class that contain
+
Standalone JMX applications usually have an Agent class that contain
their main method, which performs all the MBean
registration steps.
However, it is usually not a bad idea if that class can
@@ -1566,19 +1566,19 @@ title="The ScanManagerMXBean is the main MBean of the scandir application"
no longer be standalone and would no longer control the implementation
of main. In our example the Agent
class could be easily turned into an MBean, exposing its three
- init, waitForClose and cleanup
- method. However we didn't go as far as turning it into an MBean since
+ init, waitForClose and cleanup
+ method. However we didn't go as far as turning it into an MBean since
the application can be already easily started by registering an instance
- of ScanManagerMXBean.
Secure Client Class
-
The The ScanDirClient is an example class that shows how a
programmatic client can connect to a secured scandir application.
@@ -1596,18 +1596,18 @@ title="The ScanDirClient class is a very short example of secure programmatic cl
the example.
Make sure that you have access to junit.jar (either 3.8.1 or 3.8.2).
- Make sure also that you have junit.jar in your
+ Make sure also that you have junit.jar in your
CLASSPATH.
- Then in the example root directory (where the build.xml
+ Then in the example root directory (where the build.xml
file is located) run the following command:
ant test -Dlibs.junit.classpath=path to junit jar (either 3.8.1 or 3.8.2)
-
Alternatively you can open the jmx-scandir project with the
- NetBeans IDE and test the jmx-scandir project from the
+
Alternatively you can open the jmx-scandir project with the
+ NetBeans IDE and test the jmx-scandir project from the
Run menu.
@@ -1615,18 +1615,18 @@ title="The ScanDirClient class is a very short example of secure programmatic cl
In the example root directory (where the build.xml
+
In the example root directory (where the build.xml
file is located) run the following commands:
ant jar
ant run-single -Drun.class=com.sun.jmx.examples.scandir.ScanDirAgent -Djavac.includes=src
or simply
ant run
-
+
This will run the example using the configuration
file provided in the src/etc directory.
-
Alternatively you can open the jmx-scandir project with the
- NetBeans IDE. You can run the example by
+
Alternatively you can open the jmx-scandir project with the
+ NetBeans IDE. You can run the example by
selecting the ScanDirAgent file
and run it with Run File in the
Run menu or simply
@@ -1639,10 +1639,10 @@ ant run-single -Drun.class=com.sun.jmx.examples.scandir.ScanDirAgent -Djavac.inc
it with jconsole.
- Note: You can also run the scandir
- application directly from the java
+ Note: You can also run the scandir
+ application directly from the java
command line. Make sure to build the project jar
- first.
+ first.
On Unix systems:
ant jar
java -Djava.util.logging.config.file=logging.properties \
@@ -1655,11 +1655,11 @@ java -Djava.util.logging.config.file=logging.properties
-jar dist\jmx-scandir.jar
Run the example as explained in the previous section, so
- that it uses the provided src/etc/testconfig.xml
+ that it uses the provided src/etc/testconfig.xml
configuration file. Then start
jconsole. In the connection window choose the process that runs
com.sun.jmx.examples.scandir.ScanDirAgent or
@@ -1685,7 +1685,7 @@ java -Djava.util.logging.config.file=logging.properties
-
Open the MBeans tab, and look for the
+
Open the MBeans tab, and look for the
ScanDirConfigMXBean.
Click on its Attributes node and double click on its
Configuration attribute, to look at
@@ -1694,79 +1694,79 @@ java -Djava.util.logging.config.file=logging.properties
Now go to the ScanManagerMXBean, click on
its Notifications node, and subscribe
- for notifications. Then click on the
+ for notifications. Then click on the
Operations node and invoke the
start() operation:
-
You can see that the notifications counter was
- incremented by three: you have just scheduled,
+
You can see that the notifications counter was
+ incremented by three: you have just scheduled,
run, and completed a batch of directory scans.
Now go to the ResultLogManagerMXBean,
- click on its Attributes node, and
+ click on its Attributes node, and
expand its MemoryLog attribute:
You can see that the directory scan results have
been logged.
-
To make the application terminate go back to the
+
To make the application terminate go back to the
ScanManagerMXBean and invoke
close(). The ScanDirAgent
- will receive the notification, step out of
+ will receive the notification, step out of
the application main thread, and the application
will terminate.
This is of course a very limited scenario. Feel free
to improvise with all the features of the example, creating
- a new configuration -
+ a new configuration -
ScanManagerMXBean.createOtherConfigurationMBean -
adding multiple directory scanners to that configuration -
ScanDirConfigMXBean.addDirectoryScanner -
then switching the ScanManagerMXBean current
configuration by changing the value of the ConfigurationMBean
attribute - ScanManagerMXBean.setConfigurationMBean
- - then applying the new configuration -
- ScanManagerMXBean.applyConfiguration(true) -
- then scheduling repeated directory scans every 10 seconds -
- ScanManagerMXBean.schedule(0,10000) -
+ - then applying the new configuration -
+ ScanManagerMXBean.applyConfiguration(true) -
+ then scheduling repeated directory scans every 10 seconds -
+ ScanManagerMXBean.schedule(0,10000) -
subscribing for notifications, etc...
In this section, we will see how to configure and
start the scandir example so that the JVM agent
- is bootstrapped with a secure JMXConnectorServer. Indeed, until
- now we have only used the insecure local connection,
+ is bootstrapped with a secure JMXConnectorServer. Indeed, until
+ now we have only used the insecure local connection,
which can only be used as long as both the client and
the server run on the same machine. This section will
- explain how to start the ScanDirAgent so
+ explain how to start the ScanDirAgent so
that a real secure RMIConnectorServer is started at bootstrap.
The easiest way to configure the
+ JVM Agent for Secure Remote
Connection is to use your own management.properties file.
- In this example, we have copied the default
- $JRE/lib/management/management.properties
+ In this example, we have copied the default
+ $JRE/conf/management/management.properties
file to the example's src/etc directory and
modified it in this way:
-
We have set the RMI port to 4545 - this is just a
- random port number we have picked up. Feel free to use your
+
We have set the RMI port to 4545 - this is just a
+ random port number we have picked up. Feel free to use your
own value suited to your environment.
# For setting the JMX RMI agent port use the following line
com.sun.management.jmxremote.port=4545
# For a non-default password file location use the following line
com.sun.management.jmxremote.access.file=src/etc/access.properties
You will note that we haven't provided any value
- for the other security properties, like
+ for the other security properties, like
com.sun.management.jmxremote.authenticate=true,
because these properties already default to a value
- which enables security by default.
+ which enables security by default.
Note however that protecting the RMI Registry with SSL
improves the application security, but only as long as
mutual authentication is also switched on. Otherwise, just
- anybody would be able to connect to the registry and
+ anybody would be able to connect to the registry and
get the RMIServer stub.
We do recommend that you use the most secure configuration
@@ -1829,21 +1829,21 @@ com.sun.management.jmxremote.access.file=src/etc/access.properties
mutual authentication, as we show in this example.
We will use the com.sun.management.config.file
- system property to pass our management.properties
file to the ScanDirAgent.
In the password file, we have defined two logins:
- guest and admin. The password for
+
In the password file, we have defined two logins:
+ guest and admin. The password for
guest is guestpasswd and the password
for admin is adminpasswd.
@@ -1852,7 +1852,7 @@ com.sun.management.jmxremote.access.file=src/etc/access.properties
access, while the guest login only has read-only.
Before starting the ScanDirAgent, you will
- need to restrict access permission to the password file,
+ need to restrict access permission to the password file,
in such a way that nobody but you can read it. Otherwise, the
JVM Agent will refuse to start the JMXConnectorServer, as it will
fear that security can be compromised if other parties can
@@ -1863,7 +1863,7 @@ com.sun.management.jmxremote.access.file=src/etc/access.properties
>here.
As we have seen above, the location
- of our access and password files is configured in our own management.properties
file.
@@ -1874,17 +1874,17 @@ com.sun.management.jmxremote.access.file=src/etc/access.properties
client and server will need a keystore and a truststore
to store their own certificates, and the certificates of
- the parties they trust. Usually, client and server will
- have their own keystore and truststore.
+ the parties they trust. Usually, client and server will
+ have their own keystore and truststore.
For the sake of simplicity - and to get you started
without the tedious necessity of creating your own keystore
- and truststore, we are providing a dummy keystore and
+ and truststore, we are providing a dummy keystore and
truststore, containing a certificate self-signed by duke.
The password for our keystore is password, and the
password for our truststore is trustword.
We suggest that you first get the example running with the
- keystore and truststore we are providing before attempting
+ keystore and truststore we are providing before attempting
to use your own keystore and truststore.
A secure application will obviously need to use its own
@@ -1895,9 +1895,9 @@ com.sun.management.jmxremote.access.file=src/etc/access.properties
in here.
- As shown later,
- we will need to use here.
+ As shown later,
+ we will need to use system properties to pass our truststore
and keystore to the ScanDirAgent.
@@ -1923,7 +1923,7 @@ java \
On Windows Systems:
ant jar
-java
+java
-Djava.util.logging.config.file=logging.properties
-Djavax.net.ssl.keyStore=keystore
-Djavax.net.ssl.keyStorePassword=password
@@ -1934,10 +1934,10 @@ java
-jar dist\jmx-scandir.jar
If you start jconsole now, you will see that you
- are still able to connect to the agent using the
+ are still able to connect to the agent using the
local connection. However, if you try to connect
- through the remote connector, using
- localhost:4545,
+ through the remote connector, using
+ localhost:4545,
the connection will fail, even if you provide a correct login/password
pair. Indeed, since the JMXConnectorServer is now protected with SSL,
@@ -1946,18 +1946,18 @@ java
server too as the SSL configuration of the server requires mutual
authentication.
-
The next section will discuss how to connect to the
+
The next section will discuss how to connect to the
secure agent.
We will now see how to connect to the secure agent,
using jconsole, and using a programmatic client.
-
+
Using jconsole to connect to the secure agent
The only special thing you need to do in order to
@@ -1968,8 +1968,8 @@ java
In our example, we use the same keystore/truststore
pair on the client and server side - but this is
not what a real application would do.
- Indeed a real application would have different
- certificates for the client and the server, and
+ Indeed a real application would have different
+ certificates for the client and the server, and
thus use different keystores (and probably truststores).
More information on SSL authentication can be obtained from the JavaTM Secure Socket Extension (JSSE) Reference Guide.
To start jconsole with our provided keystore and
- truststore, go to the scandir example root directory and
+ truststore, go to the scandir example root directory and
type in the following command:
-
The -J-Djava.util.logging.config.file=logging.properties
flag is not mandatory, but passing a logging.properties
may help you debug connection problems if anything goes wrong.
-
In jconsole connection window, choose to connect to a
+
In jconsole connection window, choose to connect to a
remote process, using the address localhost:4545
and the guest login:
@@ -2006,9 +2006,9 @@ java
Note: if jconsole fails to connect and show
you this screen
you have probably misspelled some of the properties on jconsole
- command line, or you didn't start jconsole from the
+ command line, or you didn't start jconsole from the
scandir example root directory where our truststore
- and keystore files are located. This article - keystore files are located. This article - Troubleshooting connection problems in JConsole - may help
@@ -2016,28 +2016,28 @@ java
-
+
Writing a programmatic client to connect to the secure agent
- In this section we will show the steps involved in writing
+ In this section we will show the steps involved in writing
a programmatic client that will connect to our secure agent.
-
The The ScanDirClient is an example class that shows how a
programmatic client can connect to a secured scandir application.
This class contains a main method which creates and
configures a JMXConnector client to connect with
- the secured scandir agent.
+ the secured scandir agent.
The secure client differs only from a non secure client in
so far as it needs to use SSL RMI Factories and credentials to
connect to the secure agent. The steps required mainly involve:
Creating an empty environment map:
-
+
// Create an environment map to hold connection properties
// like credentials etc... We will later pass this map
// to the JMX Connector.
@@ -2048,7 +2048,7 @@ title="The ScanDirClient class is a very short example of secure programmatic cl
Putting the client's credentials in that map:
(here the client will log in as guest)
-
+
// Provide the credentials required by the server
// to successfully perform user authentication
//
@@ -2058,7 +2058,7 @@ title="The ScanDirClient class is a very short example of secure programmatic cl
Providing an SslRMIClientSocketFactory to interact
with the secure RMI Registry:
-
+
// Provide the SSL/TLS-based RMI Client Socket Factory required
// by the JNDI/RMI Registry Service Provider to communicate with
// the SSL/TLS-protected RMI Registry
@@ -2078,20 +2078,20 @@ title="The ScanDirClient class is a very short example of secure programmatic cl
System.out.println("\nCreate the RMI connector client and " +
"connect it to the RMI connector server");
final JMXServiceURL url = new JMXServiceURL(
- "service:jmx:rmi:///jndi/rmi://"+args[0]+":"+args[1]+
+ "service:jmx:rmi:///jndi/rmi://"+args[0]+":"+args[1]+
"/jmxrmi");
final JMXConnector jmxc = JMXConnectorFactory.connect(url, env);
For this to work, we also need to start the ScanDirClient
- with the appropriate system properties that will point to our
- keystore and truststore. To start the secure
+ with the appropriate system properties that will point to our
+ keystore and truststore. To start the secure
client, go to the scandir example root directory and type
the following command:
ant jar
-java
- -Djava.util.logging.config.file=logging.properties
+java
+ -Djava.util.logging.config.file=logging.properties
-Djavax.net.ssl.keyStore=keystore
-Djavax.net.ssl.keyStorePassword=password
-Djavax.net.ssl.trustStore=truststore
@@ -2140,7 +2140,7 @@ Configuration:
Invoke 'close' on ScanManagerMXBean
-Got expected security exception: java.lang.SecurityException: Access denied!
+Got expected security exception: java.lang.SecurityException: Access denied!
Invalid access level for requested MBeanServer operation.
Close the connection to the server
@@ -2148,31 +2148,31 @@ Close the connection to the server
Bye! Bye!
-
If the ScanDirClient fails to connect with
- the secure agent, then this article - If the ScanDirClient fails to connect with
+ the secure agent, then this article - Troubleshooting connection problems in JConsole - may help
you figure out what is going wrong. Indeed the connection steps
performed by the ScanDirClient are very similar to
those performed by jconsole, and the problems you
- could encounter are identical. Just remember that
+ could encounter are identical. Just remember that
jconsole needs the extra -J flag to pass
system properties to the VM, which is not needed with regular
java launcher invocations.
- In this document, we have presented an advanced
- JMX example, and shown how to run a secure
- JMX agent in a production environment.
- We have also shown how to connect to such a
- secure agent with both jconsole and a programmatic
- client. We have also discuss various JMX
- design-patterns and best practices.
+ In this document, we have presented an advanced
+ JMX example, and shown how to run a secure
+ JMX agent in a production environment.
+ We have also shown how to connect to such a
+ secure agent with both jconsole and a programmatic
+ client. We have also discuss various JMX
+ design-patterns and best practices.
Readers who would wish to learn more about JMX, and
Monitoring and Management of the JVM, are invited
to follow the links given in reference below.
@@ -2184,26 +2184,26 @@ Bye! Bye!
>JMX Best Practices: This document describes best practices that
have been identified for modeling using the JMX API.
Using JConsole: JConsole is a JMX-Compliant monitoring tool which allows
you to interact graphically with your own MBeans.
Monitoring and Management for the Java Platform: The Java Platform
- Standard Edition (Java SE) 6 provides comprehensive monitoring and
+ >Monitoring and Management for the Java Platform: The Java Platform
+ Standard Edition (Java SE) 6 provides comprehensive monitoring and
management support for the Java platform.
List of JMX-related Blogs: This page provides links to the
- different web logs written by members of the Sun team working on the
+ >List of JMX-related Blogs: This page provides links to the
+ different web logs written by members of the Sun team working on the
JMX API.