diff --git a/langtools/make/build.properties b/langtools/make/build.properties
index 9d92c73944c..b224a9721d2 100644
--- a/langtools/make/build.properties
+++ b/langtools/make/build.properties
@@ -23,25 +23,46 @@
# questions.
#
-# This is the JDK used to build and run the bootstrap version of javac.
-# The bootstrap javac is used to compile both boostrap versions of the
-# other tools, and product versions of all the tools.
-# Override this path as needed, either on the command line or in
-# one of the standard user build.properties files (see build.xml)
+#javac configuration for "normal build" (these will be passed to the bootstrap compiler):
+javac.debug = true
+javac.debuglevel = source,lines,vars
+javac.extra.opts=-XDignore.symbol.file=true
+javac.includes=
+javac.lint.opts = -Xlint:all,-deprecation -Werror
+javac.source = 8
+javac.target = 8
-# boot.java.home = /opt/jdk/1.7.0
-boot.java = ${boot.java.home}/bin/java
-boot.javac = ${boot.java.home}/bin/javac
+#javac configuration for bootstrap build (these will be passed to the compiler from the given boot JDK):
+boot.javac.extra.opts=-XDignore.symbol.file=true
+boot.javac.includes = \
+ javax/annotation/processing/ \
+ javax/lang/model/ \
+ javax/tools/ \
+ jdk/ \
+ com/sun/source/ \
+ com/sun/tools/javac/ \
+ com/sun/tools/doclint/
+boot.javac.lint.opts=
boot.javac.source = 8
boot.javac.target = 8
-# This is the JDK used to run the product version of the tools,
-# for example, for testing. If you're building a complete JDK, specify that.
-# Override this path as needed, either on the command line or in
-# one of the standard user build.properties files (see build.xml)
+#configuration of submodules (share by both the bootstrap and normal compilation):
+langtools.modules=java.base:java.compiler:jdk.compiler:jdk.dev:jdk.javadoc
+java.base.dependencies=
+java.compiler.dependencies=java.base
+jdk.compiler.dependencies=java.base:java.compiler
+jdk.javadoc.dependencies=java.base:java.compiler:jdk.compiler
+jdk.dev.dependencies=java.base:java.compiler:jdk.compiler
-# target.java.home = /opt/jdk/1.8.0
-target.java = ${target.java.home}/bin/java
+#test configuration:
+jtreg.tests=
+boot.javac.tests = tools/javac
+crules.tests = ../make/test/crules
+
+#javadoc configuration
+javadoc.jls.cite=The Java™ Language Specification
+javadoc.jls.option=-tag "jls:a:See <cite>${javadoc.jls.cite}</cite>:" \
+ -tag "implNote:a:Implementation Note:"
# Version info -- override as needed
jdk.version = 1.9.0
@@ -55,146 +76,4 @@ milestone = internal
# timestamps
# FIXME -- need to include openjdk as needed
release = ${jdk.version}-${milestone}
-bootstrap.release = ${release}_bootstrap
full.version = ${release}-${build.number}
-bootstrap.full.version = ${bootstrap.release}-${build.number}
-
-# options for the tasks used to compile the tools
-javac.source = 8
-javac.target = 8
-javac.debug = true
-javac.debuglevel = source,lines
-javac.no.jdk.warnings = -XDignore.symbol.file=true
-# set the following to -version to verify the versions of javac being used
-javac.version.opt =
-# in time, there should be no exceptions to -Xlint:all
-javac.lint.opts = -Xlint:all,-deprecation -Werror
-
-# options for the task for javac
-#javadoc.jls3.url=http://java.sun.com/docs/books/jls/
-#javadoc.jls3.cite=<a href="${javadoc.jls3.url}">The Java Language Specification, Third Edition</a>
-#javadoc.jls3.option=-tag "jls3:a:See <cite>${javadoc.jls3.cite}</cite>:"
-
-
-javadoc.jls.cite=The Java™ Language Specification
-
-javadoc.jls.option=-tag "jls:a:See <cite>${javadoc.jls.cite}</cite>:"
-
-
-
-
-
-# jtreg, used to run the JDK regression tests
-# See http://openjdk.java.net/jtreg/
-# Override this path as needed, either on the command line or in
-# one of the standard user build.properties files (see build.xml)
-
-# jtreg.home = /opt/jtreg/4.1
-
-# findbugs
-# See http://findbugs.sourceforge.net/
-# Override this path as needed, either on the command line or in
-# one of the standard user build.properties files (see build.xml)
-
-# findbugs.home = /opt/findbugs/1.2.1
-
-# vizant (graph visualization tool for Ant)
-# See http://vizant.sourceforge.net/
-# Override this path as needed, either on the command line or in
-# one of the standard user build.properties files (see build.xml)
-
-# vizant.jar = /opt/vizant/0.1.2/vizant-0.1.2.jar
-# dot = dot
-
-#------------------------------------------------------------
-
-# The following properties define the packages for each of the tools.
-# Syntactically, they should be suitable as arguments for the "includes"
-# parameter of Ant filesets. In particular, note the trailing '/'.
-
-javac.includes = \
- javax/annotation/processing/ \
- javax/lang/model/ \
- javax/tools/ \
- jdk/ \
- com/sun/source/ \
- com/sun/tools/javac/ \
- com/sun/tools/doclint/
-
-javac.tests = \
- tools/javac
-
-#
-
-javadoc.includes = \
- com/sun/javadoc/ \
- com/sun/tools/javadoc/ \
- com/sun/tools/doclets/
-
-javadoc.tests = \
- tools/javadoc/ \
- com/sun/javadoc/
-
-#
-
-javah.includes = \
- com/sun/tools/javah/
-
-javah.tests = \
- tools/javah/
-
-#
-
-javap.includes = \
- com/sun/tools/classfile/ \
- com/sun/tools/javap/ \
- com/sun/tools/jdeps/ \
- sun/tools/javap/
-
-javap.tests = \
- tools/javap/
-
-#
-
-sjavac.includes = \
- com/sun/tools/sjavac/
-
-sjavac.tests = \
- tools/sjavac
-
-crules.tests = ../make/test/crules
-
-#
-
-# The following files require the latest JDK to be available.
-# The API can be provided by using a suitable boot.java.home
-# or by setting import.jdk
-require.latest.jdk.files = \
- com/sun/tools/javac/nio/*.java
-
-# The following files in the import jdk source directory are required
-# in order to compile the files defined in ${require.latest.jdk.files}
-#
-# For NIO, the list of stub files is defined by the contents of the primary
-# API packages, together with such types that may be required in order to
-# compile the stubs. Some of these dependencies would go away if the stub
-# generator were to be improved -- e.g. by removing unnecessary imports.
-#
-import.jdk.stub.files = \
- java/io/File.java \
- java/nio/file/**.java \
- java/nio/file/attribute/**.java \
- java/nio/file/spi/**.java \
- java/nio/channels/AsynchronousChannel.java \
- java/nio/channels/AsynchronousFileChannel.java \
- java/nio/channels/CompletionHandler.java \
- java/nio/channels/SeekableByteChannel.java
-
-# The following value is used by the main jtreg target.
-# An empty value means all tests
-# Override as desired to run a specific set of tests
-jtreg.tests =
-
-# Check style configuration
-# overridable name and version
-checkstyle.name.version = checkstyle-5.4
diff --git a/langtools/make/build.xml b/langtools/make/build.xml
index 2d4488d4f3f..d2e543a6d56 100644
--- a/langtools/make/build.xml
+++ b/langtools/make/build.xml
@@ -25,10 +25,10 @@
-->
@@ -99,13 +68,6 @@
**** Global property definitions.
-->
-
-
-
-
-
@@ -119,36 +81,24 @@
-
-
-
-
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -325,9 +254,13 @@
warningsProperty="findbugs.all.warnings"
jvm="${target.java.home}/bin/java"
jvmargs="-Xmx512M">
-
+
+
+
+
+
-
+
@@ -339,49 +272,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -391,7 +282,7 @@
destdir="${build.dir}/diag-examples/classes"
includes="ArgTypeCompilerFactory.java,Example.java,FileManager.java,HTMLWriter.java,RunExamples.java,DocCommentProcessor.java"
sourcepath=""
- classpath="${dist.lib.dir}/javac.jar;${dist.lib.dir}/javap.jar"
+ classpath="${langtools.classes}"
includeAntRuntime="no"
debug="${javac.debug}"
debuglevel="${javac.debuglevel}">
@@ -400,7 +291,7 @@
@@ -413,56 +304,16 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
@@ -515,17 +365,12 @@
-
+
-
-
-
ant.home = ${ant.home}
@@ -536,257 +381,32 @@
checkstyle.home = ${checkstyle.home}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+ crules.CodingRulesAnalyzerPlugin
-
-
-
-
-
-
-
-
-
-
-
+ extra.jvmargs="-Xbootclasspath/a:${build.crules.dir}/classes" />
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
@@ -866,84 +516,73 @@
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
@@ -957,13 +596,20 @@
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
-
+
-
+
@@ -991,42 +636,15 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -1048,55 +666,9 @@
classpath="${build.toolclasses.dir}/"/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -1106,7 +678,7 @@
Unofficial Javadoc generated from developer sources for preview purposes only]]>
-
-
-
+
-
+
-
+
-
-
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1184,6 +729,7 @@
+
@@ -1191,6 +737,7 @@
+
@@ -1204,7 +751,7 @@
samevm="@{samevm}" verbose="@{verbose}"
failonerror="false" resultproperty="jtreg.@{name}.result"
javacoptions="-g"
- vmoptions="${coverage.options} -Xbootclasspath/p:${coverage.classpath}${path.separator}${build.classes.dir} @{jpda.jvmargs} @{extra.jvmargs}">
+ vmoptions="${coverage.options} -Xbootclasspath/p:${coverage.classpath}${path.separator}@{langtools.classes} @{jpda.jvmargs} @{extra.jvmargs}">
@@ -1220,21 +767,12 @@
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
@@ -1265,7 +803,7 @@
jvmargs="-Xmx512M" >
-
+
@@ -1276,11 +814,6 @@
-
-
-
-
-
diff --git a/langtools/make/launcher.sh-template b/langtools/make/launcher.sh-template
index 05d765022f2..f82d610564d 100644
--- a/langtools/make/launcher.sh-template
+++ b/langtools/make/launcher.sh-template
@@ -43,10 +43,9 @@ mylib="$mydir/../lib"
# dependent jar files for additional dependencies.
if [ "$LANGTOOLS_USE_BOOTCLASSPATH" != "no" ]; then
- cp=`unzip -c "$mylib/#PROGRAM#.jar" META-INF/MANIFEST.MF |
- grep "Class-Path:" |
- sed -e 's|Class-Path: *||' -e 's|\([a-z]*\.jar\) *|'"$mylib"'/\1#PS#|g'`
- bcp="$mylib/#PROGRAM#.jar#PS#$cp"
+ cp=`echo "$mylib"/*.jar |
+ sed -e 's|\([a-z.]*\.jar\) *|\1#PS#|g'`
+ bcp=$cp
fi
# tools currently assumes that assertions are enabled in the launcher
@@ -72,4 +71,4 @@ done
unset DUALCASE
IFS=$nl
-"#TARGET_JAVA#" "${bcp:+-Xbootclasspath/p:"$bcp"}" ${ea} ${javaOpts} -jar "${mylib}/#PROGRAM#.jar" ${toolOpts}
+"#TARGET_JAVA#" "${bcp:+-Xbootclasspath/p:"$bcp"}" ${ea} ${javaOpts} com.sun.tools.#PROGRAM#.Main ${toolOpts}
diff --git a/langtools/make/netbeans/langtools/build.xml b/langtools/make/netbeans/langtools/build.xml
index 4e85a1e4790..bb57ee77a8a 100644
--- a/langtools/make/netbeans/langtools/build.xml
+++ b/langtools/make/netbeans/langtools/build.xml
@@ -46,48 +46,34 @@
-->
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
+
-
+
Must set property 'includes'
-
+
+ debuglevel="${javac.debuglevel}">
+
+
-
+
+
+
+
+
+
+
+
-
+
Must set property 'run.classname'
@@ -115,22 +109,22 @@
test all tools.
-->
-
-
-
-
+
+
+
-
+
-
+
-
+
@@ -165,7 +159,7 @@
-
+
@@ -179,20 +173,29 @@
-
+
Must set property 'jtreg.tests'
-
+
-
+
Must set property 'class'
+
+
+
@@ -205,31 +208,10 @@
test all tools.
-->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
@@ -253,6 +235,15 @@
/>
+
+
+
+
+
+
+
+
+
@@ -262,7 +253,7 @@
-
+
@@ -278,11 +269,11 @@
-
+
-
+
compile-single
- src/java.base/share/classes
+ java.base
includes
${root}/src/java.base/share/classes
@@ -120,7 +120,7 @@
compile-single
- src/java.compiler/share/classes
+ java.compiler
includes
${root}/src/java.compiler/share/classes
@@ -133,7 +133,7 @@
compile-single
- src/jdk.compiler/share/classes
+ jdk.compiler
includes
${root}/src/jdk.compiler/share/classes
@@ -146,7 +146,7 @@
compile-single
- src/jdk.dev/share/classes
+ jdk.dev
includes
${root}/src/jdk.dev/share/classes
@@ -159,7 +159,7 @@
compile-single
- src/jdk.javadoc/share/classes
+ jdk.javadoc
includes
${root}/src/jdk.javadoc/share/classes
@@ -333,7 +333,7 @@
debug-fix
- src/java.base/share/classes
+ java.base
class
${root}/src/java.base/share/classes
@@ -346,7 +346,7 @@
debug-fix
- src/java.compiler/share/classes
+ java.compiler
class
${root}/src/java.compiler/share/classes
@@ -359,7 +359,7 @@
debug-fix
- src/jdk.compiler/share/classes
+ jdk.compiler
class
${root}/src/jdk.compiler/share/classes
@@ -372,7 +372,7 @@
debug-fix
- src/jdk.dev/share/classes
+ jdk.dev
class
${root}/src/jdk.dev/share/classes
@@ -385,7 +385,7 @@
debug-fix
- src/jdk.dev/share/classes
+ jdk.javadoc
class
${root}/src/jdk.javadoc/share/classes
@@ -478,11 +478,31 @@
${root}/src/java.base/share/classes
+ ${root}/build/java.base/classes
+ 1.8
+
+
${root}/src/java.compiler/share/classes
+ ${root}/build/java.base/classes
+ ${root}/build/java.compiler/classes
+ 1.8
+
+
${root}/src/jdk.compiler/share/classes
+ ${root}/build/java.base/classes:${root}/build/java.compiler/classes
+ ${root}/build/jdk.compiler/classes
+ 1.8
+
+
${root}/src/jdk.dev/share/classes
+ ${root}/build/java.base/classes:${root}/build/java.compiler/classes:${root}/build/jdk.compiler/classes
+ ${root}/build/jdk.dev/classes
+ 1.8
+
+
${root}/src/jdk.javadoc/share/classes
- ${root}/build/classes
+ ${root}/build/java.base/classes:${root}/build/java.compiler/classes:${root}/build/jdk.compiler/classes
+ ${root}/build/jdk.javadoc/classes
1.8
diff --git a/langtools/make/tools/anttasks/SelectToolTask.java b/langtools/make/tools/anttasks/SelectToolTask.java
index a26bc3e689f..db4451db5ab 100644
--- a/langtools/make/tools/anttasks/SelectToolTask.java
+++ b/langtools/make/tools/anttasks/SelectToolTask.java
@@ -74,7 +74,18 @@ public class SelectToolTask extends Task {
enum ToolChoices {
NONE(""),
- JAVAC("javac"),
+ BOOSTRAP_JAVAC("bootstrap-javac", true) {
+ @Override
+ public ToolChoices baseTool() {
+ return JAVAC;
+ }
+ },
+ JAVAC("javac") {
+ @Override
+ public ToolChoices asBootstrap() {
+ return BOOSTRAP_JAVAC;
+ }
+ },
JAVADOC("javadoc"),
JAVAH("javah"),
JAVAP("javap");
@@ -91,6 +102,14 @@ public class SelectToolTask extends Task {
this.bootstrap = bootstrap;
}
+ public ToolChoices asBootstrap() {
+ return this;
+ }
+
+ public ToolChoices baseTool() {
+ return this;
+ }
+
@Override
public String toString() {
return toolName;
@@ -176,9 +195,11 @@ public class SelectToolTask extends Task {
JOptionPane p = createPane(guiProps);
p.createDialog("Select Tool").setVisible(true);
- toolName = ((ToolChoices)toolChoice.getSelectedItem()).toolName;
+ ToolChoices tool = (ToolChoices)toolChoice.getSelectedItem();
+
+ toolName = tool.baseTool().toolName;
+ toolBootstrap = tool.bootstrap;
toolArgs = argsField.getText();
- toolBootstrap = bootstrapCheckbox.isSelected();
if (defaultCheck.isSelected()) {
if (toolName.equals("")) {
fileProps.remove("tool.name");
@@ -213,30 +234,31 @@ public class SelectToolTask extends Task {
EnumSet toolChoices = toolProperty == null ?
EnumSet.allOf(ToolChoices.class) : EnumSet.range(ToolChoices.JAVAC, ToolChoices.JAVAP);
toolChoice = new JComboBox<>(toolChoices.toArray());
- if (toolName != null)
- toolChoice.setSelectedItem(ToolChoices.valueOf(toolName.toUpperCase()));
+ ToolChoices tool = toolName != null ? ToolChoices.valueOf(toolName.toUpperCase()) : null;
+ if (toolName != null) {
+ if (toolBootstrap)
+ tool = tool.asBootstrap();
+ toolChoice.setSelectedItem(tool);
+ }
toolChoice.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
- String tn = ((ToolChoices)e.getItem()).toolName;
- argsField.setText(getDefaultArgsForTool(props, tn));
+ ToolChoices tool = (ToolChoices)e.getItem();
+ argsField.setText(getDefaultArgsForTool(props, tool));
if (toolProperty != null)
- okButton.setEnabled(!tn.equals(""));
+ okButton.setEnabled(tool != ToolChoices.NONE);
}
});
- GridBagConstraints checkConstraint = new GridBagConstraints();
fc.anchor = GridBagConstraints.EAST;
GridBagConstraints toolConstraint = new GridBagConstraints();
fc.anchor = GridBagConstraints.WEST;
toolPane.add(toolChoice, toolConstraint);
- bootstrapCheckbox = new JCheckBox("bootstrap", toolBootstrap);
- toolPane.add(bootstrapCheckbox, checkConstraint);
body.add(toolPane, fc);
- argsField = new JTextField(getDefaultArgsForTool(props, toolName), 40);
+ argsField = new JTextField(getDefaultArgsForTool(props, tool), 40);
if (toolProperty == null || argsProperty != null) {
JLabel argsLabel = new JLabel("Args:");
body.add(argsLabel, lc);
@@ -322,8 +344,11 @@ public class SelectToolTask extends Task {
}
}
- String getDefaultArgsForTool(Properties props, String tn) {
- return (tn == null || tn.equals("")) ? "" : props.getProperty(tn + ".args", "");
+ String getDefaultArgsForTool(Properties props, ToolChoices tool) {
+ if (tool == null)
+ return "";
+ String toolName = tool.baseTool().toolName;
+ return toolName.equals("") ? "" : props.getProperty(toolName + ".args", "");
}
// Ant task parameters
@@ -335,7 +360,6 @@ public class SelectToolTask extends Task {
// GUI components
private JComboBox> toolChoice;
- private JCheckBox bootstrapCheckbox;
private JTextField argsField;
private JCheckBox defaultCheck;
private JButton okButton;