Merge
diff --git a/langtools/.hgtags b/langtools/.hgtags
index 9834ef3..1ade7ba 100644
--- a/langtools/.hgtags
+++ b/langtools/.hgtags
@@ -593,6 +593,9 @@
 12846c3fc5a151a33e9446eff6e6704110c00362 jdk8u92-b13
 c99c71a68555038fdd1e86a10dab9c9007ec3745 jdk8u92-b14
 71176efa69475fc737d1245a28e739ddf105fd1c jdk8u92-b31
+4e8ce6c84e4ca9dd385012c10e059c15dbfcc468 jdk8u92-b32
+18568fe46895af6a7b562ffe6334a24fb5d9ee50 jdk8u92-b33
+3ca74ce54c351db2ac551e495a8b7ee65fb09e64 jdk8u92-b34
 580f87c4d91aa8cc493dbbd84a1be9671fd733f3 jdk8u81-b00
 a93c1e57407944362e05c79d756425e8c1274d9a jdk8u101-b01
 86a9d99ffadaf26b3d8417666a3600ea1ce7560f jdk8u101-b02
@@ -628,8 +631,92 @@
 16c58d7af5a4937e46bccd58114a56a7ffcd685c jdk8u102-b12
 56b0df415b570e31dc0b97d4a1c8f28b85240089 jdk8u102-b13
 0549bf2f507dae59bfcd7d11e038cdc62376fee7 jdk8u102-b14
+d86027f25a9aa960d69cf3a524588a873ae888f5 jdk8u102-b31
+1b511d4e93e7128ccb7100110ab6604eb2838afa jdk8u102-b32
+3d4b72198b23108f93ccf36b8d9275cc3b40ee1e jdk8u102-b33
+8bde2f8474d372de6a3425affd38de506aa56a51 jdk8u102-b34
+e64f16f8a585332086127b4f24b79e6c83bee530 jdk8u102-b35
+90f493bfe1faca0573844fdd2497070c8b224d76 jdk8u111-b00
+085fd7e08f4855f134a8048251c4535ddde1feee jdk8u111-b01
+f66a535fb6b3b41419c987cc90407507a64712b2 jdk8u111-b02
+386c8bc6dd3ea0d49ea483cbbe95f4b12b66db23 jdk8u111-b03
+fd9b6417c521c5ec26224129d90b38d40c04c54d jdk8u111-b04
+5710d574a99aeff3600c49a4aed34fa1b373f7b8 jdk8u111-b05
+9ce3a6ba45751aaf57cb50609f3fd64c02d66f51 jdk8u111-b06
+405b1845ab3995b43efe0e770070b90f4c5c9080 jdk8u111-b07
+8a30511b2ea4714f5868b33be07b0562bb1edbfb jdk8u111-b08
+62cbd4997d4bf8433186d3fa30847577aa483ea3 jdk8u111-b09
+74b16a9a8eda03779e55ba145bdb6a08a1ebd780 jdk8u111-b10
+f51f1b8a7b58355c11392effdf0e4f738a79a8ad jdk8u111-b11
+8e5e70b9cff8f928d28db4890d4e5905a739d210 jdk8u111-b12
+ef3134b243da77d0aed9f3cef2b3855c3be2111a jdk8u111-b13
+0e2e745ed6d7bb8a2233e83f4bad40e793a16949 jdk8u111-b14
 27503e49de52b54dde3a12af28e2d2de473192b3 jdk8u112-b00
 60a0572cd449e33b7d48b5a40065222ab5accd36 jdk8u112-b01
 6e20b82db75fbaf5a3e10455d1a28c17381f4be6 jdk8u112-b02
 e87830f756786db50d89d77ee802f303cf42d0b1 jdk8u112-b03
 03a192ef78d0ea77f1141174b29835b702f86793 jdk8u112-b04
+27a15af81178d312748a45efa457e5ef1a76e088 jdk8u112-b06
+35cb56e983d317fd319d2dbb17282264edea02e2 jdk8u112-b07
+103e6e2225bbbe779435b2e122e1ff846be54759 jdk8u112-b08
+ea5711153422cc1f8d710de08b7f4dc9e20b9333 jdk8u112-b09
+96658afeb900cb1bfc6c56b352745f3ede0ee524 jdk8u112-b10
+0169856d09008e5718f53a5d6c16e7db95c55887 jdk8u112-b11
+f56f9368471aa5bc949a730e2724ceb68e90d717 jdk8u112-b12
+04d857308b8c3db33e8fd4099c3a3dd5d50cdaeb jdk8u112-b13
+b353281f73db9617d993353e468342d3420c29f1 jdk8u112-b14
+6116c6644be0c85556931aaeb9b4f2dbc9c79157 jdk8u112-b15
+ee37eafc48cb6fb20cb6c1e31cfecfe1ccc800da jdk8u112-b16
+de1c3df992adb0c704005583210d1ed6dac758cd jdk8u112-b31
+5710d574a99aeff3600c49a4aed34fa1b373f7b8 jdk8u121-b00
+ab5d32d8cf5f6d81482692f801385a869b2d83c1 jdk8u121-b01
+e260d46661d2da3ede78aae434d5420acce99950 jdk8u121-b02
+0acfd50d67d98259a25fbd51129b763bab56d068 jdk8u121-b03
+29a08aff06088cad98dafddef7628b51e324fcae jdk8u121-b04
+a933635275c33e37c9403767d600a12b9ee71df7 jdk8u121-b05
+dc1dd2e6cf8e094c4a8437d54ebc7bac1f7ab964 jdk8u121-b06
+6cd0cd4078e9ec8ad9fa167cabf9c671ed21fc66 jdk8u121-b07
+8efc10efbfe137ed5de6bf55875fdafd25bb6a1b jdk8u121-b08
+57a26fe61f2b435332c0697e92965a22246cd143 jdk8u121-b09
+53c94a674d6076ff390c62a7682ea0e87a893cdc jdk8u121-b10
+b634abfcd98fb8b201da9208e398ea17cabd2b32 jdk8u121-b11
+7fc347da372c8c4e5530a7fa32084b5dbc4ee8b6 jdk8u121-b12
+f634736433d9fc1cffbdc55611f97ecb2cd44059 jdk8u121-b13
+8b331e7199f74a2dea8a8a866f0d7f1977f146ee jdk8u131-b00
+0d04068f82fe680c65619e08ef012ead7483873b jdk8u131-b01
+452448c6347af8f7bd827dd4632ac06c991a15b8 jdk8u131-b02
+38ea0481f6438a6379941d5c6cfc3078ab384027 jdk8u131-b03
+f85da82b8218301a785ef925f8f3d8a59d6d3345 jdk8u131-b04
+5a4e3151102973a2e0420272b044d1db94337e74 jdk8u131-b05
+dd55d0995340fa86eb7e8bb41a7205dd724a4883 jdk8u131-b06
+bc4f253725f93d9b832ec60d521cd5426a9489ea jdk8u131-b07
+3a62189765a88f393a51923f98020ad7b2d4fc7d jdk8u131-b08
+2f2c4931d13c44bb6a0f808809e723de0677e302 jdk8u131-b09
+676a07884de49a7c60379da8ac892fe1403de6b6 jdk8u131-b10
+5162417b51bdf68b95696198181f2e662a14ff8a jdk8u131-b11
+1175fac90fdbbd864f7b1f306397644d26eb9781 jdk8u141-b00
+bb163efa3276e129c69bad28299a6283b869caa3 jdk8u141-b01
+5864e3781953daa69efd54b329a358a568229268 jdk8u141-b02
+4378c8e874a5c13409b651a47b4b388f17904da1 jdk8u141-b03
+d89ea3127a93d7ea6f2b89ee3adc673136833933 jdk8u141-b04
+b8e0348df792b1c5f95cd7d77d5c05da1d435d32 jdk8u141-b05
+13b638c8e005d48be437db11835a63721ca10086 jdk8u141-b06
+4d04a70e3207dcb46b71e6f9ad04bf0e130cf389 jdk8u141-b07
+e2abef6f10b9b2946ce8f5f851af67a764bbe57d jdk8u141-b08
+1df48afb34a0778df6c97a2c96c483a177135431 jdk8u141-b09
+479c13a68ca457526d49d8e2c7034a365bf0233d jdk8u141-b10
+2cc58a0fdfd6e7e2d21a254f6830ba51c2b3612f jdk8u141-b11
+b5259d2465fa61256f485860f986bd575f13fe92 jdk8u141-b12
+9a5ddb594b491ec32e9fafa7008631291ab66d6e jdk8u141-b13
+553043f3a2319af6fd6bc704bc8fd7fa4500ee80 jdk8u141-b14
+027f6df9fe82624fb7d489ffd848a26796de4868 jdk8u141-b15
+4c355f7002c36bb626b42d5c1d42ea91d77ba5d6 jdk8u144-b00
+816907853a15d9b22a87032d07327a400f8568b3 jdk8u144-b01
+4d69601f88c30e9f05e3b56c6d38a2f3eb47d477 jdk8u151-b00
+f081adae3486f8728affc89213c2cd1dd0ac9467 jdk8u151-b01
+732e1bab2660d21227dce26190d4a31dd9785a7f jdk8u151-b02
+a1d0ecd858bbc397f7683a9e0a3fd1620c327d64 jdk8u151-b03
+d0a51eb7da2995e864af5dc4d010aef0cb3f9e38 jdk8u151-b04
+e0ed0609963aca47e766901d7ec57ab97b649567 jdk8u151-b05
+ff824edbfa4dc81b6f2b5c33e4027806fd149304 jdk8u151-b06
+305472b39e966569e99a8b149543e3cd9160419c jdk8u151-b07
diff --git a/langtools/THIRD_PARTY_README b/langtools/THIRD_PARTY_README
index 2b20da2..046a6a7 100644
--- a/langtools/THIRD_PARTY_README
+++ b/langtools/THIRD_PARTY_README
@@ -285,13 +285,53 @@
 form with the JDK 8 and OpenJDK 8 source distributions, and as object code in
 the JRE 8 & JDK 8 runtimes.
 
-In the case of the JRE 8 & JDK 8 runtimes, the terms of the Oracle license do
+In the case of the JRE & JDK runtimes, the terms of the Oracle license do
 NOT apply to the Elliptic Curve Cryptography library; it is licensed under the
 following license, separately from Oracle's JDK & JRE.  If you do not wish to
-install the Elliptic Curve Cryptography library, you may delete the library
-named libsunec.so (on Solaris and Linux systems) or sunec.dll (on Windows
-systems) from the JRE bin directory reserved for native libraries.
+install the Elliptic Curve Cryptography library, you may delete the
+Elliptic Curve Cryptography library:
+   - On Solaris and Linux systems: delete $(JAVA_HOME)/lib/libsunec.so
+   - On Windows systems: delete $(JAVA_HOME)\bin\sunec.dll
+   - On Mac systems, delete:
+      for JRE: /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/libsunec.dylib
+      for JDK: $(JAVA_HOME)/jre/lib/libsunec.dylib
 
+Written Offer for ECC Source Code
+  For third party technology that you receive from Oracle in binary form 
+  which is licensed under an open source license that gives you the right
+  to receive the source code for that binary, you can obtain a copy of 
+  the applicable source code from this page:
+     http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/file/tip/src/share/native/sun/security/ec/impl
+
+  If the source code for the technology was not provided to you with the 
+  binary, you can also receive a copy of the source code on physical 
+  media by submitting a written request to:
+
+     Oracle America, Inc.
+     Attn: Associate General Counsel,
+     Development and Engineering Legal
+     500 Oracle Parkway, 10th Floor
+     Redwood Shores, CA 94065
+
+  Or, you may send an email to Oracle using the form at:
+     http://www.oracle.com/goto/opensourcecode/request
+
+  Your request should include:
+    - The name of the component or binary file(s) for which you are requesting 
+      the source code
+    - The name and version number of the Oracle product containing the binary
+    - The date you received the Oracle product
+    - Your name
+    - Your company name (if applicable)
+    - Your return mailing address and email and
+    - A telephone number in the event we need to reach you.
+
+  We may charge you a fee to cover the cost of physical media and processing. 
+  Your request must be sent (i) within three (3) years of the date you 
+  received the Oracle product that included the component or binary 
+  file(s) that are the subject of your request, or (ii) in the case of 
+  code licensed under the GPL v3, for as long as Oracle offers spare 
+  parts or customer support for that product model.
 
 --- begin of LICENSE ---
 
@@ -870,63 +910,6 @@
 OF SUCH DAMAGE.
 --- end of LICENSE ---
 
-%% This notice is provided with respect to Dynalink library which is included
-with the Nashorn technology.
-
---- begin of LICENSE ---
-Copyright (c) 2009-2013, Attila Szegedi
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-* Redistributions of source code must retain the above copyright
-  notice, this list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright
-  notice, this list of conditions and the following disclaimer in the
-  documentation and/or other materials provided with the distribution.
-* Neither the name of the copyright holder nor the names of
-  contributors may be used to endorse or promote products derived from
-  this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---- end of LICENSE ---
-
-%% This notice is provided with respect to Joni library which is included
-with the Nashorn technology.
-
---- begin of LICENSE ---
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
 %% This notice is provided with respect to FontConfig 2.5, which may be 
 included with JRE 8, JDK 8, and OpenJDK 8 source distributions on
 Linux and Solaris.
@@ -956,6 +939,74 @@
 
 -------------------------------------------------------------------------------
 
