提交 d3f06249 编写于 作者: L lana

Merge

...@@ -21,4 +21,4 @@ ...@@ -21,4 +21,4 @@
# or visit www.oracle.com if you need additional information or have any # or visit www.oracle.com if you need additional information or have any
# questions. # questions.
# #
tzdata2014j tzdata2015a
...@@ -70,8 +70,8 @@ Rule ChileAQ 2009 only - Mar Sun>=9 3:00u 0 - ...@@ -70,8 +70,8 @@ Rule ChileAQ 2009 only - Mar Sun>=9 3:00u 0 -
Rule ChileAQ 2010 only - Apr Sun>=1 3:00u 0 - Rule ChileAQ 2010 only - Apr Sun>=1 3:00u 0 -
Rule ChileAQ 2011 only - May Sun>=2 3:00u 0 - Rule ChileAQ 2011 only - May Sun>=2 3:00u 0 -
Rule ChileAQ 2011 only - Aug Sun>=16 4:00u 1:00 S Rule ChileAQ 2011 only - Aug Sun>=16 4:00u 1:00 S
Rule ChileAQ 2012 max - Apr Sun>=23 3:00u 0 - Rule ChileAQ 2012 2015 - Apr Sun>=23 3:00u 0 -
Rule ChileAQ 2012 max - Sep Sun>=2 4:00u 1:00 S Rule ChileAQ 2012 2014 - Sep Sun>=2 4:00u 1:00 S
# Argentina - year-round bases # Argentina - year-round bases
# Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05 # Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05
...@@ -377,9 +377,10 @@ Zone Antarctica/Rothera 0 - zzz 1976 Dec 1 ...@@ -377,9 +377,10 @@ Zone Antarctica/Rothera 0 - zzz 1976 Dec 1
# #
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Antarctica/Palmer 0 - zzz 1965 Zone Antarctica/Palmer 0 - zzz 1965
-4:00 ArgAQ AR%sT 1969 Oct 5 -4:00 ArgAQ AR%sT 1969 Oct 5
-3:00 ArgAQ AR%sT 1982 May -3:00 ArgAQ AR%sT 1982 May
-4:00 ChileAQ CL%sT -4:00 ChileAQ CL%sT 2015 Apr 26 3:00u
-3:00 - CLT
# #
# #
# McMurdo Station, Ross Island, since 1955-12 # McMurdo Station, Ross Island, since 1955-12
......
...@@ -168,10 +168,7 @@ Zone Asia/Baku 3:19:24 - LMT 1924 May 2 ...@@ -168,10 +168,7 @@ Zone Asia/Baku 3:19:24 - LMT 1924 May 2
4:00 Azer AZ%sT 4:00 Azer AZ%sT
# Bahrain # Bahrain
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # See Asia/Qatar.
Zone Asia/Bahrain 3:22:20 - LMT 1920 # Manamah
4:00 - GST 1972 Jun
3:00 - AST
# Bangladesh # Bangladesh
# From Alexander Krivenyshev (2009-05-13): # From Alexander Krivenyshev (2009-05-13):
...@@ -1754,9 +1751,7 @@ Zone Asia/Pyongyang 8:23:00 - LMT 1908 Apr 1 ...@@ -1754,9 +1751,7 @@ Zone Asia/Pyongyang 8:23:00 - LMT 1908 Apr 1
############################################################################### ###############################################################################
# Kuwait # Kuwait
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # See Asia/Riyadh.
Zone Asia/Kuwait 3:11:56 - LMT 1950
3:00 - AST
# Laos # Laos
# See Asia/Bangkok. # See Asia/Bangkok.
...@@ -1977,12 +1972,7 @@ Zone Asia/Kathmandu 5:41:16 - LMT 1920 ...@@ -1977,12 +1972,7 @@ Zone Asia/Kathmandu 5:41:16 - LMT 1920
5:45 - NPT # Nepal Time 5:45 - NPT # Nepal Time
# Oman # Oman
# See Asia/Dubai.
# Milne says 3:54:24 was the meridian of the Muscat Tidal Observatory.
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Muscat 3:54:24 - LMT 1920
4:00 - GST
# Pakistan # Pakistan
...@@ -2476,6 +2466,7 @@ Zone Asia/Manila -15:56:00 - LMT 1844 Dec 31 ...@@ -2476,6 +2466,7 @@ Zone Asia/Manila -15:56:00 - LMT 1844 Dec 31
Zone Asia/Qatar 3:26:08 - LMT 1920 # Al Dawhah / Doha Zone Asia/Qatar 3:26:08 - LMT 1920 # Al Dawhah / Doha
4:00 - GST 1972 Jun 4:00 - GST 1972 Jun
3:00 - AST 3:00 - AST
Link Asia/Qatar Asia/Bahrain
# Saudi Arabia # Saudi Arabia
# #
...@@ -2502,6 +2493,8 @@ Zone Asia/Qatar 3:26:08 - LMT 1920 # Al Dawhah / Doha ...@@ -2502,6 +2493,8 @@ Zone Asia/Qatar 3:26:08 - LMT 1920 # Al Dawhah / Doha
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Riyadh 3:06:52 - LMT 1947 Mar 14 Zone Asia/Riyadh 3:06:52 - LMT 1947 Mar 14
3:00 - AST 3:00 - AST
Link Asia/Riyadh Asia/Aden # Yemen
Link Asia/Riyadh Asia/Kuwait
# Singapore # Singapore
# taken from Mok Ly Yng (2003-10-30) # taken from Mok Ly Yng (2003-10-30)
...@@ -2790,6 +2783,7 @@ Zone Asia/Ashgabat 3:53:32 - LMT 1924 May 2 # or Ashkhabad ...@@ -2790,6 +2783,7 @@ Zone Asia/Ashgabat 3:53:32 - LMT 1924 May 2 # or Ashkhabad
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Dubai 3:41:12 - LMT 1920 Zone Asia/Dubai 3:41:12 - LMT 1920
4:00 - GST 4:00 - GST
Link Asia/Dubai Asia/Muscat # Oman
# Uzbekistan # Uzbekistan
# Byalokoz 1919 says Uzbekistan was 4:27:53. # Byalokoz 1919 says Uzbekistan was 4:27:53.
...@@ -2874,10 +2868,4 @@ Zone Asia/Ho_Chi_Minh 7:06:40 - LMT 1906 Jul 1 ...@@ -2874,10 +2868,4 @@ Zone Asia/Ho_Chi_Minh 7:06:40 - LMT 1906 Jul 1
7:00 - ICT 7:00 - ICT
# Yemen # Yemen
# See Asia/Riyadh.
# Milne says 2:59:54 was the meridian of the saluting battery at Aden,
# and that Yemen was at 1:55:56, the meridian of the Hagia Sophia.
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Aden 2:59:54 - LMT 1950
3:00 - AST
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
# and their old names. Many names changed in late 1993. # and their old names. Many names changed in late 1993.
# Link TARGET LINK-NAME # Link TARGET LINK-NAME
Link Africa/Asmara Africa/Asmera Link Africa/Nairobi Africa/Asmera
Link Africa/Abidjan Africa/Timbuktu Link Africa/Abidjan Africa/Timbuktu
Link America/Argentina/Catamarca America/Argentina/ComodRivadavia Link America/Argentina/Catamarca America/Argentina/ComodRivadavia
Link America/Adak America/Atka Link America/Adak America/Atka
......
...@@ -1430,35 +1430,32 @@ Zone Europe/Budapest 1:16:20 - LMT 1890 Oct ...@@ -1430,35 +1430,32 @@ Zone Europe/Budapest 1:16:20 - LMT 1890 Oct
# might be a reference to the Julian calendar as opposed to Gregorian, or it # might be a reference to the Julian calendar as opposed to Gregorian, or it
# might mean something else (???). # might mean something else (???).
# #
# From Paul Eggert (2006-03-22): # From Paul Eggert (2014-11-22):
# The Iceland Almanak, Shanks & Pottenger, and Whitman disagree on many points. # The information below is taken from the 1988 Almanak; see
# We go with the Almanak, except for one claim from Shanks & Pottenger, namely # http://www.almanak.hi.is/klukkan.html
# that Reykavik was 21W57 from 1837 to 1908, local mean time before that.
# #
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Iceland 1917 1918 - Feb 19 23:00 1:00 S Rule Iceland 1917 1919 - Feb 19 23:00 1:00 S
Rule Iceland 1917 only - Oct 21 1:00 0 - Rule Iceland 1917 only - Oct 21 1:00 0 -
Rule Iceland 1918 only - Nov 16 1:00 0 - Rule Iceland 1918 1919 - Nov 16 1:00 0 -
Rule Iceland 1921 only - Mar 19 23:00 1:00 S
Rule Iceland 1921 only - Jun 23 1:00 0 -
Rule Iceland 1939 only - Apr 29 23:00 1:00 S Rule Iceland 1939 only - Apr 29 23:00 1:00 S
Rule Iceland 1939 only - Nov 29 2:00 0 - Rule Iceland 1939 only - Oct 29 2:00 0 -
Rule Iceland 1940 only - Feb 25 2:00 1:00 S Rule Iceland 1940 only - Feb 25 2:00 1:00 S
Rule Iceland 1940 only - Nov 3 2:00 0 - Rule Iceland 1940 1941 - Nov Sun>=2 1:00s 0 -
Rule Iceland 1941 only - Mar 2 1:00s 1:00 S Rule Iceland 1941 1942 - Mar Sun>=2 1:00s 1:00 S
Rule Iceland 1941 only - Nov 2 1:00s 0 -
Rule Iceland 1942 only - Mar 8 1:00s 1:00 S
Rule Iceland 1942 only - Oct 25 1:00s 0 -
# 1943-1946 - first Sunday in March until first Sunday in winter # 1943-1946 - first Sunday in March until first Sunday in winter
Rule Iceland 1943 1946 - Mar Sun>=1 1:00s 1:00 S Rule Iceland 1943 1946 - Mar Sun>=1 1:00s 1:00 S
Rule Iceland 1943 1948 - Oct Sun>=22 1:00s 0 - Rule Iceland 1942 1948 - Oct Sun>=22 1:00s 0 -
# 1947-1967 - first Sunday in April until first Sunday in winter # 1947-1967 - first Sunday in April until first Sunday in winter
Rule Iceland 1947 1967 - Apr Sun>=1 1:00s 1:00 S Rule Iceland 1947 1967 - Apr Sun>=1 1:00s 1:00 S
# 1949 Oct transition delayed by 1 week # 1949 and 1967 Oct transitions delayed by 1 week
Rule Iceland 1949 only - Oct 30 1:00s 0 - Rule Iceland 1949 only - Oct 30 1:00s 0 -
Rule Iceland 1950 1966 - Oct Sun>=22 1:00s 0 - Rule Iceland 1950 1966 - Oct Sun>=22 1:00s 0 -
Rule Iceland 1967 only - Oct 29 1:00s 0 - Rule Iceland 1967 only - Oct 29 1:00s 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Atlantic/Reykjavik -1:27:24 - LMT 1837 Zone Atlantic/Reykjavik -1:28 - LMT 1908
-1:27:48 - RMT 1908 # Reykjavik Mean Time?
-1:00 Iceland IS%sT 1968 Apr 7 1:00s -1:00 Iceland IS%sT 1968 Apr 7 1:00s
0:00 - GMT 0:00 - GMT
......
...@@ -77,3 +77,7 @@ Leap 1998 Dec 31 23:59:60 + S ...@@ -77,3 +77,7 @@ Leap 1998 Dec 31 23:59:60 + S
Leap 2005 Dec 31 23:59:60 + S Leap 2005 Dec 31 23:59:60 + S
Leap 2008 Dec 31 23:59:60 + S Leap 2008 Dec 31 23:59:60 + S
Leap 2012 Jun 30 23:59:60 + S Leap 2012 Jun 30 23:59:60 + S
Leap 2015 Jun 30 23:59:60 + S
# Updated through IERS Bulletin C49
# File expires on: 28 December 2015
...@@ -147,7 +147,7 @@ Rule US 1918 1919 - Mar lastSun 2:00 1:00 D ...@@ -147,7 +147,7 @@ Rule US 1918 1919 - Mar lastSun 2:00 1:00 D
Rule US 1918 1919 - Oct lastSun 2:00 0 S Rule US 1918 1919 - Oct lastSun 2:00 0 S
Rule US 1942 only - Feb 9 2:00 1:00 W # War Rule US 1942 only - Feb 9 2:00 1:00 W # War
Rule US 1945 only - Aug 14 23:00u 1:00 P # Peace Rule US 1945 only - Aug 14 23:00u 1:00 P # Peace
Rule US 1945 only - Sep 30 2:00 0 S Rule US 1945 only - Sep lastSun 2:00 0 S
Rule US 1967 2006 - Oct lastSun 2:00 0 S Rule US 1967 2006 - Oct lastSun 2:00 0 S
Rule US 1967 1973 - Apr lastSun 2:00 1:00 D Rule US 1967 1973 - Apr lastSun 2:00 1:00 D
Rule US 1974 only - Jan 6 2:00 1:00 D Rule US 1974 only - Jan 6 2:00 1:00 D
...@@ -2147,11 +2147,11 @@ Zone America/Dawson -9:17:40 - LMT 1900 Aug 20 ...@@ -2147,11 +2147,11 @@ Zone America/Dawson -9:17:40 - LMT 1900 Aug 20
# Mexico # Mexico
# From Paul Eggert (2001-03-05): # From Paul Eggert (2014-12-07):
# The Investigation and Analysis Service of the # The Investigation and Analysis Service of the
# Mexican Library of Congress (MLoC) has published a # Mexican Library of Congress (MLoC) has published a
# history of Mexican local time (in Spanish) # history of Mexican local time (in Spanish)
# http://www.cddhcu.gob.mx/bibliot/publica/inveyana/polisoc/horver/ # http://www.diputados.gob.mx/bibliot/publica/inveyana/polisoc/horver/index.htm
# #
# Here are the discrepancies between Shanks & Pottenger (S&P) and the MLoC. # Here are the discrepancies between Shanks & Pottenger (S&P) and the MLoC.
# (In all cases we go with the MLoC.) # (In all cases we go with the MLoC.)
...@@ -2320,6 +2320,24 @@ Zone America/Dawson -9:17:40 - LMT 1900 Aug 20 ...@@ -2320,6 +2320,24 @@ Zone America/Dawson -9:17:40 - LMT 1900 Aug 20
# efecto desde las dos horas del segundo domingo de marzo y concluirá a # efecto desde las dos horas del segundo domingo de marzo y concluirá a
# las dos horas del primer domingo de noviembre. # las dos horas del primer domingo de noviembre.
# From Steffen Thorsen (2014-12-08), translated by Gwillim Law:
# The Mexican state of Quintana Roo will likely change to EST in 2015.
#
# http://www.unioncancun.mx/articulo/2014/12/04/medio-ambiente/congreso-aprueba-una-hora-mas-de-sol-en-qroo
# "With this change, the time conflict that has existed between the municipios
# of Quintana Roo and the municipio of Felipe Carrillo Puerto may come to an
# end. The latter declared itself in rebellion 15 years ago when a time change
# was initiated in Mexico, and since then it has refused to change its time
# zone along with the rest of the country."
#
# From Steffen Thorsen (2015-01-14), translated by Gwillim Law:
# http://sipse.com/novedades/confirman-aplicacion-de-nueva-zona-horaria-para-quintana-roo-132331.html
# "...the new time zone will come into effect at two o'clock on the first Sunday
# of February, when we will have to advance the clock one hour from its current
# time..."
#
# Also, the new zone will not use DST.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Mexico 1939 only - Feb 5 0:00 1:00 D Rule Mexico 1939 only - Feb 5 0:00 1:00 D
Rule Mexico 1939 only - Jun 25 0:00 0 S Rule Mexico 1939 only - Jun 25 0:00 0 S
...@@ -2340,7 +2358,8 @@ Rule Mexico 2002 max - Oct lastSun 2:00 0 S ...@@ -2340,7 +2358,8 @@ Rule Mexico 2002 max - Oct lastSun 2:00 0 S
Zone America/Cancun -5:47:04 - LMT 1922 Jan 1 0:12:56 Zone America/Cancun -5:47:04 - LMT 1922 Jan 1 0:12:56
-6:00 - CST 1981 Dec 23 -6:00 - CST 1981 Dec 23
-5:00 Mexico E%sT 1998 Aug 2 2:00 -5:00 Mexico E%sT 1998 Aug 2 2:00
-6:00 Mexico C%sT -6:00 Mexico C%sT 2015 Feb 1 2:00
-5:00 - EST
# Campeche, Yucatán; represented by Mérida # Campeche, Yucatán; represented by Mérida
Zone America/Merida -5:58:28 - LMT 1922 Jan 1 0:01:32 Zone America/Merida -5:58:28 - LMT 1922 Jan 1 0:01:32
-6:00 - CST 1981 Dec 23 -6:00 - CST 1981 Dec 23
......
...@@ -1229,6 +1229,11 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914 ...@@ -1229,6 +1229,11 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914
# DST Start: first Saturday of September 2014 (Sun 07 Sep 2014 04:00 UTC) # DST Start: first Saturday of September 2014 (Sun 07 Sep 2014 04:00 UTC)
# http://www.diariooficial.interior.gob.cl//media/2014/02/19/do-20140219.pdf # http://www.diariooficial.interior.gob.cl//media/2014/02/19/do-20140219.pdf
# From Juan Correa (2015-01-28):
# ... today the Ministry of Energy announced that Chile will drop DST, will keep
# "summer time" (UTC -3 / UTC -5) all year round....
# http://www.minenergia.cl/ministerio/noticias/generales/ministerio-de-energia-anuncia.html
# NOTE: ChileAQ rules for Antarctic bases are stored separately in the # NOTE: ChileAQ rules for Antarctic bases are stored separately in the
# 'antarctica' file. # 'antarctica' file.
...@@ -1270,8 +1275,8 @@ Rule Chile 2009 only - Mar Sun>=9 3:00u 0 - ...@@ -1270,8 +1275,8 @@ Rule Chile 2009 only - Mar Sun>=9 3:00u 0 -
Rule Chile 2010 only - Apr Sun>=1 3:00u 0 - Rule Chile 2010 only - Apr Sun>=1 3:00u 0 -
Rule Chile 2011 only - May Sun>=2 3:00u 0 - Rule Chile 2011 only - May Sun>=2 3:00u 0 -
Rule Chile 2011 only - Aug Sun>=16 4:00u 1:00 S Rule Chile 2011 only - Aug Sun>=16 4:00u 1:00 S
Rule Chile 2012 max - Apr Sun>=23 3:00u 0 - Rule Chile 2012 2015 - Apr Sun>=23 3:00u 0 -
Rule Chile 2012 max - Sep Sun>=2 4:00u 1:00 S Rule Chile 2012 2014 - Sep Sun>=2 4:00u 1:00 S
# IATA SSIM anomalies: (1992-02) says 1992-03-14; # IATA SSIM anomalies: (1992-02) says 1992-03-14;
# (1996-09) says 1998-03-08. Ignore these. # (1996-09) says 1998-03-08. Ignore these.
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]
...@@ -1282,11 +1287,13 @@ Zone America/Santiago -4:42:46 - LMT 1890 ...@@ -1282,11 +1287,13 @@ Zone America/Santiago -4:42:46 - LMT 1890
-4:00 - CLT 1919 Jul 1 # Chile Time -4:00 - CLT 1919 Jul 1 # Chile Time
-4:42:46 - SMT 1927 Sep 1 # Santiago Mean Time -4:42:46 - SMT 1927 Sep 1 # Santiago Mean Time
-5:00 Chile CL%sT 1947 May 22 # Chile Time -5:00 Chile CL%sT 1947 May 22 # Chile Time
-4:00 Chile CL%sT -4:00 Chile CL%sT 2015 Apr 26 3:00u
-3:00 - CLT
Zone Pacific/Easter -7:17:44 - LMT 1890 Zone Pacific/Easter -7:17:44 - LMT 1890
-7:17:28 - EMT 1932 Sep # Easter Mean Time -7:17:28 - EMT 1932 Sep # Easter Mean Time
-7:00 Chile EAS%sT 1982 Mar 13 21:00 # Easter Time -7:00 Chile EAS%sT 1982 Mar 13 3:00u # Easter Time
-6:00 Chile EAS%sT -6:00 Chile EAS%sT 2015 Apr 26 3:00u
-5:00 - EAST
# #
# Salas y Gómez Island is uninhabited. # Salas y Gómez Island is uninhabited.
# Other Chilean locations, including Juan Fernández Is, Desventuradas Is, # Other Chilean locations, including Juan Fernández Is, Desventuradas Is,
......
...@@ -297,7 +297,7 @@ MU -2010+05730 Indian/Mauritius ...@@ -297,7 +297,7 @@ MU -2010+05730 Indian/Mauritius
MV +0410+07330 Indian/Maldives MV +0410+07330 Indian/Maldives
MW -1547+03500 Africa/Blantyre MW -1547+03500 Africa/Blantyre
MX +1924-09909 America/Mexico_City Central Time - most locations MX +1924-09909 America/Mexico_City Central Time - most locations
MX +2105-08646 America/Cancun Central Time - Quintana Roo MX +2105-08646 America/Cancun Eastern Standard Time - Quintana Roo
MX +2058-08937 America/Merida Central Time - Campeche, Yucatan MX +2058-08937 America/Merida Central Time - Campeche, Yucatan
MX +2540-10019 America/Monterrey Mexican Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas away from US border MX +2540-10019 America/Monterrey Mexican Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas away from US border
MX +2550-09730 America/Matamoros US Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas near US border MX +2550-09730 America/Matamoros US Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas near US border
......
...@@ -825,8 +825,8 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \ ...@@ -825,8 +825,8 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \
$(call SET_SHARED_LIBRARY_ORIGIN), \ $(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(BUILD_LIBFONTMANAGER_FONTLIB), \ LDFLAGS_SUFFIX := $(BUILD_LIBFONTMANAGER_FONTLIB), \
LDFLAGS_SUFFIX_linux := -lawt $(LIBM) $(LIBCXX) -ljava -ljvm -lc, \ LDFLAGS_SUFFIX_linux := -lawt $(LIBM) $(LIBCXX) -ljava -ljvm -lc, \
LDFLAGS_SUFFIX_solaris := -lawt -lawt_xawt -lc $(LIBM) $(LIBCXX) -ljava -ljvm, \ LDFLAGS_SUFFIX_solaris := -lawt -lawt_headless -lc $(LIBM) $(LIBCXX) -ljava -ljvm, \
LDFLAGS_SUFFIX_aix := -lawt -lawt_xawt $(LIBM) $(LIBCXX) -ljava -ljvm,\ LDFLAGS_SUFFIX_aix := -lawt -lawt_headless $(LIBM) $(LIBCXX) -ljava -ljvm,\
LDFLAGS_SUFFIX_macosx := -lawt $(LIBM) $(LIBCXX) -undefined dynamic_lookup \ LDFLAGS_SUFFIX_macosx := -lawt $(LIBM) $(LIBCXX) -undefined dynamic_lookup \
-ljava -ljvm, \ -ljava -ljvm, \
LDFLAGS_SUFFIX_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib gdi32.lib \ LDFLAGS_SUFFIX_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib gdi32.lib \
......
...@@ -43,7 +43,7 @@ class AixNativeDispatcher extends UnixNativeDispatcher { ...@@ -43,7 +43,7 @@ class AixNativeDispatcher extends UnixNativeDispatcher {
static native UnixMountEntry[] getmntctl() throws UnixException; static native UnixMountEntry[] getmntctl() throws UnixException;
// initialize // initialize
private static native int init(); private static native void init();
static { static {
AccessController.doPrivileged(new PrivilegedAction<Void>() { AccessController.doPrivileged(new PrivilegedAction<Void>() {
......
...@@ -56,23 +56,26 @@ static void throwUnixException(JNIEnv* env, int errnum) { ...@@ -56,23 +56,26 @@ static void throwUnixException(JNIEnv* env, int errnum) {
/** /**
* Initialization * Initialization
*/ */
JNIEXPORT jint JNICALL JNIEXPORT void JNICALL
Java_sun_nio_fs_AixNativeDispatcher_init(JNIEnv* env, jclass this) Java_sun_nio_fs_AixNativeDispatcher_init(JNIEnv* env, jclass this)
{ {
jint flags = 0;
jclass clazz; jclass clazz;
clazz = (*env)->FindClass(env, "sun/nio/fs/UnixMountEntry"); clazz = (*env)->FindClass(env, "sun/nio/fs/UnixMountEntry");
if (clazz == NULL) { CHECK_NULL(clazz);
return 0;
}
entry_name = (*env)->GetFieldID(env, clazz, "name", "[B"); entry_name = (*env)->GetFieldID(env, clazz, "name", "[B");
CHECK_NULL(entry_name);
entry_dir = (*env)->GetFieldID(env, clazz, "dir", "[B"); entry_dir = (*env)->GetFieldID(env, clazz, "dir", "[B");
CHECK_NULL(entry_dir);
entry_fstype = (*env)->GetFieldID(env, clazz, "fstype", "[B"); entry_fstype = (*env)->GetFieldID(env, clazz, "fstype", "[B");
CHECK_NULL(entry_fstype);
entry_options = (*env)->GetFieldID(env, clazz, "opts", "[B"); entry_options = (*env)->GetFieldID(env, clazz, "opts", "[B");
CHECK_NULL(entry_options);
entry_cls = (*env)->NewGlobalRef(env, clazz); entry_cls = (*env)->NewGlobalRef(env, clazz);
if (entry_cls == NULL) {
return 0; JNU_ThrowOutOfMemoryError(env, NULL);
return;
}
} }
/** /**
......
此差异已折叠。
'\" t '\" t
.\" Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. .\" Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
.\" .\"
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. .\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
.\" .\"
.\" This code is free software; you can redistribute it and/or modify it .\" This code is free software; you can redistribute it and/or modify it
.\" under the terms of the GNU General Public License version 2 only, as .\" under the terms of the GNU General Public License version 2 only, as
.\" published by the Free Software Foundation. .\" published by the Free Software Foundation.
.\" .\"
.\" This code is distributed in the hope that it will be useful, but WITHOUT .\" This code is distributed in the hope that it will be useful, but WITHOUT
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License .\" 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 .\" version 2 for more details (a copy is included in the LICENSE file that
.\" accompanied this code). .\" accompanied this code).
.\" .\"
.\" You should have received a copy of the GNU General Public License version .\" 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, .\" 2 along with this work; if not, write to the Free Software Foundation,
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. .\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
.\" .\"
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 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 .\" or visit www.oracle.com if you need additional information or have any
.\" questions. .\" questions.
.\" .\"
.\" Arch: generic .\" Title: jcmd
.\" Software: JDK 8 .\" Language: English
.\" Date: 21 November 2013 .\" Date: 03 March 2015
.\" SectDesc: Troubleshooting Tools .\" SectDesc: Troubleshooting Tools
.\" Title: jcmd.1 .\" Software: JDK 8
.\" Arch: generic
.\" Part Number: E38207-04
.\" Doc ID: JSSON
.\" .\"
.if n .pl 99999 .if n .pl 99999
.TH jcmd 1 "21 November 2013" "JDK 8" "Troubleshooting Tools" .TH "jcmd" "1" "03 March 2015" "JDK 8" "Troubleshooting Tools"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * Define some portability stuff
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673 .\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" disable hyphenation .\" disable hyphenation
.nh .nh
.\" disable justification (adjust text to left margin only) .\" disable justification (adjust text to left margin only)
.ad l .ad l
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE * .\" * MAIN CONTENT STARTS HERE *
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.SH "NAME"
.SH NAME
jcmd \- Sends diagnostic command requests to a running Java Virtual Machine (JVM)\&. jcmd \- Sends diagnostic command requests to a running Java Virtual Machine (JVM)\&.
.SH SYNOPSIS .SH "SYNOPSIS"
.sp .sp
.nf .if n \{\
.RS 4
.\}
.nf
\fBjcmd\fR [\fB\-l\fR|\fB\-h\fR|\fB\-help\fR] \fBjcmd\fR [\fB\-l\fR|\fB\-h\fR|\fB\-help\fR]
.fi .fi
.nf .if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBjcmd\fR \fIpid\fR|\fImain\-class\fR \fBPerfCounter\&.print\fR \fBjcmd\fR \fIpid\fR|\fImain\-class\fR \fBPerfCounter\&.print\fR
.fi .fi
.nf .if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBjcmd\fR \fIpid\fR|\fImain\-class\fR \fB\-f\fR \fIfilename\fR \fBjcmd\fR \fIpid\fR|\fImain\-class\fR \fB\-f\fR \fIfilename\fR
.fi .fi
.nf .if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBjcmd\fR \fIpid\fR|\fImain\-class\fR \fIcommand\fR[ \fIarguments\fR] \fBjcmd\fR \fIpid\fR|\fImain\-class\fR \fIcommand\fR[ \fIarguments\fR]
.fi .fi
.sp .if n \{\
.SH DESCRIPTION .RE
The \f3jcmd\fR utility is used to send diagnostic command requests to the JVM\&. It must be used on the same machine on which the JVM is running, and have the same effective user and group identifiers that were used to launch the JVM\&. .\}
.SH "DESCRIPTION"
.PP
The
\fBjcmd\fR
utility is used to send diagnostic command requests to the JVM\&. It must be used on the same machine on which the JVM is running, and have the same effective user and group identifiers that were used to launch the JVM\&.
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
.ps -1
.br
.TS
allbox tab(:);
l.
T{
.PP
To invoke diagnostic commands from a remote machine or with different identifiers, you can use the
\fBcom\&.sun\&.management\&.DiagnosticCommandMBean\fR
interface\&. For more information about the
\fBDiagnosticCommandMBean\fR
interface, see the API documentation at http://docs\&.oracle\&.com/javase/8/docs/jre/api/management/extension/com/sun/management/DiagnosticCommandMBean\&.html
T}
.TE
.sp 1
.sp .5v
.RE
.PP .PP
\fINote:\fR To invoke diagnostic commands from a remote machine or with different identiers, you can use the \f3com\&.sun\&.management\&.DiagnosticCommandMBean\fR interface\&. For more information about the \f3DiagnosticCommandMBean\fR interface, see the API documentation at http://download\&.java\&.net/jdk8/docs/jre/api/management/extension/com/sun/management/DiagnosticCommandMBean\&.html If you run
\fBjcmd\fR
without arguments or with the
\fB\-l\fR
option, it prints the list of running Java process identifiers with the main class and command\-line arguments that were used to launch the process\&. Running
\fBjcmd\fR
with the
\fB\-h\fR
or
\fB\-help\fR
option prints the tool\(cqs help message\&.
.PP .PP
If you run \f3jcmd\fR without arguments or with the \f3-l\fR option, it prints the list of running Java process identifiers with the main class and command-line arguments that were used to launch the process\&. Running \f3jcmd\fR with the \f3-h\fR or \f3-help\fR option prints the tool\(cqs help message\&. If you specify the processes identifier (\fIpid\fR) or the main class (\fImain\-class\fR) as the first argument,
\fBjcmd\fR
sends the diagnostic command request to the Java process with the specified identifier or to all Java processes with the specified name of the main class\&. You can also send the diagnostic command request to all available Java processes by specifying
\fB0\fR
as the process identifier\&. Use one of the following as the diagnostic command request:
.PP .PP
If you specify the processes identifier (\fIpid\fR) or the main class (\fImain-class\fR) as the first argument, \f3jcmd\fR sends the diagnostic command request to the Java process with the specified identifier or to all Java processes with the specified name of the main class\&. You can also send the diagnostic command request to all available Java processes by specifying \f30\fR as the process identifier\&. Use one of the following as the diagnostic command request:
.TP
Perfcounter\&.print Perfcounter\&.print
.RS 4
Prints the performance counters available for the specified Java process\&. The list of performance counters might vary with the Java process\&. Prints the performance counters available for the specified Java process\&. The list of performance counters might vary with the Java process\&.
.TP .RE
-f \fIfilename\fR .PP
.br \-f \fIfilename\fR
The name of the file from which to read diagnostic commands and send them to the specified Java process\&. Used only with the \f3-f\fR option\&. Each command in the file must be written on a single line\&. Lines starting with a number sign (\f3#\fR) are ignored\&. Processing of the file ends when all lines have been read or when a line containing the \f3stop\fR keyword is read\&. .RS 4
.TP The name of the file from which to read diagnostic commands and send them to the specified Java process\&. Used only with the
\fB\-f\fR
option\&. Each command in the file must be written on a single line\&. Lines starting with a number sign (\fB#\fR) are ignored\&. Processing of the file ends when all lines have been read or when a line containing the
\fBstop\fR
keyword is read\&.
.RE
.PP
\fIcommand\fR [\fIarguments\fR] \fIcommand\fR [\fIarguments\fR]
The command to be sent to the specified Java process\&. The list of available diagnostic commands for a given process can be obtained by sending the \f3help\fR command to this process\&. Each diagnostic command has its own set of arguments\&. To see the description, syntax, and a list of available arguments for a command, use the name of the command as the argument for the \f3help\fR command\&. .RS 4
The command to be sent to the specified Java process\&. The list of available diagnostic commands for a given process can be obtained by sending the
\fINote:\fR If any arguments contain spaces, you must surround them with single or double quotation marks (\f3\&'\fR or \f3"\fR)\&. In addition, you must escape single or double quotation marks with a backslash (\f3\e\fR) to prevent the operating system shell from processing quotation marks\&. Alternatively, you can surround these arguments with single quotation marks and then with double quotation marks (or with double quotation marks and then with single quotation marks)\&. \fBhelp\fR
.SH OPTIONS command to this process\&. Each diagnostic command has its own set of arguments\&. To see the description, syntax, and a list of available arguments for a command, use the name of the command as the argument for the
\fBhelp\fR
command\&.
.sp
\fBNote:\fR
If any arguments contain spaces, you must surround them with single or double quotation marks (\fB\*(Aq\fR
or
\fB"\fR)\&. In addition, you must escape single or double quotation marks with a backslash (\fB\e\fR) to prevent the operating system shell from processing quotation marks\&. Alternatively, you can surround these arguments with single quotation marks and then with double quotation marks (or with double quotation marks and then with single quotation marks)\&.
.RE
.SH "OPTIONS"
.PP
Options are mutually exclusive\&. Options are mutually exclusive\&.
.TP .PP
-f \fIfilename\fR \-f \fIfilename\fR
.br .RS 4
Reads commands from the specified file\&. This option can be used only if you specify the process identifier or the main class as the first argument\&. Each command in the file must be written on a single line\&. Lines starting with a number sign (\f3#\fR) are ignored\&. Processing of the file ends when all lines have been read or when a line containing the \f3stop\fR keyword is read\&. Reads commands from the specified file\&. This option can be used only if you specify the process identifier or the main class as the first argument\&. Each command in the file must be written on a single line\&. Lines starting with a number sign (\fB#\fR) are ignored\&. Processing of the file ends when all lines have been read or when a line containing the
.TP \fBstop\fR
-h, -help keyword is read\&.
.RE
.PP
\-h
.br .br
\-help
.RS 4
Prints a help message\&. Prints a help message\&.
.TP .RE
-l .PP
.br \-l
Prints the list of running Java processes identifiers with the main class and command-line arguments\&. .RS 4
.SH SEE\ ALSO Prints the list of running Java processes identifiers with the main class and command\-line arguments\&.
.TP 0.2i .RE
\(bu .SH "SEE ALSO"
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
jps(1) jps(1)
.RE .RE
.br .br
'pl 8.5i 'pl 8.5i
'bp 'bp
'\" t '\" t
.\" Copyright (c) 1994, 2015, Oracle and/or its affiliates. All rights reserved. .\" Copyright (c) 1994, 2015, Oracle and/or its affiliates. All rights reserved.
.\" .\"
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. .\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
.\" .\"
.\" This code is free software; you can redistribute it and/or modify it .\" This code is free software; you can redistribute it and/or modify it
.\" under the terms of the GNU General Public License version 2 only, as .\" under the terms of the GNU General Public License version 2 only, as
.\" published by the Free Software Foundation. .\" published by the Free Software Foundation.
.\" .\"
.\" This code is distributed in the hope that it will be useful, but WITHOUT .\" This code is distributed in the hope that it will be useful, but WITHOUT
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License .\" 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 .\" version 2 for more details (a copy is included in the LICENSE file that
.\" accompanied this code). .\" accompanied this code).
.\" .\"
.\" You should have received a copy of the GNU General Public License version .\" 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, .\" 2 along with this work; if not, write to the Free Software Foundation,
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. .\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
.\" .\"
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 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 .\" or visit www.oracle.com if you need additional information or have any
.\" questions. .\" questions.
.\" .\"
.\" Arch: generic .\" Title: jjs
.\" Software: JDK 8 .\" Language: English
.\" Date: 03 March 2015 .\" Date: 03 March 2015
.\" SectDesc: Basic Tools .\" SectDesc: Basic Tools
.\" Title: jjs.1 .\" Software: JDK 8
.\" Arch: generic
.\" Part Number: E38207-04
.\" Doc ID: JSSON
.\" .\"
.if n .pl 99999 .if n .pl 99999
.TH jjs 1 "03 March 2015" "JDK 8" "Basic Tools" .TH "jjs" "1" "03 March 2015" "JDK 8" "Basic Tools"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * Define some portability stuff
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673 .\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" disable hyphenation .\" disable hyphenation
.nh .nh
.\" disable justification (adjust text to left margin only) .\" disable justification (adjust text to left margin only)
.ad l .ad l
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE * .\" * MAIN CONTENT STARTS HERE *
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.SH "NAME"
.SH NAME
jjs \- Invokes the Nashorn engine\&. jjs \- Invokes the Nashorn engine\&.
.SH SYNOPSIS .SH "SYNOPSIS"
.sp .sp
.nf .if n \{\
\f3\fBjjs\fR [\fIoptions\fR] [\fIscript\-files\fR] [\-\- \fIarguments\fR]\fP .RS 4
.fi .\}
.sp .nf
.TP \fB\fBjjs\fR\fR\fB [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIscript\-files\fR\fR\fB] [\-\- \fR\fB\fIarguments\fR\fR\fB]\fR
.fi
.if n \{\
.RE
.\}
.PP
\fIoptions\fR \fIoptions\fR
One or more options of the \f3jjs\fR command, separated by spaces\&. For more information, see Options\&. .RS 4
.TP One or more options of the
\fIscript-files\fR \fBjjs\fR
command, separated by spaces\&. For more information, see Options\&.
.RE
.PP
\fIscript\-files\fR
.RS 4
One or more script files which you want to interpret using Nashorn, separated by spaces\&. If no files are specified, an interactive shell is started\&. One or more script files which you want to interpret using Nashorn, separated by spaces\&. If no files are specified, an interactive shell is started\&.
.TP .RE
.PP
\fIarguments\fR \fIarguments\fR
All values after the double hyphen marker (\f3--\fR) are passed through to the script or the interactive shell as arguments\&. These values can be accessed by using the \f3arguments\fR property (see )\&. .RS 4
.SH DESCRIPTION All values after the double hyphen marker (\fB\-\-\fR) are passed through to the script or the interactive shell as arguments\&. These values can be accessed by using the
The \f3jjs\fR command-line tool is used to invoke the Nashorn engine\&. You can use it to interpret one or several script files, or to run an interactive shell\&. \fBarguments\fR
.SH OPTIONS property (see Example 3)\&.
The options of the \f3jjs\fR command control the conditions under which scripts are interpreted by Nashorn\&. .RE
.TP .SH "DESCRIPTION"
-ccs=\fIsize\fR , --class-cache-size=\fIsize\fR .PP
.br The
Sets the class cache size (in bytes)\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes (KB), \f3m\fR or \f3M\fR to indicate megabytes (MB), \f3g\fR or \f3G\fR to indicate gigabytes (GB)\&. By default, the class cache size is set to 50 bytes\&. The following example shows how to set it to 1024 bytes (1 KB): \fBjjs\fR
.sp command\-line tool is used to invoke the Nashorn engine\&. You can use it to interpret one or several script files, or to run an interactive shell\&.
.nf .SH "OPTIONS"
\f3\-css=100\fP .PP
.fi The options of the
.nf \fBjjs\fR
\f3\-css=1k\fP command control the conditions under which scripts are interpreted by Nashorn\&.
.fi .PP
.nf \-cp \fIpath\fR
\f3\fP .br
.fi \-classpath \fIpath\fR
.sp .RS 4
.TP
-co, --compile-only
.br
Compiles the script without running it\&.
.TP
-cp \fIpath\fR , -classpath \fIpath\fR
.br
Specifies the path to the supporting class files To set multiple paths, the option can be repeated, or you can separate each path with a colon (:)\&. Specifies the path to the supporting class files To set multiple paths, the option can be repeated, or you can separate each path with a colon (:)\&.
.TP .RE
-D\fIname\fR=\fIvalue\fR .PP
.br \-D\fIname\fR=\fIvalue\fR
Sets a system property to be passed to the script by assigning a value to a property name\&. The following example shows how to invoke Nashorn in interactive mode and assign \f3myValue\fR to the property named \f3myKey\fR: .RS 4
.sp Sets a system property to be passed to the script by assigning a value to a property name\&. The following example shows how to invoke Nashorn in interactive mode and assign
.nf \fBmyValue\fR
\f3>> \fIjjs \-DmyKey=myValue\fR\fP to the property named
.fi \fBmyKey\fR:
.nf .sp
\f3jjs> \fIjava\&.lang\&.System\&.getProperty("myKey")\fR\fP .if n \{\
.fi .RS 4
.nf .\}
\f3myValue\fP .nf
.fi \fB>> \fR\fB\fBjjs \-DmyKey=myValue\fR\fR
.nf \fBjjs> \fR\fB\fBjava\&.lang\&.System\&.getProperty("myKey")\fR\fR
\f3jjs>\fP \fBmyValue\fR
.fi \fBjjs>\fR
.nf
\f3\fP .fi
.fi .if n \{\
.sp .RE
.\}
This option can be repeated to set multiple properties\&. This option can be repeated to set multiple properties\&.
.TP .RE
-d=\fIpath\fR , --dump-debug-dir=\fIpath\fR .PP
.br \-doe
Specifies the path to the directory where class files are dumped\&.
.TP
--debug-lines
.br
Generates a line number table in the class file\&. By default, this option is enabled\&. To disable it, specify \f3--debug-lines=false\fR\&.
.TP
--debug-locals
.br
Generates a local variable table in the class file\&.
.TP
-doe, --dump-on-error
.br .br
\-\-dump\-on\-error
.RS 4
Provides a full stack trace when an error occurs\&. By default, only a brief error message is printed\&. Provides a full stack trace when an error occurs\&. By default, only a brief error message is printed\&.
.TP .RE
--early-lvalue-error .PP
.br \-fv
Reports invalid lvalue expressions as early errors (that is, when the code is parsed)\&. By default, this option is enabled\&. To disable it, specify \f3--early-lvalue-error=false\fR\&. When disabled, invalid lvalue expressions will not be reported until the code is executed\&.
.TP
--empty-statements
.br
Preserves empty statements in the Java abstract syntax tree\&.
.TP
-fv, --fullversion
.br .br
\-\-fullversion
.RS 4
Prints the full Nashorn version string\&. Prints the full Nashorn version string\&.
.TP .RE
--function-statement-error .PP
.br \-fx
Prints an error message when a function declaration is used as a statement\&. .RS 4
.TP
--function-statement-warning
.br
Prints a warning message when a function declaration is used as a statement\&.
.TP
-fx
.br
Launches the script as a JavaFX application\&. Launches the script as a JavaFX application\&.
.TP .RE
-h, -help .PP
\-h
.br .br
\-help
.RS 4
Prints the list of options and their descriptions\&. Prints the list of options and their descriptions\&.
.TP .RE
-J\fIoption\fR .PP
.br \-\-language=[es5]
Passes the specified \f3java\fR launcher option to the JVM\&. The following example shows how to invoke Nashorn in interactive mode and set the maximum memory used by the JVM to 4 GB: .RS 4
.sp
.nf
\f3>> \fIjjs \-J\-Xmx4g\fR\fP
.fi
.nf
\f3jjs> \fIjava\&.lang\&.Runtime\&.getRuntime()\&.maxMemory()\fR\fP
.fi
.nf
\f33817799680\fP
.fi
.nf
\f3jjs>\fP
.fi
.nf
\f3\fP
.fi
.sp
This option can be repeated to pass multiple \f3java\fR command options\&.
.TP
--language=[es5]
.br
Specifies the ECMAScript language version\&. The default version is ES5\&. Specifies the ECMAScript language version\&. The default version is ES5\&.
.TP .RE
--lazy-compilation .PP
.br \-ot
Enables lazy code generation strategies (that is, the entire script is not compiled at once)\&. This option is experimental\&.
.TP
--loader-per-compile
.br
Creates a new class loader per compile\&. By default, this option is enabled\&. To disable it, specify \f3--loader-per-compile=false\fR\&.
.TP
--log=\fIsubsystem\fR:\fIlevel\fR
.br
Performs logging at a given level for the specified subsystems\&. You can specify logging levels for multiple subsystems separating them with commas\&. For example:
.sp
.nf
\f3\-\-log=fields:finest,codegen:info\fP
.fi
.sp
.TP
--optimistic-types=[true|false]
.br .br
\-\-optimistic\-types=[true|false]
.RS 4
Enables or disables optimistic type assumptions with deoptimizing recompilation\&. Running with optimistic types will yield higher final speed, but may increase warmup time\&. Enables or disables optimistic type assumptions with deoptimizing recompilation\&. Running with optimistic types will yield higher final speed, but may increase warmup time\&.
.TP .RE
--package=\fIname\fR .PP
.br \-scripting
Specifies the package to which generated class files are added\&. .RS 4
.TP
--parse-only
.br
Parses the code without compiling\&.
.TP
--print-ast
.br
Prints the abstract syntax tree\&.
.TP
--print-code
.br
Prints bytecode\&.
.TP
--print-lower-ast
.br
Prints the lowered abstract syntax tree\&.
.TP
--print-lower-parse
.br
Prints the lowered parse tree\&.
.TP
--print-no-newline
.br
Forces other \f3--print*\fR options to print the output on one line\&.
.TP
--print-parse
.br
Prints the parse tree\&.
.TP
--print-symbols
.br
Prints the symbol table\&.
.TP
-pcs, --profile-callsites
.br
Dumps callsite profile data\&.
.TP
-scripting
.br
Enables shell scripting features\&. Enables shell scripting features\&.
.TP .RE
--stderr=\fIfilename\fR|\fIstream\fR|\fItty\fR .PP
.br \-strict
Redirects the standard error stream to the specified file, stream (for example, to \f3stdout\fR), or text terminal\&. .RS 4
.TP
--stdout=\fIfilename\fR|\fIstream\fR|\fItty\fR
.br
Redirects the standard output stream to the specified file, stream (for example, to \f3stderr\fR), or text terminal\&.
.TP
-strict
.br
Enables strict mode, which enforces stronger adherence to the standard (ECMAScript Edition 5\&.1), making it easier to detect common coding errors\&. Enables strict mode, which enforces stronger adherence to the standard (ECMAScript Edition 5\&.1), making it easier to detect common coding errors\&.
.TP .RE
-t=\fIzone\fR , -timezone=\fIzone\fR .PP
.br \-t=\fIzone\fR
Sets the specified time zone for script execution\&. It overrides the time zone set in the OS and used by the \f3Date\fR object\&. .br
.TP \-timezone=\fIzone\fR
-tcs=\fIparameter\fR , --trace-callsites=\fIparameter\fR .RS 4
.br Sets the specified time zone for script execution\&. It overrides the time zone set in the OS and used by the
Enables callsite trace mode\&. Possible parameters are the following: \fBDate\fR
.RS object\&.
.TP .RE
miss .PP
Trace callsite misses\&. \-v
.TP .br
enterexit \-version
Trace callsite enter/exit\&. .RS 4
.TP
objects
Print object properties\&.
.RE
.TP
--verify-code
.br
Verifies bytecode before running\&.
.TP
-v, -version
.br
Prints the Nashorn version string\&. Prints the Nashorn version string\&.
.TP .RE
-xhelp .SH "EXAMPLES"
.br .PP
Prints extended help for command-line options\&. \fBExample 1 \fRRunning a Script with Nashorn
.SH EXAMPLES .RS 4
\f3Example 1 Running a Script with Nashorn\fR .sp
.sp .if n \{\
.nf .RS 4
\f3jjs script\&.js\fP .\}
.fi .nf
.nf \fBjjs script\&.js\fR
\f3\fP
.fi .fi
.sp .if n \{\
\f3Example 2 Running Nashorn in Interactive Mode\fR .RE
.sp .\}
.nf .RE
\f3>> \fIjjs\fR\fP .PP
.fi \fBExample 2 \fRRunning Nashorn in Interactive Mode
.nf .RS 4
\f3jjs> \fIprintln("Hello, World!")\fR\fP .sp
.fi .if n \{\
.nf .RS 4
\f3Hello, World!\fP .\}
.fi .nf
.nf \fB>> \fR\fB\fBjjs\fR\fR
\f3jjs> \fIquit()\fR\fP \fBjjs> \fR\fB\fBprintln("Hello, World!")\fR\fR
.fi \fBHello, World!\fR
.nf \fBjjs> \fR\fB\fBquit()\fR\fR
\f3>>\fP \fB>>\fR
.fi
.nf .fi
\f3\fP .if n \{\
.fi .RE
.sp .\}
\f3Example 3 Passing Arguments to Nashorn\fR .RE
.sp .PP
.nf \fBExample 3 \fRPassing Arguments to Nashorn
\f3>> \fIjjs \-\- a b c\fR\fP .RS 4
.fi .sp
.nf .if n \{\
\f3jjs> \fIarguments\&.join(", ")\fR\fP .RS 4
.fi .\}
.nf .nf
\f3a, b, c\fP \fB>> \fR\fB\fBjjs \-\- a b c\fR\fR
.fi \fBjjs> \fR\fB\fBarguments\&.join(", ")\fR\fR
.nf \fBa, b, c\fR
\f3jjs>\fP \fBjjs>\fR
.fi
.nf .fi
\f3\fP .if n \{\
.fi .RE
.sp .\}
.SH SEE\ ALSO .RE
\f3jrunscript\fR .SH "SEE ALSO"
.RE .PP
.br \fBjrunscript\fR
'pl 8.5i .br
'bp 'pl 8.5i
'bp
此差异已折叠。
此差异已折叠。
'\" t '\" t
.\" Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. .\" Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
.\" .\"
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. .\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
.\" .\"
.\" This code is free software; you can redistribute it and/or modify it .\" This code is free software; you can redistribute it and/or modify it
.\" under the terms of the GNU General Public License version 2 only, as .\" under the terms of the GNU General Public License version 2 only, as
.\" published by the Free Software Foundation. .\" published by the Free Software Foundation.
.\" .\"
.\" This code is distributed in the hope that it will be useful, but WITHOUT .\" This code is distributed in the hope that it will be useful, but WITHOUT
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License .\" 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 .\" version 2 for more details (a copy is included in the LICENSE file that
.\" accompanied this code). .\" accompanied this code).
.\" .\"
.\" You should have received a copy of the GNU General Public License version .\" 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, .\" 2 along with this work; if not, write to the Free Software Foundation,
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. .\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
.\" .\"
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 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 .\" or visit www.oracle.com if you need additional information or have any
.\" questions. .\" questions.
.\" .\"
.\" Arch: generic .\" Title: jcmd
.\" Software: JDK 8 .\" Language: English
.\" Date: 21 November 2013 .\" Date: 03 March 2015
.\" SectDesc: Troubleshooting Tools .\" SectDesc: Troubleshooting Tools
.\" Title: jcmd.1 .\" Software: JDK 8
.\" Arch: generic
.\" Part Number: E38207-04
.\" Doc ID: JSSON
.\" .\"
.if n .pl 99999 .if n .pl 99999
.TH jcmd 1 "21 November 2013" "JDK 8" "Troubleshooting Tools" .TH "jcmd" "1" "03 March 2015" "JDK 8" "Troubleshooting Tools"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * Define some portability stuff
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673 .\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" disable hyphenation .\" disable hyphenation
.nh .nh
.\" disable justification (adjust text to left margin only) .\" disable justification (adjust text to left margin only)
.ad l .ad l
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE * .\" * MAIN CONTENT STARTS HERE *
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.SH "NAME"
.SH NAME
jcmd \- Sends diagnostic command requests to a running Java Virtual Machine (JVM)\&. jcmd \- Sends diagnostic command requests to a running Java Virtual Machine (JVM)\&.
.SH SYNOPSIS .SH "SYNOPSIS"
.sp .sp
.nf .if n \{\
.RS 4
.\}
.nf
\fBjcmd\fR [\fB\-l\fR|\fB\-h\fR|\fB\-help\fR] \fBjcmd\fR [\fB\-l\fR|\fB\-h\fR|\fB\-help\fR]
.fi .fi
.nf .if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBjcmd\fR \fIpid\fR|\fImain\-class\fR \fBPerfCounter\&.print\fR \fBjcmd\fR \fIpid\fR|\fImain\-class\fR \fBPerfCounter\&.print\fR
.fi .fi
.nf .if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBjcmd\fR \fIpid\fR|\fImain\-class\fR \fB\-f\fR \fIfilename\fR \fBjcmd\fR \fIpid\fR|\fImain\-class\fR \fB\-f\fR \fIfilename\fR
.fi .fi
.nf .if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fBjcmd\fR \fIpid\fR|\fImain\-class\fR \fIcommand\fR[ \fIarguments\fR] \fBjcmd\fR \fIpid\fR|\fImain\-class\fR \fIcommand\fR[ \fIarguments\fR]
.fi .fi
.sp .if n \{\
.SH DESCRIPTION .RE
The \f3jcmd\fR utility is used to send diagnostic command requests to the JVM\&. It must be used on the same machine on which the JVM is running, and have the same effective user and group identifiers that were used to launch the JVM\&. .\}
.SH "DESCRIPTION"
.PP
The
\fBjcmd\fR
utility is used to send diagnostic command requests to the JVM\&. It must be used on the same machine on which the JVM is running, and have the same effective user and group identifiers that were used to launch the JVM\&.
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
.ps -1
.br
.TS
allbox tab(:);
l.
T{
.PP
To invoke diagnostic commands from a remote machine or with different identifiers, you can use the
\fBcom\&.sun\&.management\&.DiagnosticCommandMBean\fR
interface\&. For more information about the
\fBDiagnosticCommandMBean\fR
interface, see the API documentation at http://docs\&.oracle\&.com/javase/8/docs/jre/api/management/extension/com/sun/management/DiagnosticCommandMBean\&.html
T}
.TE
.sp 1
.sp .5v
.RE
.PP .PP
\fINote:\fR To invoke diagnostic commands from a remote machine or with different identiers, you can use the \f3com\&.sun\&.management\&.DiagnosticCommandMBean\fR interface\&. For more information about the \f3DiagnosticCommandMBean\fR interface, see the API documentation at http://download\&.java\&.net/jdk8/docs/jre/api/management/extension/com/sun/management/DiagnosticCommandMBean\&.html If you run
\fBjcmd\fR
without arguments or with the
\fB\-l\fR
option, it prints the list of running Java process identifiers with the main class and command\-line arguments that were used to launch the process\&. Running
\fBjcmd\fR
with the
\fB\-h\fR
or
\fB\-help\fR
option prints the tool\(cqs help message\&.
.PP .PP
If you run \f3jcmd\fR without arguments or with the \f3-l\fR option, it prints the list of running Java process identifiers with the main class and command-line arguments that were used to launch the process\&. Running \f3jcmd\fR with the \f3-h\fR or \f3-help\fR option prints the tool\(cqs help message\&. If you specify the processes identifier (\fIpid\fR) or the main class (\fImain\-class\fR) as the first argument,
\fBjcmd\fR
sends the diagnostic command request to the Java process with the specified identifier or to all Java processes with the specified name of the main class\&. You can also send the diagnostic command request to all available Java processes by specifying
\fB0\fR
as the process identifier\&. Use one of the following as the diagnostic command request:
.PP .PP
If you specify the processes identifier (\fIpid\fR) or the main class (\fImain-class\fR) as the first argument, \f3jcmd\fR sends the diagnostic command request to the Java process with the specified identifier or to all Java processes with the specified name of the main class\&. You can also send the diagnostic command request to all available Java processes by specifying \f30\fR as the process identifier\&. Use one of the following as the diagnostic command request:
.TP
Perfcounter\&.print Perfcounter\&.print
.RS 4
Prints the performance counters available for the specified Java process\&. The list of performance counters might vary with the Java process\&. Prints the performance counters available for the specified Java process\&. The list of performance counters might vary with the Java process\&.
.TP .RE
-f \fIfilename\fR .PP
.br \-f \fIfilename\fR
The name of the file from which to read diagnostic commands and send them to the specified Java process\&. Used only with the \f3-f\fR option\&. Each command in the file must be written on a single line\&. Lines starting with a number sign (\f3#\fR) are ignored\&. Processing of the file ends when all lines have been read or when a line containing the \f3stop\fR keyword is read\&. .RS 4
.TP The name of the file from which to read diagnostic commands and send them to the specified Java process\&. Used only with the
\fB\-f\fR
option\&. Each command in the file must be written on a single line\&. Lines starting with a number sign (\fB#\fR) are ignored\&. Processing of the file ends when all lines have been read or when a line containing the
\fBstop\fR
keyword is read\&.
.RE
.PP
\fIcommand\fR [\fIarguments\fR] \fIcommand\fR [\fIarguments\fR]
The command to be sent to the specified Java process\&. The list of available diagnostic commands for a given process can be obtained by sending the \f3help\fR command to this process\&. Each diagnostic command has its own set of arguments\&. To see the description, syntax, and a list of available arguments for a command, use the name of the command as the argument for the \f3help\fR command\&. .RS 4
The command to be sent to the specified Java process\&. The list of available diagnostic commands for a given process can be obtained by sending the
\fINote:\fR If any arguments contain spaces, you must surround them with single or double quotation marks (\f3\&'\fR or \f3"\fR)\&. In addition, you must escape single or double quotation marks with a backslash (\f3\e\fR) to prevent the operating system shell from processing quotation marks\&. Alternatively, you can surround these arguments with single quotation marks and then with double quotation marks (or with double quotation marks and then with single quotation marks)\&. \fBhelp\fR
.SH OPTIONS command to this process\&. Each diagnostic command has its own set of arguments\&. To see the description, syntax, and a list of available arguments for a command, use the name of the command as the argument for the
\fBhelp\fR
command\&.
.sp
\fBNote:\fR
If any arguments contain spaces, you must surround them with single or double quotation marks (\fB\*(Aq\fR
or
\fB"\fR)\&. In addition, you must escape single or double quotation marks with a backslash (\fB\e\fR) to prevent the operating system shell from processing quotation marks\&. Alternatively, you can surround these arguments with single quotation marks and then with double quotation marks (or with double quotation marks and then with single quotation marks)\&.
.RE
.SH "OPTIONS"
.PP
Options are mutually exclusive\&. Options are mutually exclusive\&.
.TP .PP
-f \fIfilename\fR \-f \fIfilename\fR
.br .RS 4
Reads commands from the specified file\&. This option can be used only if you specify the process identifier or the main class as the first argument\&. Each command in the file must be written on a single line\&. Lines starting with a number sign (\f3#\fR) are ignored\&. Processing of the file ends when all lines have been read or when a line containing the \f3stop\fR keyword is read\&. Reads commands from the specified file\&. This option can be used only if you specify the process identifier or the main class as the first argument\&. Each command in the file must be written on a single line\&. Lines starting with a number sign (\fB#\fR) are ignored\&. Processing of the file ends when all lines have been read or when a line containing the
.TP \fBstop\fR
-h, -help keyword is read\&.
.RE
.PP
\-h
.br .br
\-help
.RS 4
Prints a help message\&. Prints a help message\&.
.TP .RE
-l .PP
.br \-l
Prints the list of running Java processes identifiers with the main class and command-line arguments\&. .RS 4
.SH SEE\ ALSO Prints the list of running Java processes identifiers with the main class and command\-line arguments\&.
.TP 0.2i .RE
\(bu .SH "SEE ALSO"
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
jps(1) jps(1)
.RE .RE
.br .br
'pl 8.5i 'pl 8.5i
'bp 'bp
'\" t '\" t
.\" Copyright (c) 1994, 2015, Oracle and/or its affiliates. All rights reserved. .\" Copyright (c) 1994, 2015, Oracle and/or its affiliates. All rights reserved.
.\" .\"
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. .\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
.\" .\"
.\" This code is free software; you can redistribute it and/or modify it .\" This code is free software; you can redistribute it and/or modify it
.\" under the terms of the GNU General Public License version 2 only, as .\" under the terms of the GNU General Public License version 2 only, as
.\" published by the Free Software Foundation. .\" published by the Free Software Foundation.
.\" .\"
.\" This code is distributed in the hope that it will be useful, but WITHOUT .\" This code is distributed in the hope that it will be useful, but WITHOUT
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License .\" 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 .\" version 2 for more details (a copy is included in the LICENSE file that
.\" accompanied this code). .\" accompanied this code).
.\" .\"
.\" You should have received a copy of the GNU General Public License version .\" 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, .\" 2 along with this work; if not, write to the Free Software Foundation,
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. .\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
.\" .\"
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 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 .\" or visit www.oracle.com if you need additional information or have any
.\" questions. .\" questions.
.\" .\"
.\" Arch: generic .\" Title: jjs
.\" Software: JDK 8 .\" Language: English
.\" Date: 03 March 2015 .\" Date: 03 March 2015
.\" SectDesc: Basic Tools .\" SectDesc: Basic Tools
.\" Title: jjs.1 .\" Software: JDK 8
.\" Arch: generic
.\" Part Number: E38207-04
.\" Doc ID: JSSON
.\" .\"
.if n .pl 99999 .if n .pl 99999
.TH jjs 1 "03 March 2015" "JDK 8" "Basic Tools" .TH "jjs" "1" "03 March 2015" "JDK 8" "Basic Tools"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * Define some portability stuff
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673 .\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" disable hyphenation .\" disable hyphenation
.nh .nh
.\" disable justification (adjust text to left margin only) .\" disable justification (adjust text to left margin only)
.ad l .ad l
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE * .\" * MAIN CONTENT STARTS HERE *
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.SH "NAME"
.SH NAME
jjs \- Invokes the Nashorn engine\&. jjs \- Invokes the Nashorn engine\&.
.SH SYNOPSIS .SH "SYNOPSIS"
.sp .sp
.nf .if n \{\
\f3\fBjjs\fR [\fIoptions\fR] [\fIscript\-files\fR] [\-\- \fIarguments\fR]\fP .RS 4
.fi .\}
.sp .nf
.TP \fB\fBjjs\fR\fR\fB [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIscript\-files\fR\fR\fB] [\-\- \fR\fB\fIarguments\fR\fR\fB]\fR
.fi
.if n \{\
.RE
.\}
.PP
\fIoptions\fR \fIoptions\fR
One or more options of the \f3jjs\fR command, separated by spaces\&. For more information, see Options\&. .RS 4
.TP One or more options of the
\fIscript-files\fR \fBjjs\fR
command, separated by spaces\&. For more information, see Options\&.
.RE
.PP
\fIscript\-files\fR
.RS 4
One or more script files which you want to interpret using Nashorn, separated by spaces\&. If no files are specified, an interactive shell is started\&. One or more script files which you want to interpret using Nashorn, separated by spaces\&. If no files are specified, an interactive shell is started\&.
.TP .RE
.PP
\fIarguments\fR \fIarguments\fR
All values after the double hyphen marker (\f3--\fR) are passed through to the script or the interactive shell as arguments\&. These values can be accessed by using the \f3arguments\fR property (see )\&. .RS 4
.SH DESCRIPTION All values after the double hyphen marker (\fB\-\-\fR) are passed through to the script or the interactive shell as arguments\&. These values can be accessed by using the
The \f3jjs\fR command-line tool is used to invoke the Nashorn engine\&. You can use it to interpret one or several script files, or to run an interactive shell\&. \fBarguments\fR
.SH OPTIONS property (see Example 3)\&.
The options of the \f3jjs\fR command control the conditions under which scripts are interpreted by Nashorn\&. .RE
.TP .SH "DESCRIPTION"
-ccs=\fIsize\fR , --class-cache-size=\fIsize\fR .PP
.br The
Sets the class cache size (in bytes)\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes (KB), \f3m\fR or \f3M\fR to indicate megabytes (MB), \f3g\fR or \f3G\fR to indicate gigabytes (GB)\&. By default, the class cache size is set to 50 bytes\&. The following example shows how to set it to 1024 bytes (1 KB): \fBjjs\fR
.sp command\-line tool is used to invoke the Nashorn engine\&. You can use it to interpret one or several script files, or to run an interactive shell\&.
.nf .SH "OPTIONS"
\f3\-css=100\fP .PP
.fi The options of the
.nf \fBjjs\fR
\f3\-css=1k\fP command control the conditions under which scripts are interpreted by Nashorn\&.
.fi .PP
.nf \-cp \fIpath\fR
\f3\fP .br
.fi \-classpath \fIpath\fR
.sp .RS 4
.TP
-co, --compile-only
.br
Compiles the script without running it\&.
.TP
-cp \fIpath\fR , -classpath \fIpath\fR
.br
Specifies the path to the supporting class files To set multiple paths, the option can be repeated, or you can separate each path with a colon (:)\&. Specifies the path to the supporting class files To set multiple paths, the option can be repeated, or you can separate each path with a colon (:)\&.
.TP .RE
-D\fIname\fR=\fIvalue\fR .PP
.br \-D\fIname\fR=\fIvalue\fR
Sets a system property to be passed to the script by assigning a value to a property name\&. The following example shows how to invoke Nashorn in interactive mode and assign \f3myValue\fR to the property named \f3myKey\fR: .RS 4
.sp Sets a system property to be passed to the script by assigning a value to a property name\&. The following example shows how to invoke Nashorn in interactive mode and assign
.nf \fBmyValue\fR
\f3>> \fIjjs \-DmyKey=myValue\fR\fP to the property named
.fi \fBmyKey\fR:
.nf .sp
\f3jjs> \fIjava\&.lang\&.System\&.getProperty("myKey")\fR\fP .if n \{\
.fi .RS 4
.nf .\}
\f3myValue\fP .nf
.fi \fB>> \fR\fB\fBjjs \-DmyKey=myValue\fR\fR
.nf \fBjjs> \fR\fB\fBjava\&.lang\&.System\&.getProperty("myKey")\fR\fR
\f3jjs>\fP \fBmyValue\fR
.fi \fBjjs>\fR
.nf
\f3\fP .fi
.fi .if n \{\
.sp .RE
.\}
This option can be repeated to set multiple properties\&. This option can be repeated to set multiple properties\&.
.TP .RE
-d=\fIpath\fR , --dump-debug-dir=\fIpath\fR .PP
.br \-doe
Specifies the path to the directory where class files are dumped\&.
.TP
--debug-lines
.br
Generates a line number table in the class file\&. By default, this option is enabled\&. To disable it, specify \f3--debug-lines=false\fR\&.
.TP
--debug-locals
.br
Generates a local variable table in the class file\&.
.TP
-doe, --dump-on-error
.br .br
\-\-dump\-on\-error
.RS 4
Provides a full stack trace when an error occurs\&. By default, only a brief error message is printed\&. Provides a full stack trace when an error occurs\&. By default, only a brief error message is printed\&.
.TP .RE
--early-lvalue-error .PP
.br \-fv
Reports invalid lvalue expressions as early errors (that is, when the code is parsed)\&. By default, this option is enabled\&. To disable it, specify \f3--early-lvalue-error=false\fR\&. When disabled, invalid lvalue expressions will not be reported until the code is executed\&.
.TP
--empty-statements
.br
Preserves empty statements in the Java abstract syntax tree\&.
.TP
-fv, --fullversion
.br .br
\-\-fullversion
.RS 4
Prints the full Nashorn version string\&. Prints the full Nashorn version string\&.
.TP .RE
--function-statement-error .PP
.br \-fx
Prints an error message when a function declaration is used as a statement\&. .RS 4
.TP
--function-statement-warning
.br
Prints a warning message when a function declaration is used as a statement\&.
.TP
-fx
.br
Launches the script as a JavaFX application\&. Launches the script as a JavaFX application\&.
.TP .RE
-h, -help .PP
\-h
.br .br
\-help
.RS 4
Prints the list of options and their descriptions\&. Prints the list of options and their descriptions\&.
.TP .RE
-J\fIoption\fR .PP
.br \-\-language=[es5]
Passes the specified \f3java\fR launcher option to the JVM\&. The following example shows how to invoke Nashorn in interactive mode and set the maximum memory used by the JVM to 4 GB: .RS 4
.sp
.nf
\f3>> \fIjjs \-J\-Xmx4g\fR\fP
.fi
.nf
\f3jjs> \fIjava\&.lang\&.Runtime\&.getRuntime()\&.maxMemory()\fR\fP
.fi
.nf
\f33817799680\fP
.fi
.nf
\f3jjs>\fP
.fi
.nf
\f3\fP
.fi
.sp
This option can be repeated to pass multiple \f3java\fR command options\&.
.TP
--language=[es5]
.br
Specifies the ECMAScript language version\&. The default version is ES5\&. Specifies the ECMAScript language version\&. The default version is ES5\&.
.TP .RE
--lazy-compilation .PP
.br \-ot
Enables lazy code generation strategies (that is, the entire script is not compiled at once)\&. This option is experimental\&.
.TP
--loader-per-compile
.br
Creates a new class loader per compile\&. By default, this option is enabled\&. To disable it, specify \f3--loader-per-compile=false\fR\&.
.TP
--log=\fIsubsystem\fR:\fIlevel\fR
.br
Performs logging at a given level for the specified subsystems\&. You can specify logging levels for multiple subsystems separating them with commas\&. For example:
.sp
.nf
\f3\-\-log=fields:finest,codegen:info\fP
.fi
.sp
.TP
--optimistic-types=[true|false]
.br .br
\-\-optimistic\-types=[true|false]
.RS 4
Enables or disables optimistic type assumptions with deoptimizing recompilation\&. Running with optimistic types will yield higher final speed, but may increase warmup time\&. Enables or disables optimistic type assumptions with deoptimizing recompilation\&. Running with optimistic types will yield higher final speed, but may increase warmup time\&.
.TP .RE
--package=\fIname\fR .PP
.br \-scripting
Specifies the package to which generated class files are added\&. .RS 4
.TP
--parse-only
.br
Parses the code without compiling\&.
.TP
--print-ast
.br
Prints the abstract syntax tree\&.
.TP
--print-code
.br
Prints bytecode\&.
.TP
--print-lower-ast
.br
Prints the lowered abstract syntax tree\&.
.TP
--print-lower-parse
.br
Prints the lowered parse tree\&.
.TP
--print-no-newline
.br
Forces other \f3--print*\fR options to print the output on one line\&.
.TP
--print-parse
.br
Prints the parse tree\&.
.TP
--print-symbols
.br
Prints the symbol table\&.
.TP
-pcs, --profile-callsites
.br
Dumps callsite profile data\&.
.TP
-scripting
.br
Enables shell scripting features\&. Enables shell scripting features\&.
.TP .RE
--stderr=\fIfilename\fR|\fIstream\fR|\fItty\fR .PP
.br \-strict
Redirects the standard error stream to the specified file, stream (for example, to \f3stdout\fR), or text terminal\&. .RS 4
.TP
--stdout=\fIfilename\fR|\fIstream\fR|\fItty\fR
.br
Redirects the standard output stream to the specified file, stream (for example, to \f3stderr\fR), or text terminal\&.
.TP
-strict
.br
Enables strict mode, which enforces stronger adherence to the standard (ECMAScript Edition 5\&.1), making it easier to detect common coding errors\&. Enables strict mode, which enforces stronger adherence to the standard (ECMAScript Edition 5\&.1), making it easier to detect common coding errors\&.
.TP .RE
-t=\fIzone\fR , -timezone=\fIzone\fR .PP
.br \-t=\fIzone\fR
Sets the specified time zone for script execution\&. It overrides the time zone set in the OS and used by the \f3Date\fR object\&. .br
.TP \-timezone=\fIzone\fR
-tcs=\fIparameter\fR , --trace-callsites=\fIparameter\fR .RS 4
.br Sets the specified time zone for script execution\&. It overrides the time zone set in the OS and used by the
Enables callsite trace mode\&. Possible parameters are the following: \fBDate\fR
.RS object\&.
.TP .RE
miss .PP
Trace callsite misses\&. \-v
.TP .br
enterexit \-version
Trace callsite enter/exit\&. .RS 4
.TP
objects
Print object properties\&.
.RE
.TP
--verify-code
.br
Verifies bytecode before running\&.
.TP
-v, -version
.br
Prints the Nashorn version string\&. Prints the Nashorn version string\&.
.TP .RE
-xhelp .SH "EXAMPLES"
.br .PP
Prints extended help for command-line options\&. \fBExample 1 \fRRunning a Script with Nashorn
.SH EXAMPLES .RS 4
\f3Example 1 Running a Script with Nashorn\fR .sp
.sp .if n \{\
.nf .RS 4
\f3jjs script\&.js\fP .\}
.fi .nf
.nf \fBjjs script\&.js\fR
\f3\fP
.fi .fi
.sp .if n \{\
\f3Example 2 Running Nashorn in Interactive Mode\fR .RE
.sp .\}
.nf .RE
\f3>> \fIjjs\fR\fP .PP
.fi \fBExample 2 \fRRunning Nashorn in Interactive Mode
.nf .RS 4
\f3jjs> \fIprintln("Hello, World!")\fR\fP .sp
.fi .if n \{\
.nf .RS 4
\f3Hello, World!\fP .\}
.fi .nf
.nf \fB>> \fR\fB\fBjjs\fR\fR
\f3jjs> \fIquit()\fR\fP \fBjjs> \fR\fB\fBprintln("Hello, World!")\fR\fR
.fi \fBHello, World!\fR
.nf \fBjjs> \fR\fB\fBquit()\fR\fR
\f3>>\fP \fB>>\fR
.fi
.nf .fi
\f3\fP .if n \{\
.fi .RE
.sp .\}
\f3Example 3 Passing Arguments to Nashorn\fR .RE
.sp .PP
.nf \fBExample 3 \fRPassing Arguments to Nashorn
\f3>> \fIjjs \-\- a b c\fR\fP .RS 4
.fi .sp
.nf .if n \{\
\f3jjs> \fIarguments\&.join(", ")\fR\fP .RS 4
.fi .\}
.nf .nf
\f3a, b, c\fP \fB>> \fR\fB\fBjjs \-\- a b c\fR\fR
.fi \fBjjs> \fR\fB\fBarguments\&.join(", ")\fR\fR
.nf \fBa, b, c\fR
\f3jjs>\fP \fBjjs>\fR
.fi
.nf .fi
\f3\fP .if n \{\
.fi .RE
.sp .\}
.SH SEE\ ALSO .RE
\f3jrunscript\fR .SH "SEE ALSO"
.RE .PP
.br \fBjrunscript\fR
'pl 8.5i .br
'bp 'pl 8.5i
'bp
此差异已折叠。
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#import <JavaNativeFoundation/JavaNativeFoundation.h> #import <JavaNativeFoundation/JavaNativeFoundation.h>
#import <JavaRuntimeSupport/JavaRuntimeSupport.h> #import <JavaRuntimeSupport/JavaRuntimeSupport.h>
#import "jni_util.h"
#import "NSApplicationAWT.h" #import "NSApplicationAWT.h"
#import "PropertiesUtilities.h" #import "PropertiesUtilities.h"
#import "ThreadUtilities.h" #import "ThreadUtilities.h"
...@@ -436,8 +437,11 @@ JNF_COCOA_ENTER(env); ...@@ -436,8 +437,11 @@ JNF_COCOA_ENTER(env);
} }
JNIEnv* env = [ThreadUtilities getJNIEnvUncached]; JNIEnv* env = [ThreadUtilities getJNIEnvUncached];
jclass jc_ThreadGroupUtils = (*env)->FindClass(env, "sun/misc/ThreadGroupUtils"); jclass jc_ThreadGroupUtils = (*env)->FindClass(env, "sun/misc/ThreadGroupUtils");
CHECK_NULL_RETURN(jc_ThreadGroupUtils, JNI_VERSION_1_4);
jmethodID sjm_getRootThreadGroup = (*env)->GetStaticMethodID(env, jc_ThreadGroupUtils, "getRootThreadGroup", "()Ljava/lang/ThreadGroup;"); jmethodID sjm_getRootThreadGroup = (*env)->GetStaticMethodID(env, jc_ThreadGroupUtils, "getRootThreadGroup", "()Ljava/lang/ThreadGroup;");
CHECK_NULL_RETURN(sjm_getRootThreadGroup, JNI_VERSION_1_4);
jobject rootThreadGroup = (*env)->CallStaticObjectMethod(env, jc_ThreadGroupUtils, sjm_getRootThreadGroup); jobject rootThreadGroup = (*env)->CallStaticObjectMethod(env, jc_ThreadGroupUtils, sjm_getRootThreadGroup);
CHECK_NULL_RETURN(rootThreadGroup, JNI_VERSION_1_4);
[ThreadUtilities setAppkitThreadGroup:(*env)->NewGlobalRef(env, rootThreadGroup)]; [ThreadUtilities setAppkitThreadGroup:(*env)->NewGlobalRef(env, rootThreadGroup)];
// The current thread was attached in getJNIEnvUnchached. // The current thread was attached in getJNIEnvUnchached.
// Detach it back. It will be reattached later if needed with a proper TG // Detach it back. It will be reattached later if needed with a proper TG
......
...@@ -182,7 +182,14 @@ public class EventQueue { ...@@ -182,7 +182,14 @@ public class EventQueue {
private FwDispatcher fwDispatcher; private FwDispatcher fwDispatcher;
private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.EventQueue"); private static volatile PlatformLogger eventLog;
private static final PlatformLogger getEventLog() {
if(eventLog == null) {
eventLog = PlatformLogger.getLogger("java.awt.event.EventQueue");
}
return eventLog;
}
static { static {
AWTAccessor.setEventQueueAccessor( AWTAccessor.setEventQueueAccessor(
...@@ -759,8 +766,8 @@ public class EventQueue { ...@@ -759,8 +766,8 @@ public class EventQueue {
dispatchThread.stopDispatching(); dispatchThread.stopDispatching();
} }
} else { } else {
if (eventLog.isLoggable(PlatformLogger.Level.FINE)) { if (getEventLog().isLoggable(PlatformLogger.Level.FINE)) {
eventLog.fine("Unable to dispatch event: " + event); getEventLog().fine("Unable to dispatch event: " + event);
} }
} }
} }
...@@ -857,8 +864,8 @@ public class EventQueue { ...@@ -857,8 +864,8 @@ public class EventQueue {
* @since 1.2 * @since 1.2
*/ */
public void push(EventQueue newEventQueue) { public void push(EventQueue newEventQueue) {
if (eventLog.isLoggable(PlatformLogger.Level.FINE)) { if (getEventLog().isLoggable(PlatformLogger.Level.FINE)) {
eventLog.fine("EventQueue.push(" + newEventQueue + ")"); getEventLog().fine("EventQueue.push(" + newEventQueue + ")");
} }
pushPopLock.lock(); pushPopLock.lock();
...@@ -883,8 +890,8 @@ public class EventQueue { ...@@ -883,8 +890,8 @@ public class EventQueue {
// Use getNextEventPrivate() as it doesn't call flushPendingEvents() // Use getNextEventPrivate() as it doesn't call flushPendingEvents()
newEventQueue.postEventPrivate(topQueue.getNextEventPrivate()); newEventQueue.postEventPrivate(topQueue.getNextEventPrivate());
} catch (InterruptedException ie) { } catch (InterruptedException ie) {
if (eventLog.isLoggable(PlatformLogger.Level.FINE)) { if (getEventLog().isLoggable(PlatformLogger.Level.FINE)) {
eventLog.fine("Interrupted push", ie); getEventLog().fine("Interrupted push", ie);
} }
} }
} }
...@@ -922,8 +929,8 @@ public class EventQueue { ...@@ -922,8 +929,8 @@ public class EventQueue {
* @since 1.2 * @since 1.2
*/ */
protected void pop() throws EmptyStackException { protected void pop() throws EmptyStackException {
if (eventLog.isLoggable(PlatformLogger.Level.FINE)) { if (getEventLog().isLoggable(PlatformLogger.Level.FINE)) {
eventLog.fine("EventQueue.pop(" + this + ")"); getEventLog().fine("EventQueue.pop(" + this + ")");
} }
pushPopLock.lock(); pushPopLock.lock();
...@@ -945,8 +952,8 @@ public class EventQueue { ...@@ -945,8 +952,8 @@ public class EventQueue {
try { try {
prevQueue.postEventPrivate(topQueue.getNextEventPrivate()); prevQueue.postEventPrivate(topQueue.getNextEventPrivate());
} catch (InterruptedException ie) { } catch (InterruptedException ie) {
if (eventLog.isLoggable(PlatformLogger.Level.FINE)) { if (getEventLog().isLoggable(PlatformLogger.Level.FINE)) {
eventLog.fine("Interrupted pop", ie); getEventLog().fine("Interrupted pop", ie);
} }
} }
} }
......
...@@ -453,7 +453,7 @@ public class Object { ...@@ -453,7 +453,7 @@ public class Object {
"nanosecond timeout value out of range"); "nanosecond timeout value out of range");
} }
if (nanos >= 500000 || (nanos != 0 && timeout == 0)) { if (nanos > 0) {
timeout++; timeout++;
} }
......
...@@ -135,7 +135,7 @@ public final class String ...@@ -135,7 +135,7 @@ public final class String
* unnecessary since Strings are immutable. * unnecessary since Strings are immutable.
*/ */
public String() { public String() {
this.value = new char[0]; this.value = "".value;
} }
/** /**
...@@ -191,8 +191,14 @@ public final class String ...@@ -191,8 +191,14 @@ public final class String
if (offset < 0) { if (offset < 0) {
throw new StringIndexOutOfBoundsException(offset); throw new StringIndexOutOfBoundsException(offset);
} }
if (count < 0) { if (count <= 0) {
throw new StringIndexOutOfBoundsException(count); if (count < 0) {
throw new StringIndexOutOfBoundsException(count);
}
if (offset <= value.length) {
this.value = "".value;
return;
}
} }
// Note: offset or count might be near -1>>>1. // Note: offset or count might be near -1>>>1.
if (offset > value.length - count) { if (offset > value.length - count) {
...@@ -233,8 +239,14 @@ public final class String ...@@ -233,8 +239,14 @@ public final class String
if (offset < 0) { if (offset < 0) {
throw new StringIndexOutOfBoundsException(offset); throw new StringIndexOutOfBoundsException(offset);
} }
if (count < 0) { if (count <= 0) {
throw new StringIndexOutOfBoundsException(count); if (count < 0) {
throw new StringIndexOutOfBoundsException(count);
}
if (offset <= codePoints.length) {
this.value = "".value;
return;
}
} }
// Note: offset or count might be near -1>>>1. // Note: offset or count might be near -1>>>1.
if (offset > codePoints.length - count) { if (offset > codePoints.length - count) {
...@@ -782,7 +794,7 @@ public final class String ...@@ -782,7 +794,7 @@ public final class String
* subarray of {@code dst} starting at index {@code dstBegin} * subarray of {@code dst} starting at index {@code dstBegin}
* and ending at index: * and ending at index:
* <blockquote><pre> * <blockquote><pre>
* dstbegin + (srcEnd-srcBegin) - 1 * dstBegin + (srcEnd-srcBegin) - 1
* </pre></blockquote> * </pre></blockquote>
* *
* @param srcBegin index of the first character in the string * @param srcBegin index of the first character in the string
...@@ -827,7 +839,7 @@ public final class String ...@@ -827,7 +839,7 @@ public final class String
* dst} starting at index {@code dstBegin} and ending at index: * dst} starting at index {@code dstBegin} and ending at index:
* *
* <blockquote><pre> * <blockquote><pre>
* dstbegin + (srcEnd-srcBegin) - 1 * dstBegin + (srcEnd-srcBegin) - 1
* </pre></blockquote> * </pre></blockquote>
* *
* @deprecated This method does not properly convert characters into * @deprecated This method does not properly convert characters into
......
...@@ -846,12 +846,14 @@ public final class Unsafe { ...@@ -846,12 +846,14 @@ public final class Unsafe {
throws InstantiationException; throws InstantiationException;
/** Lock the object. It must get unlocked via {@link #monitorExit}. */ /** Lock the object. It must get unlocked via {@link #monitorExit}. */
@Deprecated
public native void monitorEnter(Object o); public native void monitorEnter(Object o);
/** /**
* Unlock the object. It must have been locked via {@link * Unlock the object. It must have been locked via {@link
* #monitorEnter}. * #monitorEnter}.
*/ */
@Deprecated
public native void monitorExit(Object o); public native void monitorExit(Object o);
/** /**
...@@ -859,6 +861,7 @@ public final class Unsafe { ...@@ -859,6 +861,7 @@ public final class Unsafe {
* whether the lock succeeded. If it did, the object must be * whether the lock succeeded. If it did, the object must be
* unlocked via {@link #monitorExit}. * unlocked via {@link #monitorExit}.
*/ */
@Deprecated
public native boolean tryMonitorEnter(Object o); public native boolean tryMonitorEnter(Object o);
/** Throw the exception without telling the verifier. */ /** Throw the exception without telling the verifier. */
......
...@@ -192,22 +192,6 @@ final class HttpsClient extends HttpClient ...@@ -192,22 +192,6 @@ final class HttpsClient extends HttpClient
return userAgent; return userAgent;
} }
// should remove once HttpClient.newHttpProxy is putback
private static Proxy newHttpProxy(String proxyHost, int proxyPort) {
InetSocketAddress saddr = null;
final String phost = proxyHost;
final int pport = proxyPort < 0 ? httpsPortNumber : proxyPort;
try {
saddr = java.security.AccessController.doPrivileged(new
java.security.PrivilegedExceptionAction<InetSocketAddress>() {
public InetSocketAddress run() {
return new InetSocketAddress(phost, pport);
}});
} catch (java.security.PrivilegedActionException pae) {
}
return new Proxy(Proxy.Type.HTTP, saddr);
}
// CONSTRUCTOR, FACTORY // CONSTRUCTOR, FACTORY
...@@ -251,7 +235,7 @@ final class HttpsClient extends HttpClient ...@@ -251,7 +235,7 @@ final class HttpsClient extends HttpClient
throws IOException { throws IOException {
this(sf, url, this(sf, url,
(proxyHost == null? null: (proxyHost == null? null:
HttpsClient.newHttpProxy(proxyHost, proxyPort)), HttpClient.newHttpProxy(proxyHost, proxyPort, "https")),
connectTimeout); connectTimeout);
} }
...@@ -261,6 +245,11 @@ final class HttpsClient extends HttpClient ...@@ -261,6 +245,11 @@ final class HttpsClient extends HttpClient
HttpsClient(SSLSocketFactory sf, URL url, Proxy proxy, HttpsClient(SSLSocketFactory sf, URL url, Proxy proxy,
int connectTimeout) int connectTimeout)
throws IOException { throws IOException {
PlatformLogger logger = HttpURLConnection.getHttpLogger();
if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
logger.finest("Creating new HttpsClient with url:" + url + " and proxy:" + proxy +
" with connect timeout:" + connectTimeout);
}
this.proxy = proxy; this.proxy = proxy;
setSSLSocketFactory(sf); setSSLSocketFactory(sf);
this.proxyDisabled = true; this.proxyDisabled = true;
...@@ -317,7 +306,7 @@ final class HttpsClient extends HttpClient ...@@ -317,7 +306,7 @@ final class HttpsClient extends HttpClient
return HttpsClient.New(sf, url, hv, return HttpsClient.New(sf, url, hv,
(proxyHost == null? null : (proxyHost == null? null :
HttpsClient.newHttpProxy(proxyHost, proxyPort)), HttpClient.newHttpProxy(proxyHost, proxyPort, "https")),
useCache, connectTimeout, httpuc); useCache, connectTimeout, httpuc);
} }
...@@ -329,6 +318,11 @@ final class HttpsClient extends HttpClient ...@@ -329,6 +318,11 @@ final class HttpsClient extends HttpClient
if (p == null) { if (p == null) {
p = Proxy.NO_PROXY; p = Proxy.NO_PROXY;
} }
PlatformLogger logger = HttpURLConnection.getHttpLogger();
if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
logger.finest("Looking for HttpClient for URL " + url +
" and proxy value of " + p);
}
HttpsClient ret = null; HttpsClient ret = null;
if (useCache) { if (useCache) {
/* see if one's already around */ /* see if one's already around */
...@@ -342,14 +336,13 @@ final class HttpsClient extends HttpClient ...@@ -342,14 +336,13 @@ final class HttpsClient extends HttpClient
if (ret != null) { if (ret != null) {
if ((ret.proxy != null && ret.proxy.equals(p)) || if ((ret.proxy != null && ret.proxy.equals(p)) ||
(ret.proxy == null && p == null)) { (ret.proxy == null && p == Proxy.NO_PROXY)) {
synchronized (ret) { synchronized (ret) {
ret.cachedHttpClient = true; ret.cachedHttpClient = true;
assert ret.inCache; assert ret.inCache;
ret.inCache = false; ret.inCache = false;
if (httpuc != null && ret.needsTunneling()) if (httpuc != null && ret.needsTunneling())
httpuc.setTunnelState(TUNNELING); httpuc.setTunnelState(TUNNELING);
PlatformLogger logger = HttpURLConnection.getHttpLogger();
if (logger.isLoggable(PlatformLogger.Level.FINEST)) { if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
logger.finest("KeepAlive stream retrieved from the cache, " + ret); logger.finest("KeepAlive stream retrieved from the cache, " + ret);
} }
...@@ -360,6 +353,9 @@ final class HttpsClient extends HttpClient ...@@ -360,6 +353,9 @@ final class HttpsClient extends HttpClient
// This should be fine as it is very rare that a connection // This should be fine as it is very rare that a connection
// to the same host will not use the same proxy. // to the same host will not use the same proxy.
synchronized(ret) { synchronized(ret) {
if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
logger.finest("Not returning this connection to cache: " + ret);
}
ret.inCache = false; ret.inCache = false;
ret.closeServer(); ret.closeServer();
} }
......
...@@ -763,9 +763,9 @@ public class Config { ...@@ -763,9 +763,9 @@ public class Config {
private static String trimmed(String s) { private static String trimmed(String s) {
s = s.trim(); s = s.trim();
if (s.isEmpty()) return s; if (s.length() >= 2 &&
if (s.charAt(0) == '"' && s.charAt(s.length()-1) == '"' || ((s.charAt(0) == '"' && s.charAt(s.length()-1) == '"') ||
s.charAt(0) == '\'' && s.charAt(s.length()-1) == '\'') { (s.charAt(0) == '\'' && s.charAt(s.length()-1) == '\''))) {
s = s.substring(1, s.length()-1).trim(); s = s.substring(1, s.length()-1).trim();
} }
return s; return s;
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
...@@ -43,8 +43,8 @@ static jfieldID key_st_ino; /* id for FileKey.st_ino */ ...@@ -43,8 +43,8 @@ static jfieldID key_st_ino; /* id for FileKey.st_ino */
JNIEXPORT void JNICALL JNIEXPORT void JNICALL
Java_sun_nio_ch_FileKey_initIDs(JNIEnv *env, jclass clazz) Java_sun_nio_ch_FileKey_initIDs(JNIEnv *env, jclass clazz)
{ {
key_st_dev = (*env)->GetFieldID(env, clazz, "st_dev", "J"); CHECK_NULL(key_st_dev = (*env)->GetFieldID(env, clazz, "st_dev", "J"));
key_st_ino = (*env)->GetFieldID(env, clazz, "st_ino", "J"); CHECK_NULL(key_st_ino = (*env)->GetFieldID(env, clazz, "st_ino", "J"));
} }
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册