+%% This notice is provided with respect to freebXML Registry 3.0 & 3.1,
+which may be included with JRE 8, JDK 8, and OpenJDK 8.
+
+--- begin of LICENSE ---
+
+freebxml:  Copyright (c) 2001 freebxml.org.  All rights reserved.
+
+The names "The freebXML Registry Project" and "freebxml Software
+Foundation" must not be used to endorse or promote products derived
+from this software or be used in a product name without prior
+written permission. For written permission, please contact
+ebxmlrr-team@lists.sourceforge.net.
+
+This software consists of voluntary contributions made by many individuals
+on behalf of the the freebxml Software Foundation. For more information on
+the freebxml Software Foundation, please see <http://www.freebxml.org/>.
+
+This product includes software developed by the Apache Software Foundation
+(http://www.apache.org/).
+
+The freebxml License, Version 1.1 5
+Copyright (c) 2001 freebxml.org. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+
+ 3. The end-user documentation included with the redistribution, if
+    any, must include the following acknowlegement:
+       "This product includes software developed by
+        freebxml.org (http://www.freebxml.org/)."
+    Alternately, this acknowlegement may appear in the software itself,
+    if and wherever such third-party acknowlegements normally appear.
+
+ 4. The names "The freebXML Registry Project", "freebxml Software
+    Foundation" must not be used to endorse or promote products derived
+    from this software without prior written permission. For written
+    permission, please contact ebxmlrr-team@lists.sourceforge.net.
+
+ 5. Products derived from this software may not be called "freebxml",
+    "freebXML Registry" nor may freebxml" appear in their names without
+    prior written permission of the freebxml Group.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED.  IN NO EVENT SHALL THE freebxml SOFTWARE FOUNDATION OR
+ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+--- end of LICENSE ---
+
+-------------------------------------------------------------------------------
+
 %% This notice is provided with respect to IAIK PKCS#11 Wrapper, 
 which may be included with JRE 8, JDK 8, and OpenJDK 8.
 
@@ -1083,6 +1134,47 @@
 
 --------------------------------------------------------------------------------
 
+%% This notice is provided with respect to Jing 20030619, which may 
+be included with JRE 8, JDK 8, and OpenJDK 8.
+
+--- begin of LICENSE  ---
+
+Copyright (c) 2001-2003 Thai Open Source Software Center Ltd All
+rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+Neither the name of the Thai Open Source Software Center Ltd nor
+the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written
+permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+--- end of LICENSE  ---
+
+--------------------------------------------------------------------------------
+
 %% This notice is provided with respect to Joni v1.1.9, which may be 
 included with JRE 8, JDK 8, and OpenJDK 8.
 
@@ -1215,7 +1307,7 @@
 
 -------------------------------------------------------------------------------
 
-%% Portions Copyright Eastman Kodak Company 1992
+%% Portions Copyright Eastman Kodak Company 1991-2003
 
 -------------------------------------------------------------------------------
 
@@ -1339,8 +1431,8 @@
 
 -------------------------------------------------------------------------------
 
-%% This notice is provided with respect to GIFLIB 5.1.1 & libungif 4.1.3, which may be 
-included with JRE 8, JDK 8, and OpenJDK 8.
+%% This notice is provided with respect to GIFLIB 5.1.1 & libungif 4.1.3, 
+which may be included with JRE 8, JDK 8, and OpenJDK 8.
 
 --- begin of LICENSE ---
 
@@ -1972,67 +2064,45 @@
 
 -------------------------------------------------------------------------------
 
-%% This notice is provided with respect to SAX 2.0.1, which may be included 
-with JRE 8, JDK 8, and OpenJDK 8.
+%% This notice is provided with respect to Relax NG Datatype 1.0, which 
+may be included with JRE 8, JDK 8, and OpenJDK 8.  
 
---- begin of LICENSE ---
+--- begin of LICENSE  ---
 
- SAX is free!
+Copyright (c) 2005, 2010 Thai Open Source Software Center Ltd
+All rights reserved.
 
- In fact, it's not possible to own a license to SAX, since it's been placed in
- the public domain.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
 
- No Warranty
+    Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
 
- Because SAX is released to the public domain, there is no warranty for the
- design or for the software implementation, to the extent permitted by
- applicable law. Except when otherwise stated in writing the copyright holders
- and/or other parties provide SAX "as is" without warranty of any kind, either
- expressed or implied, including, but not limited to, the implied warranties
- of merchantability and fitness for a particular purpose. The entire risk as
- to the quality and performance of SAX is with you. Should SAX prove
- defective, you assume the cost of all necessary servicing, repair or
- correction.
+    Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
 
- In no event unless required by applicable law or agreed to in writing will
- any copyright holder, or any other party who may modify and/or redistribute
- SAX, be liable to you for damages, including any general, special, incidental
- or consequential damages arising out of the use or inability to use SAX
- (including but not limited to loss of data or data being rendered inaccurate
- or losses sustained by you or third parties or a failure of the SAX to
- operate with any other programs), even if such holder or other party has been
- advised of the possibility of such damages.
+    Neither the names of the copyright holders nor the names of its
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
 
- Copyright Disclaimers 
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
- This page includes statements to that effect by David Megginson, who would
- have been able to claim copyright for the original work.  SAX 1.0
+--- end of LICENSE  ---
 
- Version 1.0 of the Simple API for XML (SAX), created collectively by the
- membership of the XML-DEV mailing list, is hereby released into the public
- domain.
-
- No one owns SAX: you may use it freely in both commercial and non-commercial
- applications, bundle it with your software distribution, include it on a
- CD-ROM, list the source code in a book, mirror the documentation at your own
- web site, or use it in any other way you see fit.
-
- David Megginson, sax@megginson.com
- 1998-05-11
-
- SAX 2.0 
-
- I hereby abandon any property rights to SAX 2.0 (the Simple API for XML), and
- release all of the SAX 2.0 source code, compiled code, and documentation
- contained in this distribution into the Public Domain. SAX comes with NO
- WARRANTY or guarantee of fitness for any purpose.
-
- David Megginson, david@megginson.com
- 2000-05-05
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
 
 %% This notice is provided with respect to SoftFloat version 2b, which may be 
 included with JRE 8, JDK 8, and OpenJDK 8 on Linux/ARM.
@@ -2518,801 +2588,221 @@
 
 --- begin of LICENSE ---
 
-          Licenses
-The X.Org Foundation March 2004
+This is the copyright for the files in src/solaris/native/sun/awt: list.h, 
+multiVis.h, wsutils.h, list.c, multiVis.c
+Copyright (c) 1994 Hewlett-Packard Co.
+Copyright (c) 1996 X Consortium
 
-1. Introduction
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
 
-The X.org Foundation X Window System distribution is a compilation of code and
-documentation from many sources. This document is intended primarily as a
-guide to the licenses used in the distribution: you must check each file
-and/or package for precise redistribution terms. None-the-less, this summary
-may be useful to many users. No software incorporating the XFree86 1.1 license
-has been incorporated.
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
 
-This document is based on the compilation from XFree86.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
 
-2. XFree86 License
+Except as contained in this notice, the name of the X Consortium shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from the X Consortium.
+___________________________
+The files in motif/lib/Xm/util included this copyright:mkdirhier.man,
+xmkmf.man, chownxterm.c, makeg.man, mergelib.cpp, lndir.man, makestrs.man, 
+checktree.c, lndir.c, makestrs.c
+Copyright (c) 1993, 1994 X Consortium
 
-XFree86 code without an explicit copyright is covered by the following
-copyright/license:
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software furnished to do so, subject to the following conditions:
 
-Copyright (C) 1994-2003 The XFree86 Project, Inc. All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
 
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the XFree86 Project shall not
-be used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from the XFree86 Project.
-
-3. Other Licenses
-
-Portions of code are covered by the following licenses/copyrights. See
-individual files for the copyright dates.
-
-3.1. X/MIT Copyrights
-
-3.1.1. X Consortium
-
-Copyright (C) <date> X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X
-CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall not be
-used in advertising or otherwise to promote the sale, use or other dealings in
-this Software without prior written authorization from the X Consortium.
-
-X Window System is a trademark of X Consortium, Inc.
-
-3.1.2. The Open Group
-
-Copyright <date> The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that the
-above copyright notice appear in all copies and that both that copyright
-notice and this permission notice appear in supporting documentation.
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings in
-this Software without prior written authorization from The Open Group.  3.2.
-Berkeley-based copyrights:
-
-o
-3.2.1. General
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-   1. Redistributions of source code must retain the above copyright notice,
-   this list of conditions and the following disclaimer.
-
-   2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-   3. The name of the author may not be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.  3.2.2. UCB/LBL
-
-Copyright (c) 1993 The Regents of the University of California. All rights
-reserved.
-
-This software was developed by the Computer Systems Engineering group at
-Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and contributed to
-Berkeley.
-
-All advertising materials mentioning features or use of this software must
-display the following acknowledgement: This product includes software
-developed by the University of California, Lawrence Berkeley Laboratory.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-   1. Redistributions of source code must retain the above copyright notice,
-   this list of conditions and the following disclaimer.
-
-   2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-   3. All advertising materials mentioning features or use of this software
-   must display the following acknowledgement: This product includes software
-   developed by the University of California, Berkeley and its contributors.
-
-   4. Neither the name of the University nor the names of its contributors may
-   be used to endorse or promote products derived from this software without
-   specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  3.2.3. The
-NetBSD Foundation, Inc.
-
-Copyright (c) 2003 The NetBSD Foundation, Inc. All rights reserved.
-
-This code is derived from software contributed to The NetBSD Foundation by Ben
-Collver <collver1@attbi.com>
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-   1. Redistributions of source code must retain the above copyright notice,
-   this list of conditions and the following disclaimer.
-
-   2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-   3. All advertising materials mentioning features or use of this software
-   must display the following acknowledgement: This product includes software
-   developed by the NetBSD Foundation, Inc. and its contributors.
-
-   4. Neither the name of The NetBSD Foundation nor the names of its
-   contributors may be used to endorse or promote products derived from this
-   software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS ``AS
-IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  3.2.4. Theodore
-Ts'o.
-
-Copyright Theodore Ts'o, 1994, 1995, 1996, 1997, 1998, 1999. All rights
-reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-   1. Redistributions of source code must retain the above copyright notice,
-   and the entire permission notice in its entirety, including the disclaimer
-   of warranties.
-
-   2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-   3. he name of the author may not be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE, ALL OF WHICH ARE HEREBY DISCLAIMED. IN NO
-EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.  3.2.5. Theo de Raadt and Damien Miller
-
-Copyright (c) 1995,1999 Theo de Raadt. All rights reserved. Copyright (c)
-2001-2002 Damien Miller. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-   1. Redistributions of source code must retain the above copyright notice,
-   this list of conditions and the following disclaimer.
-
-   2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.  3.2.6. Todd C. Miller
-
-Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
-
-Permission to use, copy, modify, and distribute this software for any purpose
-with or without fee is hereby granted, provided that the above copyright
-notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
-OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.  3.2.7. Thomas
-Winischhofer
-
-Copyright (C) 2001-2004 Thomas Winischhofer
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-   1. Redistributions of source code must retain the above copyright notice,
-   this list of conditions and the following disclaimer.
-
-   2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-   3. The name of the author may not be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.  3.3. NVIDIA Corp
-
-Copyright (c) 1996 NVIDIA, Corp. All rights reserved.
-
-NOTICE TO USER: The source code is copyrighted under U.S. and international
-laws. NVIDIA, Corp. of Sunnyvale, California owns the copyright and as design
-patents pending on the design and interface of the NV chips. Users and
-possessors of this source code are hereby granted a nonexclusive, royalty-free
-copyright and design patent license to use this code in individual and
-commercial software.
-
-Any use of this source code must include, in the user documentation and
-internal comments to the code, notices to the end user as follows:
-
-Copyright (c) 1996 NVIDIA, Corp. NVIDIA design patents pending in the U.S. and
-foreign countries.
-
-NVIDIA, CORP. MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE
-CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED
-WARRANTY OF ANY KIND. NVIDIA, CORP. DISCLAIMS ALL WARRANTIES WITH REGARD TO
-THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA, CORP. BE LIABLE
-FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
-DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE.  3.4. GLX Public
-License
-
-GLX PUBLIC LICENSE (Version 1.0 (2/11/99)) ("License")
-
-Subject to any third party claims, Silicon Graphics, Inc. ("SGI") hereby
-grants permission to Recipient (defined below), under Recipient's copyrights
-in the Original Software (defined below), to use, copy, modify, merge,
-publish, distribute, sublicense and/or sell copies of Subject Software
-(defined below), and to permit persons to whom the Subject Software is
-furnished in accordance with this License to do the same, subject to all of
-the following terms and conditions, which Recipient accepts by engaging in any
-such use, copying, modifying, merging, publishing, distributing, sublicensing
-or selling:
-
-1. Definitions.
-
-    (a) "Original Software" means source code of computer software code which
-    is described in Exhibit A as Original Software.
-
-    (b) "Modifications" means any addition to or deletion from the substance
-    or structure of either the Original Software or any previous
-    Modifications. When Subject Software is released as a series of files, a
-    Modification means (i) any addition to or deletion from the contents of a
-    file containing Original Software or previous Modifications and (ii) any
-    new file that contains any part of the Original Code or previous
-    Modifications.
-
-    (c) "Subject Software" means the Original Software or Modifications or the
-    combination of the Original Software and Modifications, or portions of any
-    of the foregoing.
-
-    (d) "Recipient" means an individual or a legal entity exercising rights
-    under, and complying with all of the terms of, this License. For legal
-    entities, "Recipient" includes any entity which controls, is controlled
-    by, or is under common control with Recipient. For purposes of this
-    definition, "control" of an entity means (a) the power, direct or
-    indirect, to direct or manage such entity, or (b) ownership of fifty
-    percent (50%) or more of the outstanding shares or beneficial ownership of
-    such entity.
-
-2. Redistribution of Source Code Subject to These Terms. Redistributions of
-Subject Software in source code form must retain the notice set forth in
-Exhibit A, below, in every file. A copy of this License must be included in
-any documentation for such Subject Software where the recipients' rights
-relating to Subject Software are described. Recipient may distribute the
-source code version of Subject Software under a license of Recipient's choice,
-which may contain terms different from this License, provided that (i)
-Recipient is in compliance with the terms of this License, and (ii) the
-license terms include this Section 2 and Sections 3, 4, 7, 8, 10, 12 and 13 of
-this License, which terms may not be modified or superseded by any other terms
-of such license. If Recipient distributes the source code version under a
-different license Recipient must make it absolutely clear that any terms which
-differ from this License are offered by Recipient alone, not by SGI. Recipient
-hereby agrees to indemnify SGI for any liability incurred by SGI as a result
-of any such terms Recipient offers.
-
-3. Redistribution in Executable Form. The notice set forth in Exhibit A must
-be conspicuously included in any notice in an executable version of Subject
-Software, related documentation or collateral in which Recipient describes the
-user's rights relating to the Subject Software. Recipient may distribute the
-executable version of Subject Software under a license of Recipient's choice,
-which may contain terms different from this License, provided that (i)
-Recipient is in compliance with the terms of this License, and (ii) the
-license terms include this Section 3 and Sections 4, 7, 8, 10, 12 and 13 of
-this License, which terms may not be modified or superseded by any other terms
-of such license. If Recipient distributes the executable version under a
-different license Recipient must make it absolutely clear that any terms which
-differ from this License are offered by Recipient alone, not by SGI. Recipient
-hereby agrees to indemnify SGI for any liability incurred by SGI as a result
-of any such terms Recipient offers.
-
-4. Termination. This License and the rights granted hereunder will terminate
-automatically if Recipient fails to comply with terms herein and fails to cure
-such breach within 30 days of the breach. Any sublicense to the Subject
-Software which is properly granted shall survive any termination of this
-License absent termination by the terms of such sublicense. Provisions which,
-by their nature, must remain in effect beyond the termination of this License
-shall survive.
-
-5. No Trademark Rights. This License does not grant any rights to use any
-trade name, trademark or service mark whatsoever. No trade name, trademark or
-service mark of SGI may be used to endorse or promote products derived from
-the Subject Software without prior written permission of SGI.
-
-6. No Other Rights. This License does not grant any rights with respect to the
-OpenGL API or to any software or hardware implementation thereof or to any
-other software whatsoever, nor shall any other rights or licenses not
-expressly granted hereunder arise by implication, estoppel or otherwise with
-respect to the Subject Software. Title to and ownership of the Original
-Software at all times remains with SGI. All rights in the Original Software
-not expressly granted under this License are reserved.
-
-7. Compliance with Laws; Non-Infringement. Recipient shall comply with all
-applicable laws and regulations in connection with use and distribution of the
-Subject Software, including but not limited to, all export and import control
-laws and regulations of the U.S. government and other countries. Recipient may
-not distribute Subject Software that (i) in any way infringes (directly or
-contributorily) the rights (including patent, copyright, trade secret,
-trademark or other intellectual property rights of any kind) of any other
-person or entity or (ii) breaches any representation or warranty, express,
-implied or statutory, which under any applicable law it might be deemed to
-have been distributed.
-
-8. Claims of Infringement. If Recipient at any time has knowledge of any one
-or more third party claims that reproduction, modification, use, distribution,
-import or sale of Subject Software (including particular functionality or code
-incorporated in Subject Software) infringes the third party's intellectual
-property rights, Recipient must place in a well-identified web page bearing
-the title "LEGAL" a description of each such claim and a description of the
-party making each such claim in sufficient detail that a user of the Subject
-Software will know whom to contact regarding the claim. Also, upon gaining
-such knowledge of any such claim, Recipient must conspicuously include the URL
-for such web page in the Exhibit A notice required under Sections 2 and 3,
-above, and in the text of any related documentation, license agreement or
-collateral in which Recipient describes end user's rights relating to the
-Subject Software. If Recipient obtains such knowledge after it makes Subject
-Software available to any other person or entity, Recipient shall take other
-steps (such as notifying appropriate mailing lists or newsgroups) reasonably
-calculated to inform those who received the Subject Software that new
-knowledge has been obtained.
-
-9. DISCLAIMER OF WARRANTY. SUBJECT SOFTWARE IS PROVIDED ON AN "AS IS" BASIS,
-WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT
-LIMITATION, WARRANTIES THAT THE SUBJECT SOFTWARE IS FREE OF DEFECTS,
-MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON- INFRINGING. SGI ASSUMES NO
-RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE. SHOULD ANY SOFTWARE
-PROVE DEFECTIVE IN ANY RESPECT, SGI ASSUMES NO COST OR LIABILITY FOR ANY
-SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN
-ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY SUBJECT SOFTWARE IS AUTHORIZED
-HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-10. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY,
-WHETHER TORT (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE OR STRICT LIABILITY),
-CONTRACT, OR OTHERWISE, SHALL SGI OR ANY SGI LICENSOR BE LIABLE FOR ANY
-DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
-CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK
-STOPPAGE, LOSS OF DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
-COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF
-THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY
-TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SGI's NEGLIGENCE TO
-THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT
-ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
-THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO RECIPIENT.
-
-11. Indemnity. Recipient shall be solely responsible for damages arising,
-directly or indirectly, out of its utilization of rights under this License.
-Recipient will defend, indemnify and hold harmless Silicon Graphics, Inc. from
-and against any loss, liability, damages, costs or expenses (including the
-payment of reasonable attorneys fees) arising out of Recipient's use,
-modification, reproduction and distribution of the Subject Software or out of
-any representation or warranty made by Recipient.
-
-12. U.S. Government End Users. The Subject Software is a "commercial item"
-consisting of "commercial computer software" as such terms are defined in
-title 48 of the Code of Federal Regulations and all U.S. Government End Users
-acquire only the rights set forth in this License and are subject to the terms
-of this License.
-
-13. Miscellaneous. This License represents the complete agreement concerning
-subject matter hereof. If any provision of this License is held to be
-unenforceable, such provision shall be reformed so as to achieve as nearly as
-possible the same economic effect as the original provision and the remainder
-of this License will remain in effect. This License shall be governed by and
-construed in accordance with the laws of the United States and the State of
-California as applied to agreements entered into and to be performed entirely
-within California between California residents. Any litigation relating to
-this License shall be subject to the exclusive jurisdiction of the Federal
-Courts of the Northern District of California (or, absent subject matter
-jurisdiction in such courts, the courts of the State of California), with
-venue lying exclusively in Santa Clara County, California, with the losing
-party responsible for costs, including without limitation, court costs and
-reasonable attorneys fees and expenses. The application of the United Nations
-Convention on Contracts for the International Sale of Goods is expressly
-excluded. Any law or regulation which provides that the language of a contract
-shall be construed against the drafter shall not apply to this License.
-
-Exhibit A
-
-The contents of this file are subject to Sections 2, 3, 4, 7, 8, 10, 12 and 13
-of the GLX Public License Version 1.0 (the "License"). You may not use this
-file except in compliance with those sections of the License. You may obtain a
-copy of the License at Silicon Graphics, Inc., attn: Legal Services, 2011 N.
-Shoreline Blvd., Mountain View, CA 94043 or at
-http://www.sgi.com/software/opensource/glx/license.html.
-
-Software distributed under the License is distributed on an "AS IS" basis. ALL
-WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED
-WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF NON-
-INFRINGEMENT. See the License for the specific language governing rights and
-limitations under the License.
-
-The Original Software is GLX version 1.2 source code, released February, 1999.
-The developer of the Original Software is Silicon Graphics, Inc. Those
-portions of the Subject Software created by Silicon Graphics, Inc. are
-Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved.  3.5. CID
-Font Code Public License
-
-CID FONT CODE PUBLIC LICENSE (Version 1.0 (3/31/99))("License")
-
-Subject to any applicable third party claims, Silicon Graphics, Inc. ("SGI")
-hereby grants permission to Recipient (defined below), under SGI's copyrights
-in the Original Software (defined below), to use, copy, modify, merge,
-publish, distribute, sublicense and/or sell copies of Subject Software
-(defined below) in both source code and executable form, and to permit persons
-to whom the Subject Software is furnished in accordance with this License to
-do the same, subject to all of the following terms and conditions, which
-Recipient accepts by engaging in any such use, copying, modifying, merging,
-publication, distributing, sublicensing or selling:
-
-1. Definitions.
-
-    a. "Original Software" means source code of computer software code that is
-    described in Exhibit A as Original Software.
-
-    b. "Modifications" means any addition to or deletion from the substance or
-    structure of either the Original Software or any previous Modifications.
-    When Subject Software is released as a series of files, a Modification
-    means (i) any addition to or deletion from the contents of a file
-    containing Original Software or previous Modifications and (ii) any new
-    file that contains any part of the Original Code or previous
-    Modifications.
-
-    c. "Subject Software" means the Original Software or Modifications or the
-    combination of the Original Software and Modifications, or portions of any
-    of the foregoing.
-
-    d. "Recipient" means an individual or a legal entity exercising rights
-    under the terms of this License. For legal entities, "Recipient" includes
-    any entity that controls, is controlled by, or is under common control
-    with Recipient. For purposes of this definition, "control" of an entity
-    means (i) the power, direct or indirect, to direct or manage such entity,
-    or (ii) ownership of fifty percent (50%) or more of the outstanding shares
-    or beneficial ownership of such entity.
-
-    e. "Required Notice" means the notice set forth in Exhibit A to this
-    License.
-
-    f. "Accompanying Technology" means any software or other technology that
-    is not a Modification and that is distributed or made publicly available
-    by Recipient with the Subject Software. Separate software files that do
-    not contain any Original Software or any previous Modification shall not
-    be deemed a Modification, even if such software files are aggregated as
-    part of a product, or in any medium of storage, with any file that does
-    contain Original Software or any previous Modification.
-
-2. License Terms. All distribution of the Subject Software must be made
-subject to the terms of this License. A copy of this License and the Required
-Notice must be included in any documentation for Subject Software where
-Recipient's rights relating to Subject Software and/or any Accompanying
-Technology are described. Distributions of Subject Software in source code
-form must also include the Required Notice in every file distributed. In
-addition, a ReadMe file entitled "Important Legal Notice" must be distributed
-with each distribution of one or more files that incorporate Subject Software.
-That file must be included with distributions made in both source code and
-executable form. A copy of the License and the Required Notice must be
-included in that file. Recipient may distribute Accompanying Technology under
-a license of Recipient's choice, which may contain terms different from this
-License, provided that (i) Recipient is in compliance with the terms of this
-License, (ii) such other license terms do not modify or supersede the terms of
-this License as applicable to the Subject Software, (iii) Recipient hereby
-indemnifies SGI for any liability incurred by SGI as a result of the
-distribution of Accompanying Technology or the use of other license terms.
-
-3. Termination. This License and the rights granted hereunder will terminate
-automatically if Recipient fails to comply with terms herein and fails to cure
-such breach within 30 days of the breach. Any sublicense to the Subject
-Software that is properly granted shall survive any termination of this
-License absent termination by the terms of such sublicense. Provisions which,
-by their nature, must remain in effect beyond the termination of this License
-shall survive.
-
-4. Trademark Rights. This License does not grant any rights to use any trade
-name, trademark or service mark whatsoever. No trade name, trademark or
-service mark of SGI may be used to endorse or promote products derived from or
-incorporating any Subject Software without prior written permission of SGI.
-
-5. No Other Rights. No rights or licenses not expressly granted hereunder
-shall arise by implication, estoppel or otherwise. Title to and ownership of
-the Original Software at all times remains with SGI. All rights in the
-Original Software not expressly granted under this License are reserved.
-
-6. Compliance with Laws; Non-Infringement. Recipient shall comply with all
-applicable laws and regulations in connection with use and distribution of the
-Subject Software, including but not limited to, all export and import control
-laws and regulations of the U.S. government and other countries. Recipient may
-not distribute Subject Software that (i) in any way infringes (directly or
-contributorily) the rights (including patent, copyright, trade secret,
-trademark or other intellectual property rights of any kind) of any other
-person or entity, or (ii) breaches any representation or warranty, express,
-implied or statutory, which under any applicable law it might be deemed to
-have been distributed.
-
-7. Claims of Infringement. If Recipient at any time has knowledge of any one
-or more third party claims that reproduction, modification, use, distribution,
-import or sale of Subject Software (including particular functionality or code
-incorporated in Subject Software) infringes the third party's intellectual
-property rights, Recipient must place in a well-identified web page bearing
-the title "LEGAL" a description of each such claim and a description of the
-party making each such claim in sufficient detail that a user of the Subject
-Software will know whom to contact regarding the claim. Also, upon gaining
-such knowledge of any such claim, Recipient must conspicuously include the URL
-for such web page in the Required Notice, and in the text of any related
-documentation, license agreement or collateral in which Recipient describes
-end user's rights relating to the Subject Software. If Recipient obtains such
-knowledge after it makes Subject Software available to any other person or
-entity, Recipient shall take other steps (such as notifying appropriate
-mailing lists or newsgroups) reasonably calculated to provide such knowledge
-to those who received the Subject Software.
-
-8. DISCLAIMER OF WARRANTY. SUBJECT SOFTWARE IS PROVIDED ON AN "AS IS" BASIS,
-WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT
-LIMITATION, WARRANTIES THAT THE SUBJECT SOFTWARE IS FREE OF DEFECTS,
-MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. SGI ASSUMES NO
-RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE. SHOULD ANY SOFTWARE
-PROVE DEFECTIVE IN ANY RESPECT, SGI ASSUMES NO COST OR LIABILITY FOR ANY
-SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN
-ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY SUBJECT SOFTWARE IS AUTHORIZED
-HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-9. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY,
-WHETHER TORT (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE OR STRICT LIABILITY),
-CONTRACT, OR OTHERWISE, SHALL SGI OR ANY SGI LICENSOR BE LIABLE FOR ANY CLAIM,
-DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SUBJECT SOFTWARE OR
-THE USE OR OTHER DEALINGS IN THE SUBJECT SOFTWARE. SOME JURISDICTIONS DO NOT
-ALLOW THE EXCLUSION OR LIMITATION OF CERTAIN DAMAGES, SO THIS EXCLUSION AND
-LIMITATION MAY NOT APPLY TO RECIPIENT TO THE EXTENT SO DISALLOWED.
-
-10. Indemnity. Recipient shall be solely responsible for damages arising,
-directly or indirectly, out of its utilization of rights under this License.
-Recipient will defend, indemnify and hold SGI and its successors and assigns
-harmless from and against any loss, liability, damages, costs or expenses
-(including the payment of reasonable attorneys fees) arising out of
-(Recipient's use, modification, reproduction and distribution of the Subject
-Software or out of any representation or warranty made by Recipient.
-
-11. U.S. Government End Users. The Subject Software is a "commercial item"
-consisting of "commercial computer software" as such terms are defined in
-title 48 of the Code of Federal Regulations and all U.S. Government End Users
-acquire only the rights set forth in this License and are subject to the terms
-of this License.
-
-12. Miscellaneous. This License represents the complete agreement concerning
-subject matter hereof. If any provision of this License is held to be
-unenforceable by any judicial or administrative authority having proper
-jurisdiction with respect thereto, such provision shall be reformed so as to
-achieve as nearly as possible the same economic effect as the original
-provision and the remainder of this License will remain in effect. This
-License shall be governed by and construed in accordance with the laws of the
-United States and the State of California as applied to agreements entered
-into and to be performed entirely within California between California
-residents. Any litigation relating to this License shall be subject to the
-exclusive jurisdiction of the Federal Courts of the Northern District of
-California (or, absent subject matter jurisdiction in such courts, the courts
-of the State of California), with venue lying exclusively in Santa Clara
-County, California, with the losing party responsible for costs, including
-without limitation, court costs and reasonable attorneys fees and expenses.
-The application of the United Nations Convention on Contracts for the
-International Sale of Goods is expressly excluded. Any law or regulation that
-provides that the language of a contract shall be construed against the
-drafter shall not apply to this License.
-
-Exhibit A
-
-Copyright (c) 1994-1999 Silicon Graphics, Inc.
-
-The contents of this file are subject to the CID Font Code Public License
-Version 1.0 (the "License"). You may not use this file except in compliance
-with the License. You may obtain a copy of the License at Silicon Graphics,
-Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043
-or at http://www.sgi.com/software/opensource/cid/license.html
-
-Software distributed under the License is distributed on an "AS IS" basis. ALL
-WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED
-WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF
-NON-INFRINGEMENT. See the License for the specific language governing rights
-and limitations under the License.
-
-The Original Software (as defined in the License) is CID font code that was
-developed by Silicon Graphics, Inc. Those portions of the Subject Software (as
-defined in the License) that were created by Silicon Graphics, Inc. are
-Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved.
-
-[NOTE: When using this text in connection with Subject Software delivered
-solely in object code form, Recipient may replace the words "this file" with
-"this software" in both the first and second sentences.] 3.6. Bitstream Vera
-Fonts Copyright
-
-The fonts have a generous copyright, allowing derivative works (as long as
-"Bitstream" or "Vera" are not in the names), and full redistribution (so long
-as they are not *sold* by themselves). They can be be bundled, redistributed
-and sold with any software.
-
-The fonts are distributed under the following copyright:
-
-Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is a
-trademark of Bitstream, Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of the fonts accompanying this license ("Fonts") and associated documentation
-files (the "Font Software"), to reproduce and distribute the Font Software,
-including without limitation the rights to use, copy, merge, publish,
-distribute, and/or sell copies of the Font Software, and to permit persons to
-whom the Font Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright and trademark notices and this permission notice shall be
-included in all copies of one or more of the Font Software typefaces.
-
-The Font Software may be modified, altered, or added to, and in particular the
-designs of glyphs or characters in the Fonts may be modified and additional
-glyphs or characters may be added to the Fonts, only if the fonts are renamed
-to names not containing either the words "Bitstream" or the word "Vera".
-
-This License becomes null and void to the extent applicable to Fonts or Font
-Software that has been modified and is distributed under the "Bitstream Vera"
-names.
-
-The Font Software may be sold as part of a larger software package but no copy
-of one or more of the Font Software typefaces may be sold by itself.
-
-THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
-TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME FOUNDATION
-BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL,
-SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO
-USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
-
-Except as contained in this notice, the names of Gnome, the Gnome Foundation,
-and Bitstream Inc., shall not be used in advertising or otherwise to promote
-the sale, use or other dealings in this Font Software without prior written
-authorization from the Gnome Foundation or Bitstream Inc., respectively. For
-further information, contact: fonts at gnome dot org.  3.7. Bigelow & Holmes
-Inc and URW++ GmbH Luxi font license
-
-Luxi fonts copyright (c) 2001 by Bigelow & Holmes Inc. Luxi font instruction
-code copyright (c) 2001 by URW++ GmbH. All Rights Reserved. Luxi is a
-registered trademark of Bigelow & Holmes Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of these Fonts and associated documentation files (the "Font Software"), to
-deal in the Font Software, including without limitation the rights to use,
-copy, merge, publish, distribute, sublicense, and/or sell copies of the Font
-Software, and to permit persons to whom the Font Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright and trademark notices and this permission notice shall be
-included in all copies of one or more of the Font Software.
-
-The Font Software may not be modified, altered, or added to, and in particular
-the designs of glyphs or characters in the Fonts may not be modified nor may
-additional glyphs or characters be added to the Fonts. This License becomes
-null and void when the Fonts or Font Software have been modified.
-
-THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
-TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BIGELOW & HOLMES INC. OR URW++
-GMBH. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY
-GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR
-INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 SOFTWARE.
 
-Except as contained in this notice, the names of Bigelow & Holmes Inc. and
-URW++ GmbH. shall not be used in advertising or otherwise to promote the sale,
-use or other dealings in this Font Software without prior written
-authorization from Bigelow & Holmes Inc. and URW++ GmbH.
+Except as contained in this notice, the name of the X Consortium shall not
+be used in advertising or otherwise to promote the sale, use or other
+dealing in this Software without prior written authorization from the
+X Consortium.
+_____________________________
+Xmos_r.h:
+/*
+Copyright (c) 1996 X Consortium
 
-For further information, contact:
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
 
-info@urwpp.de or design@bigelowandholmes.com
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
 
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the X Consortium.
+*/
+
+_____________________________
+Copyright notice for extutil.h:
+Copyright 1989, 1998 The Open Group
+
+All Rights Reserved.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+*
+* Author: Jim Fulton, MIT The Open Group
+*
+* Xlib Extension-Writing Utilities
+*
+* This package contains utilities for writing the client API for various
+* protocol extensions. THESE INTERFACES ARE NOT PART OF THE X STANDARD AND
+* ARE SUBJECT TO CHANGE!
+*/
+
+_____________________________
+Copyright notice for HPkeysym.h:
+/*
+
+Copyright 1987, 1998 The Open Group
+
+All Rights Reserved.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
+
+All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the names of Hewlett Packard
+or Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD
+TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. Hewlett-Packard shall not be liable for errors
+contained herein or direct, indirect, special, incidental or
+consequential damages in connection with the furnishing,
+performance, or use of this material.
+
+*/
+_____________________________________
+Copyright notice in keysym2ucs.h:
+
+Copyright 1987, 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts
+
+All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+*/
 
 --- end of LICENSE ---
 
@@ -3325,7 +2815,7 @@
 
   version 1.2.8, April 28th, 2013
 
-  Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
+  Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
@@ -3361,7 +2851,6 @@
   Apache Xalan-Java 2.7.1 
   Apache Xerces Java 2.10.0 
   Apache XML Resolver 1.1 
-  Dynalink 0.5
 
 
 --- begin of LICENSE ---
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java
index 10caa40..697ab82 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2016, 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
@@ -38,6 +38,7 @@
 import com.sun.tools.javac.file.JavacFileManager;
 import com.sun.tools.javac.util.Context;
 import com.sun.tools.javac.util.StringUtils;
+import com.sun.tools.javadoc.JavaScriptScanner;
 import com.sun.tools.javadoc.RootDocImpl;
 
 /**
@@ -181,6 +182,11 @@
     public Set<String> doclintOpts = new LinkedHashSet<String>();
 
     /**
+     * Whether or not to check for JavaScript in doc comments.
+     */
+    private boolean allowScriptInComments;
+
+    /**
      * Unique Resource Handler for this package.
      */
     public final MessageRetriever standardmessage;
@@ -283,8 +289,11 @@
                 doclintOpts.add(null);
             } else if (opt.startsWith("-xdoclint:")) {
                 doclintOpts.add(opt.substring(opt.indexOf(":") + 1));
+            } else if (opt.equals("--allow-script-in-comments")) {
+                allowScriptInComments = true;
             }
         }
+
         if (root.specifiedClasses().length > 0) {
             Map<String,PackageDoc> map = new HashMap<String,PackageDoc>();
             PackageDoc pd;
@@ -301,9 +310,30 @@
 
         if (root instanceof RootDocImpl) {
             ((RootDocImpl) root).initDocLint(doclintOpts, tagletManager.getCustomTagNames());
+            JavaScriptScanner jss = ((RootDocImpl) root).initJavaScriptScanner(isAllowScriptInComments());
+            if (jss != null) {
+                // In a more object-oriented world, this would be done by methods on the Option objects.
+                // Note that -windowtitle silently removes any and all HTML elements, and so does not need
+                // to be handled here.
+                checkJavaScript(jss, "-header", header);
+                checkJavaScript(jss, "-footer", footer);
+                checkJavaScript(jss, "-top", top);
+                checkJavaScript(jss, "-bottom", bottom);
+                checkJavaScript(jss, "-doctitle", doctitle);
+                checkJavaScript(jss, "-packagesheader", packagesheader);
+            }
         }
     }
 
+    private void checkJavaScript(JavaScriptScanner jss, final String opt, String value) {
+        jss.parse(value, new JavaScriptScanner.Reporter() {
+            public void report() {
+                root.printError(getText("doclet.JavaScript_in_option", opt));
+                throw new FatalError();
+            }
+        });
+    }
+
     /**
      * Returns the "length" of a given option. If an option takes no
      * arguments, its length is one. If it takes one argument, it's
@@ -337,7 +367,8 @@
             option.equals("-nonavbar") ||
             option.equals("-nooverview") ||
             option.equals("-xdoclint") ||
-            option.startsWith("-xdoclint:")) {
+            option.startsWith("-xdoclint:") ||
+            option.equals("--allow-script-in-comments")) {
             return 1;
         } else if (option.equals("-help")) {
             // Uugh: first, this should not be hidden inside optionLength,
@@ -595,4 +626,13 @@
     public Content newContent() {
         return new ContentBuilder();
     }
+
+    /**
+     * Returns whether or not to allow JavaScript in comments.
+     * Default is off; can be set true from a command line option.
+     * @return the allowScriptInComments
+     */
+    public boolean isAllowScriptInComments() {
+        return allowScriptInComments;
+    }
 }
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java
index 5cf8337..8377a14 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, 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
@@ -190,6 +190,8 @@
                 }
             } catch (IOException e) {
                 throw new DocletAbortException(e);
+            } catch (FatalError fe) {
+                throw fe;
             } catch (DocletAbortException de) {
                 throw de;
             } catch (Exception e) {
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java
index ae748c3..84fec05 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, 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
@@ -164,7 +164,9 @@
 
     public final Content descfrmInterfaceLabel;
 
-    private final Writer writer;
+    private final DocFile file;
+
+    private Writer writer;
 
     private Content script;
 
@@ -180,7 +182,7 @@
      */
     public HtmlWriter(Configuration configuration, DocPath path)
             throws IOException, UnsupportedEncodingException {
-        writer = DocFile.createFileForOutput(configuration, path).openWriter();
+        file = DocFile.createFileForOutput(configuration, path);
         this.configuration = configuration;
         this.memberDetailsListPrinted = false;
         profileTableHeader = new String[] {
@@ -239,6 +241,7 @@
     }
 
     public void write(Content c) throws IOException {
+        writer = file.openWriter();
         c.write(writer, true);
     }
 
@@ -380,11 +383,12 @@
         HtmlTree script = new HtmlTree(HtmlTag.SCRIPT);
         script.addAttr(HtmlAttr.TYPE, "text/javascript");
         String scriptCode = DocletConstants.NL +
-                "    targetPage = \"\" + window.location.search;" + DocletConstants.NL +
-                "    if (targetPage != \"\" && targetPage != \"undefined\")" + DocletConstants.NL +
-                "        targetPage = targetPage.substring(1);" + DocletConstants.NL +
-                "    if (targetPage.indexOf(\":\") != -1 || (targetPage != \"\" && !validURL(targetPage)))" + DocletConstants.NL +
-                "        targetPage = \"undefined\";" + DocletConstants.NL +
+                "    tmpTargetPage = \"\" + window.location.search;" + DocletConstants.NL +
+                "    if (tmpTargetPage != \"\" && tmpTargetPage != \"undefined\")" + DocletConstants.NL +
+                "        tmpTargetPage = tmpTargetPage.substring(1);" + DocletConstants.NL +
+                "    if (tmpTargetPage.indexOf(\":\") != -1 || (tmpTargetPage != \"\" && !validURL(tmpTargetPage)))" + DocletConstants.NL +
+                "        tmpTargetPage = \"undefined\";" + DocletConstants.NL +
+                "    targetPage = tmpTargetPage;" + DocletConstants.NL +
                 "    function validURL(url) {" + DocletConstants.NL +
                 "        try {" + DocletConstants.NL +
                 "            url = decodeURIComponent(url);" + DocletConstants.NL +
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AbstractDoclet.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AbstractDoclet.java
index 39fde45..35f979d 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AbstractDoclet.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AbstractDoclet.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, 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
@@ -83,6 +83,8 @@
         } catch (Configuration.Fault f) {
             root.printError(f.getMessage());
             return false;
+        } catch (FatalError fe) {
+            return false;
         } catch (DocletAbortException e) {
             Throwable cause = e.getCause();
             if (cause != null) {
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractBuilder.java
index 00f0b2b..b30e156 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractBuilder.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, 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
@@ -140,7 +140,14 @@
             configuration.root.printError("Unknown element: " + component);
             throw new DocletAbortException(e);
         } catch (InvocationTargetException e) {
-            throw new DocletAbortException(e.getCause());
+            Throwable cause = e.getCause();
+            if (cause instanceof FatalError) {
+                throw (FatalError) cause;
+            } else if (cause instanceof DocletAbortException) {
+                throw (DocletAbortException) cause;
+            } else {
+                throw new DocletAbortException(cause);
+            }
         } catch (Exception e) {
             e.printStackTrace();
             configuration.root.printError("Exception " +
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets.properties b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets.properties
index 597dd35..dad5ab8 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets.properties
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets.properties
@@ -29,6 +29,8 @@
 doclet.Building_Tree=Building tree for all the packages and classes...
 doclet.Building_Index=Building index for all the packages and classes...
 doclet.Building_Index_For_All_Classes=Building index for all classes...
+doclet.JavaScript_in_option=Argument for {0} contains JavaScript.\n\
+Use --allow-script-in-comments to allow use of JavaScript.
 doclet.sourcetab_warning=The argument for -sourcetab must be an integer greater than 0.
 doclet.Packages=Packages
 doclet.Profiles=Profiles
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets_ja.properties b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets_ja.properties
index 8051a49..3b6f660 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets_ja.properties
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets_ja.properties
@@ -27,6 +27,7 @@
 doclet.Building_Tree=\u5168\u30D1\u30C3\u30B1\u30FC\u30B8\u3068\u30AF\u30E9\u30B9\u306E\u968E\u5C64\u30C4\u30EA\u30FC\u3092\u4F5C\u6210\u3057\u3066\u3044\u307E\u3059...
 doclet.Building_Index=\u5168\u30D1\u30C3\u30B1\u30FC\u30B8\u3068\u30AF\u30E9\u30B9\u306E\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u3092\u4F5C\u6210\u3057\u3066\u3044\u307E\u3059...
 doclet.Building_Index_For_All_Classes=\u5168\u30AF\u30E9\u30B9\u306E\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u3092\u4F5C\u6210\u3057\u3066\u3044\u307E\u3059...
+doclet.JavaScript_in_option={0}\u306E\u5F15\u6570\u306BJavaScript\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u3002\n--allow-script-in-comments\u3092\u4F7F\u7528\u3057\u3066\u3001JavaScript\u306E\u4F7F\u7528\u3092\u8A31\u53EF\u3057\u3066\u304F\u3060\u3055\u3044\u3002
 doclet.sourcetab_warning=-sourcetab\u306E\u5F15\u6570\u306F0\u3088\u308A\u5927\u304D\u3044\u6574\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
 doclet.Packages=\u30D1\u30C3\u30B1\u30FC\u30B8
 doclet.Profiles=\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets_zh_CN.properties b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets_zh_CN.properties
index d67b248..3fff28a 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets_zh_CN.properties
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets_zh_CN.properties
@@ -27,6 +27,7 @@
 doclet.Building_Tree=\u6B63\u5728\u6784\u5EFA\u6240\u6709\u7A0B\u5E8F\u5305\u548C\u7C7B\u7684\u6811...
 doclet.Building_Index=\u6B63\u5728\u6784\u5EFA\u6240\u6709\u7A0B\u5E8F\u5305\u548C\u7C7B\u7684\u7D22\u5F15...
 doclet.Building_Index_For_All_Classes=\u6B63\u5728\u6784\u5EFA\u6240\u6709\u7C7B\u7684\u7D22\u5F15...
+doclet.JavaScript_in_option={0} \u7684\u53C2\u6570\u5305\u542B JavaScript\u3002\n\u4F7F\u7528 --allow-script-in-comments \u53EF\u5141\u8BB8\u4F7F\u7528 JavaScript\u3002
 doclet.sourcetab_warning=-sourcetab \u7684\u53C2\u6570\u5FC5\u987B\u662F\u5927\u4E8E 0 \u7684\u6574\u6570\u3002
 doclet.Packages=\u7A0B\u5E8F\u5305
 doclet.Profiles=\u914D\u7F6E\u6587\u4EF6
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/FatalError.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/FatalError.java
new file mode 100644
index 0000000..71248cb
--- /dev/null
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/FatalError.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2016, 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 com.sun.tools.doclets.internal.toolkit.util;
+
+/**
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
+ *  This code and its internal interfaces are subject to change or
+ *  deletion without notice.</b>
+ */
+@Deprecated
+public class FatalError extends Error {
+    private static final long serialVersionUID = -9131058909576418984L;
+
+    public FatalError() { }
+}
diff --git a/langtools/src/share/classes/com/sun/tools/doclint/Checker.java b/langtools/src/share/classes/com/sun/tools/doclint/Checker.java
index e89a460..dd9f7f4 100644
--- a/langtools/src/share/classes/com/sun/tools/doclint/Checker.java
+++ b/langtools/src/share/classes/com/sun/tools/doclint/Checker.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, 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
@@ -126,7 +126,7 @@
         }
     }
 
-    private Deque<TagStackItem> tagStack; // TODO: maybe want to record starting tree as well
+    private final Deque<TagStackItem> tagStack; // TODO: maybe want to record starting tree as well
     private HtmlTag currHeaderTag;
 
     private final int implicitHeaderLevel;
@@ -401,7 +401,16 @@
                 break;
 
             case OTHER:
-                env.messages.error(HTML, tree, "dc.tag.not.allowed", treeName);
+                switch (t) {
+                    case SCRIPT:
+                        // <script> may or may not be allowed, depending on --allow-script-in-comments
+                        // but we allow it here, and rely on a separate scanner to detect all uses
+                        // of JavaScript, including <script> tags, and use in attributes, etc.
+                        break;
+
+                    default:
+                        env.messages.error(HTML, tree, "dc.tag.not.allowed", treeName);
+                }
                 return;
         }
 
@@ -519,22 +528,27 @@
                 if (!first)
                     env.messages.error(HTML, tree, "dc.attr.repeated", name);
             }
-            AttrKind k = currTag.getAttrKind(name);
-            switch (k) {
-                case OK:
-                    break;
 
-                case INVALID:
-                    env.messages.error(HTML, tree, "dc.attr.unknown", name);
-                    break;
+            // for now, doclint allows all attribute names beginning with "on" as event handler names,
+            // without checking the validity or applicability of the name
+            if (!name.toString().startsWith("on")) {
+                AttrKind k = currTag.getAttrKind(name);
+                switch (k) {
+                    case OK:
+                        break;
 
-                case OBSOLETE:
-                    env.messages.warning(ACCESSIBILITY, tree, "dc.attr.obsolete", name);
-                    break;
+                    case INVALID:
+                        env.messages.error(HTML, tree, "dc.attr.unknown", name);
+                        break;
 
-                case USE_CSS:
-                    env.messages.warning(ACCESSIBILITY, tree, "dc.attr.obsolete.use.css", name);
-                    break;
+                    case OBSOLETE:
+                        env.messages.warning(ACCESSIBILITY, tree, "dc.attr.obsolete", name);
+                        break;
+
+                    case USE_CSS:
+                        env.messages.warning(ACCESSIBILITY, tree, "dc.attr.obsolete.use.css", name);
+                        break;
+                }
             }
 
             if (attr != null) {
@@ -643,6 +657,9 @@
     }
 
     private void checkURI(AttributeTree tree, String uri) {
+        // allow URIs beginning with javascript:, which would otherwise be rejected by the URI API.
+        if (uri.startsWith("javascript:"))
+            return;
         try {
             URI u = new URI(uri);
         } catch (URISyntaxException e) {
diff --git a/langtools/src/share/classes/com/sun/tools/doclint/HtmlTag.java b/langtools/src/share/classes/com/sun/tools/doclint/HtmlTag.java
index 8de4327..99d384e 100644
--- a/langtools/src/share/classes/com/sun/tools/doclint/HtmlTag.java
+++ b/langtools/src/share/classes/com/sun/tools/doclint/HtmlTag.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2016, 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
@@ -183,7 +183,8 @@
         }
     },
 
-    SCRIPT(BlockType.OTHER, EndKind.REQUIRED),
+    SCRIPT(BlockType.OTHER, EndKind.REQUIRED,
+            attrs(AttrKind.OK, SRC)),
 
     SMALL(BlockType.INLINE, EndKind.REQUIRED,
             EnumSet.of(Flag.EXPECT_CONTENT)),
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Types.java b/langtools/src/share/classes/com/sun/tools/javac/code/Types.java
index d7110fb..b385f28 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Types.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Types.java
@@ -1067,7 +1067,7 @@
        List<Type> argtypes = msym.type.getParameterTypes();
        return (msym.flags_field & NATIVE) != 0 &&
                msym.owner == syms.methodHandleType.tsym &&
-               argtypes.tail.tail == null &&
+               argtypes.length() == 1 &&
                argtypes.head.hasTag(TypeTag.ARRAY) &&
                msym.type.getReturnType().tsym == syms.objectType.tsym &&
                ((ArrayType)argtypes.head).elemtype.tsym == syms.objectType.tsym;
diff --git a/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java b/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java
index 9cdb462..e61ea49 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, 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
@@ -585,7 +585,7 @@
     /**
      * Ident = IDENTIFIER
      */
-    Name ident() {
+    public Name ident() {
         if (token.kind == IDENTIFIER) {
             Name name = token.name();
             nextToken();
diff --git a/langtools/src/share/classes/com/sun/tools/javac/resources/javac_ja.properties b/langtools/src/share/classes/com/sun/tools/javac/resources/javac_ja.properties
index 4d86f6a..286142b 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/resources/javac_ja.properties
+++ b/langtools/src/share/classes/com/sun/tools/javac/resources/javac_ja.properties
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2016, 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
@@ -34,7 +34,7 @@
 javac.opt.classpath=\u30E6\u30FC\u30B6\u30FC\u30FB\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u304A\u3088\u3073\u6CE8\u91C8\u30D7\u30ED\u30BB\u30C3\u30B5\u3092\u691C\u7D22\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3059\u308B
 javac.opt.sourcepath=\u5165\u529B\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3059\u308B
 javac.opt.bootclasspath=\u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30D1\u30B9\u306E\u5834\u6240\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B
-javac.opt.Xbootclasspath.p=\u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30D1\u30B9\u306B\u4ED8\u52A0\u3059\u308B
+javac.opt.Xbootclasspath.p=\u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30D1\u30B9\u306E\u5148\u982D\u306B\u4ED8\u52A0\u3059\u308B
 javac.opt.Xbootclasspath.a=\u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30D1\u30B9\u306B\u8FFD\u52A0\u3059\u308B
 javac.opt.endorseddirs=\u63A8\u5968\u898F\u683C\u30D1\u30B9\u306E\u5834\u6240\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B
 javac.opt.extdirs=\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u6E08\u62E1\u5F35\u6A5F\u80FD\u306E\u5834\u6240\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B
diff --git a/langtools/src/share/classes/com/sun/tools/javadoc/DocEnv.java b/langtools/src/share/classes/com/sun/tools/javadoc/DocEnv.java
index 49933a8..3db4597 100644
--- a/langtools/src/share/classes/com/sun/tools/javadoc/DocEnv.java
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/DocEnv.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2016, 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
@@ -86,7 +86,7 @@
     JavadocEnter enter;
 
     /** The name table. */
-    Names names;
+    private final Names names;
 
     /** The encoding name. */
     private String encoding;
@@ -109,6 +109,7 @@
     JavaFileManager fileManager;
     Context context;
     DocLint doclint;
+    JavaScriptScanner javaScriptScanner;
 
     WeakHashMap<JCTree, TreePath> treePaths = new WeakHashMap<JCTree, TreePath>();
 
@@ -834,6 +835,15 @@
         doclint.init(t, doclintOpts.toArray(new String[doclintOpts.size()]), false);
     }
 
+    JavaScriptScanner initJavaScriptScanner(boolean allowScriptInComments) {
+        if (allowScriptInComments) {
+            javaScriptScanner = null;
+        } else {
+            javaScriptScanner = new JavaScriptScanner();
+        }
+        return javaScriptScanner;
+    }
+
     boolean showTagMessages() {
         return (doclint == null);
     }
diff --git a/langtools/src/share/classes/com/sun/tools/javadoc/DocImpl.java b/langtools/src/share/classes/com/sun/tools/javadoc/DocImpl.java
index e5b3f6c..83f5581 100644
--- a/langtools/src/share/classes/com/sun/tools/javadoc/DocImpl.java
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/DocImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, 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,6 +36,7 @@
 
 import com.sun.javadoc.*;
 import com.sun.source.util.TreePath;
+import com.sun.tools.doclets.internal.toolkit.util.FatalError;
 import com.sun.tools.javac.tree.JCTree;
 import com.sun.tools.javac.tree.JCTree.JCCompilationUnit;
 import com.sun.tools.javac.util.Position;
@@ -127,6 +128,15 @@
     Comment comment() {
         if (comment == null) {
             String d = documentation();
+            if (env.javaScriptScanner != null) {
+                env.javaScriptScanner.parse(d, new JavaScriptScanner.Reporter() {
+                    @Override
+                    public void report() {
+                        env.error(DocImpl.this, "javadoc.JavaScript_in_comment");
+                        throw new FatalError();
+                    }
+                });
+            }
             if (env.doclint != null
                     && treePath != null
                     && d.equals(getCommentText(treePath))) {
diff --git a/langtools/src/share/classes/com/sun/tools/javadoc/JavaScriptScanner.java b/langtools/src/share/classes/com/sun/tools/javadoc/JavaScriptScanner.java
new file mode 100644
index 0000000..2ef0d7a
--- /dev/null
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/JavaScriptScanner.java
@@ -0,0 +1,1103 @@
+/*
+ * Copyright (c) 2016, 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 com.sun.tools.javadoc;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
+import com.sun.tools.javadoc.JavaScriptScanner.TagParser.Kind;
+
+import static com.sun.tools.javac.util.LayoutCharacters.EOI;
+
+/**
+ * Parser to detect use of JavaScript in documentation comments.
+ */
+@Deprecated
+public class JavaScriptScanner {
+    public static interface Reporter {
+        void report();
+    }
+
+    static class ParseException extends Exception {
+        private static final long serialVersionUID = 0;
+        ParseException(String key) {
+            super(key);
+        }
+    }
+
+    private Reporter reporter;
+
+    /** The input buffer, index of most recent character read,
+     *  index of one past last character in buffer.
+     */
+    protected char[] buf;
+    protected int bp;
+    protected int buflen;
+
+    /** The current character.
+     */
+    protected char ch;
+
+    private boolean newline = true;
+
+    Map<String, TagParser> tagParsers;
+    Set<String> eventAttrs;
+    Set<String> uriAttrs;
+
+    public JavaScriptScanner() {
+        initTagParsers();
+        initEventAttrs();
+        initURIAttrs();
+    }
+
+    public void parse(String comment, Reporter r) {
+        reporter = r;
+        String c = comment;
+        buf = new char[c.length() + 1];
+        c.getChars(0, c.length(), buf, 0);
+        buf[buf.length - 1] = EOI;
+        buflen = buf.length - 1;
+        bp = -1;
+        newline = true;
+        nextChar();
+
+        blockContent();
+        blockTags();
+    }
+
+    private void checkHtmlTag(String tag) {
+        if (tag.equalsIgnoreCase("script")) {
+            reporter.report();
+        }
+    }
+
+    private void checkHtmlAttr(String name, String value) {
+        String n = name.toLowerCase(Locale.ENGLISH);
+        if (eventAttrs.contains(n)
+                || uriAttrs.contains(n)
+                    && value != null && value.toLowerCase(Locale.ENGLISH).trim().startsWith("javascript:")) {
+            reporter.report();
+        }
+    }
+
+    void nextChar() {
+        ch = buf[bp < buflen ? ++bp : buflen];
+        switch (ch) {
+            case '\f': case '\n': case '\r':
+                newline = true;
+        }
+    }
+
+    /**
+     * Read block content, consisting of text, html and inline tags.
+     * Terminated by the end of input, or the beginning of the next block tag:
+     * i.e. @ as the first non-whitespace character on a line.
+     */
+    @SuppressWarnings("fallthrough")
+    protected void blockContent() {
+
+        loop:
+        while (bp < buflen) {
+            switch (ch) {
+                case '\n': case '\r': case '\f':
+                    newline = true;
+                    // fallthrough
+
+                case ' ': case '\t':
+                    nextChar();
+                    break;
+
+                case '&':
+                    entity(null);
+                    break;
+
+                case '<':
+                    html();
+                    break;
+
+                case '>':
+                    newline = false;
+                    nextChar();
+                    break;
+
+                case '{':
+                    inlineTag(null);
+                    break;
+
+                case '@':
+                    if (newline) {
+                        break loop;
+                    }
+                    // fallthrough
+
+                default:
+                    newline = false;
+                    nextChar();
+            }
+        }
+    }
+
+    /**
+     * Read a series of block tags, including their content.
+     * Standard tags parse their content appropriately.
+     * Non-standard tags are represented by {@link UnknownBlockTag}.
+     */
+    protected void blockTags() {
+        while (ch == '@')
+            blockTag();
+    }
+
+    /**
+     * Read a single block tag, including its content.
+     * Standard tags parse their content appropriately.
+     * Non-standard tags are represented by {@link UnknownBlockTag}.
+     */
+    protected void blockTag() {
+        int p = bp;
+        try {
+            nextChar();
+            if (isIdentifierStart(ch)) {
+                String name = readTagName();
+                TagParser tp = tagParsers.get(name);
+                if (tp == null) {
+                    blockContent();
+                } else {
+                    switch (tp.getKind()) {
+                        case BLOCK:
+                            tp.parse(p);
+                            return;
+                        case INLINE:
+                            return;
+                    }
+                }
+            }
+            blockContent();
+        } catch (ParseException e) {
+            blockContent();
+        }
+    }
+
+    protected void inlineTag(Void list) {
+        newline = false;
+        nextChar();
+        if (ch == '@') {
+            inlineTag();
+        }
+    }
+
+    /**
+     * Read a single inline tag, including its content.
+     * Standard tags parse their content appropriately.
+     * Non-standard tags are represented by {@link UnknownBlockTag}.
+     * Malformed tags may be returned as {@link Erroneous}.
+     */
+    protected void inlineTag() {
+        int p = bp - 1;
+        try {
+            nextChar();
+            if (isIdentifierStart(ch)) {
+                String name = readTagName();
+                TagParser tp = tagParsers.get(name);
+
+                if (tp == null) {
+                    skipWhitespace();
+                    inlineText(WhitespaceRetentionPolicy.REMOVE_ALL);
+                    nextChar();
+                } else {
+                    skipWhitespace();
+                    if (tp.getKind() == TagParser.Kind.INLINE) {
+                        tp.parse(p);
+                    } else { // handle block tags (ex: @see) in inline content
+                        inlineText(WhitespaceRetentionPolicy.REMOVE_ALL); // skip content
+                        nextChar();
+                    }
+                }
+            }
+        } catch (ParseException e) {
+        }
+    }
+
+    private static enum WhitespaceRetentionPolicy {
+        RETAIN_ALL,
+        REMOVE_FIRST_SPACE,
+        REMOVE_ALL
+    }
+
+    /**
+     * Read plain text content of an inline tag.
+     * Matching pairs of { } are skipped; the text is terminated by the first
+     * unmatched }. It is an error if the beginning of the next tag is detected.
+     */
+    private void inlineText(WhitespaceRetentionPolicy whitespacePolicy) throws ParseException {
+        switch (whitespacePolicy) {
+            case REMOVE_ALL:
+                skipWhitespace();
+                break;
+            case REMOVE_FIRST_SPACE:
+                if (ch == ' ')
+                    nextChar();
+                break;
+            case RETAIN_ALL:
+            default:
+                // do nothing
+                break;
+
+        }
+        int pos = bp;
+        int depth = 1;
+
+        loop:
+        while (bp < buflen) {
+            switch (ch) {
+                case '\n': case '\r': case '\f':
+                    newline = true;
+                    break;
+
+                case ' ': case '\t':
+                    break;
+
+                case '{':
+                    newline = false;
+                    depth++;
+                    break;
+
+                case '}':
+                    if (--depth == 0) {
+                        return;
+                    }
+                    newline = false;
+                    break;
+
+                case '@':
+                    if (newline)
+                        break loop;
+                    newline = false;
+                    break;
+
+                default:
+                    newline = false;
+                    break;
+            }
+            nextChar();
+        }
+        throw new ParseException("dc.unterminated.inline.tag");
+    }
+
+    /**
+     * Read Java class name, possibly followed by member
+     * Matching pairs of {@literal < >} are skipped. The text is terminated by the first
+     * unmatched }. It is an error if the beginning of the next tag is detected.
+     */
+    // TODO: boolean allowMember should be enum FORBID, ALLOW, REQUIRE
+    // TODO: improve quality of parse to forbid bad constructions.
+    // TODO: update to use ReferenceParser
+    @SuppressWarnings("fallthrough")
+    protected void reference(boolean allowMember) throws ParseException {
+        int pos = bp;
+        int depth = 0;
+
+        // scan to find the end of the signature, by looking for the first
+        // whitespace not enclosed in () or <>, or the end of the tag
+        loop:
+        while (bp < buflen) {
+            switch (ch) {
+                case '\n': case '\r': case '\f':
+                    newline = true;
+                    // fallthrough
+
+                case ' ': case '\t':
+                    if (depth == 0)
+                        break loop;
+                    break;
+
+                case '(':
+                case '<':
+                    newline = false;
+                    depth++;
+                    break;
+
+                case ')':
+                case '>':
+                    newline = false;
+                    --depth;
+                    break;
+
+                case '}':
+                    if (bp == pos)
+                        return;
+                    newline = false;
+                    break loop;
+
+                case '@':
+                    if (newline)
+                        break loop;
+                    // fallthrough
+
+                default:
+                    newline = false;
+
+            }
+            nextChar();
+        }
+
+        if (depth != 0)
+            throw new ParseException("dc.unterminated.signature");
+    }
+
+    /**
+     * Read Java identifier
+     * Matching pairs of { } are skipped; the text is terminated by the first
+     * unmatched }. It is an error if the beginning of the next tag is detected.
+     */
+    @SuppressWarnings("fallthrough")
+    protected void identifier() throws ParseException {
+        skipWhitespace();
+        int pos = bp;
+
+        if (isJavaIdentifierStart(ch)) {
+            readJavaIdentifier();
+            return;
+        }
+
+        throw new ParseException("dc.identifier.expected");
+    }
+
+    /**
+     * Read a quoted string.
+     * It is an error if the beginning of the next tag is detected.
+     */
+    @SuppressWarnings("fallthrough")
+    protected void quotedString() {
+        int pos = bp;
+        nextChar();
+
+        loop:
+        while (bp < buflen) {
+            switch (ch) {
+                case '\n': case '\r': case '\f':
+                    newline = true;
+                    break;
+
+                case ' ': case '\t':
+                    break;
+
+                case '"':
+                    nextChar();
+                    // trim trailing white-space?
+                    return;
+
+                case '@':
+                    if (newline)
+                        break loop;
+
+            }
+            nextChar();
+        }
+    }
+
+    /**
+     * Read a term ie. one word.
+     * It is an error if the beginning of the next tag is detected.
+     */
+    @SuppressWarnings("fallthrough")
+    protected void inlineWord() {
+        int pos = bp;
+        int depth = 0;
+        loop:
+        while (bp < buflen) {
+            switch (ch) {
+                case '\n':
+                    newline = true;
+                    // fallthrough
+
+                case '\r': case '\f': case ' ': case '\t':
+                    return;
+
+                case '@':
+                    if (newline)
+                        break loop;
+
+                case '{':
+                    depth++;
+                    break;
+
+                case '}':
+                    if (depth == 0 || --depth == 0)
+                        return;
+                    break;
+            }
+            newline = false;
+            nextChar();
+        }
+    }
+
+    /**
+     * Read general text content of an inline tag, including HTML entities and elements.
+     * Matching pairs of { } are skipped; the text is terminated by the first
+     * unmatched }. It is an error if the beginning of the next tag is detected.
+     */
+    @SuppressWarnings("fallthrough")
+    private void inlineContent() {
+
+        skipWhitespace();
+        int pos = bp;
+        int depth = 1;
+
+        loop:
+        while (bp < buflen) {
+
+            switch (ch) {
+                case '\n': case '\r': case '\f':
+                    newline = true;
+                    // fall through
+
+                case ' ': case '\t':
+                    nextChar();
+                    break;
+
+                case '&':
+                    entity(null);
+                    break;
+
+                case '<':
+                    newline = false;
+                    html();
+                    break;
+
+                case '{':
+                    newline = false;
+                    depth++;
+                    nextChar();
+                    break;
+
+                case '}':
+                    newline = false;
+                    if (--depth == 0) {
+                        nextChar();
+                        return;
+                    }
+                    nextChar();
+                    break;
+
+                case '@':
+                    if (newline)
+                        break loop;
+                    // fallthrough
+
+                default:
+                    nextChar();
+                    break;
+            }
+        }
+
+    }
+
+    protected void entity(Void list) {
+        newline = false;
+        entity();
+    }
+
+    /**
+     * Read an HTML entity.
+     * {@literal &identifier; } or {@literal &#digits; } or {@literal &#xhex-digits; }
+     */
+    protected void entity() {
+        nextChar();
+        String name = null;
+        if (ch == '#') {
+            int namep = bp;
+            nextChar();
+            if (isDecimalDigit(ch)) {
+                nextChar();
+                while (isDecimalDigit(ch))
+                    nextChar();
+                name = new String(buf, namep, bp - namep);
+            } else if (ch == 'x' || ch == 'X') {
+                nextChar();
+                if (isHexDigit(ch)) {
+                    nextChar();
+                    while (isHexDigit(ch))
+                        nextChar();
+                    name = new String(buf, namep, bp - namep);
+                }
+            }
+        } else if (isIdentifierStart(ch)) {
+            name = readIdentifier();
+        }
+
+        if (name != null) {
+            if (ch != ';')
+                return;
+            nextChar();
+        }
+    }
+
+    /**
+     * Read the start or end of an HTML tag, or an HTML comment
+     * {@literal <identifier attrs> } or {@literal </identifier> }
+     */
+    protected void html() {
+        int p = bp;
+        nextChar();
+        if (isIdentifierStart(ch)) {
+            String name = readIdentifier();
+            checkHtmlTag(name);
+            htmlAttrs();
+            if (ch == '/') {
+                nextChar();
+            }
+            if (ch == '>') {
+                nextChar();
+                return;
+            }
+        } else if (ch == '/') {
+            nextChar();
+            if (isIdentifierStart(ch)) {
+                readIdentifier();
+                skipWhitespace();
+                if (ch == '>') {
+                    nextChar();
+                    return;
+                }
+            }
+        } else if (ch == '!') {
+            nextChar();
+            if (ch == '-') {
+                nextChar();
+                if (ch == '-') {
+                    nextChar();
+                    while (bp < buflen) {
+                        int dash = 0;
+                        while (ch == '-') {
+                            dash++;
+                            nextChar();
+                        }
+                        // Strictly speaking, a comment should not contain "--"
+                        // so dash > 2 is an error, dash == 2 implies ch == '>'
+                        // See http://www.w3.org/TR/html-markup/syntax.html#syntax-comments
+                        // for more details.
+                        if (dash >= 2 && ch == '>') {
+                            nextChar();
+                            return;
+                        }
+
+                        nextChar();
+                    }
+                }
+            }
+        }
+
+        bp = p + 1;
+        ch = buf[bp];
+    }
+
+    /**
+     * Read a series of HTML attributes, terminated by {@literal > }.
+     * Each attribute is of the form {@literal identifier[=value] }.
+     * "value" may be unquoted, single-quoted, or double-quoted.
+     */
+    protected void htmlAttrs() {
+        skipWhitespace();
+
+        loop:
+        while (isIdentifierStart(ch)) {
+            int namePos = bp;
+            String name = readAttributeName();
+            skipWhitespace();
+            StringBuilder value = new StringBuilder();
+            if (ch == '=') {
+                nextChar();
+                skipWhitespace();
+                if (ch == '\'' || ch == '"') {
+                    char quote = ch;
+                    nextChar();
+                    while (bp < buflen && ch != quote) {
+                        if (newline && ch == '@') {
+                            // No point trying to read more.
+                            // In fact, all attrs get discarded by the caller
+                            // and superseded by a malformed.html node because
+                            // the html tag itself is not terminated correctly.
+                            break loop;
+                        }
+                        value.append(ch);
+                        nextChar();
+                    }
+                    nextChar();
+                } else {
+                    while (bp < buflen && !isUnquotedAttrValueTerminator(ch)) {
+                        value.append(ch);
+                        nextChar();
+                    }
+                }
+                skipWhitespace();
+            }
+            checkHtmlAttr(name, value.toString());
+        }
+    }
+
+    protected void attrValueChar(Void list) {
+        switch (ch) {
+            case '&':
+                entity(list);
+                break;
+
+            case '{':
+                inlineTag(list);
+                break;
+
+            default:
+                nextChar();
+        }
+    }
+
+    protected boolean isIdentifierStart(char ch) {
+        return Character.isUnicodeIdentifierStart(ch);
+    }
+
+    protected String readIdentifier() {
+        int start = bp;
+        nextChar();
+        while (bp < buflen && Character.isUnicodeIdentifierPart(ch))
+            nextChar();
+        return new String(buf, start, bp - start);
+    }
+
+    protected String readAttributeName() {
+        int start = bp;
+        nextChar();
+        while (bp < buflen && (Character.isUnicodeIdentifierPart(ch) || ch == '-'))
+            nextChar();
+        return new String(buf, start, bp - start);
+    }
+
+    protected String readTagName() {
+        int start = bp;
+        nextChar();
+        while (bp < buflen
+                && (Character.isUnicodeIdentifierPart(ch) || ch == '.'
+                || ch == '-' || ch == ':')) {
+            nextChar();
+        }
+        return new String(buf, start, bp - start);
+    }
+
+    protected boolean isJavaIdentifierStart(char ch) {
+        return Character.isJavaIdentifierStart(ch);
+    }
+
+    protected String readJavaIdentifier() {
+        int start = bp;
+        nextChar();
+        while (bp < buflen && Character.isJavaIdentifierPart(ch))
+            nextChar();
+        return new String(buf, start, bp - start);
+    }
+
+    protected boolean isDecimalDigit(char ch) {
+        return ('0' <= ch && ch <= '9');
+    }
+
+    protected boolean isHexDigit(char ch) {
+        return ('0' <= ch && ch <= '9')
+                || ('a' <= ch && ch <= 'f')
+                || ('A' <= ch && ch <= 'F');
+    }
+
+    protected boolean isUnquotedAttrValueTerminator(char ch) {
+        switch (ch) {
+            case '\f': case '\n': case '\r': case '\t':
+            case ' ':
+            case '"': case '\'': case '`':
+            case '=': case '<': case '>':
+                return true;
+            default:
+                return false;
+        }
+    }
+
+    protected boolean isWhitespace(char ch) {
+        return Character.isWhitespace(ch);
+    }
+
+    protected void skipWhitespace() {
+        while (isWhitespace(ch)) {
+            nextChar();
+        }
+    }
+
+    /**
+     * @param start position of first character of string
+     * @param end position of character beyond last character to be included
+     */
+    String newString(int start, int end) {
+        return new String(buf, start, end - start);
+    }
+
+    static abstract class TagParser {
+        enum Kind { INLINE, BLOCK }
+
+        final Kind kind;
+        final String name;
+
+
+        TagParser(Kind k, String tk) {
+            kind = k;
+            name = tk;
+        }
+
+        TagParser(Kind k, String tk, boolean retainWhiteSpace) {
+            this(k, tk);
+        }
+
+        Kind getKind() {
+            return kind;
+        }
+
+        String getName() {
+            return name;
+        }
+
+        abstract void parse(int pos) throws ParseException;
+    }
+
+    /**
+     * @see <a href="http://docs.oracle.com/javase/7/docs/technotes/tools/solaris/javadoc.html#javadoctags">Javadoc Tags</a>
+     */
+    @SuppressWarnings("deprecation")
+    private void initTagParsers() {
+        TagParser[] parsers = {
+            // @author name-text
+            new TagParser(Kind.BLOCK, "author") {
+                @Override
+                public void parse(int pos) {
+                    blockContent();
+                }
+            },
+
+            // {@code text}
+            new TagParser(Kind.INLINE, "code", true) {
+                @Override
+                public void parse(int pos) throws ParseException {
+                    inlineText(WhitespaceRetentionPolicy.REMOVE_FIRST_SPACE);
+                    nextChar();
+                }
+            },
+
+            // @deprecated deprecated-text
+            new TagParser(Kind.BLOCK, "deprecated") {
+                @Override
+                public void parse(int pos) {
+                    blockContent();
+                }
+            },
+
+            // {@docRoot}
+            new TagParser(Kind.INLINE, "docRoot") {
+                @Override
+                public void parse(int pos) throws ParseException {
+                    if (ch == '}') {
+                        nextChar();
+                        return;
+                    }
+                    inlineText(WhitespaceRetentionPolicy.REMOVE_ALL); // skip unexpected content
+                    nextChar();
+                    throw new ParseException("dc.unexpected.content");
+                }
+            },
+
+            // @exception class-name description
+            new TagParser(Kind.BLOCK, "exception") {
+                @Override
+                public void parse(int pos) throws ParseException {
+                    skipWhitespace();
+                    reference(false);
+                    blockContent();
+                }
+            },
+
+            // @hidden hidden-text
+            new TagParser(Kind.BLOCK, "hidden") {
+                @Override
+                public void parse(int pos) {
+                    blockContent();
+                }
+            },
+
+            // @index search-term options-description
+            new TagParser(Kind.INLINE, "index") {
+                @Override
+                public void parse(int pos) throws ParseException {
+                    skipWhitespace();
+                    if (ch == '}') {
+                        throw new ParseException("dc.no.content");
+                    }
+                    if (ch == '"') quotedString(); else inlineWord();
+                    skipWhitespace();
+                    if (ch != '}') {
+                        inlineContent();
+                    } else {
+                        nextChar();
+                    }
+                }
+            },
+
+            // {@inheritDoc}
+            new TagParser(Kind.INLINE, "inheritDoc") {
+                @Override
+                public void parse(int pos) throws ParseException {
+                    if (ch == '}') {
+                        nextChar();
+                        return;
+                    }
+                    inlineText(WhitespaceRetentionPolicy.REMOVE_ALL); // skip unexpected content
+                    nextChar();
+                    throw new ParseException("dc.unexpected.content");
+                }
+            },
+
+            // {@link package.class#member label}
+            new TagParser(Kind.INLINE, "link") {
+                @Override
+                public void parse(int pos) throws ParseException {
+                    reference(true);
+                    inlineContent();
+                }
+            },
+
+            // {@linkplain package.class#member label}
+            new TagParser(Kind.INLINE, "linkplain") {
+                @Override
+                public void parse(int pos) throws ParseException {
+                    reference(true);
+                    inlineContent();
+                }
+            },
+
+            // {@literal text}
+            new TagParser(Kind.INLINE, "literal", true) {
+                @Override
+                public void parse(int pos) throws ParseException {
+                    inlineText(WhitespaceRetentionPolicy.REMOVE_FIRST_SPACE);
+                    nextChar();
+                }
+            },
+
+            // @param parameter-name description
+            new TagParser(Kind.BLOCK, "param") {
+                @Override
+                public void parse(int pos) throws ParseException {
+                    skipWhitespace();
+
+                    boolean typaram = false;
+                    if (ch == '<') {
+                        typaram = true;
+                        nextChar();
+                    }
+
+                    identifier();
+
+                    if (typaram) {
+                        if (ch != '>')
+                            throw new ParseException("dc.gt.expected");
+                        nextChar();
+                    }
+
+                    skipWhitespace();
+                    blockContent();
+                }
+            },
+
+            // @return description
+            new TagParser(Kind.BLOCK, "return") {
+                @Override
+                public void parse(int pos) {
+                    blockContent();
+                }
+            },
+
+            // @see reference | quoted-string | HTML
+            new TagParser(Kind.BLOCK, "see") {
+                @Override
+                public void parse(int pos) throws ParseException {
+                    skipWhitespace();
+                    switch (ch) {
+                        case '"':
+                            quotedString();
+                            skipWhitespace();
+                            if (ch == '@'
+                                    || ch == EOI && bp == buf.length - 1) {
+                                return;
+                            }
+                            break;
+
+                        case '<':
+                            blockContent();
+                            return;
+
+                        case '@':
+                            if (newline)
+                                throw new ParseException("dc.no.content");
+                            break;
+
+                        case EOI:
+                            if (bp == buf.length - 1)
+                                throw new ParseException("dc.no.content");
+                            break;
+
+                        default:
+                            if (isJavaIdentifierStart(ch) || ch == '#') {
+                                reference(true);
+                                blockContent();
+                            }
+                    }
+                    throw new ParseException("dc.unexpected.content");
+                }
+            },
+
+            // @serialData data-description
+            new TagParser(Kind.BLOCK, "@serialData") {
+                @Override
+                public void parse(int pos) {
+                    blockContent();
+                }
+            },
+
+            // @serialField field-name field-type description
+            new TagParser(Kind.BLOCK, "serialField") {
+                @Override
+                public void parse(int pos) throws ParseException {
+                    skipWhitespace();
+                    identifier();
+                    skipWhitespace();
+                    reference(false);
+                    if (isWhitespace(ch)) {
+                        skipWhitespace();
+                        blockContent();
+                    }
+                }
+            },
+
+            // @serial field-description | include | exclude
+            new TagParser(Kind.BLOCK, "serial") {
+                @Override
+                public void parse(int pos) {
+                    blockContent();
+                }
+            },
+
+            // @since since-text
+            new TagParser(Kind.BLOCK, "since") {
+                @Override
+                public void parse(int pos) {
+                    blockContent();
+                }
+            },
+
+            // @throws class-name description
+            new TagParser(Kind.BLOCK, "throws") {
+                @Override
+                public void parse(int pos) throws ParseException {
+                    skipWhitespace();
+                    reference(false);
+                    blockContent();
+                }
+            },
+
+            // {@value package.class#field}
+            new TagParser(Kind.INLINE, "value") {
+                @Override
+                public void parse(int pos) throws ParseException {
+                    reference(true);
+                    skipWhitespace();
+                    if (ch == '}') {
+                        nextChar();
+                        return;
+                    }
+                    nextChar();
+                    throw new ParseException("dc.unexpected.content");
+                }
+            },
+
+            // @version version-text
+            new TagParser(Kind.BLOCK, "version") {
+                @Override
+                public void parse(int pos) {
+                    blockContent();
+                }
+            },
+        };
+
+        tagParsers = new HashMap<>();
+        for (TagParser p: parsers)
+            tagParsers.put(p.getName(), p);
+
+    }
+
+    private void initEventAttrs() {
+        eventAttrs = new HashSet<>(Arrays.asList(
+            // See https://www.w3.org/TR/html-markup/global-attributes.html#common.attrs.event-handler
+            "onabort",  "onblur",  "oncanplay",  "oncanplaythrough",
+            "onchange",  "onclick",  "oncontextmenu",  "ondblclick",
+            "ondrag",  "ondragend",  "ondragenter",  "ondragleave",
+            "ondragover",  "ondragstart",  "ondrop",  "ondurationchange",
+            "onemptied",  "onended",  "onerror",  "onfocus",  "oninput",
+            "oninvalid",  "onkeydown",  "onkeypress",  "onkeyup",
+            "onload",  "onloadeddata",  "onloadedmetadata",  "onloadstart",
+            "onmousedown",  "onmousemove",  "onmouseout",  "onmouseover",
+            "onmouseup",  "onmousewheel",  "onpause",  "onplay",
+            "onplaying",  "onprogress",  "onratechange",  "onreadystatechange",
+            "onreset",  "onscroll",  "onseeked",  "onseeking",
+            "onselect",  "onshow",  "onstalled",  "onsubmit",  "onsuspend",
+            "ontimeupdate",  "onvolumechange",  "onwaiting",
+
+            // See https://www.w3.org/TR/html4/sgml/dtd.html
+            // Most of the attributes that take a %Script are also defined as event handlers
+            // in HTML 5. The one exception is onunload.
+            // "onchange",  "onclick",   "ondblclick",  "onfocus",
+            // "onkeydown",  "onkeypress",  "onkeyup",  "onload",
+            // "onmousedown",  "onmousemove",  "onmouseout",  "onmouseover",
+            // "onmouseup",  "onreset",  "onselect",  "onsubmit",
+            "onunload"
+        ));
+    }
+
+    private void initURIAttrs() {
+        uriAttrs = new HashSet<>(Arrays.asList(
+            // See https://www.w3.org/TR/html4/sgml/dtd.html
+            //     https://www.w3.org/TR/html5/
+            // These are all the attributes that take a %URI or a valid URL potentially surrounded
+            // by spaces
+            "action",  "cite",  "classid",  "codebase",  "data",
+            "datasrc",  "for",  "href",  "longdesc",  "profile",
+            "src",  "usemap"
+        ));
+    }
+
+}
diff --git a/langtools/src/share/classes/com/sun/tools/javadoc/RootDocImpl.java b/langtools/src/share/classes/com/sun/tools/javadoc/RootDocImpl.java
index 678557b..ab7c272 100644
--- a/langtools/src/share/classes/com/sun/tools/javadoc/RootDocImpl.java
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/RootDocImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, 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
@@ -381,6 +381,10 @@
         env.initDoclint(opts, customTagNames);
     }
 
+    public JavaScriptScanner initJavaScriptScanner(boolean allowScriptInComments) {
+        return env.initJavaScriptScanner(allowScriptInComments);
+    }
+
     public boolean isFunctionalInterface(AnnotationDesc annotationDesc) {
         return annotationDesc.annotationType().qualifiedName().equals(
                 env.syms.functionalInterfaceType.toString()) && env.source.allowLambda();
diff --git a/langtools/src/share/classes/com/sun/tools/javadoc/resources/javadoc.properties b/langtools/src/share/classes/com/sun/tools/javadoc/resources/javadoc.properties
index 8ac2c34..adf73c6 100644
--- a/langtools/src/share/classes/com/sun/tools/javadoc/resources/javadoc.properties
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/resources/javadoc.properties
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2016, 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
@@ -110,6 +110,8 @@
 javadoc.Body_missing_from_html_file=Body tag missing from HTML file
 javadoc.End_body_missing_from_html_file=Close body tag missing from HTML file
 javadoc.Multiple_package_comments=Multiple sources of package comments found for package "{0}"
+javadoc.JavaScript_in_comment=JavaScript found in documentation comment.\n\
+    Use --allow-script-in-comments to allow use of JavaScript.
 javadoc.class_not_found=Class {0} not found.
 javadoc.error=error
 javadoc.warning=warning
diff --git a/langtools/src/share/classes/com/sun/tools/javadoc/resources/javadoc_ja.properties b/langtools/src/share/classes/com/sun/tools/javadoc/resources/javadoc_ja.properties
index 1c5f3f7..b71ca8d 100644
--- a/langtools/src/share/classes/com/sun/tools/javadoc/resources/javadoc_ja.properties
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/resources/javadoc_ja.properties
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2016, 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
@@ -81,6 +81,7 @@
 javadoc.Body_missing_from_html_file=HTML\u306Bbody\u30BF\u30B0\u304C\u3042\u308A\u307E\u305B\u3093
 javadoc.End_body_missing_from_html_file=HTML\u30D5\u30A1\u30A4\u30EB\u306Bbody\u306E\u9589\u3058\u30BF\u30B0\u304C\u3042\u308A\u307E\u305B\u3093
 javadoc.Multiple_package_comments=\u30D1\u30C3\u30B1\u30FC\u30B8"{0}"\u306B\u8907\u6570\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u30FB\u30B3\u30E1\u30F3\u30C8\u306E\u30BD\u30FC\u30B9\u304C\u691C\u51FA\u3055\u308C\u307E\u3057\u305F
+javadoc.JavaScript_in_comment=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30B3\u30E1\u30F3\u30C8\u306BJavaScript\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u3002\n--allow-script-in-comments\u3092\u4F7F\u7528\u3057\u3066\u3001JavaScript\u306E\u4F7F\u7528\u3092\u8A31\u53EF\u3057\u3066\u304F\u3060\u3055\u3044\u3002
 javadoc.class_not_found=\u30AF\u30E9\u30B9{0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002
 javadoc.error=\u30A8\u30E9\u30FC
 javadoc.warning=\u8B66\u544A
diff --git a/langtools/src/share/classes/com/sun/tools/javadoc/resources/javadoc_zh_CN.properties b/langtools/src/share/classes/com/sun/tools/javadoc/resources/javadoc_zh_CN.properties
index 591f577..2f6d5ce 100644
--- a/langtools/src/share/classes/com/sun/tools/javadoc/resources/javadoc_zh_CN.properties
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/resources/javadoc_zh_CN.properties
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2016, 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
@@ -81,6 +81,7 @@
 javadoc.Body_missing_from_html_file=HTML \u6587\u4EF6\u4E2D\u7F3A\u5C11\u4E3B\u4F53\u6807\u8BB0
 javadoc.End_body_missing_from_html_file=HTML \u6587\u4EF6\u4E2D\u7F3A\u5C11\u4E3B\u4F53\u7ED3\u675F\u6807\u8BB0
 javadoc.Multiple_package_comments=\u627E\u5230\u7A0B\u5E8F\u5305 "{0}" \u7684\u591A\u4E2A\u7A0B\u5E8F\u5305\u6CE8\u91CA\u6E90
+javadoc.JavaScript_in_comment=\u6587\u6863\u6CE8\u91CA\u4E2D\u53D1\u73B0 JavaScript\u3002\n\u4F7F\u7528 --allow-script-in-comments \u53EF\u5141\u8BB8\u4F7F\u7528 JavaScript\u3002
 javadoc.class_not_found=\u627E\u4E0D\u5230\u7C7B{0}\u3002
 javadoc.error=\u9519\u8BEF
 javadoc.warning=\u8B66\u544A
diff --git a/langtools/src/share/classes/com/sun/tools/jdeps/ClassFileReader.java b/langtools/src/share/classes/com/sun/tools/jdeps/ClassFileReader.java
index 435045b..f41f2d0 100644
--- a/langtools/src/share/classes/com/sun/tools/jdeps/ClassFileReader.java
+++ b/langtools/src/share/classes/com/sun/tools/jdeps/ClassFileReader.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2017, 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
@@ -34,8 +34,10 @@
 import java.nio.file.SimpleFileVisitor;
 import java.nio.file.attribute.BasicFileAttributes;
 import java.util.*;
+import java.util.jar.Attributes;
 import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
+import java.util.jar.Manifest;
 
 /**
  * ClassFileReader reads ClassFile(s) of a given path that can be
@@ -154,6 +156,8 @@
         }
     }
 
+    public boolean isMultiReleaseJar() throws IOException { return false; }
+
     public String toString() {
         return path.toString();
     }
@@ -290,6 +294,16 @@
                 }
             };
         }
+
+        @Override
+        public boolean isMultiReleaseJar() throws IOException {
+            Manifest mf = this.jarfile.getManifest();
+            if (mf != null) {
+                Attributes atts = mf.getMainAttributes();
+                return "true".equalsIgnoreCase(atts.getValue("Multi-Release"));
+            }
+            return false;
+        }
     }
 
     class JarFileIterator implements Iterator<ClassFile> {
diff --git a/langtools/src/share/classes/com/sun/tools/jdeps/JdepsTask.java b/langtools/src/share/classes/com/sun/tools/jdeps/JdepsTask.java
index 2c72d57..91002d3 100644
--- a/langtools/src/share/classes/com/sun/tools/jdeps/JdepsTask.java
+++ b/langtools/src/share/classes/com/sun/tools/jdeps/JdepsTask.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2017, 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
@@ -515,6 +515,13 @@
         // add all classpath archives to the source locations for reporting
         sourceLocations.addAll(classpaths);
 
+        // warn about Multi-Release jars
+        for (Archive a : sourceLocations) {
+            if (a.reader().isMultiReleaseJar()) {
+                warning("warn.mrjar.usejdk9", a.getPathName());
+            }
+        }
+
         // Work queue of names of classfiles to be searched.
         // Entries will be unique, and for classes that do not yet have
         // dependencies in the results map.
diff --git a/langtools/src/share/classes/com/sun/tools/jdeps/resources/jdeps.properties b/langtools/src/share/classes/com/sun/tools/jdeps/resources/jdeps.properties
index ccd14ab..51d11b8 100644
--- a/langtools/src/share/classes/com/sun/tools/jdeps/resources/jdeps.properties
+++ b/langtools/src/share/classes/com/sun/tools/jdeps/resources/jdeps.properties
@@ -99,6 +99,10 @@
 Please modify your code to eliminate dependency on any JDK internal APIs.\n\
 For the most recent update on JDK internal API replacements, please check:\n\
 {0}
+warn.mrjar.usejdk9=\
+{0} is a multi-release jar file.\n\
+All versioned entries are analyzed. To analyze the entries for a specific\n\
+version, use a newer version of jdeps (JDK 9 or later) \"--multi-release\" option.
 
 artifact.not.found=not found
 jdeps.wiki.url=https://wiki.openjdk.java.net/display/JDK8/Java+Dependency+Analysis+Tool
diff --git a/langtools/src/share/classes/com/sun/tools/jdeps/resources/jdeps_ja.properties b/langtools/src/share/classes/com/sun/tools/jdeps/resources/jdeps_ja.properties
index 123d68d..265770f 100644
--- a/langtools/src/share/classes/com/sun/tools/jdeps/resources/jdeps_ja.properties
+++ b/langtools/src/share/classes/com/sun/tools/jdeps/resources/jdeps_ja.properties
@@ -46,6 +46,7 @@
 warn.invalid.arg=\u7121\u52B9\u306A\u30AF\u30E9\u30B9\u540D\u307E\u305F\u306F\u30D1\u30B9\u540D\u304C\u5B58\u5728\u3057\u307E\u305B\u3093: {0}
 warn.split.package=\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u306F{1} {2}\u3067\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059
 warn.replace.useJDKInternals=JDK\u5185\u90E8API\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u304A\u3089\u305A\u3001JDK\u5B9F\u88C5\u5C02\u7528\u3067\u3059\u304C\u3001\u4E92\u63DB\u6027\u306A\u3057\u3067\n\u524A\u9664\u307E\u305F\u306F\u5909\u66F4\u3055\u308C\u308B\u5834\u5408\u304C\u3042\u308A\u3001\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u3092\u4E2D\u65AD\u3055\u305B\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\nJDK\u5185\u90E8API\u306E\u4F9D\u5B58\u6027\u3092\u524A\u9664\u3059\u308B\u3088\u3046\u30B3\u30FC\u30C9\u3092\u5909\u66F4\u3057\u3066\u304F\u3060\u3055\u3044\u3002\nJDK\u5185\u90E8API\u306E\u7F6E\u63DB\u306B\u95A2\u3059\u308B\u6700\u65B0\u306E\u66F4\u65B0\u306B\u3064\u3044\u3066\u306F\u3001\u6B21\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044:\n{0}
+warn.mrjar.usejdk9={0}\u306F\u30DE\u30EB\u30C1\u30EA\u30EA\u30FC\u30B9jar\u30D5\u30A1\u30A4\u30EB\u3067\u3059\u3002\n\u3059\u3079\u3066\u306E\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u6E08\u30A8\u30F3\u30C8\u30EA\u3092\u5206\u6790\u3057\u307E\u3059\u3002\u7279\u5B9A\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u306E\u30A8\u30F3\u30C8\u30EA\u3092\u5206\u6790\u3059\u308B\u306B\u306F\u3001\n\u65B0\u3057\u3044\u30D0\u30FC\u30B8\u30E7\u30F3\u306Ejdeps (JDK 9\u4EE5\u964D)\u306E"--multi-release"\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002
 
 artifact.not.found=\u898B\u3064\u304B\u308A\u307E\u305B\u3093
 jdeps.wiki.url=https://wiki.openjdk.java.net/display/JDK8/Java+Dependency+Analysis+Tool
diff --git a/langtools/src/share/classes/com/sun/tools/jdeps/resources/jdeps_zh_CN.properties b/langtools/src/share/classes/com/sun/tools/jdeps/resources/jdeps_zh_CN.properties
index c51ae8a..002d34a 100644
--- a/langtools/src/share/classes/com/sun/tools/jdeps/resources/jdeps_zh_CN.properties
+++ b/langtools/src/share/classes/com/sun/tools/jdeps/resources/jdeps_zh_CN.properties
@@ -46,6 +46,7 @@
 warn.invalid.arg=\u7C7B\u540D\u65E0\u6548\u6216\u8DEF\u5F84\u540D\u4E0D\u5B58\u5728: {0}
 warn.split.package=\u5DF2\u5728{1} {2}\u4E2D\u5B9A\u4E49\u7A0B\u5E8F\u5305{0}
 warn.replace.useJDKInternals=\u4E0D\u652F\u6301 JDK \u5185\u90E8 API, \u5B83\u4EEC\u4E13\u7528\u4E8E\u901A\u8FC7\u4E0D\u517C\u5BB9\u65B9\u5F0F\u6765\u5220\u9664\n\u6216\u66F4\u6539\u7684 JDK \u5B9E\u73B0, \u53EF\u80FD\u4F1A\u635F\u574F\u60A8\u7684\u5E94\u7528\u7A0B\u5E8F\u3002\n\u8BF7\u4FEE\u6539\u60A8\u7684\u4EE3\u7801, \u6D88\u9664\u4E0E\u4EFB\u4F55 JDK \u5185\u90E8 API \u7684\u76F8\u5173\u6027\u3002\n\u6709\u5173 JDK \u5185\u90E8 API \u66FF\u6362\u7684\u6700\u65B0\u66F4\u65B0, \u8BF7\u67E5\u770B:\n{0}
+warn.mrjar.usejdk9={0} \u662F\u591A\u53D1\u884C\u7248 jar \u6587\u4EF6\u3002\n\u5DF2\u5206\u6790\u6240\u6709\u7248\u672C\u5316\u6761\u76EE\u3002\u8981\u5206\u6790\u67D0\u4E2A\u7279\u5B9A\u7248\u672C\u7684\u6761\u76EE,\n\u8BF7\u4F7F\u7528\u66F4\u65B0\u7248\u672C\u7684 jdeps (JDK 9 \u6216\u66F4\u9AD8\u7248\u672C) "--multi-release" \u9009\u9879\u3002
 
 artifact.not.found=\u627E\u4E0D\u5230
 jdeps.wiki.url=https://wiki.openjdk.java.net/display/JDK8/Java+Dependency+Analysis+Tool
diff --git a/langtools/src/share/classes/com/sun/tools/jdeps/resources/jdkinternals.properties b/langtools/src/share/classes/com/sun/tools/jdeps/resources/jdkinternals.properties
index 56d7d0a..868b39a 100644
--- a/langtools/src/share/classes/com/sun/tools/jdeps/resources/jdkinternals.properties
+++ b/langtools/src/share/classes/com/sun/tools/jdeps/resources/jdkinternals.properties
@@ -1,22 +1,45 @@
 // No translation needed
 com.sun.crypto.provider.SunJCE=Use java.security.Security.getProvider(provider-name) @since 1.3
-com.sun.image.codec=Use javax.imageio @since 1.4
 com.sun.org.apache.xml.internal.security=Use java.xml.crypto @since 1.6
 com.sun.org.apache.xml.internal.security.utils.Base64=Use java.util.Base64 @since 1.8
+com.sun.org.apache.xml.internal.resolver=Use javax.xml.catalog @since 9
 com.sun.net.ssl=Use javax.net.ssl @since 1.4
 com.sun.net.ssl.internal.ssl.Provider=Use java.security.Security.getProvider(provider-name) @since 1.3
 com.sun.rowset=Use javax.sql.rowset.RowSetProvider @since 1.7
+com.sun.tools.doclets.standard=Use jdk.javadoc.doclets.StandardDoclet @since 9.
 com.sun.tools.javac.tree=Use com.sun.source @since 1.6
 com.sun.tools.javac=Use javax.tools and javax.lang.model @since 1.6
-sun.awt.image.codec=Use javax.imageio @since 1.4
-sun.misc.BASE64Encoder=Use java.util.Base64 @since 1.8
-sun.misc.BASE64Decoder=Use java.util.Base64 @since 1.8
-sun.misc.Cleaner=Use java.lang.ref.PhantomReference @since 1.2
-sun.misc.Service=Use java.util.ServiceLoader @since 1.6
+java.awt.peer=Should not use. See https://bugs.openjdk.java.net/browse/JDK-8037739
+java.awt.dnd.peer=Should not use. See https://bugs.openjdk.java.net/browse/JDK-8037739
+jdk.internal.ref.Cleaner=Use java.lang.ref.PhantomReference @since 1.2 or java.lang.ref.Cleaner @since 9
+sun.awt.CausedFocusEvent=Use java.awt.event.FocusEvent::getCause @since 9
+sun.font.FontUtilities=See java.awt.Font.textRequiresLayout @since 9
+sun.reflect.Reflection=See http://openjdk.java.net/jeps/260
+sun.reflect.ReflectionFactory=See http://openjdk.java.net/jeps/260
+sun.misc.Unsafe=See http://openjdk.java.net/jeps/260
+sun.misc.Signal=See http://openjdk.java.net/jeps/260
+sun.misc.SignalHandler=See http://openjdk.java.net/jeps/260
 sun.security.action=Use java.security.PrivilegedAction @since 1.1
 sun.security.krb5=Use com.sun.security.jgss
 sun.security.provider.PolicyFile=Use java.security.Policy.getInstance("JavaPolicy", new URIParameter(uri)) @since 1.6
 sun.security.provider.Sun=Use java.security.Security.getProvider(provider-name) @since 1.3
+sun.security.util.HostnameChecker=Use javax.net.ssl.SSLParameters.setEndpointIdentificationAlgorithm("HTTPS") @since 1.7\n\
+or javax.net.ssl.HttpsURLConnection.setHostnameVerifier() @since 1.4
 sun.security.util.SecurityConstants=Use appropriate java.security.Permission subclass @since 1.1
 sun.security.x509.X500Name=Use javax.security.auth.x500.X500Principal @since 1.4
-sun.tools.jar=Use java.util.jar or jar tool @since 1.2
+sun.tools.jar=Use java.util.jar @since 1.2
+sun.tools.jar.Main=Use java.util.spi.ToolProvider @since 9
+# Internal APIs removed in JDK 9
+com.apple.eawt=Use java.awt.Desktop @since 9.  See http://openjdk.java.net/jeps/272
+com.apple.concurrent=Removed in JDK 9. See https://bugs.openjdk.java.net/browse/JDK-8148187
+com.sun.image.codec.jpeg=Use javax.imageio @since 1.4
+sun.awt.image.codec=Use javax.imageio @since 1.4
+sun.misc.BASE64Encoder=Use java.util.Base64 @since 1.8
+sun.misc.BASE64Decoder=Use java.util.Base64 @since 1.8
+sun.misc.ClassLoaderUtil=Use java.net.URLClassLoader.close() @since 1.7
+sun.misc.Cleaner=Use java.lang.ref.PhantomReference @since 1.2 or java.lang.ref.Cleaner @since 9.\n\
+See http://openjdk.java.net/jeps/260.
+sun.misc.Service=Use java.util.ServiceLoader @since 1.6
+sun.misc=Removed in JDK 9. See http://openjdk.java.net/jeps/260
+sun.reflect=Removed in JDK 9. See http://openjdk.java.net/jeps/260
+
diff --git a/langtools/test/com/sun/javadoc/testJavascript/TestJavascript.java b/langtools/test/com/sun/javadoc/testJavascript/TestJavascript.java
index 96487f0..33331a9 100644
--- a/langtools/test/com/sun/javadoc/testJavascript/TestJavascript.java
+++ b/langtools/test/com/sun/javadoc/testJavascript/TestJavascript.java
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4665566 4855876 7025314 8012375 8015997 8016328 8024756
+ * @bug      4665566 4855876 7025314 8012375 8015997 8016328 8024756 8151921
  * @summary  Verify that the output has the right javascript.
  * @author   jamieh
  * @library  ../lib/
@@ -50,11 +50,12 @@
             "<a href=\"index.html?TestJavascript.html\" target=\"_top\">Frames</a>"},
         {BUG_ID + FS + "index.html",
             "<script type=\"text/javascript\">" + NL +
-                        "    targetPage = \"\" + window.location.search;" + NL +
-            "    if (targetPage != \"\" && targetPage != \"undefined\")" + NL +
-            "        targetPage = targetPage.substring(1);" + NL +
-            "    if (targetPage.indexOf(\":\") != -1 || (targetPage != \"\" && !validURL(targetPage)))" + NL +
-            "        targetPage = \"undefined\";" + NL +
+            "    tmpTargetPage = \"\" + window.location.search;" + NL +
+            "    if (tmpTargetPage != \"\" && tmpTargetPage != \"undefined\")" + NL +
+            "        tmpTargetPage = tmpTargetPage.substring(1);" + NL +
+            "    if (tmpTargetPage.indexOf(\":\") != -1 || (tmpTargetPage != \"\" && !validURL(tmpTargetPage)))" + NL +
+            "        tmpTargetPage = \"undefined\";" + NL +
+            "    targetPage = tmpTargetPage;" + NL +
             "    function validURL(url) {" + NL +
             "        try {" + NL +
             "            url = decodeURIComponent(url);" + NL +
diff --git a/langtools/test/tools/doclint/html/OtherTagsTest.out b/langtools/test/tools/doclint/html/OtherTagsTest.out
index 3fbcb15..5cd00fc 100644
--- a/langtools/test/tools/doclint/html/OtherTagsTest.out
+++ b/langtools/test/tools/doclint/html/OtherTagsTest.out
@@ -19,10 +19,7 @@
 OtherTagsTest.java:20: error: element not allowed in documentation comments: <noframes>
      *  <noframes> </noframes>
         ^
-OtherTagsTest.java:21: error: element not allowed in documentation comments: <script>
-     *  <script> </script>
-        ^
 OtherTagsTest.java:22: error: element not allowed in documentation comments: <title>
      *  <title> </title>
         ^
-9 errors
+8 errors
diff --git a/langtools/test/tools/javac/meth/BadPolySig.java b/langtools/test/tools/javac/meth/BadPolySig.java
new file mode 100644
index 0000000..4daf006
--- /dev/null
+++ b/langtools/test/tools/javac/meth/BadPolySig.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2017, 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.
+ */
+
+/*
+ * @test
+ * @bug 8168774
+ * @summary Polymorhic signature method check crashes javac
+ * @compile BadPolySig.java
+ */
+
+package java.lang.invoke;
+
+class MethodHandle {
+    native Object m();
+}
diff --git a/langtools/test/tools/javadoc/TestScriptInComment.java b/langtools/test/tools/javadoc/TestScriptInComment.java
new file mode 100644
index 0000000..bda3aca
--- /dev/null
+++ b/langtools/test/tools/javadoc/TestScriptInComment.java
@@ -0,0 +1,314 @@
+/*
+ * Copyright (c) 2016, 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.
+ */
+
+/**
+ * @test
+ * @bug 8138725
+ * @summary test --allow-script-in-comments
+ * @run main TestScriptInComment
+ */
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Combo-style test, exercising combinations of different HTML fragments that may contain
+ * JavaScript, different places to place those fragments, and whether or not to allow the use
+ * of JavaScript.
+ */
+public class TestScriptInComment {
+    public static void main(String... args) throws Exception {
+        new TestScriptInComment().run();
+    }
+
+    /**
+     * Representative samples of different fragments of HTML that may contain JavaScript.
+     * To facilitate checking the output manually in a browser, the text "#ALERT" will be
+     * replaced by a JavaScript call of "alert(msg)", using a message string that is specific
+     * to the test case.
+     */
+    enum Comment {
+        LC("<script>#ALERT</script>", true), // script tag in Lower Case
+        UC("<SCRIPT>#ALERT</script>", true), // script tag in Upper Case
+        WS("< script >#ALERT</script>", false, "-Xdoclint:none"), // script tag with invalid white space
+        SA("<script src=\"file\"> #ALERT </script>", true), // script tag with an attribute
+        ON("<a onclick='#ALERT'>x</a>", true), // event handler attribute
+        URI("<a href='javascript:#ALERT'>x</a>", true); // javadcript URI
+
+        /**
+         * Creates an HTML fragment to be injected into a template.
+         * @param text the HTML fragment to put into a doc comment or option.
+         * @param hasScript whether or not this fragment does contain legal JavaScript
+         * @param opts any additional options to be specified when javadoc is run
+         */
+        Comment(String text, boolean hasScript, String... opts) {
+            this.text = text;
+            this.hasScript = hasScript;
+            this.opts = Arrays.asList(opts);
+        }
+
+        final String text;
+        final boolean hasScript;
+        final List<String> opts;
+    };
+
+    /**
+     * Representative samples of positions in which javadoc may find JavaScript.
+     * Each template contains a series of strings, which are written to files or inferred as options.
+     * The first source file implies a corresponding output file which should not be written
+     * if the comment contains JavaScript and JavaScript is not allowed.
+     */
+    enum Template {
+        OVR("<html><body> overview #COMMENT </body></html>", "package p; public class C { }"),
+        PKGINFO("#COMMENT package p;", "package p; public class C { }"),
+        PKGHTML("<html><body>#COMMENT package p;</body></html>", "package p; public class C { }"),
+        CLS("package p; #COMMENT public class C { }"),
+        CON("package p; public class C { #COMMENT public C() { } }"),
+        FLD("package p; public class C { #COMMENT public int f; }"),
+        MTH("package p; public class C { #COMMENT public void m() { } }"),
+        TOP("-top", "lorem #COMMENT ipsum", "package p; public class C { }"),
+        HDR("-header", "lorem #COMMENT ipsum", "package p; public class C { }"),
+        FTR("-footer", "lorem #COMMENT ipsum", "package p; public class C { }"),
+        BTM("-bottom", "lorem #COMMENT ipsum", "package p; public class C { }"),
+        DTTL("-doctitle", "lorem #COMMENT ipsum", "package p; public class C { }"),
+        PHDR("-packagesheader", "lorem #COMMENT ipsum", "package p; public class C { }");
+
+        Template(String... args) {
+            opts = new ArrayList<String>();
+            sources = new ArrayList<String>();
+            int i = 0;
+            while (args[i].startsWith("-")) {
+                // all options being tested have a single argument that follow the option
+                opts.add(args[i++]);
+                opts.add(args[i++]);
+            }
+            while(i < args.length) {
+                sources.add(args[i++]);
+            }
+        }
+
+        // groups: 1 <html> or not;  2: package name;  3: class name
+        private final Pattern pat =
+                Pattern.compile("(?i)(<html>)?.*?(?:package ([a-z]+);.*?(?:class ([a-z]+).*)?)?");
+
+        /**
+         * Infer the file in which to write the given source.
+         * @param dir the base source directory
+         * @param src the source text
+         * @return the file in which the source should be written
+         */
+        File getSrcFile(File srcDir, String src) {
+            String f;
+            Matcher m = pat.matcher(src);
+            if (!m.matches())
+                throw new Error("match failed");
+            if (m.group(3) != null) {
+                f = m.group(2) + "/" + m.group(3) + ".java";
+            } else if (m.group(2) != null) {
+                f = m.group(2) + "/" + (m.group(1) == null ? "package-info.java" : "package.html");
+            } else {
+                f = "overview.html";
+            }
+            return new File(srcDir, f);
+        }
+
+        /**
+         * Get the options to give to javadoc.
+         * @param srcDir the srcDir to use -overview is needed
+         * @return
+         */
+        List<String> getOpts(File srcDir) {
+            if (!opts.isEmpty()) {
+                return opts;
+            } else if (sources.get(0).contains("overview")) {
+                return Arrays.asList("-overview", getSrcFile(srcDir, sources.get(0)).getPath());
+            } else {
+                return Collections.emptyList();
+            }
+        }
+
+        /**
+         * Gets the output file corresponding to the first source file.
+         * This file should not be written if the comment contains JavaScript and JavaScripot is
+         * not allowed.
+         * @param dir the base output directory
+         * @return the output file
+         */
+        File getOutFile(File outDir) {
+            String f;
+            Matcher m = pat.matcher(sources.get(0));
+            if (!m.matches())
+                throw new Error("match failed");
+            if (m.group(3) != null) {
+                f = m.group(2) + "/" + m.group(3) + ".html";
+            } else if (m.group(2) != null) {
+                f = m.group(2) + "/package-summary.html";
+            } else {
+                f = "overview-summary.html";
+            }
+            return new File(outDir, f);
+        }
+
+        final List<String> opts;
+        final List<String> sources;
+    };
+
+    enum Option {
+        OFF(null),
+        ON("--allow-script-in-comments");
+
+        Option(String text) {
+            this.text = text;
+        }
+
+        final String text;
+    };
+
+    private PrintStream out = System.err;
+
+    public void run() throws Exception {
+        int count = 0;
+        for (Template template: Template.values()) {
+            for (Comment comment: Comment.values()) {
+                for (Option option: Option.values()) {
+                    if (test(template, comment, option)) {
+                        count++;
+                    }
+                }
+            }
+        }
+
+        out.println(count + " test cases run");
+        if (errors > 0) {
+            throw new Exception(errors + " errors occurred");
+        }
+    }
+
+    boolean test(Template template, Comment comment, Option option) throws IOException {
+        if (option == Option.ON && !comment.hasScript) {
+            // skip --allowScriptInComments if comment does not contain JavaScript
+            return false;
+        }
+
+        String test = template + "-" + comment + "-" + option;
+        out.println("Test: " + test);
+
+        File dir = new File(test);
+        dir.mkdirs();
+        File srcDir = new File(dir, "src");
+        File outDir = new File(dir, "out");
+
+        String alert = "alert(\"" + test + "\");";
+        for (String src: template.sources) {
+            writeFile(template.getSrcFile(srcDir, src),
+                src.replace("#COMMENT",
+                        "/** " + comment.text.replace("#ALERT", alert) + " **/"));
+        }
+
+        List<String> opts = new ArrayList<String>();
+        opts.add("-sourcepath");
+        opts.add(srcDir.getPath());
+        opts.add("-d");
+        opts.add(outDir.getPath());
+        if (option.text != null)
+            opts.add(option.text);
+        for (String opt: template.getOpts(srcDir)) {
+            opts.add(opt.replace("#COMMENT", comment.text.replace("#ALERT", alert)));
+        }
+        opts.addAll(comment.opts);
+        opts.add("-noindex");   // index not required; save time/space writing files
+        opts.add("p");
+
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = new PrintWriter(sw);
+        int rc = javadoc(opts, pw);
+        pw.close();
+        String log = sw.toString();
+        writeFile(new File(dir, "log.txt"), log);
+
+        out.println("opts: " + opts);
+        out.println("  rc: " + rc);
+        out.println(" log:");
+        out.println(log);
+
+        String ERROR = "Use --allow-script-in-comment";
+        File outFile = template.getOutFile(outDir);
+
+        boolean expectErrors = comment.hasScript && (option == Option.OFF);
+
+        if (expectErrors) {
+            check(rc != 0, "unexpected exit code: " + rc);
+            check(log.contains(ERROR), "expected error message not found");
+            check(!outFile.exists(), "output file found unexpectedly");
+        } else {
+            check(rc == 0, "unexpected exit code: " + rc);
+            check(!log.contains(ERROR), "error message found");
+            check(outFile.exists(), "output file not found");
+        }
+
+        out.println();
+        return true;
+    }
+
+    int javadoc(List<String> opts, PrintWriter pw) {
+        return com.sun.tools.javadoc.Main.execute("javadoc", pw, pw, pw,
+                "com.sun.tools.doclets.standard.Standard", opts.toArray(new String[opts.size()]));
+    }
+
+    File writeFile(File f, String text) throws IOException {
+        f.getParentFile().mkdirs();
+        FileWriter fw = new FileWriter(f);
+        try {
+            fw.write(text);
+        } finally {
+            fw.close();
+        }
+        return f;
+    }
+
+    void check(boolean cond, String errMessage) {
+        if (!cond) {
+            error(errMessage);
+        }
+    }
+
+    void error(String message) {
+        out.println("Error: " + message);
+        errors++;
+    }
+
+    int errors = 0;
+}
+
diff --git a/langtools/test/tools/jdeps/MRJarWarning.java b/langtools/test/tools/jdeps/MRJarWarning.java
new file mode 100644
index 0000000..c3218cf
--- /dev/null
+++ b/langtools/test/tools/jdeps/MRJarWarning.java
@@ -0,0 +1,169 @@
+/*
+ * Copyright (c) 2017, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8176329
+ * @summary Test for jdeps warning when it encounters a multi-release jar
+ * @run testng MRJarWarning
+ */
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Locale;
+import java.util.jar.Attributes;
+import java.util.jar.JarEntry;
+import java.util.jar.JarOutputStream;
+import java.util.jar.Manifest;
+import org.testng.Assert;
+import org.testng.annotations.BeforeSuite;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+public class MRJarWarning {
+    private static final String WARNING = " is a multi-release jar file";
+    private static final String MRJAR_ATTR = "Multi-Release";
+
+    Path mrjar1;
+    Path mrjar2;
+    Path nonMRjar;
+    Path mrjarAllCaps;
+
+    private Attributes defaultAttributes;
+
+    @BeforeSuite
+    public void setup() throws IOException {
+        defaultAttributes = new Attributes();
+        defaultAttributes.putValue("Manifest-Version", "1.0");
+        defaultAttributes.putValue("Created-By", "1.8.0-internal");
+
+        mrjar1   = Paths.get("mrjar1.jar");
+        mrjar2   = Paths.get("mrjar2.jar");
+        nonMRjar = Paths.get("nonMRjar.jar");
+        mrjarAllCaps = Paths.get("mrjarAllCaps.jar");
+
+        Attributes mrJarAttrs = new Attributes(defaultAttributes);
+        mrJarAttrs.putValue(MRJAR_ATTR, "true");
+
+        build(mrjar1, mrJarAttrs);
+        build(mrjar2, mrJarAttrs);
+        build(nonMRjar, defaultAttributes);
+
+        // JEP 238 - "Multi-Release JAR Files" states that the attribute name
+        // and value are case insensitive.  Try with all caps to ensure that
+        // jdeps still recognizes a multi-release jar.
+        Attributes allCapsAttrs = new Attributes(defaultAttributes);
+        allCapsAttrs.putValue(MRJAR_ATTR.toUpperCase(), "TRUE");
+        build(mrjarAllCaps, allCapsAttrs);
+    }
+
+    @DataProvider(name="provider")
+    private Object[][] args() {
+        // jdeps warning messages may be localized.
+        // This test only checks for the English version.  Return an empty
+        // array (skip testing) if the default language is not English.
+        String language = Locale.getDefault().getLanguage();
+        System.out.println("Language: " + language);
+
+        if ("en".equals(language)) {
+            return new Object[][] {
+                // one mrjar arg
+                {   Arrays.asList(mrjar1.toString()),
+                    Arrays.asList(mrjar1)},
+                // two mrjar args
+                {   Arrays.asList(mrjar1.toString(), mrjar2.toString()),
+                    Arrays.asList(mrjar1, mrjar2)},
+                // one mrjar arg, with mrjar on classpath
+                {   Arrays.asList("-cp", mrjar2.toString(), mrjar1.toString()),
+                    Arrays.asList(mrjar1, mrjar2)},
+                // non-mrjar arg, with mrjar on classpath
+                {   Arrays.asList("-cp", mrjar1.toString(), nonMRjar.toString()),
+                    Arrays.asList(mrjar1)},
+                // mrjar arg with jar attribute name/value in ALL CAPS
+                {   Arrays.asList(mrjarAllCaps.toString()),
+                    Arrays.asList(mrjarAllCaps)},
+                // non-mrjar arg
+                {   Arrays.asList(nonMRjar.toString()),
+                    Collections.emptyList()}
+            };
+        } else {
+            System.out.println("Non-English language \""+ language +
+                    "\"; test passes superficially");
+            return new Object[][]{};
+        }
+    }
+
+    /* Run jdeps with the arguments given in 'args', and confirm that a warning
+     * is issued for each Multi-Release jar in 'expectedMRpaths'.
+     */
+    @Test(dataProvider="provider")
+    public void checkWarning(List<String> args, List<Path> expectedMRpaths) {
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = new PrintWriter(sw);
+
+        int rc = com.sun.tools.jdeps.Main.run(args.toArray(new String[args.size()]), pw);
+        pw.close();
+
+        expectedMRJars(sw.toString(), expectedMRpaths);
+        Assert.assertEquals(rc, 0, "non-zero exit code from jdeps");
+    }
+
+    /* Confirm that warnings for the specified paths are in the output (or that
+     * warnings are absent if 'paths' is empty).
+     * Doesn't check for extra, unexpected warnings.
+     */
+    private static void expectedMRJars(String output, List<Path> paths) {
+        if (paths.isEmpty()) {
+            Assert.assertFalse(output.contains(WARNING),
+                               "Expected no mrjars, but found:\n" + output);
+        } else {
+            for (Path path : paths) {
+                String expect = "Warning: " + path.toString() + WARNING;
+                Assert.assertTrue(output.contains(expect),
+                        "Did not find:\n" + expect + "\nin:\n" + output + "\n");
+            }
+        }
+    }
+
+    /* Build a jar at the expected path, containing the given attributes */
+    private static void build(Path path, Attributes attributes) throws IOException {
+        try (OutputStream os = Files.newOutputStream(path);
+             JarOutputStream jos = new JarOutputStream(os)) {
+
+            JarEntry me = new JarEntry("META-INF/MANIFEST.MF");
+            jos.putNextEntry(me);
+            Manifest manifest = new Manifest();
+            manifest.getMainAttributes().putAll(attributes);
+            manifest.write(jos);
+            jos.closeEntry();
+        }
+    }
+}