aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorasaha <none@none>2014-06-26 07:54:37 -0700
committerasaha <none@none>2014-06-26 07:54:37 -0700
commit3ddb7dde79bd071799cb2f737420e58ef099f395 (patch)
tree1a6eaf9f14cf21c90c6c37b92b2d967902070878
parent3129d799b401b8f9197dd38119ef830fe3983b2f (diff)
parent8f9fe9ab3bfb48e477a7fabd91f95e002184e92a (diff)
Merge
-rw-r--r--.hgtags1
-rw-r--r--THIRD_PARTY_README2
-rw-r--r--make/CompileLaunchers.gmk2
-rw-r--r--make/lib/Awt2dLibraries.gmk2
-rw-r--r--make/lib/CoreLibraries.gmk6
-rw-r--r--make/mapfiles/libawt/mapfile-vers1
-rw-r--r--src/aix/native/java/net/aix_close.c52
-rw-r--r--src/bsd/doc/man/java.15052
-rw-r--r--src/bsd/doc/man/javac.13242
-rw-r--r--src/bsd/doc/man/javap.1791
-rw-r--r--src/linux/doc/man/java.15052
-rw-r--r--src/linux/doc/man/javac.13242
-rw-r--r--src/linux/doc/man/javap.1791
-rw-r--r--src/macosx/classes/com/apple/laf/AquaComboBoxPopup.java4
-rw-r--r--src/macosx/classes/sun/lwawt/LWChoicePeer.java4
-rw-r--r--src/macosx/classes/sun/lwawt/LWComponentPeer.java2
-rw-r--r--src/macosx/classes/sun/lwawt/LWWindowPeer.java6
-rw-r--r--src/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java3
-rw-r--r--src/macosx/classes/sun/lwawt/macosx/CPlatformLWWindow.java31
-rw-r--r--src/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java7
-rw-r--r--src/macosx/classes/sun/lwawt/macosx/CPlatformView.java2
-rw-r--r--src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java24
-rw-r--r--src/macosx/classes/sun/lwawt/macosx/CWrapper.java13
-rw-r--r--src/macosx/classes/sun/lwawt/macosx/NSEvent.java10
-rw-r--r--src/macosx/native/sun/awt/AWTView.m9
-rw-r--r--src/macosx/native/sun/awt/AWTWindow.m6
-rw-r--r--src/macosx/native/sun/awt/CGraphicsDevice.m2
-rw-r--r--src/macosx/native/sun/awt/CWrapper.m32
-rw-r--r--src/share/classes/com/sun/jndi/ldap/Connection.java6
-rw-r--r--src/share/classes/java/awt/geom/Path2D.java6
-rw-r--r--src/share/classes/java/lang/Class.java132
-rw-r--r--src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java5
-rw-r--r--src/share/classes/java/lang/invoke/LambdaForm.java2
-rw-r--r--src/share/classes/java/lang/invoke/LambdaMetafactory.java3
-rw-r--r--src/share/classes/java/lang/invoke/MethodHandleImpl.java3
-rw-r--r--src/share/classes/java/lang/invoke/MethodHandles.java23
-rw-r--r--src/share/classes/java/lang/invoke/MethodTypeForm.java6
-rw-r--r--src/share/classes/java/lang/reflect/Executable.java2
-rw-r--r--src/share/classes/java/time/Instant.java5
-rw-r--r--src/share/classes/java/time/OffsetDateTime.java9
-rw-r--r--src/share/classes/java/time/ZonedDateTime.java15
-rw-r--r--src/share/classes/java/time/format/DateTimeFormatterBuilder.java2
-rw-r--r--src/share/classes/java/time/format/Parsed.java91
-rw-r--r--src/share/classes/java/time/temporal/IsoFields.java22
-rw-r--r--src/share/classes/java/time/temporal/WeekFields.java3
-rw-r--r--src/share/classes/java/util/HashMap.java2
-rw-r--r--src/share/classes/java/util/zip/ZipInputStream.java3
-rw-r--r--src/share/classes/javax/swing/DefaultDesktopManager.java10
-rw-r--r--src/share/classes/javax/swing/JComboBox.java16
-rw-r--r--src/share/classes/javax/swing/JComponent.java9
-rw-r--r--src/share/classes/javax/swing/JDialog.java1
-rw-r--r--src/share/classes/javax/swing/JViewport.java22
-rw-r--r--src/share/classes/javax/swing/PopupFactory.java26
-rw-r--r--src/share/classes/javax/swing/RepaintManager.java42
-rw-r--r--src/share/classes/javax/swing/plaf/metal/MetalTabbedPaneUI.java5
-rw-r--r--src/share/classes/jdk/internal/org/objectweb/asm/ClassWriter.java28
-rw-r--r--src/share/classes/jdk/internal/org/objectweb/asm/Frame.java18
-rw-r--r--src/share/classes/jdk/internal/org/objectweb/asm/Item.java3
-rw-r--r--src/share/classes/jdk/internal/org/objectweb/asm/Label.java2
-rw-r--r--src/share/classes/jdk/internal/org/objectweb/asm/MethodWriter.java125
-rw-r--r--src/share/classes/jdk/internal/org/objectweb/asm/Type.java6
-rw-r--r--src/share/classes/jdk/internal/org/objectweb/asm/commons/InstructionAdapter.java2
-rw-r--r--src/share/classes/jdk/internal/org/objectweb/asm/commons/Method.java4
-rw-r--r--src/share/classes/jdk/internal/org/objectweb/asm/commons/Remapper.java12
-rw-r--r--src/share/classes/jdk/internal/org/objectweb/asm/commons/SerialVersionUIDAdder.java4
-rw-r--r--src/share/classes/jdk/internal/org/objectweb/asm/tree/MethodNode.java1
-rw-r--r--src/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/AnalyzerException.java1
-rw-r--r--src/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Frame.java10
-rw-r--r--src/share/classes/jdk/internal/org/objectweb/asm/util/ASMifier.java1
-rw-r--r--src/share/classes/jdk/internal/org/objectweb/asm/util/CheckClassAdapter.java16
-rw-r--r--src/share/classes/jdk/internal/org/objectweb/asm/util/Textifier.java2
-rw-r--r--src/share/classes/jdk/internal/org/objectweb/asm/version.txt8
-rw-r--r--src/share/classes/jdk/net/ExtendedSocketOptions.java2
-rw-r--r--src/share/classes/jdk/net/NetworkPermission.java2
-rw-r--r--src/share/classes/jdk/net/SocketFlow.java4
-rw-r--r--src/share/classes/jdk/net/Sockets.java2
-rw-r--r--src/share/classes/jdk/net/package-info.java2
-rw-r--r--src/share/classes/sun/awt/LightweightFrame.java45
-rw-r--r--src/share/classes/sun/awt/image/FileImageSource.java4
-rw-r--r--src/share/classes/sun/java2d/SunGraphics2D.java23
-rw-r--r--src/share/classes/sun/java2d/opengl/OGLBlitLoops.java68
-rw-r--r--src/share/classes/sun/security/krb5/KdcComm.java30
-rw-r--r--src/share/classes/sun/security/smartcardio/CardImpl.java2
-rw-r--r--src/share/classes/sun/security/tools/jarsigner/Main.java22
-rw-r--r--src/share/classes/sun/swing/JLightweightFrame.java169
-rw-r--r--src/share/classes/sun/swing/LightweightContent.java54
-rw-r--r--src/share/classes/sun/swing/SwingAccessor.java36
-rw-r--r--src/share/classes/sun/swing/SwingUtilities2.java7
-rw-r--r--src/share/classes/sun/text/resources/es/FormatData_es_DO.java4
-rw-r--r--src/share/native/java/util/zip/zlib-1.2.8/ChangeLog (renamed from src/share/native/java/util/zip/zlib-1.2.5/ChangeLog)266
-rw-r--r--src/share/native/java/util/zip/zlib-1.2.8/README (renamed from src/share/native/java/util/zip/zlib-1.2.5/README)24
-rw-r--r--src/share/native/java/util/zip/zlib-1.2.8/compress.c (renamed from src/share/native/java/util/zip/zlib-1.2.5/compress.c)2
-rw-r--r--src/share/native/java/util/zip/zlib-1.2.8/crc32.h (renamed from src/share/native/java/util/zip/zlib-1.2.5/crc32.h)2
-rw-r--r--src/share/native/java/util/zip/zlib-1.2.8/deflate.c (renamed from src/share/native/java/util/zip/zlib-1.2.5/deflate.c)263
-rw-r--r--src/share/native/java/util/zip/zlib-1.2.8/deflate.h (renamed from src/share/native/java/util/zip/zlib-1.2.5/deflate.h)12
-rw-r--r--src/share/native/java/util/zip/zlib-1.2.8/gzclose.c (renamed from src/share/native/java/util/zip/zlib-1.2.5/gzclose.c)0
-rw-r--r--src/share/native/java/util/zip/zlib-1.2.8/gzguts.h (renamed from src/share/native/java/util/zip/zlib-1.2.5/gzguts.h)103
-rw-r--r--src/share/native/java/util/zip/zlib-1.2.8/gzlib.c (renamed from src/share/native/java/util/zip/zlib-1.2.5/gzlib.c)199
-rw-r--r--src/share/native/java/util/zip/zlib-1.2.8/gzread.c (renamed from src/share/native/java/util/zip/zlib-1.2.5/gzread.c)431
-rw-r--r--src/share/native/java/util/zip/zlib-1.2.8/gzwrite.c (renamed from src/share/native/java/util/zip/zlib-1.2.5/gzwrite.c)196
-rw-r--r--src/share/native/java/util/zip/zlib-1.2.8/infback.c (renamed from src/share/native/java/util/zip/zlib-1.2.5/infback.c)16
-rw-r--r--src/share/native/java/util/zip/zlib-1.2.8/inffast.c (renamed from src/share/native/java/util/zip/zlib-1.2.5/inffast.c)6
-rw-r--r--src/share/native/java/util/zip/zlib-1.2.8/inffast.h (renamed from src/share/native/java/util/zip/zlib-1.2.5/inffast.h)0
-rw-r--r--src/share/native/java/util/zip/zlib-1.2.8/inffixed.h (renamed from src/share/native/java/util/zip/zlib-1.2.5/inffixed.h)6
-rw-r--r--src/share/native/java/util/zip/zlib-1.2.8/inflate.c (renamed from src/share/native/java/util/zip/zlib-1.2.5/inflate.c)136
-rw-r--r--src/share/native/java/util/zip/zlib-1.2.8/inflate.h (renamed from src/share/native/java/util/zip/zlib-1.2.5/inflate.h)0
-rw-r--r--src/share/native/java/util/zip/zlib-1.2.8/inftrees.c (renamed from src/share/native/java/util/zip/zlib-1.2.5/inftrees.c)54
-rw-r--r--src/share/native/java/util/zip/zlib-1.2.8/inftrees.h (renamed from src/share/native/java/util/zip/zlib-1.2.5/inftrees.h)0
-rw-r--r--src/share/native/java/util/zip/zlib-1.2.8/patches/ChangeLog_java (renamed from src/share/native/java/util/zip/zlib-1.2.5/patches/ChangeLog_java)0
-rw-r--r--src/share/native/java/util/zip/zlib-1.2.8/trees.c (renamed from src/share/native/java/util/zip/zlib-1.2.5/trees.c)54
-rw-r--r--src/share/native/java/util/zip/zlib-1.2.8/trees.h (renamed from src/share/native/java/util/zip/zlib-1.2.5/trees.h)0
-rw-r--r--src/share/native/java/util/zip/zlib-1.2.8/uncompr.c (renamed from src/share/native/java/util/zip/zlib-1.2.5/uncompr.c)4
-rw-r--r--src/share/native/java/util/zip/zlib-1.2.8/zadler32.c (renamed from src/share/native/java/util/zip/zlib-1.2.5/zadler32.c)68
-rw-r--r--src/share/native/java/util/zip/zlib-1.2.8/zconf.h (renamed from src/share/native/java/util/zip/zlib-1.2.5/zconf.h)202
-rw-r--r--src/share/native/java/util/zip/zlib-1.2.8/zcrc32.c (renamed from src/share/native/java/util/zip/zlib-1.2.5/zcrc32.c)83
-rw-r--r--src/share/native/java/util/zip/zlib-1.2.8/zlib.h (renamed from src/share/native/java/util/zip/zlib-1.2.5/zlib.h)345
-rw-r--r--src/share/native/java/util/zip/zlib-1.2.8/zutil.c (renamed from src/share/native/java/util/zip/zlib-1.2.5/zutil.c)26
-rw-r--r--src/share/native/java/util/zip/zlib-1.2.8/zutil.h (renamed from src/share/native/java/util/zip/zlib-1.2.5/zutil.h)103
-rw-r--r--src/share/native/sun/awt/giflib/dgif_lib.c5
-rw-r--r--src/share/native/sun/java2d/opengl/OGLBlitLoops.c82
-rw-r--r--src/share/native/sun/security/smartcardio/pcsc.c195
-rw-r--r--src/solaris/classes/sun/awt/X11/XErrorHandlerUtil.java15
-rw-r--r--src/solaris/classes/sun/awt/X11/XFramePeer.java5
-rw-r--r--src/solaris/classes/sun/awt/X11/XNETProtocol.java29
-rw-r--r--src/solaris/doc/sun/man/man1/java.15052
-rw-r--r--src/solaris/doc/sun/man/man1/javac.13242
-rw-r--r--src/solaris/doc/sun/man/man1/javap.1791
-rw-r--r--src/solaris/native/java/net/ExtendedOptionsImpl.c6
-rw-r--r--src/solaris/native/java/net/NetworkInterface.c52
-rw-r--r--src/solaris/native/sun/awt/gtk2_interface.c2
-rw-r--r--src/solaris/native/sun/nio/ch/FileChannelImpl.c45
-rw-r--r--src/solaris/native/sun/security/smartcardio/MUSCLE/pcsclite.h19
-rw-r--r--src/solaris/native/sun/security/smartcardio/pcsc_md.c37
-rw-r--r--src/solaris/native/sun/xawt/XlibWrapper.c4
-rw-r--r--src/windows/classes/sun/awt/windows/WWindowPeer.java4
-rw-r--r--src/windows/lib/tzmappings9
-rw-r--r--src/windows/native/java/io/WinNTFileSystem_md.c17
-rw-r--r--src/windows/native/java/io/io_util_md.c31
-rw-r--r--src/windows/native/java/lang/ProcessEnvironment_md.c22
-rw-r--r--src/windows/native/java/lang/ProcessImpl_md.c40
-rw-r--r--src/windows/native/java/net/DualStackPlainDatagramSocketImpl.c16
-rw-r--r--src/windows/native/java/net/NetworkInterface.c37
-rw-r--r--src/windows/native/java/util/WindowsPreferences.c67
-rw-r--r--src/windows/native/sun/net/dns/ResolverConfigurationImpl.c27
-rw-r--r--src/windows/native/sun/net/www/protocol/http/ntlm/NTLMAuthSequence.c26
-rw-r--r--src/windows/native/sun/nio/fs/WindowsNativeDispatcher.c14
-rw-r--r--src/windows/native/sun/windows/awt_Dialog.cpp3
-rw-r--r--src/windows/native/sun/windows/awt_InputMethod.cpp2
-rw-r--r--src/windows/native/sun/windows/awt_List.cpp4
-rw-r--r--test/com/sun/jndi/ldap/LdapTimeoutTest.java45
-rw-r--r--test/java/awt/Choice/RemoveAllShrinkTest/RemoveAllShrinkTest.java85
-rw-r--r--test/java/awt/Dialog/CloseDialog/CloseDialogTest.java116
-rw-r--r--test/java/awt/FullScreen/AltTabCrashTest/AltTabCrashTest.java480
-rw-r--r--test/java/awt/Graphics2D/ScaledCopyArea/ScaledCopyArea.java60
-rw-r--r--test/java/awt/Multiscreen/MouseEventTest/MouseEventTest.java99
-rw-r--r--test/java/awt/geom/Path2D/EmptyCapacity.java42
-rw-r--r--test/java/awt/image/DrawImage/IncorrectAlphaSurface2SW.java161
-rw-r--r--test/java/awt/image/DrawImage/IncorrectClipSurface2SW.java166
-rw-r--r--test/java/awt/image/DrawImage/IncorrectDestinationOffset.java164
-rw-r--r--test/java/awt/image/DrawImage/IncorrectSourceOffset.java100
-rw-r--r--test/java/awt/image/ImageIconHang.java48
-rw-r--r--test/java/lang/annotation/typeAnnotations/TestExecutableGetAnnotatedType.java277
-rw-r--r--test/java/lang/invoke/VMAnonymousClass.java118
-rw-r--r--test/java/lang/invoke/lookup/SpecialStatic.java194
-rw-r--r--test/java/lang/reflect/DefaultMethodMembers/FilterNotMostSpecific.java691
-rw-r--r--test/java/time/tck/java/time/format/TCKDateTimeParseResolver.java101
-rw-r--r--test/java/time/test/java/time/format/TestDateTimeParsing.java204
-rw-r--r--test/java/time/test/java/time/temporal/TestIsoWeekFields.java280
-rw-r--r--test/java/util/HashMap/PutNullKey.java90
-rw-r--r--test/javax/swing/JComboBox/8019180/Test8019180.java68
-rw-r--r--test/javax/swing/JDialog/WrongBackgroundColor/WrongBackgroundColor.java62
-rw-r--r--test/javax/swing/JFrame/HangNonVolatileBuffer/HangNonVolatileBuffer.java53
-rw-r--r--test/javax/swing/JTabbedPane/8007563/Test8007563.java124
-rw-r--r--test/javax/xml/ws/8043129/MailTest.java148
-rw-r--r--test/javax/xml/ws/8043129/javax.mail.jarbin0 -> 571102 bytes
-rw-r--r--test/jdk/net/Sockets/Test.java21
-rw-r--r--test/sun/security/krb5/auto/AddressesAndNameType.java85
-rw-r--r--test/sun/security/krb5/auto/KDC.java32
-rw-r--r--test/sun/security/krb5/auto/UdpTcp.java71
-rw-r--r--test/sun/security/krb5/etype/UnsupportedKeyType.java77
-rw-r--r--test/sun/security/pkcs11/KeyStore/SecretKeysBasic.java9
-rw-r--r--test/sun/security/pkcs11/PKCS11Test.java58
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-amd64/freebl3.chkbin478 -> 899 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-amd64/freebl3.dllbin445440 -> 484864 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-amd64/libnspr4.dllbin241664 -> 242688 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-amd64/libnspr4.libbin86162 -> 86802 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-amd64/libplc4.dllbin17408 -> 16896 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-amd64/libplc4.libbin9104 -> 9104 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-amd64/libplds4.dllbin14336 -> 14336 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-amd64/libplds4.libbin6920 -> 7202 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-amd64/nss3.dllbin1052160 -> 990720 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-amd64/nss3.libbin178038 -> 183514 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-amd64/nssckbi.dllbin435200 -> 489984 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-amd64/nssdbm3.chkbin478 -> 899 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-amd64/nssdbm3.dllbin142336 -> 132608 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-amd64/nssutil3.dllbin120320 -> 139776 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-amd64/nssutil3.libbin41542 -> 48398 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-amd64/softokn3.chkbin478 -> 899 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-amd64/softokn3.dllbin263168 -> 247296 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-amd64/sqlite3.dllbin562688 -> 632320 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-amd64/ssl3.dllbin241152 -> 273920 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-amd64/ssl3.libbin17208 -> 21712 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-i586/freebl3.chkbin478 -> 899 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-i586/freebl3.dllbin307351 -> 336384 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-i586/libnspr4.dllbin213116 -> 201216 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-i586/libnspr4.libbin88388 -> 88814 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-i586/libplc4.dllbin28801 -> 14848 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-i586/libplc4.libbin9534 -> 9306 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-i586/libplds4.dllbin24700 -> 13312 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-i586/libplds4.libbin7266 -> 7324 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-i586/nss3.dllbin774270 -> 809472 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-i586/nss3.libbin182040 -> 187396 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-i586/nssckbi.dllbin381067 -> 414720 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-i586/nssdbm3.chkbin478 -> 899 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-i586/nssdbm3.dllbin114831 -> 105472 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-i586/nssutil3.dllbin102531 -> 110592 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-i586/nssutil3.libbin42550 -> 49336 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-i586/softokn3.chkbin478 -> 899 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-i586/softokn3.dllbin204935 -> 196608 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-i586/sqlite3.dllbin331908 -> 485376 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-i586/ssl3.dllbin204926 -> 226816 bytes
-rw-r--r--test/sun/security/pkcs11/nss/lib/windows-i586/ssl3.libbin17760 -> 22138 bytes
-rw-r--r--test/sun/security/pkcs11/nss/src/MD5SUMS1
-rw-r--r--test/sun/security/pkcs11/nss/src/SHA1SUMS1
-rw-r--r--test/sun/security/pkcs11/nss/src/nss-3.13.1.tar.gzbin5985329 -> 0 bytes
-rw-r--r--test/sun/security/pkcs11/nss/src/nss-3.16_nspr-4.10_src.tar.gzbin0 -> 5898265 bytes
-rw-r--r--test/sun/security/pkcs11/nss/src/nss-3.16_nspr-4.10_src.tar.gz.sha2561
-rw-r--r--test/sun/security/tools/jarsigner/certpolicy.sh80
-rw-r--r--test/sun/security/tools/keytool/autotest.sh4
-rw-r--r--test/sun/security/tools/policytool/i18n.sh2
-rw-r--r--test/sun/text/resources/Format/Bug8037343.java71
-rw-r--r--test/sun/text/resources/LocaleData8
-rw-r--r--test/sun/text/resources/LocaleDataTest.java2
233 files changed, 24686 insertions, 11895 deletions
diff --git a/.hgtags b/.hgtags
index 459ac28a3..99038b721 100644
--- a/.hgtags
+++ b/.hgtags
@@ -303,3 +303,4 @@ d723d05cd17afd5c4dd4293bcba83fef44a3c0bb jdk8u20-b16
31433e5da5bcfd107381f281058dc80377f04d23 jdk8u20-b17
266302e9c31172984493404d5b223979315b59ac jdk8u20-b18
38548d32c91cfa57b1d31eec0a5e79c936e86f11 jdk8u20-b19
+5c0406ee9e820140b5322db006baed199c165b4f jdk8u20-b20
diff --git a/THIRD_PARTY_README b/THIRD_PARTY_README
index ce0181054..e16cd2ab6 100644
--- a/THIRD_PARTY_README
+++ b/THIRD_PARTY_README
@@ -1471,7 +1471,7 @@ source code repository. It is licensed under Mozilla Public License (MPL),
version 2.0.
The NSS libraries are supplied in executable form, built from unmodified
-NSS source code labeled with the "NSS_3.13.1_RTM" release tag.
+NSS source code labeled with the "NSS_3_16_RTM" HG tag.
The NSS source code is available in the OpenJDK source code repository at:
jdk/test/sun/security/pkcs11/nss/src
diff --git a/make/CompileLaunchers.gmk b/make/CompileLaunchers.gmk
index 85434c1df..b9a759718 100644
--- a/make/CompileLaunchers.gmk
+++ b/make/CompileLaunchers.gmk
@@ -429,7 +429,7 @@ ifeq ($(USE_EXTERNAL_LIBZ), true)
UNPACKEXE_CFLAGS := -DSYSTEM_ZLIB
UNPACKEXE_ZIPOBJS := -lz
else
- UNPACKEXE_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
+ UNPACKEXE_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.8
UNPACKEXE_ZIPOBJS := $(JDK_OUTPUTDIR)/objs/libzip/zcrc32$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/deflate$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/trees$(OBJ_SUFFIX) \
diff --git a/make/lib/Awt2dLibraries.gmk b/make/lib/Awt2dLibraries.gmk
index fe2c1c048..f1703fd6c 100644
--- a/make/lib/Awt2dLibraries.gmk
+++ b/make/lib/Awt2dLibraries.gmk
@@ -1242,7 +1242,7 @@ ifndef BUILD_HEADLESS_ONLY
LIBSPLASHSCREEN_LDFLAGS_SUFFIX :=
ifneq ($(USE_EXTERNAL_LIBZ), true)
- LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
+ LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.8
LIBSPLASHSCREEN_CFLAGS += $(ZLIB_CPPFLAGS)
endif
diff --git a/make/lib/CoreLibraries.gmk b/make/lib/CoreLibraries.gmk
index e5e12c32f..bc7f357ae 100644
--- a/make/lib/CoreLibraries.gmk
+++ b/make/lib/CoreLibraries.gmk
@@ -230,9 +230,9 @@ $(BUILD_LIBJAVA): $(BUILD_LIBFDLIBM)
BUILD_LIBZIP_EXCLUDES :=
ifeq ($(USE_EXTERNAL_LIBZ), true)
LIBZ := -lz
- LIBZIP_EXCLUDES += zlib-1.2.5
+ LIBZIP_EXCLUDES += zlib-1.2.8
else
- ZLIB_CPPFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
+ ZLIB_CPPFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.8
endif
BUILD_LIBZIP_REORDER :=
@@ -384,7 +384,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
endif
ifneq ($(USE_EXTERNAL_LIBZ), true)
- BUILD_LIBJLI_SRC_DIRS += $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
+ BUILD_LIBJLI_SRC_DIRS += $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.8
LIBJLI_CFLAGS += $(ZLIB_CPPFLAGS)
BUILD_LIBJLI_FILES += \
inflate.c \
diff --git a/make/mapfiles/libawt/mapfile-vers b/make/mapfiles/libawt/mapfile-vers
index 05ca7d538..0c981e54b 100644
--- a/make/mapfiles/libawt/mapfile-vers
+++ b/make/mapfiles/libawt/mapfile-vers
@@ -155,6 +155,7 @@ SUNWprivate_1.1 {
g_CMpDataID;
colorValueID;
mul8table;
+ div8table;
jvm;
# ProcessPath entry points and data
diff --git a/src/aix/native/java/net/aix_close.c b/src/aix/native/java/net/aix_close.c
index e6e64ff5e..303ddf98a 100644
--- a/src/aix/native/java/net/aix_close.c
+++ b/src/aix/native/java/net/aix_close.c
@@ -359,7 +359,57 @@ int NET_Accept(int s, struct sockaddr *addr, int *addrlen) {
}
int NET_Connect(int s, struct sockaddr *addr, int addrlen) {
- BLOCKING_IO_RETURN_INT( s, connect(s, addr, addrlen) );
+ int crc = -1, prc = -1;
+ threadEntry_t self;
+ fdEntry_t* fdEntry = getFdEntry(s);
+
+ if (fdEntry == NULL) {
+ errno = EBADF;
+ return -1;
+ }
+
+ /* On AIX, when the system call connect() is interrupted, the connection
+ * is not aborted and it will be established asynchronously by the kernel.
+ * Hence, no need to restart connect() when EINTR is received
+ */
+ startOp(fdEntry, &self);
+ crc = connect(s, addr, addrlen);
+ endOp(fdEntry, &self);
+
+ if (crc == -1 && errno == EINTR) {
+ struct pollfd s_pollfd;
+ int sockopt_arg = 0;
+ socklen_t len;
+
+ s_pollfd.fd = s;
+ s_pollfd.events = POLLOUT | POLLERR;
+
+ /* poll the file descriptor */
+ do {
+ startOp(fdEntry, &self);
+ prc = poll(&s_pollfd, 1, -1);
+ endOp(fdEntry, &self);
+ } while (prc == -1 && errno == EINTR);
+
+ if (prc < 0)
+ return prc;
+
+ len = sizeof(sockopt_arg);
+
+ /* Check whether the connection has been established */
+ if (getsockopt(s, SOL_SOCKET, SO_ERROR, &sockopt_arg, &len) == -1)
+ return -1;
+
+ if (sockopt_arg != 0 ) {
+ errno = sockopt_arg;
+ return -1;
+ }
+ } else {
+ return crc;
+ }
+
+ /* At this point, fd is connected. Set successful return code */
+ return 0;
}
#ifndef USE_SELECT
diff --git a/src/bsd/doc/man/java.1 b/src/bsd/doc/man/java.1
index f32570f38..bc8f1f105 100644
--- a/src/bsd/doc/man/java.1
+++ b/src/bsd/doc/man/java.1
@@ -1,2001 +1,3461 @@
'\" t
-.\" Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
-.\"
-.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-.\"
-.\" This code is free software; you can redistribute it and/or modify it
-.\" under the terms of the GNU General Public License version 2 only, as
-.\" published by the Free Software Foundation.
-.\"
-.\" 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.
-.\"
-.\" Arch: generic
-.\" Software: JDK 8
-.\" Date: 21 November 2013
-.\" SectDesc: Basic Tools
-.\" Title: java.1
+.\" Copyright (c) 1994, 2014, Oracle and/or its affiliates. All rights reserved.
+.\"
+.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+.\"
+.\" This code is free software; you can redistribute it and/or modify it
+.\" under the terms of the GNU General Public License version 2 only, as
+.\" published by the Free Software Foundation.
+.\"
+.\" 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.
+.\"
+.\" Title: java
+.\" Language: English
+.\" Date: 08 August 2014
+.\" SectDesc: Basic Tools
+.\" Software: JDK 8
+.\" Arch: generic
+.\" Part Number: E38207-03
.\"
.if n .pl 99999
-.TH java 1 "21 November 2013" "JDK 8" "Basic Tools"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-
-.SH NAME
+.TH "java" "1" "08 August 2014" "JDK 8" "Basic Tools"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
java \- Launches a Java application\&.
-.SH SYNOPSIS
-.sp
-.nf
-
+.SH "SYNOPSIS"
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
\fBjava\fR [\fIoptions\fR] \fIclassname\fR [\fIargs\fR]
-.fi
-.nf
-
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
\fBjava\fR [\fIoptions\fR] \fB\-jar\fR \fIfilename\fR [\fIargs\fR]
-.fi
-.sp
-.TP
+.fi
+.if n \{\
+.RE
+.\}
+.PP
\fIoptions\fR
-Command-line options separated by spaces\&. See Options\&.
-.TP
+.RS 4
+Command\-line options separated by spaces\&. See Options\&.
+.RE
+.PP
\fIclassname\fR
+.RS 4
The name of the class to be launched\&.
-.TP
+.RE
+.PP
\fIfilename\fR
-The name of the Java Archive (JAR) file to be called\&. Used only with the \f3-jar\fR option\&.
-.TP
+.RS 4
+The name of the Java Archive (JAR) file to be called\&. Used only with the
+\fB\-jar\fR
+option\&.
+.RE
+.PP
\fIargs\fR
-The arguments passed to the \f3main()\fR method separated by spaces\&.
-.SH DESCRIPTION
-The \f3java\fR command starts a Java application\&. It does this by starting the Java Runtime Environment (JRE), loading the specified class, and calling that class\&'s \f3main()\fR method\&. The method must be declared \fIpublic\fR and \fIstatic\fR, it must not return any value, and it must accept a \f3String\fR array as a parameter\&. The method declaration has the following form:
-.sp
-.nf
-\f3public static void main(String[] args)\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-The \f3java\fR command can be used to launch a JavaFX application by loading a class that either has a \f3main()\fR method or that extends \f3javafx\&.application\&.Application\fR\&. In the latter case, the launcher constructs an instance of the \f3Application\fR class, calls its \f3init()\fR method, and then calls the \f3start(javafx\&.stage\&.Stage)\fR method\&.
-.PP
-By default, the first argument that is not an option of the \f3java\fR command is the fully qualified name of the class to be called\&. If the \f3-jar\fR option is specified, its argument is the name of the JAR file containing class and resource files for the application\&. The startup class must be indicated by the \f3Main-Class\fR manifest header in its source code\&.
+.RS 4
+The arguments passed to the
+\fBmain()\fR
+method separated by spaces\&.
+.RE
+.SH "DESCRIPTION"
+.PP
+The
+\fBjava\fR
+command starts a Java application\&. It does this by starting the Java Runtime Environment (JRE), loading the specified class, and calling that class\*(Aqs
+\fBmain()\fR
+method\&. The method must be declared
+\fIpublic\fR
+and
+\fIstatic\fR, it must not return any value, and it must accept a
+\fBString\fR
+array as a parameter\&. The method declaration has the following form:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBpublic static void main(String[] args)\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+The
+\fBjava\fR
+command can be used to launch a JavaFX application by loading a class that either has a
+\fBmain()\fR
+method or that extends
+\fBjavafx\&.application\&.Application\fR\&. In the latter case, the launcher constructs an instance of the
+\fBApplication\fR
+class, calls its
+\fBinit()\fR
+method, and then calls the
+\fBstart(javafx\&.stage\&.Stage)\fR
+method\&.
+.PP
+By default, the first argument that is not an option of the
+\fBjava\fR
+command is the fully qualified name of the class to be called\&. If the
+\fB\-jar\fR
+option is specified, its argument is the name of the JAR file containing class and resource files for the application\&. The startup class must be indicated by the
+\fBMain\-Class\fR
+manifest header in its source code\&.
.PP
The JRE searches for the startup class (and other classes used by the application) in three sets of locations: the bootstrap class path, the installed extensions, and the user\(cqs class path\&.
.PP
-Arguments after the class file name or the JAR file name are passed to the \f3main()\fR method\&.
-.SH OPTIONS
-The \f3java\fR command supports a wide range of options that can be divided into the following categories:
-.TP 0.2i
-\(bu
+Arguments after the class file name or the JAR file name are passed to the
+\fBmain()\fR
+method\&.
+.SH "OPTIONS"
+.PP
+The
+\fBjava\fR
+command supports a wide range of options that can be divided into the following categories:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
Standard Options
-.TP 0.2i
-\(bu
-Non-Standard Options
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Non\-Standard Options
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
Advanced Runtime Options
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
Advanced JIT Compiler Options
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
Advanced Serviceability Options
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
Advanced Garbage Collection Options
+.RE
.PP
Standard options are guaranteed to be supported by all implementations of the Java Virtual Machine (JVM)\&. They are used for common actions, such as checking the version of the JRE, setting the class path, enabling verbose output, and so on\&.
.PP
-Non-standard options are general purpose options that are specific to the Java HotSpot Virtual Machine, so they are not guaranteed to be supported by all JVM implementations, and are subject to change\&. These options start with \f3-X\fR\&.
+Non\-standard options are general purpose options that are specific to the Java HotSpot Virtual Machine, so they are not guaranteed to be supported by all JVM implementations, and are subject to change\&. These options start with
+\fB\-X\fR\&.
.PP
-Advanced options are not recommended for casual use\&. These are developer options used for tuning specific areas of the Java HotSpot Virtual Machine operation that often have specific system requirements and may require privileged access to system configuration parameters\&. They are also not guaranteed to be supported by all JVM implementations, and are subject to change\&. Advanced options start with \f3-XX\fR\&.
+Advanced options are not recommended for casual use\&. These are developer options used for tuning specific areas of the Java HotSpot Virtual Machine operation that often have specific system requirements and may require privileged access to system configuration parameters\&. They are also not guaranteed to be supported by all JVM implementations, and are subject to change\&. Advanced options start with
+\fB\-XX\fR\&.
.PP
To keep track of the options that were deprecated or removed in the latest release, there is a section named Deprecated and Removed Options at the end of the document\&.
.PP
-Boolean options are used to either enable a feature that is disabled by default or disable a feature that is enabled by default\&. Such options do not require a parameter\&. Boolean \f3-XX\fR options are enabled using the plus sign (\f3-XX:+\fR\fIOptionName\fR) and disabled using the minus sign (\f3-XX:-\fR\fIOptionName\fR)\&.
+Boolean options are used to either enable a feature that is disabled by default or disable a feature that is enabled by default\&. Such options do not require a parameter\&. Boolean
+\fB\-XX\fR
+options are enabled using the plus sign (\fB\-XX:+\fR\fIOptionName\fR) and disabled using the minus sign (\fB\-XX:\-\fR\fIOptionName\fR)\&.
+.PP
+For options that require an argument, the argument may be separated from the option name by a space, a colon (:), or an equal sign (=), or the argument may directly follow the option (the exact syntax differs for each option)\&. If you are expected to specify the size in bytes, you can use no suffix, or use the suffix
+\fBk\fR
+or
+\fBK\fR
+for kilobytes (KB),
+\fBm\fR
+or
+\fBM\fR
+for megabytes (MB),
+\fBg\fR
+or
+\fBG\fR
+for gigabytes (GB)\&. For example, to set the size to 8 GB, you can specify either
+\fB8g\fR,
+\fB8192m\fR,
+\fB8388608k\fR, or
+\fB8589934592\fR
+as the argument\&. If you are expected to specify the percentage, use a number from 0 to 1 (for example, specify
+\fB0\&.25\fR
+for 25%)\&.
+.SS "Standard Options"
.PP
-For options that require an argument, the argument may be separated from the option name by a space, a colon (:), or an equal sign (=), or the argument may directly follow the option (the exact syntax differs for each option)\&. If you are expected to specify the size in bytes, you can use no suffix, or use the suffix \f3k\fR or \f3K\fR for kilobytes (KB), \f3m\fR or \f3M\fR for megabytes (MB), \f3g\fR or \f3G\fR for gigabytes (GB)\&. For example, to set the size to 8 GB, you can specify either \f38g\fR, \f38192m\fR, \f38388608k\fR, or \f38589934592\fR as the argument\&. If you are expected to specify the percentage, use a number from 0 to 1 (for example, specify \f30\&.25\fR for 25%)\&.
-.SS STANDARD\ OPTIONS
These are the most commonly used options that are supported by all implementations of the JVM\&.
-.TP
--agentlib:\fIlibname\fR[=\fIoptions\fR]
-.br
-Loads the specified native agent library\&. After the library name, a comma-separated list of options specific to the library can be used\&.
-
-If the option \f3-agentlib:foo\fR is specified, then the JVM attempts to load the library named \f3libfoo\&.so\fR in the location specified by the \f3LD_LIBRARY_PATH\fR system variable (on OS X this variable is \f3DYLD_LIBRARY_PATH\fR)\&.
-
+.PP
+\-agentlib:\fIlibname\fR[=\fIoptions\fR]
+.RS 4
+Loads the specified native agent library\&. After the library name, a comma\-separated list of options specific to the library can be used\&.
+.sp
+If the option
+\fB\-agentlib:foo\fR
+is specified, then the JVM attempts to load the library named
+\fBlibfoo\&.so\fR
+in the location specified by the
+\fBLD_LIBRARY_PATH\fR
+system variable (on OS X this variable is
+\fBDYLD_LIBRARY_PATH\fR)\&.
+.sp
The following example shows how to load the heap profiling tool (HPROF) library and get sample CPU information every 20 ms, with a stack depth of 3:
-.sp
-.nf
-\f3\-agentlib:hprof=cpu=samples,interval=20,depth=3\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-agentlib:hprof=cpu=samples,interval=20,depth=3\fR
+
+.fi
+.if n \{\
+.RE
+.\}
The following example shows how to load the Java Debug Wire Protocol (JDWP) library and listen for the socket connection on port 8000, suspending the JVM before the main class loads:
-.sp
-.nf
-\f3\-agentlib:jdwp=transport=dt_socket,server=y,address=8000\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-agentlib:jdwp=transport=dt_socket,server=y,address=8000\fR
+
+.fi
+.if n \{\
+.RE
+.\}
For more information about the native agent libraries, refer to the following:
-.RS
-.TP 0.2i
-\(bu
-The \f3java\&.lang\&.instrument\fR package description at http://docs\&.oracle\&.com/javase/8/docs/api/java/lang/instrument/package-summary\&.html
-.TP 0.2i
-\(bu
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+The
+\fBjava\&.lang\&.instrument\fR
+package description at http://docs\&.oracle\&.com/javase/8/docs/api/java/lang/instrument/package\-summary\&.html
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
Agent Command Line Options in the JVM Tools Interface guide at http://docs\&.oracle\&.com/javase/8/docs/platform/jvmti/jvmti\&.html#starting
-.RE
-
-.TP
--agentpath:\fIpathname\fR[=\fIoptions\fR]
-.br
-Loads the native agent library specified by the absolute path name\&. This option is equivalent to \f3-agentlib\fR but uses the full path and file name of the library\&.
-.TP
--client
-.br
-Selects the Java HotSpot Client VM\&. The 64-bit version of the Java SE Development Kit (JDK) currently ignores this option and instead uses the Server JVM\&.
+.RE
+.RE
+.PP
+\-agentpath:\fIpathname\fR[=\fIoptions\fR]
+.RS 4
+Loads the native agent library specified by the absolute path name\&. This option is equivalent to
+\fB\-agentlib\fR
+but uses the full path and file name of the library\&.
+.RE
+.PP
+\-client
+.RS 4
+Selects the Java HotSpot Client VM\&. The 64\-bit version of the Java SE Development Kit (JDK) currently ignores this option and instead uses the Server JVM\&.
+.sp
+For default JVM selection, see Server\-Class Machine Detection at
-For default JVM selection, see Server-Class Machine Detection at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/server-class\&.html
-.TP
--D\fIproperty\fR=\fIvalue\fR
-.br
-Sets a system property value\&. The \fIproperty\fR variable is a string with no spaces that represents the name of the property\&. The \fIvalue\fR variable is a string that represents the value of the property\&. If \fIvalue\fR is a string with spaces, then enclose it in quotation marks (for example \f3-Dfoo="foo bar"\fR)\&.
-.TP
--d32
-.br
-Runs the application in a 32-bit environment\&. If a 32-bit environment is not installed or is not supported, then an error will be reported\&. By default, the application is run in a 32-bit environment unless a 64-bit system is used\&.
-.TP
--d64
+http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/server\-class\&.html
+.RE
+.PP
+\-D\fIproperty\fR=\fIvalue\fR
+.RS 4
+Sets a system property value\&. The
+\fIproperty\fR
+variable is a string with no spaces that represents the name of the property\&. The
+\fIvalue\fR
+variable is a string that represents the value of the property\&. If
+\fIvalue\fR
+is a string with spaces, then enclose it in quotation marks (for example
+\fB\-Dfoo="foo bar"\fR)\&.
+.RE
+.PP
+\-d32
+.RS 4
+Runs the application in a 32\-bit environment\&. If a 32\-bit environment is not installed or is not supported, then an error will be reported\&. By default, the application is run in a 32\-bit environment unless a 64\-bit system is used\&.
+.RE
+.PP
+\-d64
+.RS 4
+Runs the application in a 64\-bit environment\&. If a 64\-bit environment is not installed or is not supported, then an error will be reported\&. By default, the application is run in a 32\-bit environment unless a 64\-bit system is used\&.
+.sp
+Currently only the Java HotSpot Server VM supports 64\-bit operation, and the
+\fB\-server\fR
+option is implicit with the use of
+\fB\-d64\fR\&. The
+\fB\-client\fR
+option is ignored with the use of
+\fB\-d64\fR\&. This is subject to change in a future release\&.
+.RE
+.PP
+\-disableassertions[:[\fIpackagename\fR]\&.\&.\&.|:\fIclassname\fR]
.br
-Runs the application in a 64-bit environment\&. If a 64-bit environment is not installed or is not supported, then an error will be reported\&. By default, the application is run in a 32-bit environment unless a 64-bit system is used\&.
-
-Currently only the Java HotSpot Server VM supports 64-bit operation, and the \f3-server\fR option is implicit with the use of \f3-d64\fR\&. The \f3-client\fR option is ignored with the use of \f3-d64\fR\&. This is subject to change in a future release\&.
-.TP
+\-da[:[\fIpackagename\fR]\&.\&.\&.|:\fIclassname\fR]
+.RS 4
+Disables assertions\&. By default, assertions are disabled in all packages and classes\&.
+.sp
+With no arguments,
+\fB\-disableassertions\fR
+(\fB\-da\fR) disables assertions in all packages and classes\&. With the
+\fIpackagename\fR
+argument ending in
+\fB\&.\&.\&.\fR, the switch disables assertions in the specified package and any subpackages\&. If the argument is simply
+\fB\&.\&.\&.\fR, then the switch disables assertions in the unnamed package in the current working directory\&. With the
+\fIclassname\fR
+argument, the switch disables assertions in the specified class\&.
+.sp
+The
+\fB\-disableassertions\fR
+(\fB\-da\fR) option applies to all class loaders and to system classes (which do not have a class loader)\&. There is one exception to this rule: if the option is provided with no arguments, then it does not apply to system classes\&. This makes it easy to disable assertions in all classes except for system classes\&. The
+\fB\-disablesystemassertions\fR
+option enables you to disable assertions in all system classes\&.
+.sp
+To explicitly enable assertions in specific packages or classes, use the
+\fB\-enableassertions\fR
+(\fB\-ea\fR) option\&. Both options can be used at the same time\&. For example, to run the
+\fBMyClass\fR
+application with assertions enabled in package
+\fBcom\&.wombat\&.fruitbat\fR
+(and any subpackages) but disabled in class
+\fBcom\&.wombat\&.fruitbat\&.Brickbat\fR, use the following command:
+.sp
+.if n \{\
+.RS 4
+.\}
.nf
--disableassertions[:[\fIpackagename\fR]\&.\&.\&.|:\fIclassname\fR], -da[:[\fIpackagename\fR]\&.\&.\&.|:\fIclassname\fR]
-.br
+\fBjava \-ea:com\&.wombat\&.fruitbat\&.\&.\&. \-da:com\&.wombat\&.fruitbat\&.Brickbat MyClass\fR
+
.fi
-Disables assertions\&. By default, assertions are disabled in all packages and classes\&.
-
-With no arguments, \f3-disableassertions\fR (\f3-da\fR) disables assertions in all packages and classes\&. With the \fIpackagename\fR argument ending in \f3\&.\&.\&.\fR, the switch disables assertions in the specified package and any subpackages\&. If the argument is simply \f3\&.\&.\&.\fR, then the switch disables assertions in the unnamed package in the current working directory\&. With the \fIclassname\fR argument\f3\fR, the switch disables assertions in the specified class\&.
-
-The \f3-disableassertions\fR (\f3-da\fR) option applies to all class loaders and to system classes (which do not have a class loader)\&. There is one exception to this rule: if the option is provided with no arguments, then it does not apply to system classes\&. This makes it easy to disable assertions in all classes except for system classes\&. The \f3-disablesystemassertions\fR option enables you to disable assertions in all system classes\&.
-
-To explicitly enable assertions in specific packages or classes, use the \f3-enableassertions\fR (\f3-ea\fR) option\&. Both options can be used at the same time\&. For example, to run the \f3MyClass\fR application with assertions enabled in package \f3com\&.wombat\&.fruitbat\fR (and any subpackages) but disabled in class \f3com\&.wombat\&.fruitbat\&.Brickbat\fR, use the following command:
-.sp
-.nf
-\f3java \-ea:com\&.wombat\&.fruitbat\&.\&.\&. \-da:com\&.wombat\&.fruitbat\&.Brickbat MyClass\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--disablesystemassertions, -dsa
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-disablesystemassertions
.br
+\-dsa
+.RS 4
Disables assertions in all system classes\&.
-.TP
-.nf
--enableassertions[:[\fIpackagename\fR]\&.\&.\&.|:\fIclassname\fR], -ea[:[\fIpackagename\fR]\&.\&.\&.|:\fIclassname\fR]
+.RE
+.PP
+\-enableassertions[:[\fIpackagename\fR]\&.\&.\&.|:\fIclassname\fR]
.br
-.fi
+\-ea[:[\fIpackagename\fR]\&.\&.\&.|:\fIclassname\fR]
+.RS 4
Enables assertions\&. By default, assertions are disabled in all packages and classes\&.
-
-With no arguments, \f3-enableassertions\fR (\f3-ea\fR) enables assertions in all packages and classes\&. With the \fIpackagename\fR argument ending in \f3\&.\&.\&.\fR, the switch enables assertions in the specified package and any subpackages\&. If the argument is simply \f3\&.\&.\&.\fR, then the switch enables assertions in the unnamed package in the current working directory\&. With the \fIclassname\fR argument\f3\fR, the switch enables assertions in the specified class\&.
-
-The \f3-enableassertions\fR (\f3-ea\fR) option applies to all class loaders and to system classes (which do not have a class loader)\&. There is one exception to this rule: if the option is provided with no arguments, then it does not apply to system classes\&. This makes it easy to enable assertions in all classes except for system classes\&. The \f3-enablesystemassertions\fR option provides a separate switch to enable assertions in all system classes\&.
-
-To explicitly disable assertions in specific packages or classes, use the \f3-disableassertions\fR (\f3-da\fR) option\&. If a single command contains multiple instances of these switches, then they are processed in order before loading any classes\&. For example, to run the \f3MyClass\fR application with assertions enabled only in package \f3com\&.wombat\&.fruitbat\fR (and any subpackages) but disabled in class \f3com\&.wombat\&.fruitbat\&.Brickbat\fR, use the following command:
-.sp
-.nf
-\f3java \-ea:com\&.wombat\&.fruitbat\&.\&.\&. \-da:com\&.wombat\&.fruitbat\&.Brickbat MyClass\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--enablesystemassertions, -esa
+.sp
+With no arguments,
+\fB\-enableassertions\fR
+(\fB\-ea\fR) enables assertions in all packages and classes\&. With the
+\fIpackagename\fR
+argument ending in
+\fB\&.\&.\&.\fR, the switch enables assertions in the specified package and any subpackages\&. If the argument is simply
+\fB\&.\&.\&.\fR, then the switch enables assertions in the unnamed package in the current working directory\&. With the
+\fIclassname\fR
+argument, the switch enables assertions in the specified class\&.
+.sp
+The
+\fB\-enableassertions\fR
+(\fB\-ea\fR) option applies to all class loaders and to system classes (which do not have a class loader)\&. There is one exception to this rule: if the option is provided with no arguments, then it does not apply to system classes\&. This makes it easy to enable assertions in all classes except for system classes\&. The
+\fB\-enablesystemassertions\fR
+option provides a separate switch to enable assertions in all system classes\&.
+.sp
+To explicitly disable assertions in specific packages or classes, use the
+\fB\-disableassertions\fR
+(\fB\-da\fR) option\&. If a single command contains multiple instances of these switches, then they are processed in order before loading any classes\&. For example, to run the
+\fBMyClass\fR
+application with assertions enabled only in package
+\fBcom\&.wombat\&.fruitbat\fR
+(and any subpackages) but disabled in class
+\fBcom\&.wombat\&.fruitbat\&.Brickbat\fR, use the following command:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjava \-ea:com\&.wombat\&.fruitbat\&.\&.\&. \-da:com\&.wombat\&.fruitbat\&.Brickbat MyClass\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-enablesystemassertions
.br
+\-esa
+.RS 4
Enables assertions in all system classes\&.
-.TP
--help, -?
-.br
-Displays usage information for the \f3java\fR command without actually running the JVM\&.
-.TP
--jar \fIfilename\fR
+.RE
+.PP
+\-help
.br
-Executes a program encapsulated in a JAR file\&. The \fIfilename\fR argument is the name of a JAR file with a manifest that contains a line in the form \f3Main-Class:\fR\fIclassname\fR that defines the class with the \f3public static void main(String[] args)\fR method that serves as your application\&'s starting point\&.
-
-When you use the \f3-jar\fR option, the specified JAR file is the source of all user classes, and other class path settings are ignored\&.
-
+\-?
+.RS 4
+Displays usage information for the
+\fBjava\fR
+command without actually running the JVM\&.
+.RE
+.PP
+\-jar \fIfilename\fR
+.RS 4
+Executes a program encapsulated in a JAR file\&. The
+\fIfilename\fR
+argument is the name of a JAR file with a manifest that contains a line in the form
+\fBMain\-Class:\fR\fIclassname\fR
+that defines the class with the
+\fBpublic static void main(String[] args)\fR
+method that serves as your application\*(Aqs starting point\&.
+.sp
+When you use the
+\fB\-jar\fR
+option, the specified JAR file is the source of all user classes, and other class path settings are ignored\&.
+.sp
For more information about JAR files, see the following resources:
-.RS
-.TP 0.2i
-\(bu
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
jar(1)
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
The Java Archive (JAR) Files guide at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/jar/index\&.html
-.TP 0.2i
-\(bu
-Lesson: Packaging Programs in JAR Files at http://docs\&.oracle\&.com/javase/tutorial/deployment/jar/index\&.html
-.RE
-
-.TP
--javaagent:\fIjarpath\fR[=\fIoptions\fR]
-.br
-Loads the specified Java programming language agent\&. For more information about instrumenting Java applications, see the \f3java\&.lang\&.instrument\fR package description in the Java API documentation at http://docs\&.oracle\&.com/javase/8/docs/api/java/lang/instrument/package-summary\&.html
-.TP
--jre-restrict-search
-.br
-Includes user-private JREs in the version search\&.
-.TP
--no-jre-restrict-search
-.br
-Excludes user-private JREs from the version search\&.
-.TP
--server
-.br
-Selects the Java HotSpot Server VM\&. The 64-bit version of the JDK supports only the Server VM, so in that case the option is implicit\&.
-
-For default JVM selection, see Server-Class Machine Detection at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/server-class\&.html
-.TP
--showversion
-.br
-Displays version information and continues execution of the application\&. This option is equivalent to the \f3-version\fR option except that the latter instructs the JVM to exit after displaying version information\&.
-.TP
--splash:\fIimgname\fR
-.br
-Shows the splash screen with the image specified by \fIimgname\fR\&. For example, to show the \f3splash\&.gif\fR file from the \f3images\fR directory when starting your application, use the following option:
-.sp
-.nf
-\f3\-splash:images/splash\&.gif\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Lesson: Packaging Programs in JAR Files at
+
+http://docs\&.oracle\&.com/javase/tutorial/deployment/jar/index\&.html
+.RE
+.RE
+.PP
+\-javaagent:\fIjarpath\fR[=\fIoptions\fR]
+.RS 4
+Loads the specified Java programming language agent\&. For more information about instrumenting Java applications, see the
+\fBjava\&.lang\&.instrument\fR
+package description in the Java API documentation at http://docs\&.oracle\&.com/javase/8/docs/api/java/lang/instrument/package\-summary\&.html
+.RE
+.PP
+\-jre\-restrict\-search
+.RS 4
+Includes user\-private JREs in the version search\&.
+.RE
+.PP
+\-no\-jre\-restrict\-search
+.RS 4
+Excludes user\-private JREs from the version search\&.
+.RE
+.PP
+\-server
+.RS 4
+Selects the Java HotSpot Server VM\&. The 64\-bit version of the JDK supports only the Server VM, so in that case the option is implicit\&.
+.sp
+For default JVM selection, see Server\-Class Machine Detection at
-.TP
--verbose:class
-.br
+http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/server\-class\&.html
+.RE
+.PP
+\-showversion
+.RS 4
+Displays version information and continues execution of the application\&. This option is equivalent to the
+\fB\-version\fR
+option except that the latter instructs the JVM to exit after displaying version information\&.
+.RE
+.PP
+\-splash:\fIimgname\fR
+.RS 4
+Shows the splash screen with the image specified by
+\fIimgname\fR\&. For example, to show the
+\fBsplash\&.gif\fR
+file from the
+\fBimages\fR
+directory when starting your application, use the following option:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-splash:images/splash\&.gif\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-verbose:class
+.RS 4
Displays information about each loaded class\&.
-.TP
--verbose:gc
-.br
+.RE
+.PP
+\-verbose:gc
+.RS 4
Displays information about each garbage collection (GC) event\&.
-.TP
--verbose:jni
-.br
+.RE
+.PP
+\-verbose:jni
+.RS 4
Displays information about the use of native methods and other Java Native Interface (JNI) activity\&.
-.TP
--version
-.br
-Displays version information and then exits\&. This option is equivalent to the \f3-showversion\fR option except that the latter does not instruct the JVM to exit after displaying version information\&.
-.TP
--version:\fIrelease\fR
-.br
-Specifies the release version to be used for running the application\&. If the version of the \f3java\fR command called does not meet this specification and an appropriate implementation is found on the system, then the appropriate implementation will be used\&.
-
-The \fIrelease\fR argument specifies either the exact version string, or a list of version strings and ranges separated by spaces\&. A \fIversion string\fR is the developer designation of the version number in the following form: \f31\&.\fR\fIx\fR\f3\&.0_\fR\fIu\fR (where \fIx\fR is the major version number, and \fIu\fR is the update version number)\&. A \fIversion range\fR is made up of a version string followed by a plus sign (\f3+\fR) to designate this version or later, or a part of a version string followed by an asterisk (\f3*\fR) to designate any version string with a matching prefix\&. Version strings and ranges can be combined using a space for a logical \fIOR\fR combination, or an ampersand (\f3&\fR) for a logical \fIAND\fR combination of two version strings/ranges\&. For example, if running the class or JAR file requires either JRE 6u13 (1\&.6\&.0_13), or any JRE 6 starting from 6u10 (1\&.6\&.0_10), specify the following:
-.sp
-.nf
-\f3\-version:"1\&.6\&.0_13 1\&.6* & 1\&.6\&.0_10+"\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-Quotation marks are necessary only if there are spaces in the \fIrelease\fR parameter\&.
-
+.RE
+.PP
+\-version
+.RS 4
+Displays version information and then exits\&. This option is equivalent to the
+\fB\-showversion\fR
+option except that the latter does not instruct the JVM to exit after displaying version information\&.
+.RE
+.PP
+\-version:\fIrelease\fR
+.RS 4
+Specifies the release version to be used for running the application\&. If the version of the
+\fBjava\fR
+command called does not meet this specification and an appropriate implementation is found on the system, then the appropriate implementation will be used\&.
+.sp
+The
+\fIrelease\fR
+argument specifies either the exact version string, or a list of version strings and ranges separated by spaces\&. A
+\fIversion string\fR
+is the developer designation of the version number in the following form:
+\fB1\&.\fR\fIx\fR\fB\&.0_\fR\fIu\fR
+(where
+\fIx\fR
+is the major version number, and
+\fIu\fR
+is the update version number)\&. A
+\fIversion range\fR
+is made up of a version string followed by a plus sign (\fB+\fR) to designate this version or later, or a part of a version string followed by an asterisk (\fB*\fR) to designate any version string with a matching prefix\&. Version strings and ranges can be combined using a space for a logical
+\fIOR\fR
+combination, or an ampersand (\fB&\fR) for a logical
+\fIAND\fR
+combination of two version strings/ranges\&. For example, if running the class or JAR file requires either JRE 6u13 (1\&.6\&.0_13), or any JRE 6 starting from 6u10 (1\&.6\&.0_10), specify the following:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-version:"1\&.6\&.0_13 1\&.6* & 1\&.6\&.0_10+"\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Quotation marks are necessary only if there are spaces in the
+\fIrelease\fR
+parameter\&.
+.sp
For JAR files, the preference is to specify version requirements in the JAR file manifest rather than on the command line\&.
-.SS NON-STANDARD\ OPTIONS
+.RE
+.SS "Non\-Standard Options"
+.PP
These options are general purpose options that are specific to the Java HotSpot Virtual Machine\&.
-.TP
--X
-.br
-Displays help for all available \f3-X\fR options\&.
-.TP
--Xbatch
-.br
-Disables background compilation\&. By default, the JVM compiles the method as a background task, running the method in interpreter mode until the background compilation is finished\&. The \f3-Xbatch\fR flag disables background compilation so that compilation of all methods proceeds as a foreground task until completed\&.
-
-This option is equivalent to \f3-XX:-BackgroundCompilation\fR\&.
-.TP
--Xbootclasspath:\fIpath\fR
-.br
+.PP
+\-X
+.RS 4
+Displays help for all available
+\fB\-X\fR
+options\&.
+.RE
+.PP
+\-Xbatch
+.RS 4
+Disables background compilation\&. By default, the JVM compiles the method as a background task, running the method in interpreter mode until the background compilation is finished\&. The
+\fB\-Xbatch\fR
+flag disables background compilation so that compilation of all methods proceeds as a foreground task until completed\&.
+.sp
+This option is equivalent to
+\fB\-XX:\-BackgroundCompilation\fR\&.
+.RE
+.PP
+\-Xbootclasspath:\fIpath\fR
+.RS 4
Specifies a list of directories, JAR files, and ZIP archives separated by colons (:) to search for boot class files\&. These are used in place of the boot class files included in the JDK\&.
-
-\fI\fRDo not deploy applications that use this option to override a class in \f3rt\&.jar\fR, because this violates the JRE binary code license\&.
-.TP
--Xbootclasspath/a:\fIpath\fR
-.br
+.sp
+Do not deploy applications that use this option to override a class in
+\fBrt\&.jar\fR, because this violates the JRE binary code license\&.
+.RE
+.PP
+\-Xbootclasspath/a:\fIpath\fR
+.RS 4
Specifies a list of directories, JAR files, and ZIP archives separated by colons (:) to append to the end of the default bootstrap class path\&.
-
-Do not deploy applications that use this option to override a class in \f3rt\&.jar\fR, because this violates the JRE binary code license\&.
-.TP
--Xbootclasspath/p:\fIpath\fR
-.br
+.sp
+Do not deploy applications that use this option to override a class in
+\fBrt\&.jar\fR, because this violates the JRE binary code license\&.
+.RE
+.PP
+\-Xbootclasspath/p:\fIpath\fR
+.RS 4
Specifies a list of directories, JAR files, and ZIP archives separated by colons (:) to prepend to the front of the default bootstrap class path\&.
-
-Do not deploy applications that use this option to override a class in \f3rt\&.jar\fR, because this violates the JRE binary code license\&.
-.TP
--Xboundthreads
-.br
-Binds user-level threads to kernel threads\&.
-.TP
--Xcheck:jni
-.br
+.sp
+Do not deploy applications that use this option to override a class in
+\fBrt\&.jar\fR, because this violates the JRE binary code license\&.
+.RE
+.PP
+\-Xcheck:jni
+.RS 4
Performs additional checks for Java Native Interface (JNI) functions\&. Specifically, it validates the parameters passed to the JNI function and the runtime environment data before processing the JNI request\&. Any invalid data encountered indicates a problem in the native code, and the JVM will terminate with an irrecoverable error in such cases\&. Expect a performance degradation when this option is used\&.
-.TP
--Xcomp
-.br
-Forces compilation of methods on first invocation\&. By default, the Client VM (\f3-client\fR) performs 1,000 interpreted method invocations and the Server VM (\f3-server\fR) performs 10,000 interpreted method invocations to gather information for efficient compilation\&. Specifying the \f3-Xcomp\fR option disables interpreted method invocations to increase compilation performance at the expense of efficiency\&.
-
-You can also change the number of interpreted method invocations before compilation using the \f3-XX:CompileThreshold\fR option\&.
-.TP
--Xdebug
-.br
+.RE
+.PP
+\-Xcomp
+.RS 4
+Forces compilation of methods on first invocation\&. By default, the Client VM (\fB\-client\fR) performs 1,000 interpreted method invocations and the Server VM (\fB\-server\fR) performs 10,000 interpreted method invocations to gather information for efficient compilation\&. Specifying the
+\fB\-Xcomp\fR
+option disables interpreted method invocations to increase compilation performance at the expense of efficiency\&.
+.sp
+You can also change the number of interpreted method invocations before compilation using the
+\fB\-XX:CompileThreshold\fR
+option\&.
+.RE
+.PP
+\-Xdebug
+.RS 4
Does nothing\&. Provided for backward compatibility\&.
-.TP
--Xdiag
-.br
+.RE
+.PP
+\-Xdiag
+.RS 4
Shows additional diagnostic messages\&.
-.TP
--Xfuture
-.br
-Enables strict class-file format checks that enforce close conformance to the class-file format specification\&. Developers are encouraged to use this flag when developing new code because the stricter checks will become the default in future releases\&.
-.TP
--Xint
-.br
-Runs the application in interpreted-only mode\&. Compilation to native code is disabled, and all bytecode is executed by the interpreter\&. The performance benefits offered by the just in time (JIT) compiler are not present in this mode\&.
-.TP
--Xinternalversion
-.br
-Displays more detailed JVM version information than the \f3-version\fR option, and then exits\&.
-.TP
--Xloggc:\fIfilename\fR
-.br
-Sets the file to which verbose GC events information should be redirected for logging\&. The information written to this file is similar to the output of \f3-verbose:gc\fR with the time elapsed since the first GC event preceding each logged event\&. The \f3-Xloggc\fR option overrides \f3-verbose:gc\fR if both are given with the same \f3java\fR command\&.
-
+.RE
+.PP
+\-Xfuture
+.RS 4
+Enables strict class\-file format checks that enforce close conformance to the class\-file format specification\&. Developers are encouraged to use this flag when developing new code because the stricter checks will become the default in future releases\&.
+.RE
+.PP
+\-Xint
+.RS 4
+Runs the application in interpreted\-only mode\&. Compilation to native code is disabled, and all bytecode is executed by the interpreter\&. The performance benefits offered by the just in time (JIT) compiler are not present in this mode\&.
+.RE
+.PP
+\-Xinternalversion
+.RS 4
+Displays more detailed JVM version information than the
+\fB\-version\fR
+option, and then exits\&.
+.RE
+.PP
+\-Xloggc:\fIfilename\fR
+.RS 4
+Sets the file to which verbose GC events information should be redirected for logging\&. The information written to this file is similar to the output of
+\fB\-verbose:gc\fR
+with the time elapsed since the first GC event preceding each logged event\&. The
+\fB\-Xloggc\fR
+option overrides
+\fB\-verbose:gc\fR
+if both are given with the same
+\fBjava\fR
+command\&.
+.sp
Example:
-.sp
-.nf
-\f3\-Xloggc:garbage\-collection\&.log\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--Xmaxjitcodesize=\fIsize\fR
-.br
-Specifies the maximum code cache size (in bytes) for JIT-compiled code\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. By default, the value is set to 48 MB:
-.sp
-.nf
-\f3\-Xmaxjitcodesize=48m\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-This option is equivalent to \f3-XX:ReservedCodeCacheSize\fR\&.
-.TP
--Xmixed
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-Xloggc:garbage\-collection\&.log\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-Xmaxjitcodesize=\fIsize\fR
+.RS 4
+Specifies the maximum code cache size (in bytes) for JIT\-compiled code\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. By default, the value is set to 48 MB:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-Xmaxjitcodesize=48m\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+This option is equivalent to
+\fB\-XX:ReservedCodeCacheSize\fR\&.
+.RE
+.PP
+\-Xmixed
+.RS 4
Executes all bytecode by the interpreter except for hot methods, which are compiled to native code\&.
-.TP
--Xmn\fIsize\fR
-.br
-Sets the initial and maximum size (in bytes) of the heap for the young generation (nursery)\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&.
-
+.RE
+.PP
+\-Xmn\fIsize\fR
+.RS 4
+Sets the initial and maximum size (in bytes) of the heap for the young generation (nursery)\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&.
+.sp
The young generation region of the heap is used for new objects\&. GC is performed in this region more often than in other regions\&. If the size for the young generation is too small, then a lot of minor garbage collections will be performed\&. If the size is too large, then only full garbage collections will be performed, which can take a long time to complete\&. Oracle recommends that you keep the size for the young generation between a half and a quarter of the overall heap size\&.
-
+.sp
The following examples show how to set the initial and maximum size of young generation to 256 MB using various units:
-.sp
-.nf
-\f3\-Xmn256m\fP
-.fi
-.nf
-\f3\-Xmn262144k\fP
-.fi
-.nf
-\f3\-Xmn268435456\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-Instead of the \f3-Xmn\fR option to set both the initial and maximum size of the heap for the young generation, you can use \f3-XX:NewSize\fR to set the initial size and \f3-XX:MaxNewSize\fR to set the maximum size\&.
-.TP
--Xms\fIsize\fR
-.br
-Sets the initial size (in bytes) of the heap\&. This value must be a multiple of 1024 and greater than 1 MB\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&.
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-Xmn256m\fR
+\fB\-Xmn262144k\fR
+\fB\-Xmn268435456\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Instead of the
+\fB\-Xmn\fR
+option to set both the initial and maximum size of the heap for the young generation, you can use
+\fB\-XX:NewSize\fR
+to set the initial size and
+\fB\-XX:MaxNewSize\fR
+to set the maximum size\&.
+.RE
+.PP
+\-Xms\fIsize\fR
+.RS 4
+Sets the initial size (in bytes) of the heap\&. This value must be a multiple of 1024 and greater than 1 MB\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&.
+.sp
The following examples show how to set the size of allocated memory to 6 MB using various units:
-.sp
-.nf
-\f3\-Xms6291456\fP
-.fi
-.nf
-\f3\-Xms6144k\fP
-.fi
-.nf
-\f3\-Xms6m\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-If you do not set this option, then the initial size will be set as the sum of the sizes allocated for the old generation and the young generation\&. The initial size of the heap for the young generation can be set using the \f3-Xmn\fR option or the \f3-XX:NewSize\fR option\&.
-.TP
--Xmx\fIsize\fR
-.br
-Specifies the maximum size (in bytes) of the memory allocation pool in bytes\&. This value must be a multiple of 1024 and greater than 2 MB\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. The default value is chosen at runtime based on system configuration\&. For server deployments, \f3-Xms\fR and \f3-Xmx\fR are often set to the same value\&. For more information, see Garbage Collector Ergonomics at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/gc-ergonomics\&.html
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-Xms6291456\fR
+\fB\-Xms6144k\fR
+\fB\-Xms6m\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+If you do not set this option, then the initial size will be set as the sum of the sizes allocated for the old generation and the young generation\&. The initial size of the heap for the young generation can be set using the
+\fB\-Xmn\fR
+option or the
+\fB\-XX:NewSize\fR
+option\&.
+.RE
+.PP
+\-Xmx\fIsize\fR
+.RS 4
+Specifies the maximum size (in bytes) of the memory allocation pool in bytes\&. This value must be a multiple of 1024 and greater than 2 MB\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. The default value is chosen at runtime based on system configuration\&. For server deployments,
+\fB\-Xms\fR
+and
+\fB\-Xmx\fR
+are often set to the same value\&. For more information, see Garbage Collector Ergonomics at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/gc\-ergonomics\&.html
+.sp
The following examples show how to set the maximum allowed size of allocated memory to 80 MB using various units:
-.sp
-.nf
-\f3\-Xmx83886080\fP
-.fi
-.nf
-\f3\-Xmx81920k\fP
-.fi
-.nf
-\f3\-Xmx80m\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-The \f3-Xmx\fR option is equivalent to \f3-XX:MaxHeapSize\fR\&.
-.TP
--Xnoclassgc
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-Xmx83886080\fR
+\fB\-Xmx81920k\fR
+\fB\-Xmx80m\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The
+\fB\-Xmx\fR
+option is equivalent to
+\fB\-XX:MaxHeapSize\fR\&.
+.RE
+.PP
+\-Xnoclassgc
+.RS 4
Disables garbage collection (GC) of classes\&. This can save some GC time, which shortens interruptions during the application run\&.
-
-When you specify \f3-Xnoclassgc\fR at startup, the class objects in the application will be left untouched during GC and will always be considered live\&. This can result in more memory being permanently occupied which, if not used carefully, will throw an out of memory exception\&.
-.TP
--Xprof
-.br
+.sp
+When you specify
+\fB\-Xnoclassgc\fR
+at startup, the class objects in the application will be left untouched during GC and will always be considered live\&. This can result in more memory being permanently occupied which, if not used carefully, will throw an out of memory exception\&.
+.RE
+.PP
+\-Xprof
+.RS 4
Profiles the running program and sends profiling data to standard output\&. This option is provided as a utility that is useful in program development and is not intended to be used in production systems\&.
-.TP
--Xrs
-.br
+.RE
+.PP
+\-Xrs
+.RS 4
Reduces the use of operating system signals by the JVM\&.
-
+.sp
Shutdown hooks enable orderly shutdown of a Java application by running user cleanup code (such as closing database connections) at shutdown, even if the JVM terminates abruptly\&.
-
-The JVM catches signals to implement shutdown hooks for unexpected termination\&. The JVM uses \f3SIGHUP\fR, \f3SIGINT\fR, and \f3SIGTERM\fR to initiate the running of shutdown hooks\&.
-
-The JVM uses a similar mechanism to implement the feature of dumping thread stacks for debugging purposes\&. The JVM uses \f3SIGQUIT\fR to perform thread dumps\&.
-
-Applications embedding the JVM frequently need to trap signals such as \f3SIGINT\fR or \f3SIGTERM\fR, which can lead to interference with the JVM signal handlers\&. The \f3-Xrs\fR option is available to address this issue\&. When \f3-Xrs\fR is used, the signal masks for \f3SIGINT\fR, \f3SIGTERM\fR, \f3SIGHUP\fR, and \f3SIGQUIT\fR are not changed by the JVM, and signal handlers for these signals are not installed\&.
-
-There are two consequences of specifying \f3-Xrs\fR:
-.RS
-.TP 0.2i
-\(bu
-\f3SIGQUIT\fR thread dumps are not available\&.
-.TP 0.2i
-\(bu
-User code is responsible for causing shutdown hooks to run, for example, by calling \f3System\&.exit()\fR when the JVM is to be terminated\&.
-.RE
-
-.TP
--Xshare:\fImode\fR
-.br
-Sets the class data sharing mode\&. Possible \fImode\fR arguments for this option include the following:
-.RS
-.TP
+.sp
+The JVM catches signals to implement shutdown hooks for unexpected termination\&. The JVM uses
+\fBSIGHUP\fR,
+\fBSIGINT\fR, and
+\fBSIGTERM\fR
+to initiate the running of shutdown hooks\&.
+.sp
+The JVM uses a similar mechanism to implement the feature of dumping thread stacks for debugging purposes\&. The JVM uses
+\fBSIGQUIT\fR
+to perform thread dumps\&.
+.sp
+Applications embedding the JVM frequently need to trap signals such as
+\fBSIGINT\fR
+or
+\fBSIGTERM\fR, which can lead to interference with the JVM signal handlers\&. The
+\fB\-Xrs\fR
+option is available to address this issue\&. When
+\fB\-Xrs\fR
+is used, the signal masks for
+\fBSIGINT\fR,
+\fBSIGTERM\fR,
+\fBSIGHUP\fR, and
+\fBSIGQUIT\fR
+are not changed by the JVM, and signal handlers for these signals are not installed\&.
+.sp
+There are two consequences of specifying
+\fB\-Xrs\fR:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fBSIGQUIT\fR
+thread dumps are not available\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+User code is responsible for causing shutdown hooks to run, for example, by calling
+\fBSystem\&.exit()\fR
+when the JVM is to be terminated\&.
+.RE
+.RE
+.PP
+\-Xshare:\fImode\fR
+.RS 4
+Sets the class data sharing mode\&. Possible
+\fImode\fR
+arguments for this option include the following:
+.PP
auto
-Use shared class data if possible\&. This is the default value for Java HotSpot 32-Bit Client VM\&.
-.TP
+.RS 4
+Use shared class data if possible\&. This is the default value for Java HotSpot 32\-Bit Client VM\&.
+.RE
+.PP
on
+.RS 4
Require the use of class data sharing\&. Print an error message and exit if class data sharing cannot be used\&.
-.TP
+.RE
+.PP
off
-Do not use shared class data\&. This is the default value for Java HotSpot 32-Bit Server VM, Java HotSpot 64-Bit Client VM, and Java HotSpot 64-Bit Server VM\&.
-.TP
+.RS 4
+Do not use shared class data\&. This is the default value for Java HotSpot 32\-Bit Server VM, Java HotSpot 64\-Bit Client VM, and Java HotSpot 64\-Bit Server VM\&.
+.RE
+.PP
dump
+.RS 4
Manually generate the class data sharing archive\&.
-.RE
-
-.TP
--XshowSettings:\fIcategory\fR
-.br
-Shows settings and continues\&. Possible \fIcategory\fR arguments for this option include the following:
-.RS
-.TP
+.RE
+.RE
+.PP
+\-XshowSettings:\fIcategory\fR
+.RS 4
+Shows settings and continues\&. Possible
+\fIcategory\fR
+arguments for this option include the following:
+.PP
all
+.RS 4
Shows all categories of settings\&. This is the default value\&.
-.TP
+.RE
+.PP
locale
+.RS 4
Shows settings related to locale\&.
-.TP
+.RE
+.PP
properties
+.RS 4
Shows settings related to system properties\&.
-.TP
+.RE
+.PP
vm
+.RS 4
Shows the settings of the JVM\&.
-.RE
-
-.TP
--Xss\fIsize\fR
-.br
-Sets the thread stack size (in bytes)\&. Append the letter \f3k\fR or \f3K\fR to indicate KB, \f3m\fR or \f3M\fR to indicate MB, \f3g\fR or \f3G\fR to indicate GB\&. The default value depends on the platform:
-.RS
-.TP 0.2i
-\(bu
-Linux/ARM (32-bit): 320 KB
-.TP 0.2i
-\(bu
-Linux/i386 (32-bit): 320 KB
-.TP 0.2i
-\(bu
-Linux/x64 (64-bit): 1024 KB
-.TP 0.2i
-\(bu
-OS X (64-bit): 1024 KB
-.TP 0.2i
-\(bu
-Oracle Solaris/i386 (32-bit): 320 KB
-.TP 0.2i
-\(bu
-Oracle Solaris/x64 (64-bit): 1024 KB
-.TP 0.2i
-\(bu
+.RE
+.RE
+.PP
+\-Xss\fIsize\fR
+.RS 4
+Sets the thread stack size (in bytes)\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate KB,
+\fBm\fR
+or
+\fBM\fR
+to indicate MB,
+\fBg\fR
+or
+\fBG\fR
+to indicate GB\&. The default value depends on the platform:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Linux/ARM (32\-bit): 320 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Linux/i386 (32\-bit): 320 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Linux/x64 (64\-bit): 1024 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+OS X (64\-bit): 1024 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Oracle Solaris/i386 (32\-bit): 320 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Oracle Solaris/x64 (64\-bit): 1024 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
Windows: depends on virtual memory
.RE
-.RS
+.sp
The following examples set the thread stack size to 1024 KB in different units:
-.sp
-.nf
-\f3\-Xss1m\fP
-.fi
-.nf
-\f3\-Xss1024k\fP
-.fi
-.nf
-\f3\-Xss1048576\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-This option is equivalent to \f3-XX:ThreadStackSize\fR\&.
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-Xss1m\fR
+\fB\-Xss1024k\fR
+\fB\-Xss1048576\fR
+
+.fi
+.if n \{\
.RE
-.TP
--Xusealtsigs
-.br
-Use alternative signals instead of \f3SIGUSR1\fR and \f3SIGUSR2\fR for JVM internal signals\&. This option is equivalent to \f3-XX:+UseAltSigs\fR\&.
-.TP
--Xverify:\fImode\fR
-.br
-Sets the mode of the bytecode verifier\&. Bytecode verification helps to troubleshoot some problems, but it also adds overhead to the running application\&. Possible \fImode\fR arguments for this option include the following:
-.RS
-.TP
+.\}
+This option is equivalent to
+\fB\-XX:ThreadStackSize\fR\&.
+.RE
+.PP
+\-Xusealtsigs
+.RS 4
+Use alternative signals instead of
+\fBSIGUSR1\fR
+and
+\fBSIGUSR2\fR
+for JVM internal signals\&. This option is equivalent to
+\fB\-XX:+UseAltSigs\fR\&.
+.RE
+.PP
+\-Xverify:\fImode\fR
+.RS 4
+Sets the mode of the bytecode verifier\&. Bytecode verification helps to troubleshoot some problems, but it also adds overhead to the running application\&. Possible
+\fImode\fR
+arguments for this option include the following:
+.PP
none
+.RS 4
Do not verify the bytecode\&. This reduces startup time and also reduces the protection provided by Java\&.
-.TP
+.RE
+.PP
remote
-Verify only those classes that are loaded remotely over the network\&. This is the default behavior if you do not specify the \f3-Xverify\fR option\&.
-.TP
+.RS 4
+Verify only those classes that are loaded remotely over the network\&. This is the default behavior if you do not specify the
+\fB\-Xverify\fR
+option\&.
+.RE
+.PP
all
+.RS 4
Verify all classes\&.
-.RE
-
-.SS ADVANCED\ RUNTIME\ OPTIONS
+.RE
+.RE
+.SS "Advanced Runtime Options"
+.PP
These options control the runtime behavior of the Java HotSpot VM\&.
-.TP
--XX:+DisableAttachMechanism
-.br
-Enables the option that disables the mechanism that lets tools attach to the JVM\&. By default, this option is disabled, meaning that the attach mechanism is enabled and you can use tools such as \f3jcmd\fR, \f3jstack\fR, \f3jmap\fR, and \f3jinfo\fR\&.
-.TP
--XX:ErrorFile=\fIfilename\fR
-.br
-Specifies the path and file name to which error data is written when an irrecoverable error occurs\&. By default, this file is created in the current working directory and named \f3hs_err_pid\fR\fIpid\fR\f3\&.log\fR where \fIpid\fR is the identifier of the process that caused the error\&. The following example shows how to set the default log file (note that the identifier of the process is specified as \f3%p\fR):
-.sp
-.nf
-\f3\-XX:ErrorFile=\&./hs_err_pid%p\&.log\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-The following example shows how to set the error log to \f3/var/log/java/java_error\&.log\fR:
-.sp
-.nf
-\f3\-XX:ErrorFile=/var/log/java/java_error\&.log\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-If the file cannot be created in the specified directory (due to insufficient space, permission problem, or another issue), then the file is created in the temporary directory for the operating system\&. The temporary directory is \f3/tmp\fR\&.
-.TP
--XX:LargePageSizeInBytes=\fIsize\fR
-.br
-Sets the maximum size (in bytes) for large pages used for Java heap\&. The \fIsize\fR argument must be a power of 2 (2, 4, 8, 16, \&.\&.\&.)\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. By default, the size is set to 0, meaning that the JVM chooses the size for large pages automatically\&.
-
+.PP
+\-XX:+DisableAttachMechanism
+.RS 4
+Enables the option that disables the mechanism that lets tools attach to the JVM\&. By default, this option is disabled, meaning that the attach mechanism is enabled and you can use tools such as
+\fBjcmd\fR,
+\fBjstack\fR,
+\fBjmap\fR, and
+\fBjinfo\fR\&.
+.RE
+.PP
+\-XX:ErrorFile=\fIfilename\fR
+.RS 4
+Specifies the path and file name to which error data is written when an irrecoverable error occurs\&. By default, this file is created in the current working directory and named
+\fBhs_err_pid\fR\fIpid\fR\fB\&.log\fR
+where
+\fIpid\fR
+is the identifier of the process that caused the error\&. The following example shows how to set the default log file (note that the identifier of the process is specified as
+\fB%p\fR):
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:ErrorFile=\&./hs_err_pid%p\&.log\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The following example shows how to set the error log to
+\fB/var/log/java/java_error\&.log\fR:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:ErrorFile=/var/log/java/java_error\&.log\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+If the file cannot be created in the specified directory (due to insufficient space, permission problem, or another issue), then the file is created in the temporary directory for the operating system\&. The temporary directory is
+\fB/tmp\fR\&.
+.RE
+.PP
+\-XX:+FailOverToOldVerifier
+.RS 4
+Enables automatic failover to the old verifier when the new type checker fails\&. By default, this option is disabled and it is ignored (that is, treated as disabled) for classes with a recent bytecode version\&. You can enable it for classes with older versions of the bytecode\&.
+.RE
+.PP
+\-XX:LargePageSizeInBytes=\fIsize\fR
+.RS 4
+Sets the maximum size (in bytes) for large pages used for Java heap\&. The
+\fIsize\fR
+argument must be a power of 2 (2, 4, 8, 16, \&.\&.\&.)\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. By default, the size is set to 0, meaning that the JVM chooses the size for large pages automatically\&.
+.sp
The following example illustrates how to set the large page size to 4 megabytes (MB):
-.sp
-.nf
-\f3\-XX:LargePageSizeInBytes=4m\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:MaxDirectMemorySize=\fIsize\fR
-.br
-Sets the maximum total size (in bytes) of the New I/O (the \f3java\&.nio\fR package) direct-buffer allocations\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. By default, the size is set to 0, meaning that the JVM chooses the size for NIO direct-buffer allocations automatically\&.
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:LargePageSizeInBytes=4m\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:MaxDirectMemorySize=\fIsize\fR
+.RS 4
+Sets the maximum total size (in bytes) of the New I/O (the
+\fBjava\&.nio\fR
+package) direct\-buffer allocations\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. By default, the size is set to 0, meaning that the JVM chooses the size for NIO direct\-buffer allocations automatically\&.
+.sp
The following examples illustrate how to set the NIO size to 1024 KB in different units:
-.sp
-.nf
-\f3\-XX:MaxDirectMemorySize=1m\fP
-.fi
-.nf
-\f3\-XX:MaxDirectMemorySize=1024k\fP
-.fi
-.nf
-\f3\-XX:MaxDirectMemorySize=1048576\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:NativeMemoryTracking=\fImode\fR
-.br
-Specifies the mode for tracking JVM native memory usage\&. Possible \fImode\fR arguments for this option include the following:
-.RS
-.TP
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:MaxDirectMemorySize=1m\fR
+\fB\-XX:MaxDirectMemorySize=1024k\fR
+\fB\-XX:MaxDirectMemorySize=1048576\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:NativeMemoryTracking=\fImode\fR
+.RS 4
+Specifies the mode for tracking JVM native memory usage\&. Possible
+\fImode\fR
+arguments for this option include the following:
+.PP
off
-Do not track JVM native memory usage\&. This is the default behavior if you do not specify the \f3-XX:NativeMemoryTracking\fR option\&.
-.TP
+.RS 4
+Do not track JVM native memory usage\&. This is the default behavior if you do not specify the
+\fB\-XX:NativeMemoryTracking\fR
+option\&.
+.RE
+.PP
summary
+.RS 4
Only track memory usage by JVM subsystems, such as Java heap, class, code, and thread\&.
-.TP
+.RE
+.PP
detail
-In addition to tracking memory usage by JVM subsystems, track memory usage by individual \f3CallSite\fR, individual virtual memory region and its committed regions\&.
-.RE
-
-.TP
--XX:OnError=\fIstring\fR
-.br
-Sets a custom command or a series of semicolon-separated commands to run when an irrecoverable error occurs\&. If the string contains spaces, then it must be enclosed in quotation marks\&.
-
-\fI\fRThe following example shows how the \f3-XX:OnError\fR option can be used to run the \f3gcore\fR command to create the core image, and the debugger is started to attach to the process in case of an irrecoverable error (the \f3%p\fR designates the current process):
-.sp
-.nf
-\f3\-XX:OnError="gcore %p;dbx \- %p"\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:OnOutOfMemoryError=\fIstring\fR
-.br
-Sets a custom command or a series of semicolon-separated commands to run when an \f3OutOfMemoryError\fR exception is first thrown\&. If the string contains spaces, then it must be enclosed in quotation marks\&. For an example of a command string, see the description of the \f3-XX:OnError\fR option\&.
-.TP
--XX:+PrintCommandLineFlags
-.br
+.RS 4
+In addition to tracking memory usage by JVM subsystems, track memory usage by individual
+\fBCallSite\fR, individual virtual memory region and its committed regions\&.
+.RE
+.RE
+.PP
+\-XX:OnError=\fIstring\fR
+.RS 4
+Sets a custom command or a series of semicolon\-separated commands to run when an irrecoverable error occurs\&. If the string contains spaces, then it must be enclosed in quotation marks\&.
+.sp
+The following example shows how the
+\fB\-XX:OnError\fR
+option can be used to run the
+\fBgcore\fR
+command to create the core image, and the debugger is started to attach to the process in case of an irrecoverable error (the
+\fB%p\fR
+designates the current process):
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:OnError="gcore %p;dbx \- %p"\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:OnOutOfMemoryError=\fIstring\fR
+.RS 4
+Sets a custom command or a series of semicolon\-separated commands to run when an
+\fBOutOfMemoryError\fR
+exception is first thrown\&. If the string contains spaces, then it must be enclosed in quotation marks\&. For an example of a command string, see the description of the
+\fB\-XX:OnError\fR
+option\&.
+.RE
+.PP
+\-XX:+PrintCommandLineFlags
+.RS 4
Enables printing of ergonomically selected JVM flags that appeared on the command line\&. It can be useful to know the ergonomic values set by the JVM, such as the heap space size and the selected garbage collector\&. By default, this option is disabled and flags are not printed\&.
-.TP
--XX:+PrintNMTStatistics
-.br
-Enables printing of collected native memory tracking data at JVM exit when native memory tracking is enabled (see \f3-XX:NativeMemoryTracking\fR)\&. By default, this option is disabled and native memory tracking data is not printed\&.
-.TP
--XX:+ShowMessageBoxOnError
-.br
+.RE
+.PP
+\-XX:+PrintNMTStatistics
+.RS 4
+Enables printing of collected native memory tracking data at JVM exit when native memory tracking is enabled (see
+\fB\-XX:NativeMemoryTracking\fR)\&. By default, this option is disabled and native memory tracking data is not printed\&.
+.RE
+.PP
+\-XX:+RelaxAccessControlCheck
+.RS 4
+Decreases the amount of access control checks in the verifier\&. By default, this option is disabled, and it is ignored (that is, treated as disabled) for classes with a recent bytecode version\&. You can enable it for classes with older versions of the bytecode\&.
+.RE
+.PP
+\-XX:+ShowMessageBoxOnError
+.RS 4
Enables displaying of a dialog box when the JVM experiences an irrecoverable error\&. This prevents the JVM from exiting and keeps the process active so that you can attach a debugger to it to investigate the cause of the error\&. By default, this option is disabled\&.
-.TP
--XX:ThreadStackSize=\fIsize\fR
-.br
-Sets the thread stack size (in bytes)\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. The default value depends on the platform:
-.RS
-.TP 0.2i
-\(bu
-Linux/ARM (32-bit): 320 KB
-.TP 0.2i
-\(bu
-Linux/i386 (32-bit): 320 KB
-.TP 0.2i
-\(bu
-Linux/x64 (64-bit): 1024 KB
-.TP 0.2i
-\(bu
-OS X (64-bit): 1024 KB
-.TP 0.2i
-\(bu
-Oracle Solaris/i386 (32-bit): 320 KB
-.TP 0.2i
-\(bu
-Oracle Solaris/x64 (64-bit): 1024 KB
-.TP 0.2i
-\(bu
+.RE
+.PP
+\-XX:ThreadStackSize=\fIsize\fR
+.RS 4
+Sets the thread stack size (in bytes)\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. The default value depends on the platform:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Linux/ARM (32\-bit): 320 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Linux/i386 (32\-bit): 320 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Linux/x64 (64\-bit): 1024 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+OS X (64\-bit): 1024 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Oracle Solaris/i386 (32\-bit): 320 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Oracle Solaris/x64 (64\-bit): 1024 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
Windows: depends on virtual memory
.RE
-.RS
+.sp
The following examples show how to set the thread stack size to 1024 KB in different units:
-.sp
-.nf
-\f3\-XX:ThreadStackSize=1m\fP
-.fi
-.nf
-\f3\-XX:ThreadStackSize=1024k\fP
-.fi
-.nf
-\f3\-XX:ThreadStackSize=1048576\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-This option is equivalent to \f3-Xss\fR\&.
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:ThreadStackSize=1m\fR
+\fB\-XX:ThreadStackSize=1024k\fR
+\fB\-XX:ThreadStackSize=1048576\fR
+
+.fi
+.if n \{\
.RE
-.TP
--XX:+TraceClassLoading
-.br
+.\}
+This option is equivalent to
+\fB\-Xss\fR\&.
+.RE
+.PP
+\-XX:+TraceClassLoading
+.RS 4
Enables tracing of classes as they are loaded\&. By default, this option is disabled and classes are not traced\&.
-.TP
--XX:+TraceClassLoadingPreorder
-.br
+.RE
+.PP
+\-XX:+TraceClassLoadingPreorder
+.RS 4
Enables tracing of all loaded classes in the order in which they are referenced\&. By default, this option is disabled and classes are not traced\&.
-.TP
--XX:+TraceClassResolution
-.br
+.RE
+.PP
+\-XX:+TraceClassResolution
+.RS 4
Enables tracing of constant pool resolutions\&. By default, this option is disabled and constant pool resolutions are not traced\&.
-.TP
--XX:+TraceClassUnloading
-.br
+.RE
+.PP
+\-XX:+TraceClassUnloading
+.RS 4
Enables tracing of classes as they are unloaded\&. By default, this option is disabled and classes are not traced\&.
-.TP
--XX:+TraceLoaderConstraints
-.br
-Enables tracing of the loader constraints recording\&. By default, this option is disabled and loader constraints recoding is not traced\&.
-.TP
--XX:+UseAltSigs
-.br
-Enables the use of alternative signals instead of \f3SIGUSR1\fR and \f3SIGUSR2\fR for JVM internal signals\&. By default, this option is disabled and alternative signals are not used\&. This option is equivalent to \f3-Xusealtsigs\fR\&.
-.TP
--XX:+UseBiasedLocking
-.br
-Enables the use of biased locking\&. Some applications with significant amounts of uncontended synchronization may attain significant speedups with this flag enabled, whereas applications with certain patterns of locking may see slowdowns\&. For more information about the biased locking technique, see the example in Java Tuning White Paper at http://www\&.oracle\&.com/technetwork/java/tuning-139912\&.html#section4\&.2\&.5
-
-By default, this option is disabled and biased locking is not used\&.
-.TP
--XX:+UseCompressedOops
-.br
-Enables the use of compressed pointers\&. When this option is enabled, object references are represented as 32-bit offsets instead of 64-bit pointers, which typically increases performance when running the application with Java heap sizes less than 32 GB\&. This option works only for 64-bit JVMs\&.
-
-By default, this option is disabled and compressed pointers are not used\&.
-.TP
--XX:+UseLargePages
-.br
-Enables the use of large page memory\&. This option is enabled by default\&. To disable the use of large page memory, specify \f3-XX:-UseLargePages\fR\&.
-
-For more information, see Java Support for Large Memory Pages at http://www\&.oracle\&.com/technetwork/java/javase/tech/largememory-jsp-137182\&.html
-.TP
--XX:+UseMembar
-.br
-Enables issuing of membars on thread state transitions\&. This option is disabled by default on all platforms except Power PC and ARM servers, where it is enabled\&. To disable issuing of membars on thread state transitions for Power PC and ARM, specify \f3-XX:-UseMembar\fR\&.
-.TP
--XX:+UsePerfData
-.br
-Enables the \f3perfdata\fR feature\&. This option is enabled by default to allow JVM monitoring and performance testing\&. Disabling it suppresses the creation of the \f3hsperfdata_userid\fR directories\&. To disable the \f3perfdata\fR feature, specify \f3-XX:-UsePerfData\fR\&.
-.TP
--XX:+AllowUserSignalHandlers
-.br
+.RE
+.PP
+\-XX:+TraceLoaderConstraints
+.RS 4
+Enables tracing of the loader constraints recording\&. By default, this option is disabled and loader constraints recording is not traced\&.
+.RE
+.PP
+\-XX:+UseAltSigs
+.RS 4
+Enables the use of alternative signals instead of
+\fBSIGUSR1\fR
+and
+\fBSIGUSR2\fR
+for JVM internal signals\&. By default, this option is disabled and alternative signals are not used\&. This option is equivalent to
+\fB\-Xusealtsigs\fR\&.
+.RE
+.PP
+\-XX:\-UseBiasedLocking
+.RS 4
+Disables the use of biased locking\&. Some applications with significant amounts of uncontended synchronization may attain significant speedups with this flag enabled, whereas applications with certain patterns of locking may see slowdowns\&. For more information about the biased locking technique, see the example in Java Tuning White Paper at http://www\&.oracle\&.com/technetwork/java/tuning\-139912\&.html#section4\&.2\&.5
+.sp
+By default, this option is enabled\&.
+.RE
+.PP
+\-XX:\-UseCompressedOops
+.RS 4
+Disables the use of compressed pointers\&. By default, this option is enabled, and compressed pointers are used when Java heap sizes are less than 32 GB\&. When this option is enabled, object references are represented as 32\-bit offsets instead of 64\-bit pointers, which typically increases performance when running the application with Java heap sizes less than 32 GB\&. This option works only for 64\-bit JVMs\&.
+.RE
+.PP
+\-XX:\-UseLargePages
+.RS 4
+Disables the use of large page memory\&. This option is enabled by default\&.
+.sp
+For more information, see Java Support for Large Memory Pages at http://www\&.oracle\&.com/technetwork/java/javase/tech/largememory\-jsp\-137182\&.html
+.RE
+.PP
+\-XX:+UseMembar
+.RS 4
+Enables issuing of membars on thread state transitions\&. This option is disabled by default on all platforms except ARM servers, where it is enabled\&. (It is recommended that you do not disable this option on ARM servers\&.)
+.RE
+.PP
+\-XX:+UsePerfData
+.RS 4
+Enables the
+\fBperfdata\fR
+feature\&. This option is enabled by default to allow JVM monitoring and performance testing\&. Disabling it suppresses the creation of the
+\fBhsperfdata_userid\fR
+directories\&. To disable the
+\fBperfdata\fR
+feature, specify
+\fB\-XX:\-UsePerfData\fR\&.
+.RE
+.PP
+\-XX:+AllowUserSignalHandlers
+.RS 4
Enables installation of signal handlers by the application\&. By default, this option is disabled and the application is not allowed to install signal handlers\&.
-.SS ADVANCED\ JIT\ COMPILER\ OPTIONS
-These options control the dynamic just-in-time (JIT) compilation performed by the Java HotSpot VM\&.
-.TP
--XX:+AggressiveOpts
-.br
+.RE
+.SS "Advanced JIT Compiler Options"
+.PP
+These options control the dynamic just\-in\-time (JIT) compilation performed by the Java HotSpot VM\&.
+.PP
+\-XX:+AggressiveOpts
+.RS 4
Enables the use of aggressive performance optimization features, which are expected to become default in upcoming releases\&. By default, this option is disabled and experimental performance features are not used\&.
-.TP
--XX:AllocateInstancePrefetchLines=\fIlines\fR
-.br
+.RE
+.PP
+\-XX:AllocateInstancePrefetchLines=\fIlines\fR
+.RS 4
Sets the number of lines to prefetch ahead of the instance allocation pointer\&. By default, the number of lines to prefetch is set to 1:
-.sp
-.nf
-\f3\-XX:AllocateInstancePrefetchLines=1\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:AllocatePrefetchInstr=\fIinstruction\fR
-.br
-Sets the prefetch instruction to prefetch ahead of the allocation pointer\&. Possible values are from 0 to 3\&. The actual instructions behind the values depend on the platform\&. By default, the prefetch instruction is set to 0:
-.sp
-.nf
-\f3\-XX:AllocatePrefetchInstr=0\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:AllocatePrefetchStepSize=\fIsize\fR
-.br
-Sets the step size (in bytes) for sequential prefetch instructions\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. By default, the step size is set to 16 bytes:
-.sp
-.nf
-\f3\-XX:AllocatePrefetchStepSize=16\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:+BackgroundCompilation
-.br
-Enables background compilation\&. This option is enabled by default\&. To disable background compilation, specify \f3-XX:-BackgroundCompilation\fR (this is equivalent to specifying \f3-Xbatch\fR)\&.
-.TP
--XX:CICompilerCount=\fIthreads\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:AllocateInstancePrefetchLines=1\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Only the Java HotSpot Server VM supports this option\&.
+.RE
+.PP
+\-XX:AllocatePrefetchDistance=\fIsize\fR
+.RS 4
+Sets the size (in bytes) of the prefetch distance for object allocation\&. Memory about to be written with the value of new objects is prefetched up to this distance starting from the address of the last allocated object\&. Each Java thread has its own allocation point\&.
+.sp
+Negative values denote that prefetch distance is chosen based on the platform\&. Positive values are bytes to prefetch\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. The default value is set to \-1\&.
+.sp
+The following example shows how to set the prefetch distance to 1024 bytes:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:AllocatePrefetchDistance=1024\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Only the Java HotSpot Server VM supports this option\&.
+.RE
+.PP
+\-XX:AllocatePrefetchInstr=\fIinstruction\fR
+.RS 4
+Sets the prefetch instruction to prefetch ahead of the allocation pointer\&. Only the Java HotSpot Server VM supports this option\&. Possible values are from 0 to 3\&. The actual instructions behind the values depend on the platform\&. By default, the prefetch instruction is set to 0:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:AllocatePrefetchInstr=0\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Only the Java HotSpot Server VM supports this option\&.
+.RE
+.PP
+\-XX:AllocatePrefetchLines=\fIlines\fR
+.RS 4
+Sets the number of cache lines to load after the last object allocation by using the prefetch instructions generated in compiled code\&. The default value is 1 if the last allocated object was an instance, and 3 if it was an array\&.
+.sp
+The following example shows how to set the number of loaded cache lines to 5:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:AllocatePrefetchLines=5\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Only the Java HotSpot Server VM supports this option\&.
+.RE
+.PP
+\-XX:AllocatePrefetchStepSize=\fIsize\fR
+.RS 4
+Sets the step size (in bytes) for sequential prefetch instructions\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. By default, the step size is set to 16 bytes:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:AllocatePrefetchStepSize=16\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Only the Java HotSpot Server VM supports this option\&.
+.RE
+.PP
+\-XX:AllocatePrefetchStyle=\fIstyle\fR
+.RS 4
+Sets the generated code style for prefetch instructions\&. The
+\fIstyle\fR
+argument is an integer from 0 to 3:
+.PP
+0
+.RS 4
+Do not generate prefetch instructions\&.
+.RE
+.PP
+1
+.RS 4
+Execute prefetch instructions after each allocation\&. This is the default parameter\&.
+.RE
+.PP
+2
+.RS 4
+Use the thread\-local allocation block (TLAB) watermark pointer to determine when prefetch instructions are executed\&.
+.RE
+.PP
+3
+.RS 4
+Use BIS instruction on SPARC for allocation prefetch\&.
+.RE
+.sp
+Only the Java HotSpot Server VM supports this option\&.
+.RE
+.PP
+\-XX:+BackgroundCompilation
+.RS 4
+Enables background compilation\&. This option is enabled by default\&. To disable background compilation, specify
+\fB\-XX:\-BackgroundCompilation\fR
+(this is equivalent to specifying
+\fB\-Xbatch\fR)\&.
+.RE
+.PP
+\-XX:CICompilerCount=\fIthreads\fR
+.RS 4
Sets the number of compiler threads to use for compilation\&. By default, the number of threads is set to 2 for the server JVM, to 1 for the client JVM, and it scales to the number of cores if tiered compilation is used\&. The following example shows how to set the number of threads to 2:
-.sp
-.nf
-\f3\-XX:CICompilerCount=2\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:CodeCacheMinimumFreeSpace=\fIsize\fR
-.br
-Sets the minimum free space (in bytes) required for compilation\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. When less than the minimum free space remains, compiling stops\&. By default, this option is set to 500 KB\&. The following example shows how to set the minimum free space to 1024 MB:
-.sp
-.nf
-\f3\-XX:CodeCacheMinimumFreeSpace=1024m\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:CompileCommand=\fIcommand\fR,\fImethod\fR[,\fIoption\fR]
-.br
-Specifies a command to perform on a method\&. For example, to exclude the \f3indexOf()\fR method of the \f3String\fR class from being compiled, use the following:
-.sp
-.nf
-\f3\-XX:CompileCommand=exclude,java/lang/String\&.indexOf\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-Note that the full class name is specified, including all packages and subpackages separated by a slash (\f3/\fR)\&. For easier cut and paste operations, it is also possible to use the method name format produced by the \f3-XX:+PrintCompilation\fR and \f3-XX:+LogCompilation\fR options:
-.sp
-.nf
-\f3\-XX:CompileCommand=exclude,java\&.lang\&.String::indexOf\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-If the method is specified without the signature, the command will be applied to all methods with the specified name\&. However, you can also specify the signature of the method in the class file format\&. In this case, you should enclose the arguments in quotation marks, because otherwise the shell treats the semicolon as command end\&. For example, if you want to exclude only the \f3indexOf(String)\fR method of the \f3String\fR class from being compiled, use the following:
-.sp
-.nf
-\f3\-XX:CompileCommand="exclude,java/lang/String\&.indexOf,(Ljava/lang/String;)I"\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-You can also use the asterisk (*) as a wildcard for class and method names\&. For example, to exclude all \f3indexOf()\fR methods in all classes from being compiled, use the following:
-.sp
-.nf
-\f3\-XX:CompileCommand=exclude,*\&.indexOf\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-The commas and periods are aliases for spaces, making it easier to pass compiler commands through a shell\&. You can pass arguments to \f3-XX:CompileCommand\fR using spaces as separators by enclosing the argument in quotation marks:
-.sp
-.nf
-\f3\-XX:CompileCommand="exclude java/lang/String indexOf"\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-Note that after parsing the commands passed on the command line using the \f3-XX:CompileCommand\fR options, the JIT compiler then reads commands from the \f3\&.hotspot_compiler\fR file\&. You can add commands to this file or specify a different file using the \f3-XX:CompileCommandFile\fR option\&.
-
-To add several commands, either specify the \f3-XX:CompileCommand\fR option multiple times, or separate each argument with the newline separator (\f3\en\fR)\&. The following commands are available:
-.RS
-.TP
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CICompilerCount=2\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:CodeCacheMinimumFreeSpace=\fIsize\fR
+.RS 4
+Sets the minimum free space (in bytes) required for compilation\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. When less than the minimum free space remains, compiling stops\&. By default, this option is set to 500 KB\&. The following example shows how to set the minimum free space to 1024 MB:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CodeCacheMinimumFreeSpace=1024m\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:CompileCommand=\fIcommand\fR,\fImethod\fR[,\fIoption\fR]
+.RS 4
+Specifies a command to perform on a method\&. For example, to exclude the
+\fBindexOf()\fR
+method of the
+\fBString\fR
+class from being compiled, use the following:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CompileCommand=exclude,java/lang/String\&.indexOf\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Note that the full class name is specified, including all packages and subpackages separated by a slash (\fB/\fR)\&. For easier cut and paste operations, it is also possible to use the method name format produced by the
+\fB\-XX:+PrintCompilation\fR
+and
+\fB\-XX:+LogCompilation\fR
+options:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CompileCommand=exclude,java\&.lang\&.String::indexOf\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+If the method is specified without the signature, the command will be applied to all methods with the specified name\&. However, you can also specify the signature of the method in the class file format\&. In this case, you should enclose the arguments in quotation marks, because otherwise the shell treats the semicolon as command end\&. For example, if you want to exclude only the
+\fBindexOf(String)\fR
+method of the
+\fBString\fR
+class from being compiled, use the following:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CompileCommand="exclude,java/lang/String\&.indexOf,(Ljava/lang/String;)I"\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+You can also use the asterisk (*) as a wildcard for class and method names\&. For example, to exclude all
+\fBindexOf()\fR
+methods in all classes from being compiled, use the following:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CompileCommand=exclude,*\&.indexOf\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The commas and periods are aliases for spaces, making it easier to pass compiler commands through a shell\&. You can pass arguments to
+\fB\-XX:CompileCommand\fR
+using spaces as separators by enclosing the argument in quotation marks:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CompileCommand="exclude java/lang/String indexOf"\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Note that after parsing the commands passed on the command line using the
+\fB\-XX:CompileCommand\fR
+options, the JIT compiler then reads commands from the
+\fB\&.hotspot_compiler\fR
+file\&. You can add commands to this file or specify a different file using the
+\fB\-XX:CompileCommandFile\fR
+option\&.
+.sp
+To add several commands, either specify the
+\fB\-XX:CompileCommand\fR
+option multiple times, or separate each argument with the newline separator (\fB\en\fR)\&. The following commands are available:
+.PP
break
+.RS 4
Set a breakpoint when debugging the JVM to stop at the beginning of compilation of the specified method\&.
-.TP
+.RE
+.PP
compileonly
-Exclude all methods from compilation except for the specified method\&. As an alternative, you can use the \f3-XX:CompileOnly\fR option, which allows to specify several methods\&.
-.TP
+.RS 4
+Exclude all methods from compilation except for the specified method\&. As an alternative, you can use the
+\fB\-XX:CompileOnly\fR
+option, which allows to specify several methods\&.
+.RE
+.PP
dontinline
+.RS 4
Prevent inlining of the specified method\&.
-.TP
+.RE
+.PP
exclude
+.RS 4
Exclude the specified method from compilation\&.
-.TP
+.RE
+.PP
help
-Print a help message for the \f3-XX:CompileCommand\fR option\&.
-.TP
+.RS 4
+Print a help message for the
+\fB\-XX:CompileCommand\fR
+option\&.
+.RE
+.PP
inline
+.RS 4
Attempt to inline the specified method\&.
-.TP
+.RE
+.PP
log
-Exclude compilation logging (with the \f3-XX:+LogCompilation\fR option) for all methods except for the specified method\&. By default, logging is performed for all compiled methods\&.
-.TP
+.RS 4
+Exclude compilation logging (with the
+\fB\-XX:+LogCompilation\fR
+option) for all methods except for the specified method\&. By default, logging is performed for all compiled methods\&.
+.RE
+.PP
option
-This command can be used to pass a JIT compilation option to the specified method in place of the last argument (\fIoption\fR)\&. The compilation option is set at the end, after the method name\&. For example, to enable the \f3BlockLayoutByFrequency\fR option for the \f3append()\fR method of the \f3StringBuffer\fR class, use the following:
-.sp
-.nf
-\f3\-XX:CompileCommand=option,java/lang/StringBuffer\&.append,BlockLayoutByFrequency\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.RS 4
+This command can be used to pass a JIT compilation option to the specified method in place of the last argument (\fIoption\fR)\&. The compilation option is set at the end, after the method name\&. For example, to enable the
+\fBBlockLayoutByFrequency\fR
+option for the
+\fBappend()\fR
+method of the
+\fBStringBuffer\fR
+class, use the following:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CompileCommand=option,java/lang/StringBuffer\&.append,BlockLayoutByFrequency\fR
+
+.fi
+.if n \{\
+.RE
+.\}
You can specify multiple compilation options, separated by commas or spaces\&.
-.TP
+.RE
+.PP
print
+.RS 4
Print generated assembler code after compilation of the specified method\&.
-.TP
+.RE
+.PP
quiet
-Do not print the compile commands\&. By default, the commands that you specify with the -\f3XX:CompileCommand\fR option are printed; for example, if you exclude from compilation the \f3indexOf()\fR method of the \f3String\fR class, then the following will be printed to standard output:
-.sp
-.nf
-\f3CompilerOracle: exclude java/lang/String\&.indexOf\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-You can suppress this by specifying the \f3-XX:CompileCommand=quiet\fR option before other \f3-XX:CompileCommand\fR options\&.
-.RE
-
-.TP
--XX:CompileCommandFile=\fIfilename\fR
-.br
-Sets the file from which JIT compiler commands are read\&. By default, the \f3\&.hotspot_compiler\fR file is used to store commands performed by the JIT compiler\&.
-
-Each line in the command file represents a command, a class name, and a method name for which the command is used\&. For example, this line prints assembly code for the \f3toString()\fR method of the \f3String\fR class:
-.sp
-.nf
-\f3print java/lang/String toString\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-For more information about specifying the commands for the JIT compiler to perform on methods, see the \f3-XX:CompileCommand\fR option\&.
-.TP
--XX:CompileOnly=\fImethods\fR
-.br
-Sets the list of methods (separated by commas) to which compilation should be restricted\&. Only the specified methods will be compiled\&. Specify each method with the full class name (including the packages and subpackages)\&. For example, to compile only the \f3length()\fR method of the \f3String\fR class and the \f3size()\fR method of the \f3List\fR class, use the following:
-.sp
-.nf
-\f3\-XX:CompileOnly=java/lang/String\&.length,java/util/List\&.size\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-Note that the full class name is specified, including all packages and subpackages separated by a slash (\f3/\fR)\&. For easier cut and paste operations, it is also possible to use the method name format produced by the \f3-XX:+PrintCompilation\fR and \f3-XX:+LogCompilation\fR options:
-.sp
-.nf
-\f3\-XX:CompileOnly=java\&.lang\&.String::length,java\&.util\&.List::size\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.RS 4
+Do not print the compile commands\&. By default, the commands that you specify with the \-\fBXX:CompileCommand\fR
+option are printed; for example, if you exclude from compilation the
+\fBindexOf()\fR
+method of the
+\fBString\fR
+class, then the following will be printed to standard output:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBCompilerOracle: exclude java/lang/String\&.indexOf\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+You can suppress this by specifying the
+\fB\-XX:CompileCommand=quiet\fR
+option before other
+\fB\-XX:CompileCommand\fR
+options\&.
+.RE
+.RE
+.PP
+\-XX:CompileCommandFile=\fIfilename\fR
+.RS 4
+Sets the file from which JIT compiler commands are read\&. By default, the
+\fB\&.hotspot_compiler\fR
+file is used to store commands performed by the JIT compiler\&.
+.sp
+Each line in the command file represents a command, a class name, and a method name for which the command is used\&. For example, this line prints assembly code for the
+\fBtoString()\fR
+method of the
+\fBString\fR
+class:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBprint java/lang/String toString\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+For more information about specifying the commands for the JIT compiler to perform on methods, see the
+\fB\-XX:CompileCommand\fR
+option\&.
+.RE
+.PP
+\-XX:CompileOnly=\fImethods\fR
+.RS 4
+Sets the list of methods (separated by commas) to which compilation should be restricted\&. Only the specified methods will be compiled\&. Specify each method with the full class name (including the packages and subpackages)\&. For example, to compile only the
+\fBlength()\fR
+method of the
+\fBString\fR
+class and the
+\fBsize()\fR
+method of the
+\fBList\fR
+class, use the following:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CompileOnly=java/lang/String\&.length,java/util/List\&.size\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Note that the full class name is specified, including all packages and subpackages separated by a slash (\fB/\fR)\&. For easier cut and paste operations, it is also possible to use the method name format produced by the
+\fB\-XX:+PrintCompilation\fR
+and
+\fB\-XX:+LogCompilation\fR
+options:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CompileOnly=java\&.lang\&.String::length,java\&.util\&.List::size\fR
+
+.fi
+.if n \{\
+.RE
+.\}
Although wildcards are not supported, you can specify only the class or package name to compile all methods in that class or package, as well as specify just the method to compile methods with this name in any class:
-.sp
-.nf
-\f3\-XX:CompileOnly=java/lang/String\fP
-.fi
-.nf
-\f3\-XX:CompileOnly=java/lang\fP
-.fi
-.nf
-\f3\-XX:CompileOnly=\&.length\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:CompileThreshold=\fIinvocations\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CompileOnly=java/lang/String\fR
+\fB\-XX:CompileOnly=java/lang\fR
+\fB\-XX:CompileOnly=\&.length\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:CompileThreshold=\fIinvocations\fR
+.RS 4
Sets the number of interpreted method invocations before compilation\&. By default, in the server JVM, the JIT compiler performs 10,000 interpreted method invocations to gather information for efficient compilation\&. For the client JVM, the default setting is 1,500 invocations\&. The following example shows how to set the number of interpreted method invocations to 5,000:
-.sp
-.nf
-\f3\-XX:CompileThreshold=5000\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-You can completely disable interpretation of Java methods before compilation by specifying the \f3-Xcomp\fR option\&.
-.TP
--XX:+DoEscapeAnalysis
-.br
-Enables the use of escape analysis\&. This option is enabled by default\&. To disable the use of escape analysis, specify \f3-XX:-DoEscapeAnalysis\fR\&.
-.TP
--XX:+FailOverToOldVerifier
-.br
-Enables automatic failover to the old verifier when the new type checker fails\&. By default, this option is disabled and it is ignored (that is, treated as disabled) for classes with a recent bytecode version\&. You can enable it for classes with older versions of the bytecode\&.
-.TP
--XX:InitialCodeCacheSize=\fIsize\fR
-.br
-Sets the initial code cache size (in bytes)\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. The default value is set to 500 KB\&. The following example shows how to set the initial code cache size to 32 KB:
-.sp
-.nf
-\f3\-XX:InitialCodeCacheSize=32k\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:+Inline
-.br
-Enables method inlining\&. This option is enabled by default to increase performance\&. To disable method inlining, specify \f3-XX:-Inline\fR\&.
-.TP
--XX:InlineSmallCode=\fIsize\fR
-.br
-Sets the maximum code size (in bytes) for compiled methods that should be inlined\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. Only compiled methods with the size smaller than the specified size will be inlined\&. By default, the maximum code size is set to 1000 bytes:
-.sp
-.nf
-\f3\-XX:InlineSmallCode=1000\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:+LogCompilation
-.br
-Enables logging of compilation activity to a file named \f3hotspot\&.log\fR in the current working directory\&. You can specify a different log file path and name using the \f3-XX:LogFile\fR option\&.
-
-By default, this option is disabled and compilation activity is not logged\&. The \f3-XX:+LogCompilation\fR option has to be used together with the \f3-XX:UnlockDiagnosticVMOptions\fR option that unlocks diagnostic JVM options\&.
-
-You can enable verbose diagnostic output with a message printed to the console every time a method is compiled by using the \f3-XX:+PrintCompilation\fR option\&.
-.TP
--XX:MaxInlineSize=\fIsize\fR
-.br
-Sets the maximum bytecode size (in bytes) of a method to be inlined\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. By default, the maximum bytecode size is set to 35 bytes:
-.sp
-.nf
-\f3\-XX:MaxInlineSize=35\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:MaxNodeLimit=\fInodes\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CompileThreshold=5000\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+You can completely disable interpretation of Java methods before compilation by specifying the
+\fB\-Xcomp\fR
+option\&.
+.RE
+.PP
+\-XX:+DoEscapeAnalysis
+.RS 4
+Enables the use of escape analysis\&. This option is enabled by default\&. To disable the use of escape analysis, specify
+\fB\-XX:\-DoEscapeAnalysis\fR\&. Only the Java HotSpot Server VM supports this option\&.
+.RE
+.PP
+\-XX:InitialCodeCacheSize=\fIsize\fR
+.RS 4
+Sets the initial code cache size (in bytes)\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. The default value is set to 500 KB\&. The following example shows how to set the initial code cache size to 32 KB:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:InitialCodeCacheSize=32k\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:+Inline
+.RS 4
+Enables method inlining\&. This option is enabled by default to increase performance\&. To disable method inlining, specify
+\fB\-XX:\-Inline\fR\&.
+.RE
+.PP
+\-XX:InlineSmallCode=\fIsize\fR
+.RS 4
+Sets the maximum code size (in bytes) for compiled methods that should be inlined\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. Only compiled methods with the size smaller than the specified size will be inlined\&. By default, the maximum code size is set to 1000 bytes:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:InlineSmallCode=1000\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:+LogCompilation
+.RS 4
+Enables logging of compilation activity to a file named
+\fBhotspot\&.log\fR
+in the current working directory\&. You can specify a different log file path and name using the
+\fB\-XX:LogFile\fR
+option\&.
+.sp
+By default, this option is disabled and compilation activity is not logged\&. The
+\fB\-XX:+LogCompilation\fR
+option has to be used together with the
+\fB\-XX:UnlockDiagnosticVMOptions\fR
+option that unlocks diagnostic JVM options\&.
+.sp
+You can enable verbose diagnostic output with a message printed to the console every time a method is compiled by using the
+\fB\-XX:+PrintCompilation\fR
+option\&.
+.RE
+.PP
+\-XX:MaxInlineSize=\fIsize\fR
+.RS 4
+Sets the maximum bytecode size (in bytes) of a method to be inlined\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. By default, the maximum bytecode size is set to 35 bytes:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:MaxInlineSize=35\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:MaxNodeLimit=\fInodes\fR
+.RS 4
Sets the maximum number of nodes to be used during single method compilation\&. By default, the maximum number of nodes is set to 65,000:
-.sp
-.nf
-\f3\-XX:MaxNodeLimit=65000\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:MaxTrivialSize=\fIsize\fR
-.br
-Sets the maximum bytecode size (in bytes) of a trivial method to be inlined\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. By default, the maximum bytecode size of a trivial method is set to 6 bytes:
-.sp
-.nf
-\f3\-XX:MaxTrivialSize=6\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:+OptimizeStringConcat
-.br
-Enables the optimization of \f3String\fR concatenation operations\&. This option is enabled by default\&. To disable the optimization of \f3String\fR concatenation operations, specify \f3-XX:-OptimizeStringConcat\fR\&.
-.TP
--XX:+PrintAssembly
-.br
-Enables printing of assembly code for bytecoded and native methods by using the external \f3disassembler\&.so\fR library\&. This enables you to see the generated code, which may help you to diagnose performance issues\&.
-
-By default, this option is disabled and assembly code is not printed\&. The \f3-XX:+PrintAssembly\fR option has to be used together with the \f3-XX:UnlockDiagnosticVMOptions\fR option that unlocks diagnostic JVM options\&.
-.TP
--XX:+PrintCompilation
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:MaxNodeLimit=65000\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:MaxTrivialSize=\fIsize\fR
+.RS 4
+Sets the maximum bytecode size (in bytes) of a trivial method to be inlined\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. By default, the maximum bytecode size of a trivial method is set to 6 bytes:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:MaxTrivialSize=6\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:+OptimizeStringConcat
+.RS 4
+Enables the optimization of
+\fBString\fR
+concatenation operations\&. This option is enabled by default\&. To disable the optimization of
+\fBString\fR
+concatenation operations, specify
+\fB\-XX:\-OptimizeStringConcat\fR\&. Only the Java HotSpot Server VM supports this option\&.
+.RE
+.PP
+\-XX:+PrintAssembly
+.RS 4
+Enables printing of assembly code for bytecoded and native methods by using the external
+\fBdisassembler\&.so\fR
+library\&. This enables you to see the generated code, which may help you to diagnose performance issues\&.
+.sp
+By default, this option is disabled and assembly code is not printed\&. The
+\fB\-XX:+PrintAssembly\fR
+option has to be used together with the
+\fB\-XX:UnlockDiagnosticVMOptions\fR
+option that unlocks diagnostic JVM options\&.
+.RE
+.PP
+\-XX:+PrintCompilation
+.RS 4
Enables verbose diagnostic output from the JVM by printing a message to the console every time a method is compiled\&. This enables you to see which methods actually get compiled\&. By default, this option is disabled and diagnostic output is not printed\&.
-
-You can also log compilation activity to a file by using the \f3-XX:+LogCompilation\fR option\&.
-.TP
--XX:+PrintInlining
-.br
+.sp
+You can also log compilation activity to a file by using the
+\fB\-XX:+LogCompilation\fR
+option\&.
+.RE
+.PP
+\-XX:+PrintInlining
+.RS 4
Enables printing of inlining decisions\&. This enables you to see which methods are getting inlined\&.
-
-By default, this option is disabled and inlining information is not printed\&. The \f3-XX:+PrintInlining\fR option has to be used together with the \f3-XX:+UnlockDiagnosticVMOptions\fR option that unlocks diagnostic JVM options\&.
-.TP
--XX:+RelaxAccessControlCheck
-.br
-Decreases the amount of access control checks in the verifier\&. By default, this option is disabled, and it is ignored (that is, treated as disabled) for classes with a recent bytecode version\&. You can enable it for classes with older versions of the bytecode\&.
-.TP
--XX:ReservedCodeCacheSize=\fIsize\fR
-.br
-Sets the maximum code cache size (in bytes) for JIT-compiled code\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. This option is equivalent to \f3-Xmaxjitcodesize\fR\&.
-.TP
--XX:+TieredCompilation
-.br
-Enables the use of tiered compilation\&. By default, this option is disabled and tiered compilation is not used\&.
-.TP
--XX:+UseCodeCacheFlushing
-.br
-Enables flushing of the code cache before shutting down the compiler\&. This option is enabled by default\&. To disable flushing of the code cache before shutting down the compiler, specify \f3-XX:-UseCodeCacheFlushing\fR\&.
-.TP
--XX:+UseCondCardMark
-.br
-Enables checking of whether the card is already marked before updating the card table\&. This option is disabled by default and should only be used on machines with multiple sockets, where it will increase performance of Java applications that rely heavily on concurrent operations\&.
-.TP
--XX:+UseSuperWord
-.br
-Enables the transformation of scalar operations into superword operations\&. This option is enabled by default\&. To disable the transformation of scalar operations into superword operations, specify \f3-XX:-UseSuperWord\fR\&.
-.SS ADVANCED\ SERVICEABILITY\ OPTIONS
+.sp
+By default, this option is disabled and inlining information is not printed\&. The
+\fB\-XX:+PrintInlining\fR
+option has to be used together with the
+\fB\-XX:+UnlockDiagnosticVMOptions\fR
+option that unlocks diagnostic JVM options\&.
+.RE
+.PP
+\-XX:ReservedCodeCacheSize=\fIsize\fR
+.RS 4
+Sets the maximum code cache size (in bytes) for JIT\-compiled code\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. This option is equivalent to
+\fB\-Xmaxjitcodesize\fR\&.
+.RE
+.PP
+\-XX:+TieredCompilation
+.RS 4
+Enables the use of tiered compilation\&. By default, this option is enabled\&. Only the Java HotSpot Server VM supports this option\&.
+.RE
+.PP
+\-XX:+UseAES
+.RS 4
+Enables hardware\-based AES intrinsics for Intel, AMD, and SPARC hardware\&. Intel Westmere (2010 and newer), AMD Bulldozer (2011 and newer), and SPARC (T4 and newer) are the supported hardware\&. UseAES is used in conjunction with UseAESIntrinsics\&.
+.RE
+.PP
+\-XX:+UseAESIntrinsics
+.RS 4
+UseAES and UseAESIntrinsics flags are enabled by default and are supported only for Java HotSpot Server VM 32\-bit and 64\-bit\&. To disable hardware\-based AES intrinsics, specify
+\fB\-XX:\-UseAES \-XX:\-UseAESIntrinsics\fR\&. For example, to enable hardware AES, use the following flags:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:+UseAES \-XX:+UseAESIntrinsics\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+To support UseAES and UseAESIntrinsics flags for 32\-bit and 64\-bit use
+\fB\-server\fR
+option to choose Java HotSpot Server VM\&. These flags are not supported on Client VM\&.
+.RE
+.PP
+\-XX:+UseCodeCacheFlushing
+.RS 4
+Enables flushing of the code cache before shutting down the compiler\&. This option is enabled by default\&. To disable flushing of the code cache before shutting down the compiler, specify
+\fB\-XX:\-UseCodeCacheFlushing\fR\&.
+.RE
+.PP
+\-XX:+UseCondCardMark
+.RS 4
+Enables checking of whether the card is already marked before updating the card table\&. This option is disabled by default and should only be used on machines with multiple sockets, where it will increase performance of Java applications that rely heavily on concurrent operations\&. Only the Java HotSpot Server VM supports this option\&.
+.RE
+.PP
+\-XX:+UseSuperWord
+.RS 4
+Enables the transformation of scalar operations into superword operations\&. This option is enabled by default\&. To disable the transformation of scalar operations into superword operations, specify
+\fB\-XX:\-UseSuperWord\fR\&. Only the Java HotSpot Server VM supports this option\&.
+.RE
+.SS "Experimental JIT Compiler Options"
+.PP
+The options related to the Restricted Transactional Memory (RTM) locking feature in this section are experimental and are not officially supported in Java SE 8u20; you must enable the
+\fB\-XX:+UnlockExperimentalVMOptions\fR
+option to use them\&. These options are only available for the Java HotSpot Server VM on x86 CPUs that support Transactional Synchronization Extensions (TSX)\&.
+.PP
+\-XX:RTMAbortRatio=\fIabort_ratio\fR
+.RS 4
+The RTM abort ratio is specified as a percentage (%) of all executed RTM transactions\&. If a number of aborted transactions becomes greater than this ratio, then the compiled code will be deoptimized\&. This ratio is used when the
+\fB\-XX:+UseRTMDeopt\fR
+option is enabled\&. The default value of this option is 50\&. This means that the compiled code will be deoptimized if 50% of all transactions are aborted\&.
+.RE
+.PP
+\-XX:RTMRetryCount=\fInumber_of_retries\fR
+.RS 4
+RTM locking code will be retried, when it is aborted or busy, the number of times specified by this option before falling back to the normal locking mechanism\&. The default value for this option is 5\&. The
+\fB\-XX:UseRTMLocking\fR
+option must be enabled\&.
+.RE
+.PP
+\-XX:+UseRTMDeopt
+.RS 4
+Auto\-tunes RTM locking depending on the abort ratio\&. This ratio is specified by
+\fB\-XX:RTMAbortRatio\fR
+option\&. If the number of aborted transactions exceeds the abort ratio, then the method containing the lock will be deoptimized and recompiled with all locks as normal locks\&. This option is disabled by default\&. The
+\fB\-XX:UseRTMLocking\fR
+option must be enabled\&.
+.RE
+.PP
+\-XX:+UseRTMLocking
+.RS 4
+Generate Restricted Transactional Memory (RTM) locking code for all inflated locks, with the normal locking mechanism as the fallback handler\&. This option is disabled by default\&.
+.sp
+RTM is part of Intel\*(Aqs Transactional Synchronization Extensions (TSX), which is an x86 instruction set extension and facilitates the creation of multithreaded applications\&. RTM introduces the new instructions
+\fBXBEGIN\fR,
+\fBXABORT\fR,
+\fBXEND\fR, and
+\fBXTEST\fR\&. The
+\fBXBEGIN\fR
+and
+\fBXEND\fR
+instructions enclose a set of instructions to run as a transaction\&. If no conflict is found when running the transaction, the memory and register modifications are committed together at the
+\fBXEND\fR
+instruction\&. The
+\fBXABORT\fR
+instruction can be used to explicitly abort a transaction and the
+\fBXEND\fR
+instruction to check if a set of instructions are being run in a transaction\&.
+.sp
+A lock on a transaction is inflated when another thread tries to access the same transaction, thereby blocking the thread that did not originally request access to the transaction\&. RTM requires that a fallback set of operations be specified in case a transaction aborts or fails\&. An RTM lock is a lock that has been delegated to the TSX\*(Aqs system\&.
+.sp
+RTM improves performance for highly contended locks with low conflict in a critical region (which is code that must not be accessed by more than one thread concurrently)\&. RTM also improves the performance of coarse\-grain locking, which typically does not perform well in multithreaded applications\&. (Coarse\-grain locking is the strategy of holding locks for long periods to minimize the overhead of taking and releasing locks, while fine\-grained locking is the strategy of trying to achieve maximum parallelism by locking only when necessary and unlocking as soon as possible\&.) Also, for lightly contended locks that are used by different threads, RTM can reduce false cache line sharing, also known as cache line ping\-pong\&. This occurs when multiple threads from different processors are accessing different resources, but the resources share the same cache line\&. As a result, the processors repeatedly invalidate the cache lines of other processors, which forces them to read from main memory instead of their cache\&.
+.RE
+.SS "Advanced Serviceability Options"
+.PP
These options provide the ability to gather system information and perform extensive debugging\&.
-.TP
--XX:+ExtendedDTraceProbes
-.br
-Enables additional \f3dtrace\fR tool probes that impact the performance\&. By default, this option is disabled and \f3dtrace\fR performs only standard probes\&.
-.TP
--XX:+HeapDumpOnOutOfMemory
-.br
-Enables the dumping of the Java heap to a file in the current directory by using the heap profiler (HPROF) when a \f3java\&.lang\&.OutOfMemoryError\fR exception is thrown\&. You can explicitly set the heap dump file path and name using the \f3-XX:HeapDumpPath\fR option\&. By default, this option is disabled and the heap is not dumped when an \f3OutOfMemoryError\fR exception is thrown\&.
-.TP
--XX:HeapDumpPath=\fIpath\fR
-.br
-Sets the path and file name for writing the heap dump provided by the heap profiler (HPROF) when the \f3-XX:+HeapDumpOnOutOfMemoryError\fR option is set\&. By default, the file is created in the current working directory, and it is named \f3java_pid\fR\fIpid\fR\f3\&.hprof\fR where \fIpid\fR is the identifier of the process that caused the error\&. The following example shows how to set the default file explicitly (\f3%p\fR represents the current process identificator):
-.sp
-.nf
-\f3\-XX:HeapDumpPath=\&./java_pid%p\&.hprof\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-\fI\fRThe following example shows how to set the heap dump file to \f3/var/log/java/java_heapdump\&.hprof\fR:
-.sp
-.nf
-\f3\-XX:HeapDumpPath=/var/log/java/java_heapdump\&.hprof\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:LogFile=\fIpath\fR
-.br
-Sets the path and file name where log data is written\&. By default, the file is created in the current working directory, and it is named \f3hotspot\&.log\fR\&.
-
-\fI\fRThe following example shows how to set the log file to \f3/var/log/java/hotspot\&.log\fR:
-.sp
-.nf
-\f3\-XX:LogFile=/var/log/java/hotspot\&.log\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:+PrintClassHistogram
-.br
-\fI\fREnables printing of a class instance histogram after a \f3Control+C\fR event (\f3SIGTERM\fR)\&. By default, this option is disabled\&.
-
-Setting this option is equivalent to running the \f3jmap -histo\fR command, or the \f3jcmd\fR\fIpid\fR\f3GC\&.class_histogram\fR command, where \fIpid\fR is the current Java process identifier\&.
-.TP
--XX:+PrintConcurrentLocks
-
-
-Enables printing of j\f3ava\&.util\&.concurrent\fR locks after a \f3Control+C\fR event (\f3SIGTERM\fR)\&. By default, this option is disabled\&.
-
-Setting this option is equivalent to running the \f3jstack -l\fR command or the \f3jcmd\fR\fIpid\fR\f3Thread\&.print -l\fR command, where \fIpid\fR is the current Java process identifier\&.
-.TP
--XX:+UnlockDiagnosticVMOptions
-.br
+.PP
+\-XX:+ExtendedDTraceProbes
+.RS 4
+Enables additional
+\fBdtrace\fR
+tool probes that impact the performance\&. By default, this option is disabled and
+\fBdtrace\fR
+performs only standard probes\&.
+.RE
+.PP
+\-XX:+HeapDumpOnOutOfMemory
+.RS 4
+Enables the dumping of the Java heap to a file in the current directory by using the heap profiler (HPROF) when a
+\fBjava\&.lang\&.OutOfMemoryError\fR
+exception is thrown\&. You can explicitly set the heap dump file path and name using the
+\fB\-XX:HeapDumpPath\fR
+option\&. By default, this option is disabled and the heap is not dumped when an
+\fBOutOfMemoryError\fR
+exception is thrown\&.
+.RE
+.PP
+\-XX:HeapDumpPath=\fIpath\fR
+.RS 4
+Sets the path and file name for writing the heap dump provided by the heap profiler (HPROF) when the
+\fB\-XX:+HeapDumpOnOutOfMemoryError\fR
+option is set\&. By default, the file is created in the current working directory, and it is named
+\fBjava_pid\fR\fIpid\fR\fB\&.hprof\fR
+where
+\fIpid\fR
+is the identifier of the process that caused the error\&. The following example shows how to set the default file explicitly (\fB%p\fR
+represents the current process identificator):
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:HeapDumpPath=\&./java_pid%p\&.hprof\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The following example shows how to set the heap dump file to
+\fB/var/log/java/java_heapdump\&.hprof\fR:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:HeapDumpPath=/var/log/java/java_heapdump\&.hprof\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:LogFile=\fIpath\fR
+.RS 4
+Sets the path and file name where log data is written\&. By default, the file is created in the current working directory, and it is named
+\fBhotspot\&.log\fR\&.
+.sp
+The following example shows how to set the log file to
+\fB/var/log/java/hotspot\&.log\fR:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:LogFile=/var/log/java/hotspot\&.log\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:+PrintClassHistogram
+.RS 4
+Enables printing of a class instance histogram after a
+\fBControl+C\fR
+event (\fBSIGTERM\fR)\&. By default, this option is disabled\&.
+.sp
+Setting this option is equivalent to running the
+\fBjmap \-histo\fR
+command, or the
+\fBjcmd \fR\fIpid\fR\fB GC\&.class_histogram\fR
+command, where
+\fIpid\fR
+is the current Java process identifier\&.
+.RE
+.PP
+\-XX:+PrintConcurrentLocks
+.RS 4
+Enables printing of j locks after a event\&. By default, this option is disabled\&.
+.sp
+Enables printing of j\fBava\&.util\&.concurrent\fR
+locks after a
+\fBControl+C\fR
+event (\fBSIGTERM\fR)\&. By default, this option is disabled\&.
+.sp
+Setting this option is equivalent to running the
+\fBjstack \-l\fR
+command or the
+\fBjcmd \fR\fIpid\fR\fB Thread\&.print \-l\fR
+command, where
+\fIpid\fR
+is the current Java process identifier\&.
+.RE
+.PP
+\-XX:+UnlockDiagnosticVMOptions
+.RS 4
Unlocks the options intended for diagnosing the JVM\&. By default, this option is disabled and diagnostic options are not available\&.
-.SS ADVANCED\ GARBAGE\ COLLECTION\ OPTIONS
+.RE
+.SS "Advanced Garbage Collection Options"
+.PP
These options control how garbage collection (GC) is performed by the Java HotSpot VM\&.
-.TP
--XX:+AggressiveHeap
-.br
-Enables Java heap optimization\&. This sets various parameters to be optimal for long-running jobs with intensive memory allocation, based on the configuration of the computer (RAM and CPU)\&. By default, the option is disabled and the heap is not optimized\&.
-.TP
--XX:AllocatePrefetchDistance=\fIsize\fR
-.br
-Sets the size (in bytes) of the prefetch distance for object allocation\&. Memory about to be written with the value of new objects is prefetched up to this distance starting from the address of the last allocated object\&. Each Java thread has its own allocation point\&.
-
-Negative values denote that prefetch distance is chosen based on the platform\&. Positive values are bytes to prefetch\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. The default value is set to -1\&.
-
-The following example shows how to set the prefetch distance to 1024 bytes:
-.sp
-.nf
-\f3\-XX:AllocatePrefetchDistance=1024\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:AllocatePrefetchLines=\fIlines\fR
-.br
-Sets the number of cache lines to load after the last object allocation by using the prefetch instructions generated in compiled code\&. The default value is 1 if the last allocated object was an instance, and 3 if it was an array\&.
-
-The following example shows how to set the number of loaded cache lines to 5:
-.sp
-.nf
-\f3\-XX:AllocatePrefetchLines=5\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:AllocatePrefetchStyle=\fIstyle\fR
-.br
-Sets the generated code style for prefetch instructions\&. The \fIstyle\fR argument is an integer from 0 to 3:
-.RS
-.TP
-0
-Do not generate prefetch instructions\&.
-.TP
-1
-Execute prefetch instructions after each allocation\&. This is the default parameter\&.
-.TP
-2
-Use the thread-local allocation block (TLAB) watermark pointer to determine when prefetch instructions are executed\&.
-.TP
-3
-Use BIS instruction on SPARC for allocation prefetch\&.
-.RE
-
-.TP
--XX:+AlwaysPreTouch
-.br
-Enables touching of every page on the Java heap during JVM initialization\&. This gets all pages into the memory before entering the \f3main()\fR method\&. The option can be used in testing to simulate a long-running system with all virtual memory mapped to physical memory\&. By default, this option is disabled and all pages are committed as JVM heap space fills\&.
-.TP
--XX:+CMSClassUnloadingEnabled
-.br
-Enables class unloading when using the concurrent mark-sweep (CMS) garbage collector\&. This option is enabled by default\&. To disable class unloading for the CMS garbage collector, specify \f3-XX:-CMSClassUnloadingEnabled\fR\&.
-.TP
--XX:CMSExpAvgFactor=\fIpercent\fR
-.br
+.PP
+\-XX:+AggressiveHeap
+.RS 4
+Enables Java heap optimization\&. This sets various parameters to be optimal for long\-running jobs with intensive memory allocation, based on the configuration of the computer (RAM and CPU)\&. By default, the option is disabled and the heap is not optimized\&.
+.RE
+.PP
+\-XX:+AlwaysPreTouch
+.RS 4
+Enables touching of every page on the Java heap during JVM initialization\&. This gets all pages into the memory before entering the
+\fBmain()\fR
+method\&. The option can be used in testing to simulate a long\-running system with all virtual memory mapped to physical memory\&. By default, this option is disabled and all pages are committed as JVM heap space fills\&.
+.RE
+.PP
+\-XX:+CMSClassUnloadingEnabled
+.RS 4
+Enables class unloading when using the concurrent mark\-sweep (CMS) garbage collector\&. This option is enabled by default\&. To disable class unloading for the CMS garbage collector, specify
+\fB\-XX:\-CMSClassUnloadingEnabled\fR\&.
+.RE
+.PP
+\-XX:CMSExpAvgFactor=\fIpercent\fR
+.RS 4
Sets the percentage of time (0 to 100) used to weight the current sample when computing exponential averages for the concurrent collection statistics\&. By default, the exponential averages factor is set to 25%\&. The following example shows how to set the factor to 15%:
-.sp
-.nf
-\f3\-XX:CMSExpAvgFactor=15\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:CMSInitiatingOccupancyFraction=\fIpercent\fR
-.br
-Sets the percentage of the old generation occupancy (0 to 100) at which to start a CMS collection cycle\&. The default value is set to -1\&. Any negative value (including the default) implies that \f3-XX:CMSTriggerRatio\fR is used to define the value of the initiating occupancy fraction\&.
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CMSExpAvgFactor=15\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:CMSInitiatingOccupancyFraction=\fIpercent\fR
+.RS 4
+Sets the percentage of the old generation occupancy (0 to 100) at which to start a CMS collection cycle\&. The default value is set to \-1\&. Any negative value (including the default) implies that
+\fB\-XX:CMSTriggerRatio\fR
+is used to define the value of the initiating occupancy fraction\&.
+.sp
The following example shows how to set the occupancy fraction to 20%:
-.sp
-.nf
-\f3\-XX:CMSInitiatingOccupancyFraction=20\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:+CMSScavengeBeforeRemark
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CMSInitiatingOccupancyFraction=20\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:+CMSScavengeBeforeRemark
+.RS 4
Enables scavenging attempts before the CMS remark step\&. By default, this option is disabled\&.
-.TP
--XX:CMSTriggerRatio=\fIpercent\fR
-.br
-Sets the percentage (0 to 100) of the value specified by \f3-XX:MinHeapFreeRatio\fR that is allocated before a CMS collection cycle commences\&. The default value is set to 80%\&.
-
+.RE
+.PP
+\-XX:CMSTriggerRatio=\fIpercent\fR
+.RS 4
+Sets the percentage (0 to 100) of the value specified by
+\fB\-XX:MinHeapFreeRatio\fR
+that is allocated before a CMS collection cycle commences\&. The default value is set to 80%\&.
+.sp
The following example shows how to set the occupancy fraction to 75%:
-.sp
-.nf
-\f3\-XX:CMSTriggerRatio=75\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:ConcGCThreads=\fIthreads\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CMSTriggerRatio=75\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:ConcGCThreads=\fIthreads\fR
+.RS 4
Sets the number of threads used for concurrent GC\&. The default value depends on the number of CPUs available to the JVM\&.
-
+.sp
For example, to set the number of threads for concurrent GC to 2, specify the following option:
-.sp
-.nf
-\f3\-XX:ConcGCThreads=2\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:+DisableExplicitGC
-.br
-Enables the option that disables processing of calls to \f3System\&.gc()\fR\&. This option is disabled by default, meaning that calls to \f3System\&.gc()\fR are processed\&. If processing of calls to \f3System\&.gc()\fR is disabled, the JVM still performs GC when necessary\&.
-.TP
--XX:+ExplicitGCInvokesConcurrent
-.br
-Enables invoking of concurrent GC by using the \f3System\&.gc()\fR request\&. This option is disabled by default and can be enabled only together with the \f3-XX:+UseConcMarkSweepGC\fR option\&.
-.TP
--XX:+ExplicitGCInvokesConcurrentAndUnloadsClasses
-.br
-Enables invoking of concurrent GC by using the \f3System\&.gc()\fR request and unloading of classes during the concurrent GC cycle\&. This option is disabled by default and can be enabled only together with the \f3-XX:+UseConcMarkSweepGC\fR option\&.
-.TP
--XX:G1HeapRegionSize=\fIsize\fR
-.br
-Sets the size of the regions into which the Java heap is subdivided when using the garbage-first (G1) collector\&. The value can be between 1 MB and 32 MB\&. The default region size is determined ergonomically based on the heap size\&.
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:ConcGCThreads=2\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:+DisableExplicitGC
+.RS 4
+Enables the option that disables processing of calls to
+\fBSystem\&.gc()\fR\&. This option is disabled by default, meaning that calls to
+\fBSystem\&.gc()\fR
+are processed\&. If processing of calls to
+\fBSystem\&.gc()\fR
+is disabled, the JVM still performs GC when necessary\&.
+.RE
+.PP
+\-XX:+ExplicitGCInvokesConcurrent
+.RS 4
+Enables invoking of concurrent GC by using the
+\fBSystem\&.gc()\fR
+request\&. This option is disabled by default and can be enabled only together with the
+\fB\-XX:+UseConcMarkSweepGC\fR
+option\&.
+.RE
+.PP
+\-XX:+ExplicitGCInvokesConcurrentAndUnloadsClasses
+.RS 4
+Enables invoking of concurrent GC by using the
+\fBSystem\&.gc()\fR
+request and unloading of classes during the concurrent GC cycle\&. This option is disabled by default and can be enabled only together with the
+\fB\-XX:+UseConcMarkSweepGC\fR
+option\&.
+.RE
+.PP
+\-XX:G1HeapRegionSize=\fIsize\fR
+.RS 4
+Sets the size of the regions into which the Java heap is subdivided when using the garbage\-first (G1) collector\&. The value can be between 1 MB and 32 MB\&. The default region size is determined ergonomically based on the heap size\&.
+.sp
The following example shows how to set the size of the subdivisions to 16 MB:
-.sp
-.nf
-\f3\-XX:G1HeapRegionSize=16m\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:+G1PrintHeapRegions
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:G1HeapRegionSize=16m\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:+G1PrintHeapRegions
+.RS 4
Enables the printing of information about which regions are allocated and which are reclaimed by the G1 collector\&. By default, this option is disabled\&.
-.TP
--XX:G1ReservePercent=\fIpercent\fR
-.br
+.RE
+.PP
+\-XX:G1ReservePercent=\fIpercent\fR
+.RS 4
Sets the percentage of the heap (0 to 50) that is reserved as a false ceiling to reduce the possibility of promotion failure for the G1 collector\&. By default, this option is set to 10%\&.
-
+.sp
The following example shows how to set the reserved heap to 20%:
-.sp
-.nf
-\f3\-XX:G1ReservePercent=20\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:InitialHeapSize=\fIsize\fR
-.br
-Sets the initial size (in bytes) of the memory allocation pool\&. This value must be either 0, or a multiple of 1024 and greater than 1 MB\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. The default value is chosen at runtime based on system configuration\&. For more information, see Garbage Collector Ergonomics at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/gc-ergonomics\&.html
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:G1ReservePercent=20\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:InitialHeapSize=\fIsize\fR
+.RS 4
+Sets the initial size (in bytes) of the memory allocation pool\&. This value must be either 0, or a multiple of 1024 and greater than 1 MB\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. The default value is chosen at runtime based on system configuration\&. For more information, see Garbage Collector Ergonomics at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/gc\-ergonomics\&.html
+.sp
The following examples show how to set the size of allocated memory to 6 MB using various units:
-.sp
-.nf
-\f3\-XX:InitialHeapSize=6291456\fP
-.fi
-.nf
-\f3\-XX:InitialHeapSize=6144k\fP
-.fi
-.nf
-\f3\-XX:InitialHeapSize=6m\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-If you set this option to 0, then the initial size will be set as the sum of the sizes allocated for the old generation and the young generation\&. The size of the heap for the young generation can be set using the \f3-XX:NewSize\fR option\&.
-.TP
--XX:InitialSurvivorRatio=\fIratio\fR
-.br
-Sets the initial survivor space ratio used by the throughput garbage collector (which is enabled by the \f3-XX:+UseParallelGC\fR and/or -\f3XX:+UseParallelOldGC\fR options)\&. Adaptive sizing is enabled by default with the throughput garbage collector by using the \f3-XX:+UseParallelGC\fR and \f3-XX:+UseParallelOldGC\fR options, and survivor space is resized according to the application behavior, starting with the initial value\&. If adaptive sizing is disabled (using the \f3-XX:-UseAdaptiveSizePolicy\fR option), then the \f3-XX:SurvivorRatio\fR option should be used to set the size of the survivor space for the entire execution of the application\&.
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:InitialHeapSize=6291456\fR
+\fB\-XX:InitialHeapSize=6144k\fR
+\fB\-XX:InitialHeapSize=6m\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+If you set this option to 0, then the initial size will be set as the sum of the sizes allocated for the old generation and the young generation\&. The size of the heap for the young generation can be set using the
+\fB\-XX:NewSize\fR
+option\&.
+.RE
+.PP
+\-XX:InitialSurvivorRatio=\fIratio\fR
+.RS 4
+Sets the initial survivor space ratio used by the throughput garbage collector (which is enabled by the
+\fB\-XX:+UseParallelGC\fR
+and/or \-\fBXX:+UseParallelOldGC\fR
+options)\&. Adaptive sizing is enabled by default with the throughput garbage collector by using the
+\fB\-XX:+UseParallelGC\fR
+and
+\fB\-XX:+UseParallelOldGC\fR
+options, and survivor space is resized according to the application behavior, starting with the initial value\&. If adaptive sizing is disabled (using the
+\fB\-XX:\-UseAdaptiveSizePolicy\fR
+option), then the
+\fB\-XX:SurvivorRatio\fR
+option should be used to set the size of the survivor space for the entire execution of the application\&.
+.sp
The following formula can be used to calculate the initial size of survivor space (S) based on the size of the young generation (Y), and the initial survivor space ratio (R):
-.sp
-.nf
-\f3S=Y/(R+2)\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBS=Y/(R+2)\fR
+
+.fi
+.if n \{\
+.RE
+.\}
The 2 in the equation denotes two survivor spaces\&. The larger the value specified as the initial survivor space ratio, the smaller the initial survivor space size\&.
-
+.sp
By default, the initial survivor space ratio is set to 8\&. If the default value for the young generation space size is used (2 MB), the initial size of the survivor space will be 0\&.2 MB\&.
-
+.sp
The following example shows how to set the initial survivor space ratio to 4:
-.sp
-.nf
-\f3\-XX:InitialSurvivorRatio=4\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:InitiatingHeapOccupancyPercent=\fIpercent\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:InitialSurvivorRatio=4\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:InitiatingHeapOccupancyPercent=\fIpercent\fR
+.RS 4
Sets the percentage of the heap occupancy (0 to 100) at which to start a concurrent GC cycle\&. It is used by garbage collectors that trigger a concurrent GC cycle based on the occupancy of the entire heap, not just one of the generations (for example, the G1 garbage collector)\&.
-
+.sp
By default, the initiating value is set to 45%\&. A value of 0 implies nonstop GC cycles\&. The following example shows how to set the initiating heap occupancy to 75%:
-.sp
-.nf
-\f3\-XX:InitiatingHeapOccupancyPercent=75\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:MaxGCPauseMillis=\fItime\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:InitiatingHeapOccupancyPercent=75\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:MaxGCPauseMillis=\fItime\fR
+.RS 4
Sets a target for the maximum GC pause time (in milliseconds)\&. This is a soft goal, and the JVM will make its best effort to achieve it\&. By default, there is no maximum pause time value\&.
-
+.sp
The following example shows how to set the maximum target pause time to 500 ms:
-.sp
-.nf
-\f3\-XX:MaxGCPauseMillis=500\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:MaxHeapSize=\fIsize\fR
-.br
-Sets the maximum size (in byes) of the memory allocation pool\&. This value must be a multiple of 1024 and greater than 2 MB\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. The default value is chosen at runtime based on system configuration\&. For server deployments, \f3-XX:InitialHeapSize\fR and \f3-XX:MaxHeapSize\fR are often set to the same value\&. For more information, see Garbage Collector Ergonomics at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/gc-ergonomics\&.html
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:MaxGCPauseMillis=500\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:MaxHeapSize=\fIsize\fR
+.RS 4
+Sets the maximum size (in byes) of the memory allocation pool\&. This value must be a multiple of 1024 and greater than 2 MB\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. The default value is chosen at runtime based on system configuration\&. For server deployments,
+\fB\-XX:InitialHeapSize\fR
+and
+\fB\-XX:MaxHeapSize\fR
+are often set to the same value\&. For more information, see Garbage Collector Ergonomics at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/gc\-ergonomics\&.html
+.sp
The following examples show how to set the maximum allowed size of allocated memory to 80 MB using various units:
-.sp
-.nf
-\f3\-XX:MaxHeapSize=83886080\fP
-.fi
-.nf
-\f3\-XX:MaxHeapSize=81920k\fP
-.fi
-.nf
-\f3\-XX:MaxHeapSize=80m\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:MaxHeapSize=83886080\fR
+\fB\-XX:MaxHeapSize=81920k\fR
+\fB\-XX:MaxHeapSize=80m\fR
+
+.fi
+.if n \{\
+.RE
+.\}
On Oracle Solaris 7 and Oracle Solaris 8 SPARC platforms, the upper limit for this value is approximately 4,000 MB minus overhead amounts\&. On Oracle Solaris 2\&.6 and x86 platforms, the upper limit is approximately 2,000 MB minus overhead amounts\&. On Linux platforms, the upper limit is approximately 2,000 MB minus overhead amounts\&.
-
-The \f3-XX:MaxHeapSize\fR option is equivalent to \f3-Xmx\fR\&.
-.TP
--XX:MaxHeapFreeRatio=\fIpercent\fR
-.br
+.sp
+The
+\fB\-XX:MaxHeapSize\fR
+option is equivalent to
+\fB\-Xmx\fR\&.
+.RE
+.PP
+\-XX:MaxHeapFreeRatio=\fIpercent\fR
+.RS 4
Sets the maximum allowed percentage of free heap space (0 to 100) after a GC event\&. If free heap space expands above this value, then the heap will be shrunk\&. By default, this value is set to 70%\&.
-
+.sp
The following example shows how to set the maximum free heap ratio to 75%:
-.sp
-.nf
-\f3\-XX:MaxHeapFreeRatio=75\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:MaxMetaspaceSize=\fIsize\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:MaxHeapFreeRatio=75\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:MaxMetaspaceSize=\fIsize\fR
+.RS 4
Sets the maximum amount of native memory that can be allocated for class metadata\&. By default, the size is not limited\&. The amount of metadata for an application depends on the application itself, other running applications, and the amount of memory available on the system\&.
-
+.sp
The following example shows how to set the maximum class metadata size to 256 MB:
-.sp
-.nf
-\f3\-XX:MaxMetaspaceSize=256m\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:MaxNewSize=\fIsize\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:MaxMetaspaceSize=256m\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:MaxNewSize=\fIsize\fR
+.RS 4
Sets the maximum size (in bytes) of the heap for the young generation (nursery)\&. The default value is set ergonomically\&.
-.TP
--XX:MaxTenuringThreshold=\fIthreshold\fR
-.br
+.RE
+.PP
+\-XX:MaxTenuringThreshold=\fIthreshold\fR
+.RS 4
Sets the maximum tenuring threshold for use in adaptive GC sizing\&. The largest value is 15\&. The default value is 15 for the parallel (throughput) collector, and 6 for the CMS collector\&.
-
+.sp
The following example shows how to set the maximum tenuring threshold to 10:
-.sp
-.nf
-\f3\-XX:MaxTenuringThreshold=10\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:MetaspaceSize=\fIsize\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:MaxTenuringThreshold=10\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:MetaspaceSize=\fIsize\fR
+.RS 4
Sets the size of the allocated class metadata space that will trigger a garbage collection the first time it is exceeded\&. This threshold for a garbage collection is increased or decreased depending on the amount of metadata used\&. The default size depends on the platform\&.
-.TP
--XX:MinHeapFreeRatio=\fIpercent\fR
-.br
+.RE
+.PP
+\-XX:MinHeapFreeRatio=\fIpercent\fR
+.RS 4
Sets the minimum allowed percentage of free heap space (0 to 100) after a GC event\&. If free heap space falls below this value, then the heap will be expanded\&. By default, this value is set to 40%\&.
-
+.sp
The following example shows how to set the minimum free heap ratio to 25%:
-.sp
-.nf
-\f3\-XX:MinHeapFreeRatio=25\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:NewRatio=\fIratio\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:MinHeapFreeRatio=25\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:NewRatio=\fIratio\fR
+.RS 4
Sets the ratio between young and old generation sizes\&. By default, this option is set to 2\&. The following example shows how to set the young/old ratio to 1:
-.sp
-.nf
-\f3\-XX:NewRatio=1\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:NewSize=\fIsize\fR
-.br
-Sets the initial size (in bytes) of the heap for the young generation (nursery)\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&.
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:NewRatio=1\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:NewSize=\fIsize\fR
+.RS 4
+Sets the initial size (in bytes) of the heap for the young generation (nursery)\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&.
+.sp
The young generation region of the heap is used for new objects\&. GC is performed in this region more often than in other regions\&. If the size for the young generation is too low, then a large number of minor GCs will be performed\&. If the size is too high, then only full GCs will be performed, which can take a long time to complete\&. Oracle recommends that you keep the size for the young generation between a half and a quarter of the overall heap size\&.
-
+.sp
The following examples show how to set the initial size of young generation to 256 MB using various units:
-.sp
-.nf
-\f3\-XX:NewSize=256m\fP
-.fi
-.nf
-\f3\-XX:NewSize=262144k\fP
-.fi
-.nf
-\f3\-XX:NewSize=268435456\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-The \f3-XX:NewSize\fR option is equivalent to \f3-Xmn\fR\&.
-.TP
--XX:ParallelGCThreads=\fIthreads\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:NewSize=256m\fR
+\fB\-XX:NewSize=262144k\fR
+\fB\-XX:NewSize=268435456\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The
+\fB\-XX:NewSize\fR
+option is equivalent to
+\fB\-Xmn\fR\&.
+.RE
+.PP
+\-XX:ParallelGCThreads=\fIthreads\fR
+.RS 4
Sets the number of threads used for parallel garbage collection in the young and old generations\&. The default value depends on the number of CPUs available to the JVM\&.
-
+.sp
For example, to set the number of threads for parallel GC to 2, specify the following option:
-.sp
-.nf
-\f3\-XX:ParallelGCThreads=2\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:+ParallelRefProcEnabled
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:ParallelGCThreads=2\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:+ParallelRefProcEnabled
+.RS 4
Enables parallel reference processing\&. By default, this option is disabled\&.
-.TP
--XX:+PrintAdaptiveSizePolicy
-.br
+.RE
+.PP
+\-XX:+PrintAdaptiveSizePolicy
+.RS 4
Enables printing of information about adaptive generation sizing\&. By default, this option is disabled\&.
-.TP
--XX:+PrintGC
-.br
+.RE
+.PP
+\-XX:+PrintGC
+.RS 4
Enables printing of messages at every GC\&. By default, this option is disabled\&.
-.TP
--XX:+PrintGCApplicationConcurrentTime
-.br
+.RE
+.PP
+\-XX:+PrintGCApplicationConcurrentTime
+.RS 4
Enables printing of how much time elapsed since the last pause (for example, a GC pause)\&. By default, this option is disabled\&.
-.TP
--XX:+PrintGCApplicationStoppedTime
-.br
+.RE
+.PP
+\-XX:+PrintGCApplicationStoppedTime
+.RS 4
Enables printing of how much time the pause (for example, a GC pause) lasted\&. By default, this option is disabled\&.
-.TP
--XX+PrintGCDateStamp
-.br
+.RE
+.PP
+\-XX:+PrintGCDateStamps
+.RS 4
Enables printing of a date stamp at every GC\&. By default, this option is disabled\&.
-.TP
--XX:+PrintGCDetails
-.br
+.RE
+.PP
+\-XX:+PrintGCDetails
+.RS 4
Enables printing of detailed messages at every GC\&. By default, this option is disabled\&.
-.TP
--XX:+PrintGCTaskTimeStamps
-.br
+.RE
+.PP
+\-XX:+PrintGCTaskTimeStamps
+.RS 4
Enables printing of time stamps for every individual GC worker thread task\&. By default, this option is disabled\&.
-.TP
--XX:+PrintGCTimeStamp
-.br
+.RE
+.PP
+\-XX:+PrintGCTimeStamps
+.RS 4
Enables printing of time stamps at every GC\&. By default, this option is disabled\&.
-.TP
--XX:+PrintTenuringDistribution
-.br
+.RE
+.PP
+\-XX:+PrintStringDeduplicationStatistics
+.RS 4
+Prints detailed deduplication statistics\&. By default, this option is disabled\&. See the
+\fB\-XX:+UseStringDeduplication\fR
+option\&.
+.RE
+.PP
+\-XX:+PrintTenuringDistribution
+.RS 4
Enables printing of tenuring age information\&. The following is an example of the output:
-.sp
-.nf
-\f3Desired survivor size 48286924 bytes, new threshold 10 (max 10)\fP
-.fi
-.nf
-\f3\- age 1: 28992024 bytes, 28992024 total\fP
-.fi
-.nf
-\f3\- age 2: 1366864 bytes, 30358888 total\fP
-.fi
-.nf
-\f3\- age 3: 1425912 bytes, 31784800 total\fP
-.fi
-.nf
-\f3\&.\&.\&.\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBDesired survivor size 48286924 bytes, new threshold 10 (max 10)\fR
+\fB\- age 1: 28992024 bytes, 28992024 total\fR
+\fB\- age 2: 1366864 bytes, 30358888 total\fR
+\fB\- age 3: 1425912 bytes, 31784800 total\fR
+\fB\&.\&.\&.\fR
+
+.fi
+.if n \{\
+.RE
+.\}
Age 1 objects are the youngest survivors (they were created after the previous scavenge, survived the latest scavenge, and moved from eden to survivor space)\&. Age 2 objects have survived two scavenges (during the second scavenge they were copied from one survivor space to the next)\&. And so on\&.
-
+.sp
In the preceding example, 28 992 024 bytes survived one scavenge and were copied from eden to survivor space, 1 366 864 bytes are occupied by age 2 objects, etc\&. The third value in each row is the cumulative size of objects of age n or less\&.
-
+.sp
By default, this option is disabled\&.
-.TP
--XX:+ScavengeBeforeFullGC
-.br
-Enables GC of the young generation before each full GC\&. This option is enabled by default\&. Oracle recommends that you \fIdo not\fR disable it, because scavenging the young generation before a full GC can reduce the number of objects reachable from the old generation space into the young generation space\&. To disable GC of the young generation before each full GC, specify \f3-XX:-ScavengeBeforeFullGC\fR\&.
-.TP
--XX:SoftRefLRUPolicyMSPerMB=\fItime\fR
-.br
-Sets the amount of time (in milliseconds) a softly reachable object is kept active on the heap after the last time it was referenced\&. The default value is one second of lifetime per free megabyte in the heap\&. The \f3-XX:SoftRefLRUPolicyMSPerMB\fR option accepts integer values representing milliseconds per one megabyte of the current heap size (for Java HotSpot Client VM) or the maximum possible heap size (for Java HotSpot Server VM)\&. This difference means that the Client VM tends to flush soft references rather than grow the heap, whereas the Server VM tends to grow the heap rather than flush soft references\&. In the latter case, the value of the \f3-Xmx\fR option has a significant effect on how quickly soft references are garbage collected\&.
-
+.RE
+.PP
+\-XX:+ScavengeBeforeFullGC
+.RS 4
+Enables GC of the young generation before each full GC\&. This option is enabled by default\&. Oracle recommends that you
+\fIdo not\fR
+disable it, because scavenging the young generation before a full GC can reduce the number of objects reachable from the old generation space into the young generation space\&. To disable GC of the young generation before each full GC, specify
+\fB\-XX:\-ScavengeBeforeFullGC\fR\&.
+.RE
+.PP
+\-XX:SoftRefLRUPolicyMSPerMB=\fItime\fR
+.RS 4
+Sets the amount of time (in milliseconds) a softly reachable object is kept active on the heap after the last time it was referenced\&. The default value is one second of lifetime per free megabyte in the heap\&. The
+\fB\-XX:SoftRefLRUPolicyMSPerMB\fR
+option accepts integer values representing milliseconds per one megabyte of the current heap size (for Java HotSpot Client VM) or the maximum possible heap size (for Java HotSpot Server VM)\&. This difference means that the Client VM tends to flush soft references rather than grow the heap, whereas the Server VM tends to grow the heap rather than flush soft references\&. In the latter case, the value of the
+\fB\-Xmx\fR
+option has a significant effect on how quickly soft references are garbage collected\&.
+.sp
The following example shows how to set the value to 2\&.5 seconds:
-.sp
-.nf
-\f3\-XX:SoftRefLRUPolicyMSPerMB=2500\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:SurvivorRatio=\fIratio\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:SoftRefLRUPolicyMSPerMB=2500\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:StringDeduplicationAgeThreshold=\fIthreshold\fR
+.RS 4
+\fBString\fR
+objects reaching the specified age are considered candidates for deduplication\&. An object\*(Aqs age is a measure of how many times it has survived garbage collection\&. This is sometimes referred to as tenuring; see the
+\fB\-XX:+PrintTenuringDistribution\fR
+option\&. Note that
+\fBString\fR
+objects that are promoted to an old heap region before this age has been reached are always considered candidates for deduplication\&. The default value for this option is
+\fB3\fR\&. See the
+\fB\-XX:+UseStringDeduplication\fR
+option\&.
+.RE
+.PP
+\-XX:SurvivorRatio=\fIratio\fR
+.RS 4
Sets the ratio between eden space size and survivor space size\&. By default, this option is set to 8\&. The following example shows how to set the eden/survivor space ratio to 4:
-.sp
-.nf
-\f3\-XX:SurvivorRatio=4\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:TargetSurvivorRatio=\fIpercent\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:SurvivorRatio=4\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:TargetSurvivorRatio=\fIpercent\fR
+.RS 4
Sets the desired percentage of survivor space (0 to 100) used after young garbage collection\&. By default, this option is set to 50%\&.
-
+.sp
The following example shows how to set the target survivor space ratio to 30%:
-.sp
-.nf
-\f3\-XX:TargetSurvivorRatio=30\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:TLABSize=\fIsize\fR
-.br
-Sets the initial size (in bytes) of a thread-local allocation buffer (TLAB)\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. If this option is set to 0, then the JVM chooses the initial size automatically\&.
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:TargetSurvivorRatio=30\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:TLABSize=\fIsize\fR
+.RS 4
+Sets the initial size (in bytes) of a thread\-local allocation buffer (TLAB)\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. If this option is set to 0, then the JVM chooses the initial size automatically\&.
+.sp
The following example shows how to set the initial TLAB size to 512 KB:
-.sp
-.nf
-\f3\-XX:TLABSize=512k\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:+UseAdaptiveSizePolicy
-.br
-Enables the use of adaptive generation sizing\&. This option is enabled by default\&. To disable adaptive generation sizing, specify \f3-XX:-UseAdaptiveSizePolicy\fR and set the size of the memory allocation pool explicitly (see the \f3-XX:SurvivorRatio\fR option)\&.
-.TP
--XX:+UseCMSInitiatingOccupancyOnly
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:TLABSize=512k\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:+UseAdaptiveSizePolicy
+.RS 4
+Enables the use of adaptive generation sizing\&. This option is enabled by default\&. To disable adaptive generation sizing, specify
+\fB\-XX:\-UseAdaptiveSizePolicy\fR
+and set the size of the memory allocation pool explicitly (see the
+\fB\-XX:SurvivorRatio\fR
+option)\&.
+.RE
+.PP
+\-XX:+UseCMSInitiatingOccupancyOnly
+.RS 4
Enables the use of the occupancy value as the only criterion for initiating the CMS collector\&. By default, this option is disabled and other criteria may be used\&.
-.TP
--XX:+UseConcMarkSweepGC
-.br
-Enables the use of the CMS garbage collector for the old generation\&. Oracle recommends that you use the CMS garbage collector when application latency requirements cannot be met by the throughput (\f3-XX:+UseParallelGC\fR) garbage collector\&. The G1 garbage collector (\f3-XX:+UseG1GC\fR) is another alternative\&.
-
-By default, this option is disabled and the collector is chosen automatically based on the configuration of the machine and type of the JVM\&. When this option is enabled, the \f3-XX:+UseParNewGC\fR option is automatically set and you should not disable it, because the following combination of options has been deprecated in JDK 8: \f3-XX:+UseConcMarkSweepGC -XX:-UseParNewGC\fR\&.
-.TP
--XX:+UseG1GC
-.br
-Enables the use of the G1 garbage collector\&. It is a server-style garbage collector, targeted for multiprocessor machines with a large amount of RAM\&. It meets GC pause time goals with high probability, while maintaining good throughput\&. The G1 collector is recommended for applications requiring large heaps (sizes of around 6 GB or larger) with limited GC latency requirements (stable and predictable pause time below 0\&.5 seconds)\&.
-
+.RE
+.PP
+\-XX:+UseConcMarkSweepGC
+.RS 4
+Enables the use of the CMS garbage collector for the old generation\&. Oracle recommends that you use the CMS garbage collector when application latency requirements cannot be met by the throughput (\fB\-XX:+UseParallelGC\fR) garbage collector\&. The G1 garbage collector (\fB\-XX:+UseG1GC\fR) is another alternative\&.
+.sp
+By default, this option is disabled and the collector is chosen automatically based on the configuration of the machine and type of the JVM\&. When this option is enabled, the
+\fB\-XX:+UseParNewGC\fR
+option is automatically set and you should not disable it, because the following combination of options has been deprecated in JDK 8:
+\fB\-XX:+UseConcMarkSweepGC \-XX:\-UseParNewGC\fR\&.
+.RE
+.PP
+\-XX:+UseG1GC
+.RS 4
+Enables the use of the garbage\-first (G1) garbage collector\&. It is a server\-style garbage collector, targeted for multiprocessor machines with a large amount of RAM\&. It meets GC pause time goals with high probability, while maintaining good throughput\&. The G1 collector is recommended for applications requiring large heaps (sizes of around 6 GB or larger) with limited GC latency requirements (stable and predictable pause time below 0\&.5 seconds)\&.
+.sp
By default, this option is disabled and the collector is chosen automatically based on the configuration of the machine and type of the JVM\&.
-.TP
--XX:+UseGCOverheadLimit
-.br
-Enables the use of a policy that limits the proportion of time spent by the JVM on GC before an \f3OutOfMemoryError\fR exception is thrown\&. This option is enabled, by default and the parallel GC will throw an \f3OutOfMemoryError\fR if more than 98% of the total time is spent on garbage collection and less than 2% of the heap is recovered\&. When the heap is small, this feature can be used to prevent applications from running for long periods of time with little or no progress\&. To disable this option, specify \f3-XX:-UseGCOverheadLimit\fR\&.
-.TP
--XX:+UseNUMA
-.br
-Enables performance optimization of an application on a machine with nonuniform memory architecture (NUMA) by increasing the application\&'s use of lower latency memory\&. By default, this option is disabled and no optimization for NUMA is made\&. The option is only available when the parallel garbage collector is used (\f3-XX:+UseParallelGC\fR)\&.
-.TP
--XX:+UseParallelGC
-.br
+.RE
+.PP
+\-XX:+UseGCOverheadLimit
+.RS 4
+Enables the use of a policy that limits the proportion of time spent by the JVM on GC before an
+\fBOutOfMemoryError\fR
+exception is thrown\&. This option is enabled, by default and the parallel GC will throw an
+\fBOutOfMemoryError\fR
+if more than 98% of the total time is spent on garbage collection and less than 2% of the heap is recovered\&. When the heap is small, this feature can be used to prevent applications from running for long periods of time with little or no progress\&. To disable this option, specify
+\fB\-XX:\-UseGCOverheadLimit\fR\&.
+.RE
+.PP
+\-XX:+UseNUMA
+.RS 4
+Enables performance optimization of an application on a machine with nonuniform memory architecture (NUMA) by increasing the application\*(Aqs use of lower latency memory\&. By default, this option is disabled and no optimization for NUMA is made\&. The option is only available when the parallel garbage collector is used (\fB\-XX:+UseParallelGC\fR)\&.
+.RE
+.PP
+\-XX:+UseParallelGC
+.RS 4
Enables the use of the parallel scavenge garbage collector (also known as the throughput collector) to improve the performance of your application by leveraging multiple processors\&.
-
-By default, this option is disabled and the collector is chosen automatically based on the configuration of the machine and type of the JVM\&. If it is enabled, then the \f3-XX:+UseParallelOldGC\fR option is automatically enabled, unless you explicitly disable it\&.
-.TP
--XX:+UseParallelOldGC
-.br
-Enables the use of the parallel garbage collector for full GCs\&. By default, this option is disabled\&. Enabling it automatically enables the \f3-XX:+UseParallelGC\fR option\&.
-.TP
--XX:+UseParNewGC
-.br
-Enables the use of parallel threads for collection in the young generation\&. By default, this option is disabled\&. It is automatically enabled when you set the \f3-XX:+UseConcMarkSweepGC\fR option\&. Using the \f3-XX:+UseParNewGC\fR option without the \f3-XX:+UseConcMarkSweepGC\fR option was deprecated in JDK 8\&.
-.TP
--XX:+UseSerialGC
-.br
+.sp
+By default, this option is disabled and the collector is chosen automatically based on the configuration of the machine and type of the JVM\&. If it is enabled, then the
+\fB\-XX:+UseParallelOldGC\fR
+option is automatically enabled, unless you explicitly disable it\&.
+.RE
+.PP
+\-XX:+UseParallelOldGC
+.RS 4
+Enables the use of the parallel garbage collector for full GCs\&. By default, this option is disabled\&. Enabling it automatically enables the
+\fB\-XX:+UseParallelGC\fR
+option\&.
+.RE
+.PP
+\-XX:+UseParNewGC
+.RS 4
+Enables the use of parallel threads for collection in the young generation\&. By default, this option is disabled\&. It is automatically enabled when you set the
+\fB\-XX:+UseConcMarkSweepGC\fR
+option\&. Using the
+\fB\-XX:+UseParNewGC\fR
+option without the
+\fB\-XX:+UseConcMarkSweepGC\fR
+option was deprecated in JDK 8\&.
+.RE
+.PP
+\-XX:+UseSerialGC
+.RS 4
Enables the use of the serial garbage collector\&. This is generally the best choice for small and simple applications that do not require any special functionality from garbage collection\&. By default, this option is disabled and the collector is chosen automatically based on the configuration of the machine and type of the JVM\&.
-.TP
--XX:+UseTLAB
-.br
-Enables the use of thread-local allocation blocks (TLABs) in the young generation space\&. This option is enabled by default\&. To disable the use of TLABs, specify \f3-XX:-UseTLAB\fR\&.
-.SS DEPRECATED\ AND\ REMOVED\ OPTIONS
+.RE
+.PP
+\-XX:+UseStringDeduplication
+.RS 4
+Enables string deduplication\&. By default, this option is disabled\&. To use this option, you must enable the garbage\-first (G1) garbage collector\&. See the
+\fB\-XX:+UseG1GC\fR
+option\&.
+.sp
+\fIString deduplication\fR
+reduces the memory footprint of
+\fBString\fR
+objects on the Java heap by taking advantage of the fact that many
+\fBString\fR
+objects are identical\&. Instead of each
+\fBString\fR
+object pointing to its own character array, identical
+\fBString\fR
+objects can point to and share the same character array\&.
+.RE
+.PP
+\-XX:+UseTLAB
+.RS 4
+Enables the use of thread\-local allocation blocks (TLABs) in the young generation space\&. This option is enabled by default\&. To disable the use of TLABs, specify
+\fB\-XX:\-UseTLAB\fR\&.
+.RE
+.SS "Deprecated and Removed Options"
+.PP
These options were included in the previous release, but have since been considered unnecessary\&.
-.TP
--Xincgc
-.br
+.PP
+\-Xincgc
+.RS 4
Enables incremental garbage collection\&. This option was deprecated in JDK 8 with no replacement\&.
-.TP
--Xrun\fIlibname\fR
-.br
-Loads the specified debugging/profiling library\&. This option was superseded by the \f3-agentlib\fR option\&.
-.TP
--XX:CMSIncrementalDutyCycle=\fIpercent\fR
-.br
-Sets the percentage of time (0 to 100) between minor collections that the concurrent collector is allowed to run\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the \f3-XX:+CMSIncrementalMode\fR option\&.
-.TP
--XX:CMSIncrementalDutyCycleMin=\fIpercent\fR
-.br
-Sets the percentage of time (0 to 100) between minor collections that is the lower bound for the duty cycle when \f3-XX:+CMSIncrementalPacing\fR is enabled\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the \f3-XX:+CMSIncrementalMode\fR option\&.
-.TP
--XX:+CMSIncrementalMode
-.br
-Enables the incremental mode for the CMS collector\&. This option was deprecated in JDK 8 with no replacement, along with other options that start with \f3CMSIncremental\fR\&.
-.TP
--XX:CMSIncrementalOffset=\fIpercent\fR
-.br
-Sets the percentage of time (0 to 100) by which the incremental mode duty cycle is shifted to the right within the period between minor collections\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the \f3-XX:+CMSIncrementalMode\fR option\&.
-.TP
--XX:+CMSIncrementalPacing
-.br
-Enables automatic adjustment of the incremental mode duty cycle based on statistics collected while the JVM is running\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the \f3-XX:+CMSIncrementalMode\fR option\&.
-.TP
--XX:CMSIncrementalSafetyFactor=\fIpercent\fR
-.br
-Sets the percentage of time (0 to 100) used to add conservatism when computing the duty cycle\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the \f3-XX:+CMSIncrementalMode\fR option\&.
-.TP
--XX:CMSInitiatingPermOccupancyFraction=\fIpercent\fR
-.br
+.RE
+.PP
+\-Xrun\fIlibname\fR
+.RS 4
+Loads the specified debugging/profiling library\&. This option was superseded by the
+\fB\-agentlib\fR
+option\&.
+.RE
+.PP
+\-XX:CMSIncrementalDutyCycle=\fIpercent\fR
+.RS 4
+Sets the percentage of time (0 to 100) between minor collections that the concurrent collector is allowed to run\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the
+\fB\-XX:+CMSIncrementalMode\fR
+option\&.
+.RE
+.PP
+\-XX:CMSIncrementalDutyCycleMin=\fIpercent\fR
+.RS 4
+Sets the percentage of time (0 to 100) between minor collections that is the lower bound for the duty cycle when
+\fB\-XX:+CMSIncrementalPacing\fR
+is enabled\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the
+\fB\-XX:+CMSIncrementalMode\fR
+option\&.
+.RE
+.PP
+\-XX:+CMSIncrementalMode
+.RS 4
+Enables the incremental mode for the CMS collector\&. This option was deprecated in JDK 8 with no replacement, along with other options that start with
+\fBCMSIncremental\fR\&.
+.RE
+.PP
+\-XX:CMSIncrementalOffset=\fIpercent\fR
+.RS 4
+Sets the percentage of time (0 to 100) by which the incremental mode duty cycle is shifted to the right within the period between minor collections\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the
+\fB\-XX:+CMSIncrementalMode\fR
+option\&.
+.RE
+.PP
+\-XX:+CMSIncrementalPacing
+.RS 4
+Enables automatic adjustment of the incremental mode duty cycle based on statistics collected while the JVM is running\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the
+\fB\-XX:+CMSIncrementalMode\fR
+option\&.
+.RE
+.PP
+\-XX:CMSIncrementalSafetyFactor=\fIpercent\fR
+.RS 4
+Sets the percentage of time (0 to 100) used to add conservatism when computing the duty cycle\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the
+\fB\-XX:+CMSIncrementalMode\fR
+option\&.
+.RE
+.PP
+\-XX:CMSInitiatingPermOccupancyFraction=\fIpercent\fR
+.RS 4
Sets the percentage of the permanent generation occupancy (0 to 100) at which to start a GC\&. This option was deprecated in JDK 8 with no replacement\&.
-.TP
--XX:MaxPermSize=\fIsize\fR
-.br
-Sets the maximum permanent generation space size (in bytes)\&. This option was deprecated in JDK 8, and superseded by the \f3-XX:MaxMetaspaceSize\fR option\&.
-.TP
--XX:PermSize=\fIsize\fR
-.br
-Sets the space (in bytes) allocated to the permanent generation that triggers a garbage collection if it is exceeded\&. This option was deprecated un JDK 8, and superseded by the \f3-XX:MetaspaceSize\fR option\&.
-.TP
--XX:+UseSplitVerifier
-.br
+.RE
+.PP
+\-XX:MaxPermSize=\fIsize\fR
+.RS 4
+Sets the maximum permanent generation space size (in bytes)\&. This option was deprecated in JDK 8, and superseded by the
+\fB\-XX:MaxMetaspaceSize\fR
+option\&.
+.RE
+.PP
+\-XX:PermSize=\fIsize\fR
+.RS 4
+Sets the space (in bytes) allocated to the permanent generation that triggers a garbage collection if it is exceeded\&. This option was deprecated un JDK 8, and superseded by the
+\fB\-XX:MetaspaceSize\fR
+option\&.
+.RE
+.PP
+\-XX:+UseSplitVerifier
+.RS 4
Enables splitting of the verification process\&. By default, this option was enabled in the previous releases, and verification was split into two phases: type referencing (performed by the compiler) and type checking (performed by the JVM runtime)\&. This option was deprecated in JDK 8, and verification is now split by default without a way to disable it\&.
-.TP
--XX:+UseStringCache
-.br
+.RE
+.PP
+\-XX:+UseStringCache
+.RS 4
Enables caching of commonly allocated strings\&. This option was removed from JDK 8 with no replacement\&.
-.SH PERFORMANCE\ TUNING\ EXAMPLES
+.RE
+.SH "PERFORMANCE TUNING EXAMPLES"
+.PP
The following examples show how to use experimental tuning flags to either optimize throughput or to provide lower response time\&.
.PP
-\f3Example 1 Tuning for Higher Throughput\fR
-.sp
-.nf
-\f3java \-d64 \-server \-XX:+AggressiveOpts \-XX:+UseLargePages \-Xmn10g \-Xms26g \-Xmx26g\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-\f3Example 2 Tuning for Lower Response Time\fR
-.sp
-.nf
-\f3java \-d64 \-XX:+UseG1GC \-Xms26g Xmx26g \-XX:MaxGCPauseMillis=500 \-XX:+PrintGCTimeStamp\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-.SH EXIT\ STATUS
-The following exit values are typically returned by the launcher when the launcher is called with the wrong arguments, serious errors, or exceptions thrown by the JVM\&. However, a Java application may choose to return any value by using the API call \f3System\&.exit(exitValue)\fR\&. The values are:
-.TP 0.2i
-\(bu
-\f30\fR: Successful completion
-.TP 0.2i
-\(bu
-\f3>0\fR: An error occurred
-.SH SEE\ ALSO
-.TP 0.2i
-\(bu
+\fBExample 1\fR
+.br
+Tuning for Higher Throughput
+.RS 4
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjava \-d64 \-server \-XX:+AggressiveOpts \-XX:+UseLargePages \-Xmn10g \-Xms26g \-Xmx26g\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBExample 2\fR
+.br
+Tuning for Lower Response Time
+.RS 4
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjava \-d64 \-XX:+UseG1GC \-Xms26g Xmx26g \-XX:MaxGCPauseMillis=500 \-XX:+PrintGCTimeStamp\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.SH "EXIT STATUS"
+.PP
+The following exit values are typically returned by the launcher when the launcher is called with the wrong arguments, serious errors, or exceptions thrown by the JVM\&. However, a Java application may choose to return any value by using the API call
+\fBSystem\&.exit(exitValue)\fR\&. The values are:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fB0\fR: Successful completion
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fB>0\fR: An error occurred
+.RE
+.SH "SEE ALSO"
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
javac(1)
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
jdb(1)
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
javah(1)
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
jar(1)
-.RE
-.br
-'pl 8.5i
-'bp
+.RE
+.br
+'pl 8.5i
+'bp
diff --git a/src/bsd/doc/man/javac.1 b/src/bsd/doc/man/javac.1
index 3cbc97614..a3d55e275 100644
--- a/src/bsd/doc/man/javac.1
+++ b/src/bsd/doc/man/javac.1
@@ -1,1364 +1,2116 @@
'\" t
-.\" Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
-.\"
-.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-.\"
-.\" This code is free software; you can redistribute it and/or modify it
-.\" under the terms of the GNU General Public License version 2 only, as
-.\" published by the Free Software Foundation.
-.\"
-.\" 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.
-.\"
-.\" Arch: generic
-.\" Software: JDK 8
-.\" Date: 21 November 2013
-.\" SectDesc: Basic Tools
-.\" Title: javac.1
+.\" Copyright (c) 1994, 2014, Oracle and/or its affiliates. All rights reserved.
+.\"
+.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+.\"
+.\" This code is free software; you can redistribute it and/or modify it
+.\" under the terms of the GNU General Public License version 2 only, as
+.\" published by the Free Software Foundation.
+.\"
+.\" 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.
+.\"
+.\" Title: javac
+.\" Language: English
+.\" Date: 8 August 2014
+.\" SectDesc: Basic Tools
+.\" Software: JDK 8
+.\" Arch: generic
+.\" Part Number: E38207-03
.\"
.if n .pl 99999
-.TH javac 1 "21 November 2013" "JDK 8" "Basic Tools"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-
-.SH NAME
+.TH "javac" "1" "8 August 2014" "JDK 8" "Basic Tools"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
javac \- Reads Java class and interface definitions and compiles them into bytecode and class files\&.
-.SH SYNOPSIS
-.sp
-.nf
-
+.SH "SYNOPSIS"
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
\fBjavac\fR [ \fIoptions\fR ] [ \fIsourcefiles\fR ] [ \fIclasses\fR] [ \fI@argfiles\fR ]
-.fi
-.sp
+.fi
+.if n \{\
+.RE
+.\}
+.PP
Arguments can be in any order:
-.TP
+.PP
\fIoptions\fR
-Command-line options\&. See Options\&.
-.TP
+.RS 4
+Command\-line options\&. See Options\&.
+.RE
+.PP
\fIsourcefiles\fR
-One or more source files to be compiled (such as \f3MyClass\&.java\fR)\&.
-.TP
+.RS 4
+One or more source files to be compiled (such as
+\fBMyClass\&.java\fR)\&.
+.RE
+.PP
\fIclasses\fR
-One or more classes to be processed for annotations (such as \f3MyPackage\&.MyClass\fR)\&.
-.TP
+.RS 4
+One or more classes to be processed for annotations (such as
+\fBMyPackage\&.MyClass\fR)\&.
+.RE
+.PP
\fI@argfiles\fR
-One or more files that list options and source files\&. The \f3-J\fR options are not allowed in these files\&. See Command-Line Argument Files\&.
-.SH DESCRIPTION
-The \f3javac\fR command reads class and interface definitions, written in the Java programming language, and compiles them into bytecode class files\&. The \f3javac\fR command can also process annotations in Java source files and classes\&.
+.RS 4
+One or more files that list options and source files\&. The
+\fB\-J\fR
+options are not allowed in these files\&. See Command\-Line Argument Files\&.
+.RE
+.SH "DESCRIPTION"
+.PP
+The
+\fBjavac\fR
+command reads class and interface definitions, written in the Java programming language, and compiles them into bytecode class files\&. The
+\fBjavac\fR
+command can also process annotations in Java source files and classes\&.
.PP
-There are two ways to pass source code file names to \f3javac\fR\&.
-.TP 0.2i
-\(bu
+There are two ways to pass source code file names to
+\fBjavac\fR\&.
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
For a small number of source files, list the file names on the command line\&.
-.TP 0.2i
-\(bu
-For a large number of source files, list the file names in a file that is separated by blanks or line breaks\&. Use the list file name preceded by an at sign (@) with the \f3javac\fR command\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+For a large number of source files, list the file names in a file that is separated by blanks or line breaks\&. Use the list file name preceded by an at sign (@) with the
+\fBjavac\fR
+command\&.
+.RE
.PP
-Source code file names must have \&.java suffixes, class file names must have \&.class suffixes, and both source and class files must have root names that identify the class\&. For example, a class called \f3MyClass\fR would be written in a source file called \f3MyClass\&.java\fR and compiled into a bytecode class file called \f3MyClass\&.class\fR\&.
+Source code file names must have \&.java suffixes, class file names must have \&.class suffixes, and both source and class files must have root names that identify the class\&. For example, a class called
+\fBMyClass\fR
+would be written in a source file called
+\fBMyClass\&.java\fR
+and compiled into a bytecode class file called
+\fBMyClass\&.class\fR\&.
.PP
-Inner class definitions produce additional class files\&. These class files have names that combine the inner and outer class names, such as \f3MyClass$MyInnerClass\&.class\fR\&.
+Inner class definitions produce additional class files\&. These class files have names that combine the inner and outer class names, such as
+\fBMyClass$MyInnerClass\&.class\fR\&.
.PP
-Arrange source files in a directory tree that reflects their package tree\&. For example, if all of your source files are in \f3/workspace\fR, then put the source code for \f3com\&.mysoft\&.mypack\&.MyClass\fR in \f3/workspace/com/mysoft/mypack/MyClass\&.java\fR\&.
+Arrange source files in a directory tree that reflects their package tree\&. For example, if all of your source files are in
+\fB/workspace\fR, then put the source code for
+\fBcom\&.mysoft\&.mypack\&.MyClass\fR
+in
+\fB/workspace/com/mysoft/mypack/MyClass\&.java\fR\&.
.PP
-By default, the compiler puts each class file in the same directory as its source file\&. You can specify a separate destination directory with the \f3-d\fR option\&.
-.SH OPTIONS
-The compiler has a set of standard options that are supported on the current development environment\&. An additional set of nonstandard options are specific to the current virtual machine and compiler implementations and are subject to change in the future\&. Nonstandard options begin with the \f3-X\fR option\&.
-.TP 0.2i
-\(bu
-See also Cross-Compilation Options
-.TP 0.2i
-\(bu
+By default, the compiler puts each class file in the same directory as its source file\&. You can specify a separate destination directory with the
+\fB\-d\fR
+option\&.
+.SH "OPTIONS"
+.PP
+The compiler has a set of standard options that are supported on the current development environment\&. An additional set of nonstandard options are specific to the current virtual machine and compiler implementations and are subject to change in the future\&. Nonstandard options begin with the
+\fB\-X\fR
+option\&.
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+See also Cross\-Compilation Options
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
See also Nonstandard Options
-.SS STANDARD\ OPTIONS
-.TP
--A\fIkey\fR[\fI=value\fR]
-.br
-Specifies options to pass to annotation processors\&. These options are not interpreted by \f3javac\fR directly, but are made available for use by individual processors\&. The \f3key\fR value should be one or more identifiers separated by a dot (\&.)\&.
-.TP
--cp \fIpath\fR or -classpath \fIpath\fR
-.br
-Specifies where to find user class files, and (optionally) annotation processors and source files\&. This class path overrides the user class path in the \f3CLASSPATH\fR environment variable\&. If neither \f3CLASSPATH\fR, \f3-cp\fR nor \f3-classpath\fR is specified, then the user \fIclass path\fR is the current directory\&. See Setting the Class Path\&.
-
-If the \f3-sourcepath\fR option is not specified, then the user class path is also searched for source files\&.
-
-If the \f3-processorpath\fR option is not specified, then the class path is also searched for annotation processors\&.
-.TP
--Djava\&.ext\&.dirs=\fIdirectories\fR
-.br
+.RE
+.SS "Standard Options"
+.PP
+\-A\fIkey\fR[\fI=value\fR]
+.RS 4
+Specifies options to pass to annotation processors\&. These options are not interpreted by
+\fBjavac\fR
+directly, but are made available for use by individual processors\&. The
+\fBkey\fR
+value should be one or more identifiers separated by a dot (\&.)\&.
+.RE
+.PP
+\-cp \fIpath\fR or \-classpath \fIpath\fR
+.RS 4
+Specifies where to find user class files, and (optionally) annotation processors and source files\&. This class path overrides the user class path in the
+\fBCLASSPATH\fR
+environment variable\&. If neither
+\fBCLASSPATH\fR,
+\fB\-cp\fR
+nor
+\fB\-classpath\fR
+is specified, then the user
+\fIclass path\fR
+is the current directory\&. See Setting the Class Path \&.
+.sp
+If the
+\fB\-sourcepath\fR
+option is not specified, then the user class path is also searched for source files\&.
+.sp
+If the
+\fB\-processorpath\fR
+option is not specified, then the class path is also searched for annotation processors\&.
+.RE
+.PP
+\-Djava\&.ext\&.dirs=\fIdirectories\fR
+.RS 4
Overrides the location of installed extensions\&.
-.TP
--Djava\&.endorsed\&.dirs=\fIdirectories\fR
-.br
+.RE
+.PP
+\-Djava\&.endorsed\&.dirs=\fIdirectories\fR
+.RS 4
Overrides the location of the endorsed standards path\&.
-.TP
--d \fIdirectory\fR
-.br
-Sets the destination directory for class files\&. The directory must already exist because \f3javac\fR does not create it\&. If a class is part of a package, then \f3javac\fR puts the class file in a subdirectory that reflects the package name and creates directories as needed\&.
-
-If you specify \f3-d\fR\f3/home/myclasses\fR and the class is called \f3com\&.mypackage\&.MyClass\fR, then the class file is \f3/home/myclasses/com/mypackage/MyClass\&.class\fR\&.
-
-If the \fI-d\fR option is not specified, then \f3javac\fR puts each class file in the same directory as the source file from which it was generated\&.
-
-\fINote:\fR The directory specified by the \fI-d\fR option is not automatically added to your user class path\&.
-.TP
--deprecation
-.br
-Shows a description of each use or override of a deprecated member or class\&. Without the \f3-deprecation\fR option, \f3javac\fR shows a summary of the source files that use or override deprecated members or classes\&. The \f3-deprecation\fR option is shorthand for \f3-Xlint:deprecation\fR\&.
-.TP
--encoding \fIencoding\fR
-.br
-Sets the source file encoding name, such as EUC-JP and UTF-8\&. If the \f3-encoding\fR option is not specified, then the platform default converter is used\&.
-.TP
--endorseddirs \fIdirectories\fR
-.br
+.RE
+.PP
+\-d \fIdirectory\fR
+.RS 4
+Sets the destination directory for class files\&. The directory must already exist because
+\fBjavac\fR
+does not create it\&. If a class is part of a package, then
+\fBjavac\fR
+puts the class file in a subdirectory that reflects the package name and creates directories as needed\&.
+.sp
+If you specify
+\fB\-d\fR
+\fB/home/myclasses\fR
+and the class is called
+\fBcom\&.mypackage\&.MyClass\fR, then the class file is
+\fB/home/myclasses/com/mypackage/MyClass\&.class\fR\&.
+.sp
+If the
+\fI\-d\fR
+option is not specified, then
+\fBjavac\fR
+puts each class file in the same directory as the source file from which it was generated\&.
+.sp
+\fBNote:\fR
+The directory specified by the
+\fI\-d\fR
+option is not automatically added to your user class path\&.
+.RE
+.PP
+\-deprecation
+.RS 4
+Shows a description of each use or override of a deprecated member or class\&. Without the
+\fB\-deprecation\fR
+option,
+\fBjavac\fR
+shows a summary of the source files that use or override deprecated members or classes\&. The
+\fB\-deprecation\fR
+option is shorthand for
+\fB\-Xlint:deprecation\fR\&.
+.RE
+.PP
+\-encoding \fIencoding\fR
+.RS 4
+Sets the source file encoding name, such as EUC\-JP and UTF\-8\&. If the
+\fB\-encoding\fR
+option is not specified, then the platform default converter is used\&.
+.RE
+.PP
+\-endorseddirs \fIdirectories\fR
+.RS 4
Overrides the location of the endorsed standards path\&.
-.TP
--extdirs \fIdirectories\fR
-.br
-Overrides the location of the \f3ext\fR directory\&. The directories variable is a colon-separated list of directories\&. Each JAR file in the specified directories is searched for class files\&. All JAR files found become part of the class path\&.
-
-If you are cross-compiling (compiling classes against bootstrap and extension classes of a different Java platform implementation), then this option specifies the directories that contain the extension classes\&. See Cross-Compilation Options for more information\&.
-.TP
--g
-.br
+.RE
+.PP
+\-extdirs \fIdirectories\fR
+.RS 4
+Overrides the location of the
+\fBext\fR
+directory\&. The directories variable is a colon\-separated list of directories\&. Each JAR file in the specified directories is searched for class files\&. All JAR files found become part of the class path\&.
+.sp
+If you are cross\-compiling (compiling classes against bootstrap and extension classes of a different Java platform implementation), then this option specifies the directories that contain the extension classes\&. See Cross\-Compilation Options for more information\&.
+.RE
+.PP
+\-g
+.RS 4
Generates all debugging information, including local variables\&. By default, only line number and source file information is generated\&.
-.TP
--g:none
-.br
+.RE
+.PP
+\-g:none
+.RS 4
Does not generate any debugging information\&.
-.TP
--g:[\fIkeyword list\fR]
-.br
+.RE
+.PP
+\-g:[\fIkeyword list\fR]
+.RS 4
Generates only some kinds of debugging information, specified by a comma separated list of keywords\&. Valid keywords are:
-.RS
-.TP
+.PP
source
+.RS 4
Source file debugging information\&.
-.TP
+.RE
+.PP
lines
+.RS 4
Line number debugging information\&.
-.TP
+.RE
+.PP
vars
+.RS 4
Local variable debugging information\&.
-.RE
-
-.TP
--help
-.br
+.RE
+.RE
+.PP
+\-help
+.RS 4
Prints a synopsis of standard options\&.
-.TP
--implicit:[\fIclass, none\fR]
-.br
-Controls the generation of class files for implicitly loaded source files\&. To automatically generate class files, use \f3-implicit:class\fR\&. To suppress class file generation, use \f3-implicit:none\fR\&. If this option is not specified, then the default is to automatically generate class files\&. In this case, the compiler issues a warning if any such class files are generated when also doing annotation processing\&. The warning is not issued when the \f3-implicit\fR option is set explicitly\&. See Searching for Types\&.
-.TP
--J\fIoption\fR
-.br
-Passes \f3option\fR to the Java Virtual Machine (JVM), where option is one of the options described on the reference page for the Java launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
-
-\fINote:\fR The \fICLASSPATH\fR, \f3-classpath\fR, \f3-bootclasspath\fR, and \f3-extdirs\fR options do not specify the classes used to run \f3javac\fR\&. Trying to customize the compiler implementation with these options and variables is risky and often does not accomplish what you want\&. If you must customize the complier implementation, then use the \f3-J\fR option to pass options through to the underlying \f3\fRJava launcher\&.
-.TP
--nowarn
-.br
-Disables warning messages\&. This option operates the same as the \f3-Xlint:none\fR option\&.
-.TP
--parameters
-.br
-Stores formal parameter names of constructors and methods in the generated class file so that the method \f3java\&.lang\&.reflect\&.Executable\&.getParameters\fR from the Reflection API can retrieve them\&.
-.TP
--proc: [\fInone\fR, \fIonly\fR]
-.br
-Controls whether annotation processing and compilation are done\&. \f3-proc:none\fR means that compilation takes place without annotation processing\&. \f3-proc:only\fR means that only annotation processing is done, without any subsequent compilation\&.
-.TP
--processor \fIclass1\fR [,\fIclass2\fR,\fIclass3\fR\&.\&.\&.]
-.br
+.RE
+.PP
+\-implicit:[\fIclass, none\fR]
+.RS 4
+Controls the generation of class files for implicitly loaded source files\&. To automatically generate class files, use
+\fB\-implicit:class\fR\&. To suppress class file generation, use
+\fB\-implicit:none\fR\&. If this option is not specified, then the default is to automatically generate class files\&. In this case, the compiler issues a warning if any such class files are generated when also doing annotation processing\&. The warning is not issued when the
+\fB\-implicit\fR
+option is set explicitly\&. See Searching for Types\&.
+.RE
+.PP
+\-J\fIoption\fR
+.RS 4
+Passes
+\fBoption\fR
+to the Java Virtual Machine (JVM), where option is one of the options described on the reference page for the Java launcher\&. For example,
+\fB\-J\-Xms48m\fR
+sets the startup memory to 48 MB\&. See
+java(1)\&.
+.sp
+\fBNote:\fR
+The
+\fICLASSPATH\fR,
+\fB\-classpath\fR,
+\fB\-bootclasspath\fR, and
+\fB\-extdirs\fR
+options do not specify the classes used to run
+\fBjavac\fR\&. Trying to customize the compiler implementation with these options and variables is risky and often does not accomplish what you want\&. If you must customize the complier implementation, then use the
+\fB\-J\fR
+option to pass options through to the underlying Java launcher\&.
+.RE
+.PP
+\-nowarn
+.RS 4
+Disables warning messages\&. This option operates the same as the
+\fB\-Xlint:none\fR
+option\&.
+.RE
+.PP
+\-parameters
+.RS 4
+Stores formal parameter names of constructors and methods in the generated class file so that the method
+\fBjava\&.lang\&.reflect\&.Executable\&.getParameters\fR
+from the Reflection API can retrieve them\&.
+.RE
+.PP
+\-proc: [\fInone\fR, \fIonly\fR]
+.RS 4
+Controls whether annotation processing and compilation are done\&.
+\fB\-proc:none\fR
+means that compilation takes place without annotation processing\&.
+\fB\-proc:only\fR
+means that only annotation processing is done, without any subsequent compilation\&.
+.RE
+.PP
+\-processor \fIclass1\fR [,\fIclass2\fR,\fIclass3\fR\&.\&.\&.]
+.RS 4
Names of the annotation processors to run\&. This bypasses the default discovery process\&.
-.TP
--processorpath \fIpath\fR
-.br
+.RE
+.PP
+\-processorpath \fIpath\fR
+.RS 4
Specifies where to find annotation processors\&. If this option is not used, then the class path is searched for processors\&.
-.TP
--s \fIdir\fR
-.br
-Specifies the directory where to place the generated source files\&. The directory must already exist because \f3javac\fR does not create it\&. If a class is part of a package, then the compiler puts the source file in a subdirectory that reflects the package name and creates directories as needed\&.
-
-If you specify \f3-s /home/mysrc\fR and the class is called \f3com\&.mypackage\&.MyClass\fR, then the source file is put in \f3/home/mysrc/com/mypackage/MyClass\&.java\fR\&.
-.TP
--source \fIrelease\fR
-.br
-Specifies the version of source code accepted\&. The following values for \f3release\fR are allowed:
-.RS
-.TP
+.RE
+.PP
+\-s \fIdir\fR
+.RS 4
+Specifies the directory where to place the generated source files\&. The directory must already exist because
+\fBjavac\fR
+does not create it\&. If a class is part of a package, then the compiler puts the source file in a subdirectory that reflects the package name and creates directories as needed\&.
+.sp
+If you specify
+\fB\-s /home/mysrc\fR
+and the class is called
+\fBcom\&.mypackage\&.MyClass\fR, then the source file is put in
+\fB/home/mysrc/com/mypackage/MyClass\&.java\fR\&.
+.RE
+.PP
+\-source \fIrelease\fR
+.RS 4
+Specifies the version of source code accepted\&. The following values for
+\fBrelease\fR
+are allowed:
+.PP
1\&.3
+.RS 4
The compiler does not support assertions, generics, or other language features introduced after Java SE 1\&.3\&.
-.TP
+.RE
+.PP
1\&.4
+.RS 4
The compiler accepts code containing assertions, which were introduced in Java SE 1\&.4\&.
-.TP
+.RE
+.PP
1\&.5
+.RS 4
The compiler accepts code containing generics and other language features introduced in Java SE 5\&.
-.TP
+.RE
+.PP
5
+.RS 4
Synonym for 1\&.5\&.
-.TP
+.RE
+.PP
1\&.6
+.RS 4
No language changes were introduced in Java SE 6\&. However, encoding errors in source files are now reported as errors instead of warnings as in earlier releases of Java Platform, Standard Edition\&.
-.TP
+.RE
+.PP
6
+.RS 4
Synonym for 1\&.6\&.
-.TP
+.RE
+.PP
1\&.7
-This is the default value\&. The compiler accepts code with features introduced in Java SE 7\&.
-.TP
+.RS 4
+The compiler accepts code with features introduced in Java SE 7\&.
+.RE
+.PP
7
+.RS 4
Synonym for 1\&.7\&.
-.RE
-
-.TP
--sourcepath \fIsourcepath\fR
-.br
+.RE
+.PP
+1\&.8
+.RS 4
+This is the default value\&. The compiler accepts code with features introduced in Java SE 8\&.
+.RE
+.PP
+8
+.RS 4
+Synonym for 1\&.8\&.
+.RE
+.RE
+.PP
+\-sourcepath \fIsourcepath\fR
+.RS 4
Specifies the source code path to search for class or interface definitions\&. As with the user class path, source path entries are separated by colons (:) on Oracle Solaris and semicolons on Windows and can be directories, JAR archives, or ZIP archives\&. If packages are used, then the local path name within the directory or archive must reflect the package name\&.
-
-\fINote:\fR Classes found through the class path might be recompiled when their source files are also found\&. See Searching for Types\&.
-.TP
--verbose
-.br
+.sp
+\fBNote:\fR
+Classes found through the class path might be recompiled when their source files are also found\&. See Searching for Types\&.
+.RE
+.PP
+\-verbose
+.RS 4
Uses verbose output, which includes information about each class loaded and each source file compiled\&.
-.TP
--version
-.br
+.RE
+.PP
+\-version
+.RS 4
Prints release information\&.
-.TP
--werror
-.br
+.RE
+.PP
+\-werror
+.RS 4
Terminates compilation when warnings occur\&.
-.TP
--X
-.br
+.RE
+.PP
+\-X
+.RS 4
Displays information about nonstandard options and exits\&.
-.SS CROSS-COMPILATION\ OPTIONS
-By default, classes are compiled against the bootstrap and extension classes of the platform that \f3javac\fR shipped with\&. But \f3javac\fR also supports cross-compiling, where classes are compiled against a bootstrap and extension classes of a different Java platform implementation\&. It is important to use the \f3-bootclasspath\fR and \f3-extdirs\fR options when cross-compiling\&.
-.TP
--target \fIversion\fR
-.br
-Generates class files that target a specified release of the virtual machine\&. Class files will run on the specified target and on later releases, but not on earlier releases of the JVM\&. Valid targets are 1\&.1, 1\&.2, 1\&.3, 1\&.4, 1\&.5 (also 5), 1\&.6 (also 6), and 1\&.7 (also 7)\&.
-
-The default for the \f3-target\fR option depends on the value of the \f3-source\fR option:
-.RS
-.TP 0.2i
-\(bu
-If the \f3-source\fR option is not specified, then the value of the \f3-target\fR option is 1\&.7
-.TP 0.2i
-\(bu
-If the \f3-source\fR option is 1\&.2, then the value of the \f3-target\fR option is 1\&.4
-.TP 0.2i
-\(bu
-If the \f3-source\fR option is 1\&.3, then the value of the \f3-target\fR option is 1\&.4
-.TP 0.2i
-\(bu
-If the \f3-source\fR option is 1\&.5, then the value of the \f3-target\fR option is 1\&.7
-.TP 0.2i
-\(bu
-If the \f3-source\fR option is 1\&.6, then the value of the \f3-target\fR is option 1\&.7
-.TP 0.2i
-\(bu
-For all other values of the \f3-source\fR option, the value of the \f3-target\fR option is the value of the \f3-source\fR option\&.
-.RE
-
-.TP
--bootclasspath \fIbootclasspath\fR
-.br
-Cross-compiles against the specified set of boot classes\&. As with the user class path, boot class path entries are separated by colons (:) and can be directories, JAR archives, or ZIP archives\&.
-.SS COMPACT\ PROFILE\ OPTION
-Beginning with JDK 8, the \f3javac\fR compiler supports compact profiles\&. With compact profiles, applications that do not require the entire Java platform can be deployed and run with a smaller footprint\&. The compact profiles feature could be used to shorten the download time for applications from app stores\&. This feature makes for more compact deployment of Java applications that bundle the JRE\&. This feature is also useful in small devices\&.
+.RE
+.SS "Cross\-Compilation Options"
.PP
-The supported profile values are \f3compact1\fR, \f3compact2\fR, and \f3compact3\fR\&. These are additive layers\&. Each higher-numbered compact profile contains all of the APIs in profiles with smaller number names\&.
-.TP
--profile
-.br
+By default, classes are compiled against the bootstrap and extension classes of the platform that
+\fBjavac\fR
+shipped with\&. But
+\fBjavac\fR
+also supports cross\-compiling, where classes are compiled against a bootstrap and extension classes of a different Java platform implementation\&. It is important to use the
+\fB\-bootclasspath\fR
+and
+\fB\-extdirs\fR
+options when cross\-compiling\&.
+.PP
+\-target \fIversion\fR
+.RS 4
+Generates class files that target a specified release of the virtual machine\&. Class files will run on the specified target and on later releases, but not on earlier releases of the JVM\&. Valid targets are 1\&.1, 1\&.2, 1\&.3, 1\&.4, 1\&.5 (also 5), 1\&.6 (also 6), 1\&.7 (also 7), and 1\&.8 (also 8)\&.
+.sp
+The default for the
+\fB\-target\fR
+option depends on the value of the
+\fB\-source\fR
+option:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+If the
+\fB\-source\fR
+option is not specified, then the value of the
+\fB\-target\fR
+option is 1\&.8
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+If the
+\fB\-source\fR
+option is 1\&.2, then the value of the
+\fB\-target\fR
+option is 1\&.4
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+If the
+\fB\-source\fR
+option is 1\&.3, then the value of the
+\fB\-target\fR
+option is 1\&.4
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+If the
+\fB\-source\fR
+option is 1\&.5, then the value of the
+\fB\-target\fR
+option is 1\&.8
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+If the
+\fB\-source\fR
+option is 1\&.6, then the value of the
+\fB\-target\fR
+is option 1\&.8
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+If the
+\fB\-source\fR
+option is 1\&.7, then the value of the
+\fB\-target\fR
+is option 1\&.8
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+For all other values of the
+\fB\-source\fR
+option, the value of the
+\fB\-target\fR
+option is the value of the
+\fB\-source\fR
+option\&.
+.RE
+.RE
+.PP
+\-bootclasspath \fIbootclasspath\fR
+.RS 4
+Cross\-compiles against the specified set of boot classes\&. As with the user class path, boot class path entries are separated by colons (:) and can be directories, JAR archives, or ZIP archives\&.
+.RE
+.SS "Compact Profile Option"
+.PP
+Beginning with JDK 8, the
+\fBjavac\fR
+compiler supports compact profiles\&. With compact profiles, applications that do not require the entire Java platform can be deployed and run with a smaller footprint\&. The compact profiles feature could be used to shorten the download time for applications from app stores\&. This feature makes for more compact deployment of Java applications that bundle the JRE\&. This feature is also useful in small devices\&.
+.PP
+The supported profile values are
+\fBcompact1\fR,
+\fBcompact2\fR, and
+\fBcompact3\fR\&. These are additive layers\&. Each higher\-numbered compact profile contains all of the APIs in profiles with smaller number names\&.
+.PP
+\-profile
+.RS 4
When using compact profiles, this option specifies the profile name when compiling\&. For example:
-.sp
-.nf
-\f3javac \-profile compact1 Hello\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac \-profile compact1 Hello\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
javac does not compile source code that uses any Java SE APIs that is not in the specified profile\&. Here is an example of the error message that results from attempting to compile such source code:
-.sp
-.nf
-\f3cd jdk1\&.8\&.0/bin\fP
-.fi
-.nf
-\f3\&./javac \-profile compact1 Paint\&.java\fP
-.fi
-.nf
-\f3Paint\&.java:5: error: Applet is not available in profile \&'compact1\&'\fP
-.fi
-.nf
-\f3import java\&.applet\&.Applet;\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-In this example, you can correct the error by modifying the source to not use the \f3Applet\fR class\&. You could also correct the error by compiling without the -profile option\&. Then the compilation would be run against the full set of Java SE APIs\&. (None of the compact profiles include the \f3Applet\fR class\&.)
-
-An alternative way to compile with compact profiles is to use the \f3-bootclasspath\fR option to specify a path to an \f3rt\&.jar\fR file that specifies a profile\&'s image\&. Using the \f3-profile\fR option instead does not require a profile image to be present on the system at compile time\&. This is useful when cross-compiling\&.
-.SS NONSTANDARD\ OPTIONS
-.TP
--Xbootclasspath/p:\fIpath\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBcd jdk1\&.8\&.0/bin\fR
+\fB\&./javac \-profile compact1 Paint\&.java\fR
+\fBPaint\&.java:5: error: Applet is not available in profile \*(Aqcompact1\*(Aq\fR
+\fBimport java\&.applet\&.Applet;\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+In this example, you can correct the error by modifying the source to not use the
+\fBApplet\fR
+class\&. You could also correct the error by compiling without the \-profile option\&. Then the compilation would be run against the full set of Java SE APIs\&. (None of the compact profiles include the
+\fBApplet\fR
+class\&.)
+.sp
+An alternative way to compile with compact profiles is to use the
+\fB\-bootclasspath\fR
+option to specify a path to an
+\fBrt\&.jar\fR
+file that specifies a profile\*(Aqs image\&. Using the
+\fB\-profile\fR
+option instead does not require a profile image to be present on the system at compile time\&. This is useful when cross\-compiling\&.
+.RE
+.SS "Nonstandard Options"
+.PP
+\-Xbootclasspath/p:\fIpath\fR
+.RS 4
Adds a suffix to the bootstrap class path\&.
-.TP
--Xbootclasspath/a:\fIpath\fR
-.br
+.RE
+.PP
+\-Xbootclasspath/a:\fIpath\fR
+.RS 4
Adds a prefix to the bootstrap class path\&.
-.TP
--Xbootclasspath/:\fIpath\fR
-.br
+.RE
+.PP
+\-Xbootclasspath/:\fIpath\fR
+.RS 4
Overrides the location of the bootstrap class files\&.
-.TP
--Xdoclint:[-]\fIgroup\fR [\fI/access\fR]
-.br
-Enables or disables specific groups of checks, where \fIgroup\fR is one of the following values: \f3accessibility\fR, \f3syntax\fR, \f3reference\fR, \f3html\fR or \f3missing\fR\&. For more information about these groups of checks see the \f3-Xdoclint\fR option of the \f3javadoc\fR command\&. The \f3-Xdoclint\fR option is disabled by default in the \f3javac\fR command\&.
-
-The variable \fIaccess\fR specifies the minimum visibility level of classes and members that the \f3-Xdoclint\fR option checks\&. It can have one of the following values (in order of most to least visible) : \f3public\fR, \f3protected\fR, \f3package\fR and \f3private\fR\&. For example, the following option checks classes and members (with all groups of checks) that have the access level protected and higher (which includes protected, package and public):
-.sp
-.nf
-\f3\-Xdoclint:all/protected\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.RE
+.PP
+\-Xdoclint:[\-]\fIgroup\fR [\fI/access\fR]
+.RS 4
+Enables or disables specific groups of checks, where
+\fIgroup\fR
+is one of the following values:
+\fBaccessibility\fR,
+\fBsyntax\fR,
+\fBreference\fR,
+\fBhtml\fR
+or
+\fBmissing\fR\&. For more information about these groups of checks see the
+\fB\-Xdoclint\fR
+option of the
+\fBjavadoc\fR
+command\&. The
+\fB\-Xdoclint\fR
+option is disabled by default in the
+\fBjavac\fR
+command\&.
+.sp
+The variable
+\fIaccess\fR
+specifies the minimum visibility level of classes and members that the
+\fB\-Xdoclint\fR
+option checks\&. It can have one of the following values (in order of most to least visible) :
+\fBpublic\fR,
+\fBprotected\fR,
+\fBpackage\fR
+and
+\fBprivate\fR\&. For example, the following option checks classes and members (with all groups of checks) that have the access level protected and higher (which includes protected, package and public):
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-Xdoclint:all/protected\fR
+
+.fi
+.if n \{\
+.RE
+.\}
The following option enables all groups of checks for all access levels, except it will not check for HTML errors for classes and members that have access level package and higher (which includes package and public):
-.sp
-.nf
-\f3\-Xdoclint:all,\-html/package\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--Xdoclint:none
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-Xdoclint:all,\-html/package\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-Xdoclint:none
+.RS 4
Disables all groups of checks\&.
-.TP
--Xdoclint:all[\fI/access\fR]
-.br
+.RE
+.PP
+\-Xdoclint:all[\fI/access\fR]
+.RS 4
Enables all groups of checks\&.
-.TP
--Xlint
-.br
-\fI\fREnables all recommended warnings\&. In this release, enabling all available warnings is recommended\&.
-.TP
--Xlint:all
-.br
-\fI\fREnables all recommended warnings\&. In this release, enabling all available warnings is recommended\&.
-.TP
--Xlint:none
-.br
+.RE
+.PP
+\-Xlint
+.RS 4
+Enables all recommended warnings\&. In this release, enabling all available warnings is recommended\&.
+.RE
+.PP
+\-Xlint:all
+.RS 4
+Enables all recommended warnings\&. In this release, enabling all available warnings is recommended\&.
+.RE
+.PP
+\-Xlint:none
+.RS 4
Disables all warnings\&.
-.TP
--Xlint:\fIname\fR
-.br
-Disables warning name\&. See Enable or Disable Warnings with the -Xlint Option for a list of warnings you can disable with this option\&.
-.TP
--Xlint:\fI-name\fR
-.br
-Disables warning name\&. See Enable or Disable Warnings with the -Xlint Option with the \f3-Xlint\fR option to get a list of warnings that you can disable with this option\&.
-.TP
--Xmaxerrs \fInumber\fR
-.br
+.RE
+.PP
+\-Xlint:\fIname\fR
+.RS 4
+Disables warning name\&. See Enable or Disable Warnings with the \-Xlint Option for a list of warnings you can disable with this option\&.
+.RE
+.PP
+\-Xlint:\fI\-name\fR
+.RS 4
+Disables warning name\&. See Enable or Disable Warnings with the \-Xlint Option with the
+\fB\-Xlint\fR
+option to get a list of warnings that you can disable with this option\&.
+.RE
+.PP
+\-Xmaxerrs \fInumber\fR
+.RS 4
Sets the maximum number of errors to print\&.
-.TP
--Xmaxwarns \fInumber\fR
-.br
+.RE
+.PP
+\-Xmaxwarns \fInumber\fR
+.RS 4
Sets the maximum number of warnings to print\&.
-.TP
--Xstdout \fIfilename\fR
-.br
-Sends compiler messages to the named file\&. By default, compiler messages go to \f3System\&.err\fR\&.
-.TP
--Xprefer:[\fInewer,source\fR]
-.br
-Specifies which file to read when both a source file and class file are found for a type\&. (See Searching for Types)\&. If the \f3-Xprefer:newer\fR option is used, then it reads the newer of the source or class file for a type (default)\&. If the \f3-Xprefer:source\fR option is used, then it reads the source file\&. Use -\f3Xprefer:source\fR when you want to be sure that any annotation processors can access annotations declared with a retention policy of \f3SOURCE\fR\&.
-.TP
--Xpkginfo:[\fIalways\fR,\fIlegacy\fR,\fInonempty\fR]
-.br
-Control whether javac generates \f3package-info\&.class\fR files from package-info\&.java files\&. Possible mode arguments for this option include the following\&.
-.RS
-.TP
+.RE
+.PP
+\-Xstdout \fIfilename\fR
+.RS 4
+Sends compiler messages to the named file\&. By default, compiler messages go to
+\fBSystem\&.err\fR\&.
+.RE
+.PP
+\-Xprefer:[\fInewer,source\fR]
+.RS 4
+Specifies which file to read when both a source file and class file are found for a type\&. (See Searching for Types)\&. If the
+\fB\-Xprefer:newer\fR
+option is used, then it reads the newer of the source or class file for a type (default)\&. If the
+\fB\-Xprefer:source\fR
+option is used, then it reads the source file\&. Use \-\fBXprefer:source\fR
+when you want to be sure that any annotation processors can access annotations declared with a retention policy of
+\fBSOURCE\fR\&.
+.RE
+.PP
+\-Xpkginfo:[\fIalways\fR,\fIlegacy\fR,\fInonempty\fR]
+.RS 4
+Control whether javac generates
+\fBpackage\-info\&.class\fR
+files from package\-info\&.java files\&. Possible mode arguments for this option include the following\&.
+.PP
always
-Always generate a \f3package-info\&.class\fR file for every \f3package-info\&.java\fR file\&. This option may be useful if you use a build system such as Ant, which checks that each \f3\&.java\fR file has a corresponding \f3\&.class\fR file\&.
-.TP
+.RS 4
+Always generate a
+\fBpackage\-info\&.class\fR
+file for every
+\fBpackage\-info\&.java\fR
+file\&. This option may be useful if you use a build system such as Ant, which checks that each
+\fB\&.java\fR
+file has a corresponding
+\fB\&.class\fR
+file\&.
+.RE
+.PP
legacy
-Generate a \f3package-info\&.class\fR file only if package-info\&.java contains annotations\&. Don\&'t generate a \f3package-info\&.class\fR file if package-info\&.java only contains comments\&.
-
-\fINote:\fR A \f3package-info\&.class\fR file might be generated but be empty if all the annotations in the package-info\&.java file have \f3RetentionPolicy\&.SOURCE\fR\&.
-.TP
+.RS 4
+Generate a
+\fBpackage\-info\&.class\fR
+file only if package\-info\&.java contains annotations\&. Don\*(Aqt generate a
+\fBpackage\-info\&.class\fR
+file if package\-info\&.java only contains comments\&.
+.sp
+\fBNote:\fR
+A
+\fBpackage\-info\&.class\fR
+file might be generated but be empty if all the annotations in the package\-info\&.java file have
+\fBRetentionPolicy\&.SOURCE\fR\&.
+.RE
+.PP
nonempty
-Generate a \f3package-info\&.class\fR file only if package-info\&.java contains annotations with \f3RetentionPolicy\&.CLASS\fR or \f3RetentionPolicy\&.RUNTIME\fR\&.
-.RE
-
-.TP
--Xprint
-.br
+.RS 4
+Generate a
+\fBpackage\-info\&.class\fR
+file only if package\-info\&.java contains annotations with
+\fBRetentionPolicy\&.CLASS\fR
+or
+\fBRetentionPolicy\&.RUNTIME\fR\&.
+.RE
+.RE
+.PP
+\-Xprint
+.RS 4
Prints a textual representation of specified types for debugging purposes\&. Perform neither annotation processing nor compilation\&. The format of the output could change\&.
-.TP
--XprintProcessorInfo
-.br
+.RE
+.PP
+\-XprintProcessorInfo
+.RS 4
Prints information about which annotations a processor is asked to process\&.
-.TP
--XprintRounds
-.br
+.RE
+.PP
+\-XprintRounds
+.RS 4
Prints information about initial and subsequent annotation processing rounds\&.
-.SH ENABLE\ OR\ DISABLE\ WARNINGS\ WITH\ THE\ -XLINT\ OPTION
-Enable warning \fIname\fR with the \f3-Xlint:name\fR option, where \f3name\fR is one of the following warning names\&. Note that you can disable a warning with the \f3-Xlint:-name:\fR option\&.
-.TP
+.RE
+.SH "ENABLE OR DISABLE WARNINGS WITH THE -XLINT OPTION"
+.PP
+Enable warning
+\fIname\fR
+with the
+\fB\-Xlint:name\fR
+option, where
+\fBname\fR
+is one of the following warning names\&. Note that you can disable a warning with the
+\fB\-Xlint:\-name:\fR
+option\&.
+.PP
cast
+.RS 4
Warns about unnecessary and redundant casts, for example:
-.sp
-.nf
-\f3String s = (String) "Hello!"\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBString s = (String) "Hello!"\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
classfile
+.RS 4
Warns about issues related to class file contents\&.
-.TP
+.RE
+.PP
deprecation
+.RS 4
Warns about the use of deprecated items, for example:
-.sp
-.nf
-\f3java\&.util\&.Date myDate = new java\&.util\&.Date();\fP
-.fi
-.nf
-\f3int currentDay = myDate\&.getDay();\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-The method \f3java\&.util\&.Date\&.getDay\fR has been deprecated since JDK 1\&.1
-.TP
-dep-ann
-Warns about items that are documented with an \f3@deprecated\fR Javadoc comment, but do not have a \f3@Deprecated\fR annotation, for example:
-.sp
-.nf
-\f3/**\fP
-.fi
-.nf
-\f3 * @deprecated As of Java SE 7, replaced by {@link #newMethod()}\fP
-.fi
-.nf
-\f3 */\fP
-.fi
-.nf
-\f3public static void deprecatedMethood() { }\fP
-.fi
-.nf
-\f3public static void newMethod() { }\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjava\&.util\&.Date myDate = new java\&.util\&.Date();\fR
+\fBint currentDay = myDate\&.getDay();\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The method
+\fBjava\&.util\&.Date\&.getDay\fR
+has been deprecated since JDK 1\&.1
+.RE
+.PP
+dep\-ann
+.RS 4
+Warns about items that are documented with an
+\fB@deprecated\fR
+Javadoc comment, but do not have a
+\fB@Deprecated\fR
+annotation, for example:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB/**\fR
+\fB * @deprecated As of Java SE 7, replaced by {@link #newMethod()}\fR
+\fB */\fR
+\fBpublic static void deprecatedMethood() { }\fR
+\fBpublic static void newMethod() { }\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
divzero
+.RS 4
Warns about division by the constant integer 0, for example:
-.sp
-.nf
-\f3int divideByZero = 42 / 0;\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBint divideByZero = 42 / 0;\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
empty
-Warns about empty statements after \f3if\fRstatements, for example:
-.sp
-.nf
-\f3class E {\fP
-.fi
-.nf
-\f3 void m() {\fP
-.fi
-.nf
-\f3 if (true) ;\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
+.RS 4
+Warns about empty statements after
+\fBif \fRstatements, for example:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBclass E {\fR
+\fB void m() {\fR
+\fB if (true) ;\fR
+\fB }\fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
fallthrough
-Checks the switch blocks for fall-through cases and provides a warning message for any that are found\&. Fall-through cases are cases in a switch block, other than the last case in the block, whose code does not include a break statement, allowing code execution to fall through from that case to the next case\&. For example, the code following the case 1 label in this switch block does not end with a break statement:
-.sp
-.nf
-\f3switch (x) {\fP
-.fi
-.nf
-\f3case 1:\fP
-.fi
-.nf
-\f3 System\&.out\&.println("1");\fP
-.fi
-.nf
-\f3 // No break statement here\&.\fP
-.fi
-.nf
-\f3case 2:\fP
-.fi
-.nf
-\f3 System\&.out\&.println("2");\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-If the \f3-Xlint:fallthrough\fR option was used when compiling this code, then the compiler emits a warning about possible fall-through into case, with the line number of the case in question\&.
-.TP
+.RS 4
+Checks the switch blocks for fall\-through cases and provides a warning message for any that are found\&. Fall\-through cases are cases in a switch block, other than the last case in the block, whose code does not include a break statement, allowing code execution to fall through from that case to the next case\&. For example, the code following the case 1 label in this switch block does not end with a break statement:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBswitch (x) {\fR
+\fBcase 1:\fR
+\fB System\&.out\&.println("1");\fR
+\fB // No break statement here\&.\fR
+\fBcase 2:\fR
+\fB System\&.out\&.println("2");\fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+If the
+\fB\-Xlint:fallthrough\fR
+option was used when compiling this code, then the compiler emits a warning about possible fall\-through into case, with the line number of the case in question\&.
+.RE
+.PP
finally
-Warns about \f3finally\fR clauses that cannot complete normally, for example:
-.sp
-.nf
-\f3public static int m() {\fP
-.fi
-.nf
-\f3 try {\fP
-.fi
-.nf
-\f3 throw new NullPointerException();\fP
-.fi
-.nf
-\f3 } catch (NullPointerException(); {\fP
-.fi
-.nf
-\f3 System\&.err\&.println("Caught NullPointerException\&.");\fP
-.fi
-.nf
-\f3 return 1;\fP
-.fi
-.nf
-\f3 } finally {\fP
-.fi
-.nf
-\f3 return 0;\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-The compiler generates a warning for the \f3finally\fR block in this example\&. When the \f3int\fR method is called, it returns a value of 0\&. A \f3finally\fR block executes when the \f3try\fR block exits\&. In this example, when control is transferred to the \f3catch\fR block, the \f3int\fR method exits\&. However, the \f3finally\fR block must execute, so it is executed, even though control was transferred outside the method\&.
-.TP
+.RS 4
+Warns about
+\fBfinally\fR
+clauses that cannot complete normally, for example:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBpublic static int m() {\fR
+\fB try {\fR
+\fB throw new NullPointerException();\fR
+\fB } catch (NullPointerException(); {\fR
+\fB System\&.err\&.println("Caught NullPointerException\&.");\fR
+\fB return 1;\fR
+\fB } finally {\fR
+\fB return 0;\fR
+\fB }\fR
+\fB }\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The compiler generates a warning for the
+\fBfinally\fR
+block in this example\&. When the
+\fBint\fR
+method is called, it returns a value of 0\&. A
+\fBfinally\fR
+block executes when the
+\fBtry\fR
+block exits\&. In this example, when control is transferred to the
+\fBcatch\fR
+block, the
+\fBint\fR
+method exits\&. However, the
+\fBfinally\fR
+block must execute, so it is executed, even though control was transferred outside the method\&.
+.RE
+.PP
options
-Warns about issues that related to the use of command-line options\&. See Cross-Compilation Options\&.
-.TP
+.RS 4
+Warns about issues that related to the use of command\-line options\&. See Cross\-Compilation Options\&.
+.RE
+.PP
overrides
+.RS 4
Warns about issues regarding method overrides\&. For example, consider the following two classes:
-.sp
-.nf
-\f3public class ClassWithVarargsMethod {\fP
-.fi
-.nf
-\f3 void varargsMethod(String\&.\&.\&. s) { }\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3public class ClassWithOverridingMethod extends ClassWithVarargsMethod {\fP
-.fi
-.nf
-\f3 @Override\fP
-.fi
-.nf
-\f3 void varargsMethod(String[] s) { }\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBpublic class ClassWithVarargsMethod {\fR
+\fB void varargsMethod(String\&.\&.\&. s) { }\fR
+\fB}\fR
+
+\fBpublic class ClassWithOverridingMethod extends ClassWithVarargsMethod {\fR
+\fB @Override\fR
+\fB void varargsMethod(String[] s) { }\fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
The compiler generates a warning similar to the following:\&.
-.sp
-.nf
-\f3warning: [override] varargsMethod(String[]) in ClassWithOverridingMethod \fP
-.fi
-.nf
-\f3overrides varargsMethod(String\&.\&.\&.) in ClassWithVarargsMethod; overriding\fP
-.fi
-.nf
-\f3method is missing \&'\&.\&.\&.\&'\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-When the compiler encounters a \f3varargs\fR method, it translates the \f3varargs\fR formal parameter into an array\&. In the method \f3ClassWithVarargsMethod\&.varargsMethod\fR, the compiler translates the \f3varargs\fR formal parameter \f3String\&.\&.\&. s\fR to the formal parameter \f3String[] s\fR, an array, which matches the formal parameter of the method \f3ClassWithOverridingMethod\&.varargsMethod\fR\&. Consequently, this example compiles\&.
-.TP
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBwarning: [override] varargsMethod(String[]) in ClassWithOverridingMethod \fR
+\fBoverrides varargsMethod(String\&.\&.\&.) in ClassWithVarargsMethod; overriding\fR
+\fBmethod is missing \*(Aq\&.\&.\&.\*(Aq\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+When the compiler encounters a
+\fBvarargs\fR
+method, it translates the
+\fBvarargs\fR
+formal parameter into an array\&. In the method
+\fBClassWithVarargsMethod\&.varargsMethod\fR, the compiler translates the
+\fBvarargs\fR
+formal parameter
+\fBString\&.\&.\&. s\fR
+to the formal parameter
+\fBString[] s\fR, an array, which matches the formal parameter of the method
+\fBClassWithOverridingMethod\&.varargsMethod\fR\&. Consequently, this example compiles\&.
+.RE
+.PP
path
-Warns about invalid path elements and nonexistent path directories on the command line (with regard to the class path, the source path, and other paths)\&. Such warnings cannot be suppressed with the \f3@SuppressWarnings\fR annotation, for example:
-.sp
-.nf
-\f3javac \-Xlint:path \-classpath /nonexistentpath Example\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
+.RS 4
+Warns about invalid path elements and nonexistent path directories on the command line (with regard to the class path, the source path, and other paths)\&. Such warnings cannot be suppressed with the
+\fB@SuppressWarnings\fR
+annotation, for example:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac \-Xlint:path \-classpath /nonexistentpath Example\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
processing
+.RS 4
Warn about issues regarding annotation processing\&. The compiler generates this warning when you have a class that has an annotation, and you use an annotation processor that cannot handle that type of exception\&. For example, the following is a simple annotation processor:
-
-\fISource file AnnocProc\&.java\fR:
-.sp
-.nf
-\f3import java\&.util\&.*;\fP
-.fi
-.nf
-\f3import javax\&.annotation\&.processing\&.*;\fP
-.fi
-.nf
-\f3import javax\&.lang\&.model\&.*;\fP
-.fi
-.nf
-\f3import\&.javaz\&.lang\&.model\&.element\&.*;\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3@SupportedAnnotationTypes("NotAnno")\fP
-.fi
-.nf
-\f3public class AnnoProc extends AbstractProcessor {\fP
-.fi
-.nf
-\f3 public boolean process(Set<? extends TypeElement> elems, RoundEnvironment renv){\fP
-.fi
-.nf
-\f3 return true;\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3 public SourceVersion getSupportedSourceVersion() {\fP
-.fi
-.nf
-\f3 return SourceVersion\&.latest();\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-\fISource file AnnosWithoutProcessors\&.java\fR:
-.sp
-.nf
-\f3@interface Anno { }\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3@Anno\fP
-.fi
-.nf
-\f3class AnnosWithoutProcessors { }\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-The following commands compile the annotation processor \f3AnnoProc\fR, then run this annotation processor against the source file \f3AnnosWithoutProcessors\&.java\fR:
-.sp
-.nf
-\f3javac AnnoProc\&.java\fP
-.fi
-.nf
-\f3javac \-cp \&. \-Xlint:processing \-processor AnnoProc \-proc:only AnnosWithoutProcessors\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-When the compiler runs the annotation processor against the source file \f3AnnosWithoutProcessors\&.java\fR, it generates the following warning:
-.sp
-.nf
-\f3warning: [processing] No processor claimed any of these annotations: Anno\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-To resolve this issue, you can rename the annotation defined and used in the class \f3AnnosWithoutProcessors\fR from \f3Anno\fR to \f3NotAnno\fR\&.
-.TP
+.sp
+\fBSource file AnnocProc\&.java\fR:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBimport java\&.util\&.*;\fR
+\fBimport javax\&.annotation\&.processing\&.*;\fR
+\fBimport javax\&.lang\&.model\&.*;\fR
+\fBimport\&.javaz\&.lang\&.model\&.element\&.*;\fR
+
+\fB@SupportedAnnotationTypes("NotAnno")\fR
+\fBpublic class AnnoProc extends AbstractProcessor {\fR
+\fB public boolean process(Set<? extends TypeElement> elems, RoundEnvironment renv){\fR
+\fB return true;\fR
+\fB }\fR
+
+\fB public SourceVersion getSupportedSourceVersion() {\fR
+\fB return SourceVersion\&.latest();\fR
+\fB }\fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+\fBSource file AnnosWithoutProcessors\&.java\fR:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB@interface Anno { }\fR
+\fB \fR
+\fB@Anno\fR
+\fBclass AnnosWithoutProcessors { }\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The following commands compile the annotation processor
+\fBAnnoProc\fR, then run this annotation processor against the source file
+\fBAnnosWithoutProcessors\&.java\fR:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac AnnoProc\&.java\fR
+\fBjavac \-cp \&. \-Xlint:processing \-processor AnnoProc \-proc:only AnnosWithoutProcessors\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+When the compiler runs the annotation processor against the source file
+\fBAnnosWithoutProcessors\&.java\fR, it generates the following warning:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBwarning: [processing] No processor claimed any of these annotations: Anno\fR
+\fB \fR
+.fi
+.if n \{\
+.RE
+.\}
+To resolve this issue, you can rename the annotation defined and used in the class
+\fBAnnosWithoutProcessors\fR
+from
+\fBAnno\fR
+to
+\fBNotAnno\fR\&.
+.RE
+.PP
rawtypes
-Warns about unchecked operations on raw types\&. The following statement generates a \f3rawtypes\fR warning:
-.sp
-.nf
-\f3void countElements(List l) { \&.\&.\&. }\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-The following example does not generate a \f3rawtypes\fR warning
-.sp
-.nf
-\f3void countElements(List<?> l) { \&.\&.\&. }\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-\f3List\fR is a raw type\&. However, \f3List<?>\fR is an unbounded wildcard parameterized type\&. Because \f3List\fR is a parameterized interface, always specify its type argument\&. In this example, the \f3List\fR formal argument is specified with an unbounded wildcard (\f3?\fR) as its formal type parameter, which means that the \f3countElements\fR method can accept any instantiation of the \f3List\fR interface\&.
-.TP
+.RS 4
+Warns about unchecked operations on raw types\&. The following statement generates a
+\fBrawtypes\fR
+warning:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBvoid countElements(List l) { \&.\&.\&. }\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The following example does not generate a
+\fBrawtypes\fR
+warning
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBvoid countElements(List<?> l) { \&.\&.\&. }\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+\fBList\fR
+is a raw type\&. However,
+\fBList<?>\fR
+is an unbounded wildcard parameterized type\&. Because
+\fBList\fR
+is a parameterized interface, always specify its type argument\&. In this example, the
+\fBList\fR
+formal argument is specified with an unbounded wildcard (\fB?\fR) as its formal type parameter, which means that the
+\fBcountElements\fR
+method can accept any instantiation of the
+\fBList\fR
+interface\&.
+.RE
+.PP
Serial
-Warns about missing \f3serialVersionUID\fR definitions on serializable classes, for example:
-.sp
-.nf
-\f3public class PersistentTime implements Serializable\fP
-.fi
-.nf
-\f3{\fP
-.fi
-.nf
-\f3 private Date time;\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3 public PersistentTime() {\fP
-.fi
-.nf
-\f3 time = Calendar\&.getInstance()\&.getTime();\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3 public Date getTime() {\fP
-.fi
-.nf
-\f3 return time;\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.RS 4
+Warns about missing
+\fBserialVersionUID\fR
+definitions on serializable classes, for example:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBpublic class PersistentTime implements Serializable\fR
+\fB{\fR
+\fB private Date time;\fR
+\fB \fR
+\fB public PersistentTime() {\fR
+\fB time = Calendar\&.getInstance()\&.getTime();\fR
+\fB }\fR
+\fB \fR
+\fB public Date getTime() {\fR
+\fB return time;\fR
+\fB }\fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
The compiler generates the following warning:
-.sp
-.nf
-\f3warning: [serial] serializable class PersistentTime has no definition of\fP
-.fi
-.nf
-\f3serialVersionUID\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-If a serializable class does not explicitly declare a field named \f3serialVersionUID\fR, then the serialization runtime environment calculates a default \f3serialVersionUID\fR value for that class based on various aspects of the class, as described in the Java Object Serialization Specification\&. However, it is strongly recommended that all serializable classes explicitly declare \f3serialVersionUID\fR values because the default process of computing \f3serialVersionUID\fR vales is highly sensitive to class details that can vary depending on compiler implementations, and as a result, might cause an unexpected \f3InvalidClassExceptions\fR during deserialization\&. To guarantee a consistent \f3serialVersionUID\fR value across different Java compiler implementations, a serializable class must declare an explicit \f3serialVersionUID\fR value\&.
-.TP
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBwarning: [serial] serializable class PersistentTime has no definition of\fR
+\fBserialVersionUID\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+If a serializable class does not explicitly declare a field named
+\fBserialVersionUID\fR, then the serialization runtime environment calculates a default
+\fBserialVersionUID\fR
+value for that class based on various aspects of the class, as described in the Java Object Serialization Specification\&. However, it is strongly recommended that all serializable classes explicitly declare
+\fBserialVersionUID\fR
+values because the default process of computing
+\fBserialVersionUID\fR
+vales is highly sensitive to class details that can vary depending on compiler implementations, and as a result, might cause an unexpected
+\fBInvalidClassExceptions\fR
+during deserialization\&. To guarantee a consistent
+\fBserialVersionUID\fR
+value across different Java compiler implementations, a serializable class must declare an explicit
+\fBserialVersionUID\fR
+value\&.
+.RE
+.PP
static
+.RS 4
Warns about issues relating to the use of statics, for example:
-.sp
-.nf
-\f3class XLintStatic {\fP
-.fi
-.nf
-\f3 static void m1() { }\fP
-.fi
-.nf
-\f3 void m2() { this\&.m1(); }\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBclass XLintStatic {\fR
+\fB static void m1() { }\fR
+\fB void m2() { this\&.m1(); }\fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
The compiler generates the following warning:
-.sp
-.nf
-\f3warning: [static] static method should be qualified by type name, \fP
-.fi
-.nf
-\f3XLintStatic, instead of by an expression\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-To resolve this issue, you can call the \f3static\fR method \f3m1\fR as follows:
-.sp
-.nf
-\f3XLintStatic\&.m1();\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-Alternately, you can remove the \f3static\fR keyword from the declaration of the method \f3m1\fR\&.
-.TP
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBwarning: [static] static method should be qualified by type name, \fR
+\fBXLintStatic, instead of by an expression\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+To resolve this issue, you can call the
+\fBstatic\fR
+method
+\fBm1\fR
+as follows:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBXLintStatic\&.m1();\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Alternately, you can remove the
+\fBstatic\fR
+keyword from the declaration of the method
+\fBm1\fR\&.
+.RE
+.PP
try
-Warns about issues relating to use of \f3try\fR blocks, including try-with-resources statements\&. For example, a warning is generated for the following statement because the resource \f3ac\fR declared in the \f3try\fR block is not used:
-.sp
-.nf
-\f3try ( AutoCloseable ac = getResource() ) { // do nothing}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
+.RS 4
+Warns about issues relating to use of
+\fBtry\fR
+blocks, including try\-with\-resources statements\&. For example, a warning is generated for the following statement because the resource
+\fBac\fR
+declared in the
+\fBtry\fR
+block is not used:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBtry ( AutoCloseable ac = getResource() ) { // do nothing}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
unchecked
+.RS 4
Gives more detail for unchecked conversion warnings that are mandated by the Java Language Specification, for example:
-.sp
-.nf
-\f3List l = new ArrayList<Number>();\fP
-.fi
-.nf
-\f3List<String> ls = l; // unchecked warning\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-During type erasure, the types \f3ArrayList<Number>\fR and \f3List<String>\fR become \f3ArrayList\fR and \f3List\fR, respectively\&.
-
-The \f3ls\fR command has the parameterized type \f3List<String>\fR\&. When the \f3List\fR referenced by \f3l\fR is assigned to \f3ls\fR, the compiler generates an unchecked warning\&. At compile time, the compiler and JVM cannot determine whether \f3l\fR refers to a \f3List<String>\fR type\&. In this case, \f3l\fR does not refer to a \f3List<String>\fR type\&. As a result, heap pollution occurs\&.
-
-A heap pollution situation occurs when the \f3List\fR object \f3l\fR, whose static type is \f3List<Number>\fR, is assigned to another \f3List\fR object, \f3ls\fR, that has a different static type, \f3List<String>\fR\&. However, the compiler still allows this assignment\&. It must allow this assignment to preserve backward compatibility with releases of Java SE that do not support generics\&. Because of type erasure, \f3List<Number>\fR and \f3List<String>\fR both become \f3List\fR\&. Consequently, the compiler allows the assignment of the object \f3l\fR\f3,\fR which has a raw type of \f3List\fR, to the object \f3ls\fR\&.
-.TP
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBList l = new ArrayList<Number>();\fR
+\fBList<String> ls = l; // unchecked warning\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+During type erasure, the types
+\fBArrayList<Number>\fR
+and
+\fBList<String>\fR
+become
+\fBArrayList\fR
+and
+\fBList\fR, respectively\&.
+.sp
+The
+\fBls\fR
+command has the parameterized type
+\fBList<String>\fR\&. When the
+\fBList\fR
+referenced by
+\fBl\fR
+is assigned to
+\fBls\fR, the compiler generates an unchecked warning\&. At compile time, the compiler and JVM cannot determine whether
+\fBl\fR
+refers to a
+\fBList<String>\fR
+type\&. In this case,
+\fBl\fR
+does not refer to a
+\fBList<String>\fR
+type\&. As a result, heap pollution occurs\&.
+.sp
+A heap pollution situation occurs when the
+\fBList\fR
+object
+\fBl\fR, whose static type is
+\fBList<Number>\fR, is assigned to another
+\fBList\fR
+object,
+\fBls\fR, that has a different static type,
+\fBList<String>\fR\&. However, the compiler still allows this assignment\&. It must allow this assignment to preserve backward compatibility with releases of Java SE that do not support generics\&. Because of type erasure,
+\fBList<Number>\fR
+and
+\fBList<String>\fR
+both become
+\fBList\fR\&. Consequently, the compiler allows the assignment of the object
+\fBl\fR\fB,\fR
+which has a raw type of
+\fBList\fR, to the object
+\fBls\fR\&.
+.RE
+.PP
varargs
-Warns about unsafe usages of variable arguments (\f3varargs\fR) methods, in particular, those that contain non-reifiable arguments, for example:
-.sp
-.nf
-\f3public class ArrayBuilder {\fP
-.fi
-.nf
-\f3 public static <T> void addToList (List<T> listArg, T\&.\&.\&. elements) {\fP
-.fi
-.nf
-\f3 for (T x : elements) {\fP
-.fi
-.nf
-\f3 listArg\&.add(x);\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-\fINote:\fR A non-reifiable type is a type whose type information is not fully available at runtime\&.
-
-The compiler generates the following warning for the definition of the method \f3ArrayBuilder\&.addToList\fR
-.sp
-.nf
-\f3warning: [varargs] Possible heap pollution from parameterized vararg type T\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-When the compiler encounters a varargs method, it translates the \f3varargs\fR formal parameter into an array\&. However, the Java programming language does not permit the creation of arrays of parameterized types\&. In the method \f3ArrayBuilder\&.addToList\fR, the compiler translates the \f3varargs\fR formal parameter \f3T\&.\&.\&.\fR elements to the formal parameter \f3T[]\fR elements, an array\&. However, because of type erasure, the compiler converts the \f3varargs\fR formal parameter to \f3Object[]\fR elements\&. Consequently, there is a possibility of heap pollution\&.
-.SH COMMAND-LINE\ ARGUMENT\ FILES
-To shorten or simplify the \f3javac\fR command, you can specify one or more files that contain arguments to the \f3javac\fR command (except \f3-J\fR options)\&. This enables you to create \f3javac\fR commands of any length on any operating system\&.
-.PP
-An argument file can include \f3javac\fR options and source file names in any combination\&. The arguments within a file can be separated by spaces or new line characters\&. If a file name contains embedded spaces, then put the whole file name in double quotation marks\&.
-.PP
-File Names within an argument file are relative to the current directory, not the location of the argument file\&. Wild cards (*) are not allowed in these lists (such as for specifying \f3*\&.java\fR)\&. Use of the at sign (@) to recursively interpret files is not supported\&. The \f3-J\fR options are not supported because they are passed to the launcher, which does not support argument files\&.
-.PP
-When executing the \f3javac\fR command, pass in the path and name of each argument file with the at sign (@) leading character\&. When the \f3javac\fR command encounters an argument beginning with the at sign (@), it expands the contents of that file into the argument list\&.
-.PP
-\f3Example 1 Single Argument File\fR
-.PP
-You could use a single argument file named \f3argfile\fR to hold all \f3javac\fR arguments:
-.sp
-.nf
-\f3javac @argfile\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-This argument file could contain the contents of both files shown in Example 2
+.RS 4
+Warns about unsafe usages of variable arguments (\fBvarargs\fR) methods, in particular, those that contain non\-reifiable arguments, for example:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBpublic class ArrayBuilder {\fR
+\fB public static <T> void addToList (List<T> listArg, T\&.\&.\&. elements) {\fR
+\fB for (T x : elements) {\fR
+\fB listArg\&.add(x);\fR
+\fB }\fR
+\fB }\fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+\fBNote:\fR
+A non\-reifiable type is a type whose type information is not fully available at runtime\&.
+.sp
+The compiler generates the following warning for the definition of the method
+\fBArrayBuilder\&.addToList\fR
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBwarning: [varargs] Possible heap pollution from parameterized vararg type T\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+When the compiler encounters a varargs method, it translates the
+\fBvarargs\fR
+formal parameter into an array\&. However, the Java programming language does not permit the creation of arrays of parameterized types\&. In the method
+\fBArrayBuilder\&.addToList\fR, the compiler translates the
+\fBvarargs\fR
+formal parameter
+\fBT\&.\&.\&.\fR
+elements to the formal parameter
+\fBT[]\fR
+elements, an array\&. However, because of type erasure, the compiler converts the
+\fBvarargs\fR
+formal parameter to
+\fBObject[]\fR
+elements\&. Consequently, there is a possibility of heap pollution\&.
+.RE
+.SH "COMMAND-LINE ARGUMENT FILES"
+.PP
+To shorten or simplify the
+\fBjavac\fR
+command, you can specify one or more files that contain arguments to the
+\fBjavac\fR
+command (except
+\fB\-J\fR
+options)\&. This enables you to create
+\fBjavac\fR
+commands of any length on any operating system\&.
.PP
-\f3Example 2 Two Argument Files\fR
+An argument file can include
+\fBjavac\fR
+options and source file names in any combination\&. The arguments within a file can be separated by spaces or new line characters\&. If a file name contains embedded spaces, then put the whole file name in double quotation marks\&.
.PP
-You can create two argument files: one for the \f3javac\fR options and the other for the source file names\&. Note that the following lists have no line-continuation characters\&.
+File Names within an argument file are relative to the current directory, not the location of the argument file\&. Wild cards (*) are not allowed in these lists (such as for specifying
+\fB*\&.java\fR)\&. Use of the at sign (@) to recursively interpret files is not supported\&. The
+\fB\-J\fR
+options are not supported because they are passed to the launcher, which does not support argument files\&.
+.PP
+When executing the
+\fBjavac\fR
+command, pass in the path and name of each argument file with the at sign (@) leading character\&. When the
+\fBjavac\fR
+command encounters an argument beginning with the at sign (@), it expands the contents of that file into the argument list\&.
+.PP
+\fBExample 1\fR
+.br
+Single Argument File
+.RS 4
+You could use a single argument file named
+\fBargfile\fR
+to hold all
+\fBjavac\fR
+arguments:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac @argfile\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+This argument file could contain the contents of both files shown in Example 2
+.RE
.PP
+\fBExample 2\fR
+.br
+Two Argument Files
+.RS 4
+You can create two argument files: one for the
+\fBjavac\fR
+options and the other for the source file names\&. Note that the following lists have no line\-continuation characters\&.
+.sp
Create a file named options that contains the following:
-.sp
-.nf
-\f3\-d classes\fP
-.fi
-.nf
-\f3\-g\fP
-.fi
-.nf
-\f3\-sourcepath /java/pubs/ws/1\&.3/src/share/classes\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-d classes\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-g\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-sourcepath /java/pubs/ws/1\&.3/src/share/classes\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+
+.fi
+.if n \{\
+.RE
+.\}
Create a file named classes that contains the following:
-.sp
-.nf
-\f3MyClass1\&.java\fP
-.fi
-.nf
-\f3MyClass2\&.java\fP
-.fi
-.nf
-\f3MyClass3\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-Then, run the \f3javac\fR command as follows:
-.sp
-.nf
-\f3javac @options @classes\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-\f3Example 3 Argument Files with Paths\fR
-.PP
-The argument files can have paths, but any file names inside the files are relative to the current working directory (not \f3path1\fR or \f3path2\fR):
-.sp
-.nf
-\f3javac @path1/options @path2/classes\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-.SH ANNOTATION\ PROCESSING
-The \f3javac\fR command provides direct support for annotation processing, superseding the need for the separate annotation processing command, \f3apt\fR\&.
-.PP
-The API for annotation processors is defined in the \f3javax\&.annotation\&.processing\fR and j\f3avax\&.lang\&.model\fR packages and subpackages\&.
-.SS HOW\ ANNOTATION\ PROCESSING\ WORKS
-Unless annotation processing is disabled with the \f3-proc:none\fR option, the compiler searches for any annotation processors that are available\&. The search path can be specified with the \f3-processorpath\fR option\&. If no path is specified, then the user class path is used\&. Processors are located by means of service provider-configuration files named \f3META-INF/services/javax\&.annotation\&.processing\fR\&.Processor on the search path\&. Such files should contain the names of any annotation processors to be used, listed one per line\&. Alternatively, processors can be specified explicitly, using the \f3-processor\fR option\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBMyClass1\&.java\fR
+\fBMyClass2\&.java\fR
+\fBMyClass3\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Then, run the
+\fBjavac\fR
+command as follows:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac @options @classes\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBExample 3\fR
+.br
+Argument Files with Paths
+.RS 4
+The argument files can have paths, but any file names inside the files are relative to the current working directory (not
+\fBpath1\fR
+or
+\fBpath2\fR):
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac @path1/options @path2/classes\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.SH "ANNOTATION PROCESSING"
+.PP
+The
+\fBjavac\fR
+command provides direct support for annotation processing, superseding the need for the separate annotation processing command,
+\fBapt\fR\&.
+.PP
+The API for annotation processors is defined in the
+\fBjavax\&.annotation\&.processing\fR
+and j\fBavax\&.lang\&.model\fR
+packages and subpackages\&.
+.SS "How Annotation Processing Works"
+.PP
+Unless annotation processing is disabled with the
+\fB\-proc:none\fR
+option, the compiler searches for any annotation processors that are available\&. The search path can be specified with the
+\fB\-processorpath\fR
+option\&. If no path is specified, then the user class path is used\&. Processors are located by means of service provider\-configuration files named
+\fBMETA\-INF/services/javax\&.annotation\&.processing\fR\&.Processor on the search path\&. Such files should contain the names of any annotation processors to be used, listed one per line\&. Alternatively, processors can be specified explicitly, using the
+\fB\-processor\fR
+option\&.
.PP
After scanning the source files and classes on the command line to determine what annotations are present, the compiler queries the processors to determine what annotations they process\&. When a match is found, the processor is called\&. A processor can claim the annotations it processes, in which case no further attempt is made to find any processors for those annotations\&. After all of the annotations are claimed, the compiler does not search for additional processors\&.
.PP
If any processors generate new source files, then another round of annotation processing occurs: Any newly generated source files are scanned, and the annotations processed as before\&. Any processors called on previous rounds are also called on all subsequent rounds\&. This continues until no new source files are generated\&.
.PP
-After a round occurs where no new source files are generated, the annotation processors are called one last time, to give them a chance to complete any remaining work\&. Finally, unless the \f3-proc:only\fR option is used, the compiler compiles the original and all generated source files\&.
-.SS IMPLICITLY\ LOADED\ SOURCE\ FILES
-To compile a set of source files, the compiler might need to implicitly load additional source files\&. See Searching for Types\&. Such files are currently not subject to annotation processing\&. By default, the compiler gives a warning when annotation processing occurred and any implicitly loaded source files are compiled\&. The \f3-implicit\fR option provides a way to suppress the warning\&.
-.SH SEARCHING\ FOR\ TYPES
+After a round occurs where no new source files are generated, the annotation processors are called one last time, to give them a chance to complete any remaining work\&. Finally, unless the
+\fB\-proc:only\fR
+option is used, the compiler compiles the original and all generated source files\&.
+.SS "Implicitly Loaded Source Files"
+.PP
+To compile a set of source files, the compiler might need to implicitly load additional source files\&. See Searching for Types\&. Such files are currently not subject to annotation processing\&. By default, the compiler gives a warning when annotation processing occurred and any implicitly loaded source files are compiled\&. The
+\fB\-implicit\fR
+option provides a way to suppress the warning\&.
+.SH "SEARCHING FOR TYPES"
+.PP
To compile a source file, the compiler often needs information about a type, but the type definition is not in the source files specified on the command line\&. The compiler needs type information for every class or interface used, extended, or implemented in the source file\&. This includes classes and interfaces not explicitly mentioned in the source file, but that provide information through inheritance\&.
.PP
-For example, when you create a subclass \f3java\&.applet\&.Applet\fR, you are also using the ancestor classes of \f3Applet\fR: \f3java\&.awt\&.Panel\fR, \f3java\&.awt\&.Container\fR, \f3java\&.awt\&.Component\fR, and \f3java\&.lang\&.Object\fR\&.
-.PP
-When the compiler needs type information, it searches for a source file or class file that defines the type\&. The compiler searches for class files first in the bootstrap and extension classes, then in the user class path (which by default is the current directory)\&. The user class path is defined by setting the \f3CLASSPATH\fR environment variable or by using the \f3-classpath\fR option\&.
-.PP
-If you set the \f3-sourcepath\fR option, then the compiler searches the indicated path for source files\&. Otherwise, the compiler searches the user class path for both class files and source files\&.
-.PP
-You can specify different bootstrap or extension classes with the \f3-bootclasspath\fR and the \f3-extdirs\fR options\&. See Cross-Compilation Options\&.
-.PP
-A successful type search may produce a class file, a source file, or both\&. If both are found, then you can use the \f3-Xprefer\fR option to instruct the compiler which to use\&. If \f3newer\fR is specified, then the compiler uses the newer of the two files\&. If \f3source\fR is specified, the compiler uses the source file\&. The default is \f3newer\fR\&.
-.PP
-If a type search finds a source file for a required type, either by itself, or as a result of the setting for the \f3-Xprefer\fR option, then the compiler reads the source file to get the information it needs\&. By default the compiler also compiles the source file\&. You can use the \f3-implicit\fR option to specify the behavior\&. If \f3none\fR is specified, then no class files are generated for the source file\&. If \f3class\fR is specified, then class files are generated for the source file\&.
-.PP
-The compiler might not discover the need for some type information until after annotation processing completes\&. When the type information is found in a source file and no \f3-implicit\fR option is specified, the compiler gives a warning that the file is being compiled without being subject to annotation processing\&. To disable the warning, either specify the file on the command line (so that it will be subject to annotation processing) or use the \f3-implicit\fR option to specify whether or not class files should be generated for such source files\&.
-.SH PROGRAMMATIC\ INTERFACE
-The \f3javac\fR command supports the new Java Compiler API defined by the classes and interfaces in the \f3javax\&.tools\fR package\&.
-.SS EXAMPLE
-To compile as though providing command-line arguments, use the following syntax:
-.sp
-.nf
-\f3JavaCompiler javac = ToolProvider\&.getSystemJavaCompiler();\fP
-.fi
-.nf
-\f3JavaCompiler javac = ToolProvider\&.getSystemJavaCompiler();\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-The example writes diagnostics to the standard output stream and returns the exit code that \f3javac\fR would give when called from the command line\&.
-.PP
-You can use other methods in the \f3javax\&.tools\&.JavaCompiler\fR interface to handle diagnostics, control where files are read from and written to, and more\&.
-.SS OLD\ INTERFACE
-\fINote:\fR This API is retained for backward compatibility only\&. All new code should use the newer Java Compiler API\&.
-.PP
-The \f3com\&.sun\&.tools\&.javac\&.Main\fR class provides two static methods to call the compiler from a program:
-.sp
-.nf
-\f3public static int compile(String[] args);\fP
-.fi
-.nf
-\f3public static int compile(String[] args, PrintWriter out);\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-The \f3args\fR parameter represents any of the command-line arguments that would typically be passed to the compiler\&.
-.PP
-The \f3out\fR parameter indicates where the compiler diagnostic output is directed\&.
-.PP
-The \f3return\fR value is equivalent to the \f3exit\fR value from \f3javac\fR\&.
-.PP
-\fINote:\fR All other classes and methods found in a package with names that start with \f3com\&.sun\&.tools\&.javac\fR (subpackages of \f3com\&.sun\&.tools\&.javac\fR) are strictly internal and subject to change at any time\&.
-.SH EXAMPLES
-\f3Example 1 Compile a Simple Program\fR
-.PP
-This example shows how to compile the \f3Hello\&.java\fR source file in the greetings directory\&. The class defined in \f3Hello\&.java\fR is called \f3greetings\&.Hello\fR\&. The greetings directory is the package directory both for the source file and the class file and is underneath the current directory\&. This makes it possible to use the default user class path\&. It also makes it unnecessary to specify a separate destination directory with the \f3-d\fR option\&.
-.PP
-The source code in \f3Hello\&.java\fR:
-.sp
-.nf
-\f3package greetings;\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3public class Hello {\fP
-.fi
-.nf
-\f3 public static void main(String[] args) {\fP
-.fi
-.nf
-\f3 for (int i=0; i < args\&.length; i++) {\fP
-.fi
-.nf
-\f3 System\&.out\&.println("Hello " + args[i]);\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
+For example, when you create a subclass
+\fBjava\&.applet\&.Applet\fR, you are also using the ancestor classes of
+\fBApplet\fR:
+\fBjava\&.awt\&.Panel\fR,
+\fBjava\&.awt\&.Container\fR,
+\fBjava\&.awt\&.Component\fR, and
+\fBjava\&.lang\&.Object\fR\&.
+.PP
+When the compiler needs type information, it searches for a source file or class file that defines the type\&. The compiler searches for class files first in the bootstrap and extension classes, then in the user class path (which by default is the current directory)\&. The user class path is defined by setting the
+\fBCLASSPATH\fR
+environment variable or by using the
+\fB\-classpath\fR
+option\&.
+.PP
+If you set the
+\fB\-sourcepath\fR
+option, then the compiler searches the indicated path for source files\&. Otherwise, the compiler searches the user class path for both class files and source files\&.
+.PP
+You can specify different bootstrap or extension classes with the
+\fB\-bootclasspath\fR
+and the
+\fB\-extdirs\fR
+options\&. See Cross\-Compilation Options\&.
+.PP
+A successful type search may produce a class file, a source file, or both\&. If both are found, then you can use the
+\fB\-Xprefer\fR
+option to instruct the compiler which to use\&. If
+\fBnewer\fR
+is specified, then the compiler uses the newer of the two files\&. If
+\fBsource\fR
+is specified, the compiler uses the source file\&. The default is
+\fBnewer\fR\&.
+.PP
+If a type search finds a source file for a required type, either by itself, or as a result of the setting for the
+\fB\-Xprefer\fR
+option, then the compiler reads the source file to get the information it needs\&. By default the compiler also compiles the source file\&. You can use the
+\fB\-implicit\fR
+option to specify the behavior\&. If
+\fBnone\fR
+is specified, then no class files are generated for the source file\&. If
+\fBclass\fR
+is specified, then class files are generated for the source file\&.
+.PP
+The compiler might not discover the need for some type information until after annotation processing completes\&. When the type information is found in a source file and no
+\fB\-implicit\fR
+option is specified, the compiler gives a warning that the file is being compiled without being subject to annotation processing\&. To disable the warning, either specify the file on the command line (so that it will be subject to annotation processing) or use the
+\fB\-implicit\fR
+option to specify whether or not class files should be generated for such source files\&.
+.SH "PROGRAMMATIC INTERFACE"
+.PP
+The
+\fBjavac\fR
+command supports the new Java Compiler API defined by the classes and interfaces in the
+\fBjavax\&.tools\fR
+package\&.
+.SS "Example"
+.PP
+To compile as though providing command\-line arguments, use the following syntax:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBJavaCompiler javac = ToolProvider\&.getSystemJavaCompiler();\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+The example writes diagnostics to the standard output stream and returns the exit code that
+\fBjavac\fR
+would give when called from the command line\&.
+.PP
+You can use other methods in the
+\fBjavax\&.tools\&.JavaCompiler\fR
+interface to handle diagnostics, control where files are read from and written to, and more\&.
+.SS "Old Interface"
+.PP
+\fBNote:\fR
+This API is retained for backward compatibility only\&. All new code should use the newer Java Compiler API\&.
+.PP
+The
+\fBcom\&.sun\&.tools\&.javac\&.Main\fR
+class provides two static methods to call the compiler from a program:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBpublic static int compile(String[] args);\fR
+\fBpublic static int compile(String[] args, PrintWriter out);\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+The
+\fBargs\fR
+parameter represents any of the command\-line arguments that would typically be passed to the compiler\&.
+.PP
+The
+\fBout\fR
+parameter indicates where the compiler diagnostic output is directed\&.
+.PP
+The
+\fBreturn\fR
+value is equivalent to the
+\fBexit\fR
+value from
+\fBjavac\fR\&.
+.PP
+\fBNote:\fR
+All other classes and methods found in a package with names that start with
+\fBcom\&.sun\&.tools\&.javac\fR
+(subpackages of
+\fBcom\&.sun\&.tools\&.javac\fR) are strictly internal and subject to change at any time\&.
+.SH "EXAMPLES"
+.PP
+\fBExample 1\fR
+.br
+Compile a Simple Program
+.RS 4
+This example shows how to compile the
+\fBHello\&.java\fR
+source file in the greetings directory\&. The class defined in
+\fBHello\&.java\fR
+is called
+\fBgreetings\&.Hello\fR\&. The greetings directory is the package directory both for the source file and the class file and is underneath the current directory\&. This makes it possible to use the default user class path\&. It also makes it unnecessary to specify a separate destination directory with the
+\fB\-d\fR
+option\&.
+.sp
+The source code in
+\fBHello\&.java\fR:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBpackage greetings;\fR
+\fB \fR
+\fBpublic class Hello {\fR
+\fB public static void main(String[] args) {\fR
+\fB for (int i=0; i < args\&.length; i++) {\fR
+\fB System\&.out\&.println("Hello " + args[i]);\fR
+\fB }\fR
+\fB }\fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
Compile greetings\&.Hello:
-.sp
-.nf
-\f3javac greetings/Hello\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-Run \f3greetings\&.Hello\fR:
-.sp
-.nf
-\f3java greetings\&.Hello World Universe Everyone\fP
-.fi
-.nf
-\f3Hello World\fP
-.fi
-.nf
-\f3Hello Universe\fP
-.fi
-.nf
-\f3Hello Everyone\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-\f3Example 2 Compile Multiple Source Files\fR
-.PP
-This example compiles the \f3Aloha\&.java\fR, \f3GutenTag\&.java\fR, \f3Hello\&.java\fR, and \f3Hi\&.java\fR source files in the \f3greetings\fR package\&.
-.sp
-.nf
-\f3% javac greetings/*\&.java\fP
-.fi
-.nf
-\f3% ls greetings\fP
-.fi
-.nf
-\f3Aloha\&.class GutenTag\&.class Hello\&.class Hi\&.class\fP
-.fi
-.nf
-\f3Aloha\&.java GutenTag\&.java Hello\&.java Hi\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-\f3Example 3 Specify a User Class Path\fR
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac greetings/Hello\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Run
+\fBgreetings\&.Hello\fR:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjava greetings\&.Hello World Universe Everyone\fR
+\fBHello World\fR
+\fBHello Universe\fR
+\fBHello Everyone\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
.PP
+\fBExample 2\fR
+.br
+Compile Multiple Source Files
+.RS 4
+This example compiles the
+\fBAloha\&.java\fR,
+\fBGutenTag\&.java\fR,
+\fBHello\&.java\fR, and
+\fBHi\&.java\fR
+source files in the
+\fBgreetings\fR
+package\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB% javac greetings/*\&.java\fR
+\fB% ls greetings\fR
+\fBAloha\&.class GutenTag\&.class Hello\&.class Hi\&.class\fR
+\fBAloha\&.java GutenTag\&.java Hello\&.java Hi\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBExample 3\fR
+.br
+Specify a User Class Path
+.RS 4
After changing one of the source files in the previous example, recompile it:
-.sp
-.nf
-\f3pwd\fP
-.fi
-.nf
-\f3/examples\fP
-.fi
-.nf
-\f3javac greetings/Hi\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-Because \f3greetings\&.Hi\fR refers to other classes in the \f3greetings\fR package, the compiler needs to find these other classes\&. The previous example works because the default user class path is the directory that contains the package directory\&. If you want to recompile this file without concern for which directory you are in, then add the examples directory to the user class path by setting \f3CLASSPATH\fR\&. This example uses the \f3-classpath\fR option\&.
-.sp
-.nf
-\f3javac \-classpath /examples /examples/greetings/Hi\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-If you change \f3greetings\&.Hi\fR to use a banner utility, then that utility also needs to be accessible through the user class path\&.
-.sp
-.nf
-\f3javac \-classpath /examples:/lib/Banners\&.jar \e\fP
-.fi
-.nf
-\f3 /examples/greetings/Hi\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-To execute a class in the \f3greetings\fR package, the program needs access to the \f3greetings\fR package, and to the classes that the \f3greetings\fR classes use\&.
-.sp
-.nf
-\f3java \-classpath /examples:/lib/Banners\&.jar greetings\&.Hi\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-\f3Example 4 Separate Source Files and Class Files\fR
-.PP
-The following example uses \f3javac\fR to compile code that runs on JVM 1\&.6\&.
-.sp
-.nf
-\f3javac \-source 1\&.6 \-target 1\&.6 \-bootclasspath jdk1\&.6\&.0/lib/rt\&.jar \e \fP
-.fi
-.nf
-\f3\-extdirs "" OldCode\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-The \f3-source 1\&.6\fR option specifies that release 1\&.6 (or 6) of the Java programming language be used to compile \f3OldCode\&.java\fR\&. The option \f3-target 1\&.6\fR option ensures that the generated class files are compatible with JVM 1\&.6\&. Note that in most cases, the value of the \f3-target\fR option is the value of the \f3-source\fR option; in this example, you can omit the \f3-target\fR option\&.
-.PP
-You must specify the \f3-bootclasspath\fR option to specify the correct version of the bootstrap classes (the \f3rt\&.jar\fR library)\&. If not, then the compiler generates a warning:
-.sp
-.nf
-\f3javac \-source 1\&.6 OldCode\&.java\fP
-.fi
-.nf
-\f3warning: [options] bootstrap class path not set in conjunction with \fP
-.fi
-.nf
-\f3\-source 1\&.6\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-If you do not specify the correct version of bootstrap classes, then the compiler uses the old language rules (in this example, it uses version 1\&.6 of the Java programming language) combined with the new bootstrap classes, which can result in class files that do not work on the older platform (in this case, Java SE 6) because reference to nonexistent methods can get included\&.
-.PP
-\f3Example 5 Cross Compile\fR
-.PP
-This example uses \f3javac\fR to compile code that runs on JVM 1\&.6\&.
-.sp
-.nf
-\f3javac \-source 1\&.6 \-target 1\&.6 \-bootclasspath jdk1\&.6\&.0/lib/rt\&.jar \e\fP
-.fi
-.nf
-\f3 \-extdirs "" OldCode\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-The\f3-source 1\&.6\fR option specifies that release 1\&.6 (or 6) of the Java programming language to be used to compile OldCode\&.java\&. The \f3-target 1\&.6\fR option ensures that the generated class files are compatible with JVM 1\&.6\&. In most cases, the value of the \f3-target\fR is the value of \f3-source\fR\&. In this example, the \f3-target\fR option is omitted\&.
-.PP
-You must specify the \f3-bootclasspath\fR option to specify the correct version of the bootstrap classes (the \f3rt\&.jar\fR library)\&. If not, then the compiler generates a warning:
-.sp
-.nf
-\f3javac \-source 1\&.6 OldCode\&.java\fP
-.fi
-.nf
-\f3warning: [options] bootstrap class path not set in conjunction with \-source 1\&.6\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-If you do not specify the correct version of bootstrap classes, then the compiler uses the old language rules combined with the new bootstrap classes\&. This combination can result in class files that do not work on the older platform (in this case, Java SE 6) because reference to nonexistent methods can get included\&. In this example, the compiler uses release 1\&.6 of the Java programming language\&.
-.SH SEE\ ALSO
-.TP 0.2i
-\(bu
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBpwd\fR
+\fB/examples\fR
+\fBjavac greetings/Hi\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Because
+\fBgreetings\&.Hi\fR
+refers to other classes in the
+\fBgreetings\fR
+package, the compiler needs to find these other classes\&. The previous example works because the default user class path is the directory that contains the package directory\&. If you want to recompile this file without concern for which directory you are in, then add the examples directory to the user class path by setting
+\fBCLASSPATH\fR\&. This example uses the
+\fB\-classpath\fR
+option\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac \-classpath /examples /examples/greetings/Hi\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+If you change
+\fBgreetings\&.Hi\fR
+to use a banner utility, then that utility also needs to be accessible through the user class path\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac \-classpath /examples:/lib/Banners\&.jar \e\fR
+\fB /examples/greetings/Hi\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+To execute a class in the
+\fBgreetings\fR
+package, the program needs access to the
+\fBgreetings\fR
+package, and to the classes that the
+\fBgreetings\fR
+classes use\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjava \-classpath /examples:/lib/Banners\&.jar greetings\&.Hi\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBExample 4\fR
+.br
+Separate Source Files and Class Files
+.RS 4
+The following example uses
+\fBjavac\fR
+to compile code that runs on JVM 1\&.7\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac \-source 1\&.7 \-target 1\&.7 \-bootclasspath jdk1\&.7\&.0/lib/rt\&.jar \e \fR
+\fB\-extdirs "" OldCode\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The
+\fB\-source 1\&.7\fR
+option specifies that release 1\&.7 (or 7) of the Java programming language be used to compile
+\fBOldCode\&.java\fR\&. The option
+\fB\-target 1\&.7\fR
+option ensures that the generated class files are compatible with JVM 1\&.7\&. Note that in most cases, the value of the
+\fB\-target\fR
+option is the value of the
+\fB\-source\fR
+option; in this example, you can omit the
+\fB\-target\fR
+option\&.
+.sp
+You must specify the
+\fB\-bootclasspath\fR
+option to specify the correct version of the bootstrap classes (the
+\fBrt\&.jar\fR
+library)\&. If not, then the compiler generates a warning:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac \-source 1\&.7 OldCode\&.java\fR
+\fBwarning: [options] bootstrap class path not set in conjunction with \fR
+\fB\-source 1\&.7\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+If you do not specify the correct version of bootstrap classes, then the compiler uses the old language rules (in this example, it uses version 1\&.7 of the Java programming language) combined with the new bootstrap classes, which can result in class files that do not work on the older platform (in this case, Java SE 7) because reference to nonexistent methods can get included\&.
+.RE
+.PP
+\fBExample 5\fR
+.br
+Cross Compile
+.RS 4
+This example uses
+\fBjavac\fR
+to compile code that runs on JVM 1\&.7\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac \-source 1\&.7 \-target 1\&.7 \-bootclasspath jdk1\&.7\&.0/lib/rt\&.jar \e\fR
+\fB \-extdirs "" OldCode\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The\fB \-source 1\&.7\fR
+option specifies that release 1\&.7 (or 7) of the Java programming language to be used to compile OldCode\&.java\&. The
+\fB\-target 1\&.7\fR
+option ensures that the generated class files are compatible with JVM 1\&.7\&. In most cases, the value of the
+\fB\-target\fR
+is the value of
+\fB\-source\fR\&. In this example, the
+\fB\-target\fR
+option is omitted\&.
+.sp
+You must specify the
+\fB\-bootclasspath\fR
+option to specify the correct version of the bootstrap classes (the
+\fBrt\&.jar\fR
+library)\&. If not, then the compiler generates a warning:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac \-source 1\&.7 OldCode\&.java\fR
+\fBwarning: [options] bootstrap class path not set in conjunction with \-source 1\&.7\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+If you do not specify the correct version of bootstrap classes, then the compiler uses the old language rules combined with the new bootstrap classes\&. This combination can result in class files that do not work on the older platform (in this case, Java SE 7) because reference to nonexistent methods can get included\&. In this example, the compiler uses release 1\&.7 of the Java programming language\&.
+.RE
+.SH "SEE ALSO"
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
java(1)
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
jdb(1)
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
javah(1)
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
javadoc(1)
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
jar(1)
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
jdb(1)
-.RE
-.br
-'pl 8.5i
-'bp
+.RE
+.br
+'pl 8.5i
+'bp
diff --git a/src/bsd/doc/man/javap.1 b/src/bsd/doc/man/javap.1
index 353a13fb0..2580bf124 100644
--- a/src/bsd/doc/man/javap.1
+++ b/src/bsd/doc/man/javap.1
@@ -1,443 +1,392 @@
'\" t
-.\" Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
-.\"
-.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-.\"
-.\" This code is free software; you can redistribute it and/or modify it
-.\" under the terms of the GNU General Public License version 2 only, as
-.\" published by the Free Software Foundation.
-.\"
-.\" 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.
-.\"
-.\" Arch: generic
-.\" Software: JDK 8
-.\" Date: 21 November 2013
-.\" SectDesc: Basic Tools
-.\" Title: javap.1
+.\" Copyright (c) 1994, 2014, Oracle and/or its affiliates. All rights reserved.
+.\"
+.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+.\"
+.\" This code is free software; you can redistribute it and/or modify it
+.\" under the terms of the GNU General Public License version 2 only, as
+.\" published by the Free Software Foundation.
+.\"
+.\" 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.
+.\"
+.\" Title: javap
+.\" Language: English
+.\" Date: 8 August 2014
+.\" SectDesc: Basic Tools
+.\" Software: JDK 8
+.\" Arch: generic
+.\" Part Number: E38207-03
.\"
.if n .pl 99999
-.TH javap 1 "21 November 2013" "JDK 8" "Basic Tools"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-
-.SH NAME
+.TH "javap" "1" "8 August 2014" "JDK 8" "Basic Tools"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
javap \- Disassembles one or more class files\&.
-.SH SYNOPSIS
-.sp
-.nf
-
+.SH "SYNOPSIS"
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
\fBjavap\fR [\fIoptions\fR] \fIclassfile\fR\&.\&.\&.
-.fi
-.sp
-.TP
+.fi
+.if n \{\
+.RE
+.\}
+.PP
\fIoptions\fR
-The command-line options\&. See Options\&.
-.TP
+.RS 4
+The command\-line options\&. See Options\&.
+.RE
+.PP
\fIclassfile\fR
-One or more classes separated by spaces to be processed for annotations such as DocFooter\&.class\&. You can specify a class that can be found in the class path, by its file name or with a URL such as \f3file:///home/user/myproject/src/DocFooter\&.class\fR\&.
-.SH DESCRIPTION
-The \f3javap\fR command disassembles one or more class files\&. The output depends on the options used\&. When no options are used, then the \f3javap\fR command prints the package, protected and public fields, and methods of the classes passed to it\&. The \f3javap\fR command prints its output to \f3stdout\fR\&.
-.SH OPTIONS
-.TP
--help, --help, -?
+.RS 4
+One or more classes separated by spaces to be processed for annotations such as DocFooter\&.class\&. You can specify a class that can be found in the class path, by its file name or with a URL such as
+\fBfile:///home/user/myproject/src/DocFooter\&.class\fR\&.
+.RE
+.SH "DESCRIPTION"
+.PP
+The
+\fBjavap\fR
+command disassembles one or more class files\&. The output depends on the options used\&. When no options are used, then the
+\fBjavap\fR
+command prints the package, protected and public fields, and methods of the classes passed to it\&. The
+\fBjavap\fR
+command prints its output to
+\fBstdout\fR\&.
+.SH "OPTIONS"
+.PP
+\-help
.br
-Prints a help message for the \f3javap\fR command\&.
-.TP
--version
+\-\-help
.br
+\-?
+.RS 4
+Prints a help message for the
+\fBjavap\fR
+command\&.
+.RE
+.PP
+\-version
+.RS 4
Prints release information\&.
-.TP
--l
-.br
+.RE
+.PP
+\-l
+.RS 4
Prints line and local variable tables\&.
-.TP
--public
-.br
+.RE
+.PP
+\-public
+.RS 4
Shows only public classes and members\&.
-.TP
--protected
-.br
+.RE
+.PP
+\-protected
+.RS 4
Shows only protected and public classes and members\&.
-.TP
--private, -p
+.RE
+.PP
+\-private
.br
+\-p
+.RS 4
Shows all classes and members\&.
-.TP
--J\fIoption\fR
-.br
+.RE
+.PP
+\-J\fIoption\fR
+.RS 4
Passes the specified option to the JVM\&. For example:
-.sp
-.nf
-\f3javap \-J\-version\fP
-.fi
-.nf
-\f3javap \-J\-Djava\&.security\&.manager \-J\-Djava\&.security\&.policy=MyPolicy MyClassName\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-For more information about JVM options, see the \f3java(1)\fR command documentation\&.
-.TP
--s
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavap \-J\-version\fR
+\fBjavap \-J\-Djava\&.security\&.manager \-J\-Djava\&.security\&.policy=MyPolicy MyClassName\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+For more information about JVM options, see the command documentation\&.
+.RE
+.PP
+\-s
+.RS 4
Prints internal type signatures\&.
-.TP
--sysinfo
-.br
+.RE
+.PP
+\-sysinfo
+.RS 4
Shows system information (path, size, date, MD5 hash) of the class being processed\&.
-.TP
--constants
-.br
-Shows \f3static final\fR constants\&.
-.TP
--c
-.br
+.RE
+.PP
+\-constants
+.RS 4
+Shows
+\fBstatic final\fR
+constants\&.
+.RE
+.PP
+\-c
+.RS 4
Prints disassembled code, for example, the instructions that comprise the Java bytecodes, for each of the methods in the class\&.
-.TP
--verbose
-.br
+.RE
+.PP
+\-verbose
+.RS 4
Prints stack size, number of locals and arguments for methods\&.
-.TP
--classpath \fIpath\fR
-.br
-Specifies the path the \f3javap\fR command uses to look up classes\&. Overrides the default or the \f3CLASSPATH\fR environment variable when it is set\&.
-.TP
--bootclasspath \fIpath\fR
-.br
-Specifies the path from which to load bootstrap classes\&. By default, the bootstrap classes are the classes that implement the core Java platform located in \f3jre/lib/rt\&.jar\fR and several other JAR files\&.
-.TP
--extdir \fIdirs\fR
-.br
-Overrides the location at which installed extensions are searched for\&. The default location for extensions is the value of \f3java\&.ext\&.dirs\fR\&.
-.SH EXAMPLE
-Compile the following \f3DocFooter\fR class:
-.sp
-.nf
-\f3import java\&.awt\&.*;\fP
-.fi
-.nf
-\f3import java\&.applet\&.*;\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3public class DocFooter extends Applet {\fP
-.fi
-.nf
-\f3 String date;\fP
-.fi
-.nf
-\f3 String email;\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3 public void init() {\fP
-.fi
-.nf
-\f3 resize(500,100);\fP
-.fi
-.nf
-\f3 date = getParameter("LAST_UPDATED");\fP
-.fi
-.nf
-\f3 email = getParameter("EMAIL");\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3 public void paint(Graphics g) {\fP
-.fi
-.nf
-\f3 g\&.drawString(date + " by ",100, 15);\fP
-.fi
-.nf
-\f3 g\&.drawString(email,290,15);\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-The output from the \f3javap DocFooter\&.class\fR command yields the following:
-.sp
-.nf
-\f3Compiled from "DocFooter\&.java"\fP
-.fi
-.nf
-\f3public class DocFooter extends java\&.applet\&.Applet {\fP
-.fi
-.nf
-\f3 java\&.lang\&.String date;\fP
-.fi
-.nf
-\f3 java\&.lang\&.String email;\fP
-.fi
-.nf
-\f3 public DocFooter();\fP
-.fi
-.nf
-\f3 public void init();\fP
-.fi
-.nf
-\f3 public void paint(java\&.awt\&.Graphics);\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-The output from \f3javap -c DocFooter\&.class\fR command yields the following:
-.sp
-.nf
-\f3Compiled from "DocFooter\&.java"\fP
-.fi
-.nf
-\f3public class DocFooter extends java\&.applet\&.Applet {\fP
-.fi
-.nf
-\f3 java\&.lang\&.String date;\fP
-.fi
-.nf
-\f3 java\&.lang\&.String email;\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3 public DocFooter();\fP
-.fi
-.nf
-\f3 Code:\fP
-.fi
-.nf
-\f3 0: aload_0 \fP
-.fi
-.nf
-\f3 1: invokespecial #1 // Method\fP
-.fi
-.nf
-\f3java/applet/Applet\&."<init>":()V\fP
-.fi
-.nf
-\f3 4: return \fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3 public void init();\fP
-.fi
-.nf
-\f3 Code:\fP
-.fi
-.nf
-\f3 0: aload_0 \fP
-.fi
-.nf
-\f3 1: sipush 500\fP
-.fi
-.nf
-\f3 4: bipush 100\fP
-.fi
-.nf
-\f3 6: invokevirtual #2 // Method resize:(II)V\fP
-.fi
-.nf
-\f3 9: aload_0 \fP
-.fi
-.nf
-\f3 10: aload_0 \fP
-.fi
-.nf
-\f3 11: ldc #3 // String LAST_UPDATED\fP
-.fi
-.nf
-\f3 13: invokevirtual #4 // Method\fP
-.fi
-.nf
-\f3 getParameter:(Ljava/lang/String;)Ljava/lang/String;\fP
-.fi
-.nf
-\f3 16: putfield #5 // Field date:Ljava/lang/String;\fP
-.fi
-.nf
-\f3 19: aload_0 \fP
-.fi
-.nf
-\f3 20: aload_0 \fP
-.fi
-.nf
-\f3 21: ldc #6 // String EMAIL\fP
-.fi
-.nf
-\f3 23: invokevirtual #4 // Method\fP
-.fi
-.nf
-\f3 getParameter:(Ljava/lang/String;)Ljava/lang/String;\fP
-.fi
-.nf
-\f3 26: putfield #7 // Field email:Ljava/lang/String;\fP
-.fi
-.nf
-\f3 29: return \fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3 public void paint(java\&.awt\&.Graphics);\fP
-.fi
-.nf
-\f3 Code:\fP
-.fi
-.nf
-\f3 0: aload_1 \fP
-.fi
-.nf
-\f3 1: new #8 // class java/lang/StringBuilder\fP
-.fi
-.nf
-\f3 4: dup \fP
-.fi
-.nf
-\f3 5: invokespecial #9 // Method\fP
-.fi
-.nf
-\f3 java/lang/StringBuilder\&."<init>":()V\fP
-.fi
-.nf
-\f3 8: aload_0 \fP
-.fi
-.nf
-\f3 9: getfield #5 // Field date:Ljava/lang/String;\fP
-.fi
-.nf
-\f3 12: invokevirtual #10 // Method\fP
-.fi
-.nf
-\f3 java/lang/StringBuilder\&.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;\fP
-.fi
-.nf
-\f3 15: ldc #11 // String by \fP
-.fi
-.nf
-\f3 17: invokevirtual #10 // Method\fP
-.fi
-.nf
-\f3 java/lang/StringBuilder\&.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;\fP
-.fi
-.nf
-\f3 20: invokevirtual #12 // Method\fP
-.fi
-.nf
-\f3 java/lang/StringBuilder\&.toString:()Ljava/lang/String;\fP
-.fi
-.nf
-\f3 23: bipush 100\fP
-.fi
-.nf
-\f3 25: bipush 15\fP
-.fi
-.nf
-\f3 27: invokevirtual #13 // Method\fP
-.fi
-.nf
-\f3 java/awt/Graphics\&.drawString:(Ljava/lang/String;II)V\fP
-.fi
-.nf
-\f3 30: aload_1 \fP
-.fi
-.nf
-\f3 31: aload_0 \fP
-.fi
-.nf
-\f3 32: getfield #7 // Field email:Ljava/lang/String;\fP
-.fi
-.nf
-\f3 35: sipush 290\fP
-.fi
-.nf
-\f3 38: bipush 15\fP
-.fi
-.nf
-\f3 40: invokevirtual #13 // Method\fP
-.fi
-.nf
-\f3java/awt/Graphics\&.drawString:(Ljava/lang/String;II)V\fP
-.fi
-.nf
-\f3 43: return \fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-.SH SEE\ ALSO
-.TP 0.2i
-\(bu
-javac(1)
-.TP 0.2i
-\(bu
+.RE
+.PP
+\-classpath \fIpath\fR
+.RS 4
+Specifies the path the
+\fBjavap\fR
+command uses to look up classes\&. Overrides the default or the
+\fBCLASSPATH\fR
+environment variable when it is set\&.
+.RE
+.PP
+\-bootclasspath \fIpath\fR
+.RS 4
+Specifies the path from which to load bootstrap classes\&. By default, the bootstrap classes are the classes that implement the core Java platform located in
+\fBjre/lib/rt\&.jar\fR
+and several other JAR files\&.
+.RE
+.PP
+\-extdir \fIdirs\fR
+.RS 4
+Overrides the location at which installed extensions are searched for\&. The default location for extensions is the value of
+\fBjava\&.ext\&.dirs\fR\&.
+.RE
+.SH "EXAMPLE"
+.PP
+Compile the following
+\fBDocFooter\fR
+class:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBimport java\&.awt\&.*;\fR
+\fBimport java\&.applet\&.*;\fR
+\fB \fR
+\fBpublic class DocFooter extends Applet {\fR
+\fB String date;\fR
+\fB String email;\fR
+\fB \fR
+\fB public void init() {\fR
+\fB resize(500,100);\fR
+\fB date = getParameter("LAST_UPDATED");\fR
+\fB email = getParameter("EMAIL");\fR
+\fB }\fR
+\fB \fR
+\fB public void paint(Graphics g) {\fR
+\fB g\&.drawString(date + " by ",100, 15);\fR
+\fB g\&.drawString(email,290,15);\fR
+\fB }\fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+The output from the
+\fBjavap DocFooter\&.class\fR
+command yields the following:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBCompiled from "DocFooter\&.java"\fR
+\fBpublic class DocFooter extends java\&.applet\&.Applet {\fR
+\fB java\&.lang\&.String date;\fR
+\fB java\&.lang\&.String email;\fR
+\fB public DocFooter();\fR
+\fB public void init();\fR
+\fB public void paint(java\&.awt\&.Graphics);\fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+The output from
+\fBjavap \-c DocFooter\&.class\fR
+command yields the following:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBCompiled from "DocFooter\&.java"\fR
+\fBpublic class DocFooter extends java\&.applet\&.Applet {\fR
+\fB java\&.lang\&.String date;\fR
+\fB java\&.lang\&.String email;\fR
+
+\fB public DocFooter();\fR
+\fB Code:\fR
+\fB 0: aload_0 \fR
+\fB 1: invokespecial #1 // Method\fR
+\fBjava/applet/Applet\&."<init>":()V\fR
+\fB 4: return \fR
+
+\fB public void init();\fR
+\fB Code:\fR
+\fB 0: aload_0 \fR
+\fB 1: sipush 500\fR
+\fB 4: bipush 100\fR
+\fB 6: invokevirtual #2 // Method resize:(II)V\fR
+\fB 9: aload_0 \fR
+\fB 10: aload_0 \fR
+\fB 11: ldc #3 // String LAST_UPDATED\fR
+\fB 13: invokevirtual #4 // Method\fR
+\fB getParameter:(Ljava/lang/String;)Ljava/lang/String;\fR
+\fB 16: putfield #5 // Field date:Ljava/lang/String;\fR
+\fB 19: aload_0 \fR
+\fB 20: aload_0 \fR
+\fB 21: ldc #6 // String EMAIL\fR
+\fB 23: invokevirtual #4 // Method\fR
+\fB getParameter:(Ljava/lang/String;)Ljava/lang/String;\fR
+\fB 26: putfield #7 // Field email:Ljava/lang/String;\fR
+\fB 29: return \fR
+
+\fB public void paint(java\&.awt\&.Graphics);\fR
+\fB Code:\fR
+\fB 0: aload_1 \fR
+\fB 1: new #8 // class java/lang/StringBuilder\fR
+\fB 4: dup \fR
+\fB 5: invokespecial #9 // Method\fR
+\fB java/lang/StringBuilder\&."<init>":()V\fR
+\fB 8: aload_0 \fR
+\fB 9: getfield #5 // Field date:Ljava/lang/String;\fR
+\fB 12: invokevirtual #10 // Method\fR
+\fB java/lang/StringBuilder\&.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;\fR
+\fB 15: ldc #11 // String by \fR
+\fB 17: invokevirtual #10 // Method\fR
+\fB java/lang/StringBuilder\&.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;\fR
+\fB 20: invokevirtual #12 // Method\fR
+\fB java/lang/StringBuilder\&.toString:()Ljava/lang/String;\fR
+\fB 23: bipush 100\fR
+\fB 25: bipush 15\fR
+\fB 27: invokevirtual #13 // Method\fR
+\fB java/awt/Graphics\&.drawString:(Ljava/lang/String;II)V\fR
+\fB 30: aload_1 \fR
+\fB 31: aload_0 \fR
+\fB 32: getfield #7 // Field email:Ljava/lang/String;\fR
+\fB 35: sipush 290\fR
+\fB 38: bipush 15\fR
+\fB 40: invokevirtual #13 // Method\fR
+\fBjava/awt/Graphics\&.drawString:(Ljava/lang/String;II)V\fR
+\fB 43: return \fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.SH "SEE ALSO"
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
java(1)
-.TP 0.2i
-\(bu
-jdb(1)
-.TP 0.2i
-\(bu
-javah(1)
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+javac(1)
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
javadoc(1)
-.RE
-.br
-'pl 8.5i
-'bp
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+javah(1)
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+jdb(1)
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+jdeps(1)
+.RE
+.br
+'pl 8.5i
+'bp
diff --git a/src/linux/doc/man/java.1 b/src/linux/doc/man/java.1
index f32570f38..bc8f1f105 100644
--- a/src/linux/doc/man/java.1
+++ b/src/linux/doc/man/java.1
@@ -1,2001 +1,3461 @@
'\" t
-.\" Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
-.\"
-.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-.\"
-.\" This code is free software; you can redistribute it and/or modify it
-.\" under the terms of the GNU General Public License version 2 only, as
-.\" published by the Free Software Foundation.
-.\"
-.\" 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.
-.\"
-.\" Arch: generic
-.\" Software: JDK 8
-.\" Date: 21 November 2013
-.\" SectDesc: Basic Tools
-.\" Title: java.1
+.\" Copyright (c) 1994, 2014, Oracle and/or its affiliates. All rights reserved.
+.\"
+.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+.\"
+.\" This code is free software; you can redistribute it and/or modify it
+.\" under the terms of the GNU General Public License version 2 only, as
+.\" published by the Free Software Foundation.
+.\"
+.\" 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.
+.\"
+.\" Title: java
+.\" Language: English
+.\" Date: 08 August 2014
+.\" SectDesc: Basic Tools
+.\" Software: JDK 8
+.\" Arch: generic
+.\" Part Number: E38207-03
.\"
.if n .pl 99999
-.TH java 1 "21 November 2013" "JDK 8" "Basic Tools"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-
-.SH NAME
+.TH "java" "1" "08 August 2014" "JDK 8" "Basic Tools"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
java \- Launches a Java application\&.
-.SH SYNOPSIS
-.sp
-.nf
-
+.SH "SYNOPSIS"
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
\fBjava\fR [\fIoptions\fR] \fIclassname\fR [\fIargs\fR]
-.fi
-.nf
-
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
\fBjava\fR [\fIoptions\fR] \fB\-jar\fR \fIfilename\fR [\fIargs\fR]
-.fi
-.sp
-.TP
+.fi
+.if n \{\
+.RE
+.\}
+.PP
\fIoptions\fR
-Command-line options separated by spaces\&. See Options\&.
-.TP
+.RS 4
+Command\-line options separated by spaces\&. See Options\&.
+.RE
+.PP
\fIclassname\fR
+.RS 4
The name of the class to be launched\&.
-.TP
+.RE
+.PP
\fIfilename\fR
-The name of the Java Archive (JAR) file to be called\&. Used only with the \f3-jar\fR option\&.
-.TP
+.RS 4
+The name of the Java Archive (JAR) file to be called\&. Used only with the
+\fB\-jar\fR
+option\&.
+.RE
+.PP
\fIargs\fR
-The arguments passed to the \f3main()\fR method separated by spaces\&.
-.SH DESCRIPTION
-The \f3java\fR command starts a Java application\&. It does this by starting the Java Runtime Environment (JRE), loading the specified class, and calling that class\&'s \f3main()\fR method\&. The method must be declared \fIpublic\fR and \fIstatic\fR, it must not return any value, and it must accept a \f3String\fR array as a parameter\&. The method declaration has the following form:
-.sp
-.nf
-\f3public static void main(String[] args)\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-The \f3java\fR command can be used to launch a JavaFX application by loading a class that either has a \f3main()\fR method or that extends \f3javafx\&.application\&.Application\fR\&. In the latter case, the launcher constructs an instance of the \f3Application\fR class, calls its \f3init()\fR method, and then calls the \f3start(javafx\&.stage\&.Stage)\fR method\&.
-.PP
-By default, the first argument that is not an option of the \f3java\fR command is the fully qualified name of the class to be called\&. If the \f3-jar\fR option is specified, its argument is the name of the JAR file containing class and resource files for the application\&. The startup class must be indicated by the \f3Main-Class\fR manifest header in its source code\&.
+.RS 4
+The arguments passed to the
+\fBmain()\fR
+method separated by spaces\&.
+.RE
+.SH "DESCRIPTION"
+.PP
+The
+\fBjava\fR
+command starts a Java application\&. It does this by starting the Java Runtime Environment (JRE), loading the specified class, and calling that class\*(Aqs
+\fBmain()\fR
+method\&. The method must be declared
+\fIpublic\fR
+and
+\fIstatic\fR, it must not return any value, and it must accept a
+\fBString\fR
+array as a parameter\&. The method declaration has the following form:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBpublic static void main(String[] args)\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+The
+\fBjava\fR
+command can be used to launch a JavaFX application by loading a class that either has a
+\fBmain()\fR
+method or that extends
+\fBjavafx\&.application\&.Application\fR\&. In the latter case, the launcher constructs an instance of the
+\fBApplication\fR
+class, calls its
+\fBinit()\fR
+method, and then calls the
+\fBstart(javafx\&.stage\&.Stage)\fR
+method\&.
+.PP
+By default, the first argument that is not an option of the
+\fBjava\fR
+command is the fully qualified name of the class to be called\&. If the
+\fB\-jar\fR
+option is specified, its argument is the name of the JAR file containing class and resource files for the application\&. The startup class must be indicated by the
+\fBMain\-Class\fR
+manifest header in its source code\&.
.PP
The JRE searches for the startup class (and other classes used by the application) in three sets of locations: the bootstrap class path, the installed extensions, and the user\(cqs class path\&.
.PP
-Arguments after the class file name or the JAR file name are passed to the \f3main()\fR method\&.
-.SH OPTIONS
-The \f3java\fR command supports a wide range of options that can be divided into the following categories:
-.TP 0.2i
-\(bu
+Arguments after the class file name or the JAR file name are passed to the
+\fBmain()\fR
+method\&.
+.SH "OPTIONS"
+.PP
+The
+\fBjava\fR
+command supports a wide range of options that can be divided into the following categories:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
Standard Options
-.TP 0.2i
-\(bu
-Non-Standard Options
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Non\-Standard Options
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
Advanced Runtime Options
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
Advanced JIT Compiler Options
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
Advanced Serviceability Options
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
Advanced Garbage Collection Options
+.RE
.PP
Standard options are guaranteed to be supported by all implementations of the Java Virtual Machine (JVM)\&. They are used for common actions, such as checking the version of the JRE, setting the class path, enabling verbose output, and so on\&.
.PP
-Non-standard options are general purpose options that are specific to the Java HotSpot Virtual Machine, so they are not guaranteed to be supported by all JVM implementations, and are subject to change\&. These options start with \f3-X\fR\&.
+Non\-standard options are general purpose options that are specific to the Java HotSpot Virtual Machine, so they are not guaranteed to be supported by all JVM implementations, and are subject to change\&. These options start with
+\fB\-X\fR\&.
.PP
-Advanced options are not recommended for casual use\&. These are developer options used for tuning specific areas of the Java HotSpot Virtual Machine operation that often have specific system requirements and may require privileged access to system configuration parameters\&. They are also not guaranteed to be supported by all JVM implementations, and are subject to change\&. Advanced options start with \f3-XX\fR\&.
+Advanced options are not recommended for casual use\&. These are developer options used for tuning specific areas of the Java HotSpot Virtual Machine operation that often have specific system requirements and may require privileged access to system configuration parameters\&. They are also not guaranteed to be supported by all JVM implementations, and are subject to change\&. Advanced options start with
+\fB\-XX\fR\&.
.PP
To keep track of the options that were deprecated or removed in the latest release, there is a section named Deprecated and Removed Options at the end of the document\&.
.PP
-Boolean options are used to either enable a feature that is disabled by default or disable a feature that is enabled by default\&. Such options do not require a parameter\&. Boolean \f3-XX\fR options are enabled using the plus sign (\f3-XX:+\fR\fIOptionName\fR) and disabled using the minus sign (\f3-XX:-\fR\fIOptionName\fR)\&.
+Boolean options are used to either enable a feature that is disabled by default or disable a feature that is enabled by default\&. Such options do not require a parameter\&. Boolean
+\fB\-XX\fR
+options are enabled using the plus sign (\fB\-XX:+\fR\fIOptionName\fR) and disabled using the minus sign (\fB\-XX:\-\fR\fIOptionName\fR)\&.
+.PP
+For options that require an argument, the argument may be separated from the option name by a space, a colon (:), or an equal sign (=), or the argument may directly follow the option (the exact syntax differs for each option)\&. If you are expected to specify the size in bytes, you can use no suffix, or use the suffix
+\fBk\fR
+or
+\fBK\fR
+for kilobytes (KB),
+\fBm\fR
+or
+\fBM\fR
+for megabytes (MB),
+\fBg\fR
+or
+\fBG\fR
+for gigabytes (GB)\&. For example, to set the size to 8 GB, you can specify either
+\fB8g\fR,
+\fB8192m\fR,
+\fB8388608k\fR, or
+\fB8589934592\fR
+as the argument\&. If you are expected to specify the percentage, use a number from 0 to 1 (for example, specify
+\fB0\&.25\fR
+for 25%)\&.
+.SS "Standard Options"
.PP
-For options that require an argument, the argument may be separated from the option name by a space, a colon (:), or an equal sign (=), or the argument may directly follow the option (the exact syntax differs for each option)\&. If you are expected to specify the size in bytes, you can use no suffix, or use the suffix \f3k\fR or \f3K\fR for kilobytes (KB), \f3m\fR or \f3M\fR for megabytes (MB), \f3g\fR or \f3G\fR for gigabytes (GB)\&. For example, to set the size to 8 GB, you can specify either \f38g\fR, \f38192m\fR, \f38388608k\fR, or \f38589934592\fR as the argument\&. If you are expected to specify the percentage, use a number from 0 to 1 (for example, specify \f30\&.25\fR for 25%)\&.
-.SS STANDARD\ OPTIONS
These are the most commonly used options that are supported by all implementations of the JVM\&.
-.TP
--agentlib:\fIlibname\fR[=\fIoptions\fR]
-.br
-Loads the specified native agent library\&. After the library name, a comma-separated list of options specific to the library can be used\&.
-
-If the option \f3-agentlib:foo\fR is specified, then the JVM attempts to load the library named \f3libfoo\&.so\fR in the location specified by the \f3LD_LIBRARY_PATH\fR system variable (on OS X this variable is \f3DYLD_LIBRARY_PATH\fR)\&.
-
+.PP
+\-agentlib:\fIlibname\fR[=\fIoptions\fR]
+.RS 4
+Loads the specified native agent library\&. After the library name, a comma\-separated list of options specific to the library can be used\&.
+.sp
+If the option
+\fB\-agentlib:foo\fR
+is specified, then the JVM attempts to load the library named
+\fBlibfoo\&.so\fR
+in the location specified by the
+\fBLD_LIBRARY_PATH\fR
+system variable (on OS X this variable is
+\fBDYLD_LIBRARY_PATH\fR)\&.
+.sp
The following example shows how to load the heap profiling tool (HPROF) library and get sample CPU information every 20 ms, with a stack depth of 3:
-.sp
-.nf
-\f3\-agentlib:hprof=cpu=samples,interval=20,depth=3\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-agentlib:hprof=cpu=samples,interval=20,depth=3\fR
+
+.fi
+.if n \{\
+.RE
+.\}
The following example shows how to load the Java Debug Wire Protocol (JDWP) library and listen for the socket connection on port 8000, suspending the JVM before the main class loads:
-.sp
-.nf
-\f3\-agentlib:jdwp=transport=dt_socket,server=y,address=8000\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-agentlib:jdwp=transport=dt_socket,server=y,address=8000\fR
+
+.fi
+.if n \{\
+.RE
+.\}
For more information about the native agent libraries, refer to the following:
-.RS
-.TP 0.2i
-\(bu
-The \f3java\&.lang\&.instrument\fR package description at http://docs\&.oracle\&.com/javase/8/docs/api/java/lang/instrument/package-summary\&.html
-.TP 0.2i
-\(bu
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+The
+\fBjava\&.lang\&.instrument\fR
+package description at http://docs\&.oracle\&.com/javase/8/docs/api/java/lang/instrument/package\-summary\&.html
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
Agent Command Line Options in the JVM Tools Interface guide at http://docs\&.oracle\&.com/javase/8/docs/platform/jvmti/jvmti\&.html#starting
-.RE
-
-.TP
--agentpath:\fIpathname\fR[=\fIoptions\fR]
-.br
-Loads the native agent library specified by the absolute path name\&. This option is equivalent to \f3-agentlib\fR but uses the full path and file name of the library\&.
-.TP
--client
-.br
-Selects the Java HotSpot Client VM\&. The 64-bit version of the Java SE Development Kit (JDK) currently ignores this option and instead uses the Server JVM\&.
+.RE
+.RE
+.PP
+\-agentpath:\fIpathname\fR[=\fIoptions\fR]
+.RS 4
+Loads the native agent library specified by the absolute path name\&. This option is equivalent to
+\fB\-agentlib\fR
+but uses the full path and file name of the library\&.
+.RE
+.PP
+\-client
+.RS 4
+Selects the Java HotSpot Client VM\&. The 64\-bit version of the Java SE Development Kit (JDK) currently ignores this option and instead uses the Server JVM\&.
+.sp
+For default JVM selection, see Server\-Class Machine Detection at
-For default JVM selection, see Server-Class Machine Detection at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/server-class\&.html
-.TP
--D\fIproperty\fR=\fIvalue\fR
-.br
-Sets a system property value\&. The \fIproperty\fR variable is a string with no spaces that represents the name of the property\&. The \fIvalue\fR variable is a string that represents the value of the property\&. If \fIvalue\fR is a string with spaces, then enclose it in quotation marks (for example \f3-Dfoo="foo bar"\fR)\&.
-.TP
--d32
-.br
-Runs the application in a 32-bit environment\&. If a 32-bit environment is not installed or is not supported, then an error will be reported\&. By default, the application is run in a 32-bit environment unless a 64-bit system is used\&.
-.TP
--d64
+http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/server\-class\&.html
+.RE
+.PP
+\-D\fIproperty\fR=\fIvalue\fR
+.RS 4
+Sets a system property value\&. The
+\fIproperty\fR
+variable is a string with no spaces that represents the name of the property\&. The
+\fIvalue\fR
+variable is a string that represents the value of the property\&. If
+\fIvalue\fR
+is a string with spaces, then enclose it in quotation marks (for example
+\fB\-Dfoo="foo bar"\fR)\&.
+.RE
+.PP
+\-d32
+.RS 4
+Runs the application in a 32\-bit environment\&. If a 32\-bit environment is not installed or is not supported, then an error will be reported\&. By default, the application is run in a 32\-bit environment unless a 64\-bit system is used\&.
+.RE
+.PP
+\-d64
+.RS 4
+Runs the application in a 64\-bit environment\&. If a 64\-bit environment is not installed or is not supported, then an error will be reported\&. By default, the application is run in a 32\-bit environment unless a 64\-bit system is used\&.
+.sp
+Currently only the Java HotSpot Server VM supports 64\-bit operation, and the
+\fB\-server\fR
+option is implicit with the use of
+\fB\-d64\fR\&. The
+\fB\-client\fR
+option is ignored with the use of
+\fB\-d64\fR\&. This is subject to change in a future release\&.
+.RE
+.PP
+\-disableassertions[:[\fIpackagename\fR]\&.\&.\&.|:\fIclassname\fR]
.br
-Runs the application in a 64-bit environment\&. If a 64-bit environment is not installed or is not supported, then an error will be reported\&. By default, the application is run in a 32-bit environment unless a 64-bit system is used\&.
-
-Currently only the Java HotSpot Server VM supports 64-bit operation, and the \f3-server\fR option is implicit with the use of \f3-d64\fR\&. The \f3-client\fR option is ignored with the use of \f3-d64\fR\&. This is subject to change in a future release\&.
-.TP
+\-da[:[\fIpackagename\fR]\&.\&.\&.|:\fIclassname\fR]
+.RS 4
+Disables assertions\&. By default, assertions are disabled in all packages and classes\&.
+.sp
+With no arguments,
+\fB\-disableassertions\fR
+(\fB\-da\fR) disables assertions in all packages and classes\&. With the
+\fIpackagename\fR
+argument ending in
+\fB\&.\&.\&.\fR, the switch disables assertions in the specified package and any subpackages\&. If the argument is simply
+\fB\&.\&.\&.\fR, then the switch disables assertions in the unnamed package in the current working directory\&. With the
+\fIclassname\fR
+argument, the switch disables assertions in the specified class\&.
+.sp
+The
+\fB\-disableassertions\fR
+(\fB\-da\fR) option applies to all class loaders and to system classes (which do not have a class loader)\&. There is one exception to this rule: if the option is provided with no arguments, then it does not apply to system classes\&. This makes it easy to disable assertions in all classes except for system classes\&. The
+\fB\-disablesystemassertions\fR
+option enables you to disable assertions in all system classes\&.
+.sp
+To explicitly enable assertions in specific packages or classes, use the
+\fB\-enableassertions\fR
+(\fB\-ea\fR) option\&. Both options can be used at the same time\&. For example, to run the
+\fBMyClass\fR
+application with assertions enabled in package
+\fBcom\&.wombat\&.fruitbat\fR
+(and any subpackages) but disabled in class
+\fBcom\&.wombat\&.fruitbat\&.Brickbat\fR, use the following command:
+.sp
+.if n \{\
+.RS 4
+.\}
.nf
--disableassertions[:[\fIpackagename\fR]\&.\&.\&.|:\fIclassname\fR], -da[:[\fIpackagename\fR]\&.\&.\&.|:\fIclassname\fR]
-.br
+\fBjava \-ea:com\&.wombat\&.fruitbat\&.\&.\&. \-da:com\&.wombat\&.fruitbat\&.Brickbat MyClass\fR
+
.fi
-Disables assertions\&. By default, assertions are disabled in all packages and classes\&.
-
-With no arguments, \f3-disableassertions\fR (\f3-da\fR) disables assertions in all packages and classes\&. With the \fIpackagename\fR argument ending in \f3\&.\&.\&.\fR, the switch disables assertions in the specified package and any subpackages\&. If the argument is simply \f3\&.\&.\&.\fR, then the switch disables assertions in the unnamed package in the current working directory\&. With the \fIclassname\fR argument\f3\fR, the switch disables assertions in the specified class\&.
-
-The \f3-disableassertions\fR (\f3-da\fR) option applies to all class loaders and to system classes (which do not have a class loader)\&. There is one exception to this rule: if the option is provided with no arguments, then it does not apply to system classes\&. This makes it easy to disable assertions in all classes except for system classes\&. The \f3-disablesystemassertions\fR option enables you to disable assertions in all system classes\&.
-
-To explicitly enable assertions in specific packages or classes, use the \f3-enableassertions\fR (\f3-ea\fR) option\&. Both options can be used at the same time\&. For example, to run the \f3MyClass\fR application with assertions enabled in package \f3com\&.wombat\&.fruitbat\fR (and any subpackages) but disabled in class \f3com\&.wombat\&.fruitbat\&.Brickbat\fR, use the following command:
-.sp
-.nf
-\f3java \-ea:com\&.wombat\&.fruitbat\&.\&.\&. \-da:com\&.wombat\&.fruitbat\&.Brickbat MyClass\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--disablesystemassertions, -dsa
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-disablesystemassertions
.br
+\-dsa
+.RS 4
Disables assertions in all system classes\&.
-.TP
-.nf
--enableassertions[:[\fIpackagename\fR]\&.\&.\&.|:\fIclassname\fR], -ea[:[\fIpackagename\fR]\&.\&.\&.|:\fIclassname\fR]
+.RE
+.PP
+\-enableassertions[:[\fIpackagename\fR]\&.\&.\&.|:\fIclassname\fR]
.br
-.fi
+\-ea[:[\fIpackagename\fR]\&.\&.\&.|:\fIclassname\fR]
+.RS 4
Enables assertions\&. By default, assertions are disabled in all packages and classes\&.
-
-With no arguments, \f3-enableassertions\fR (\f3-ea\fR) enables assertions in all packages and classes\&. With the \fIpackagename\fR argument ending in \f3\&.\&.\&.\fR, the switch enables assertions in the specified package and any subpackages\&. If the argument is simply \f3\&.\&.\&.\fR, then the switch enables assertions in the unnamed package in the current working directory\&. With the \fIclassname\fR argument\f3\fR, the switch enables assertions in the specified class\&.
-
-The \f3-enableassertions\fR (\f3-ea\fR) option applies to all class loaders and to system classes (which do not have a class loader)\&. There is one exception to this rule: if the option is provided with no arguments, then it does not apply to system classes\&. This makes it easy to enable assertions in all classes except for system classes\&. The \f3-enablesystemassertions\fR option provides a separate switch to enable assertions in all system classes\&.
-
-To explicitly disable assertions in specific packages or classes, use the \f3-disableassertions\fR (\f3-da\fR) option\&. If a single command contains multiple instances of these switches, then they are processed in order before loading any classes\&. For example, to run the \f3MyClass\fR application with assertions enabled only in package \f3com\&.wombat\&.fruitbat\fR (and any subpackages) but disabled in class \f3com\&.wombat\&.fruitbat\&.Brickbat\fR, use the following command:
-.sp
-.nf
-\f3java \-ea:com\&.wombat\&.fruitbat\&.\&.\&. \-da:com\&.wombat\&.fruitbat\&.Brickbat MyClass\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--enablesystemassertions, -esa
+.sp
+With no arguments,
+\fB\-enableassertions\fR
+(\fB\-ea\fR) enables assertions in all packages and classes\&. With the
+\fIpackagename\fR
+argument ending in
+\fB\&.\&.\&.\fR, the switch enables assertions in the specified package and any subpackages\&. If the argument is simply
+\fB\&.\&.\&.\fR, then the switch enables assertions in the unnamed package in the current working directory\&. With the
+\fIclassname\fR
+argument, the switch enables assertions in the specified class\&.
+.sp
+The
+\fB\-enableassertions\fR
+(\fB\-ea\fR) option applies to all class loaders and to system classes (which do not have a class loader)\&. There is one exception to this rule: if the option is provided with no arguments, then it does not apply to system classes\&. This makes it easy to enable assertions in all classes except for system classes\&. The
+\fB\-enablesystemassertions\fR
+option provides a separate switch to enable assertions in all system classes\&.
+.sp
+To explicitly disable assertions in specific packages or classes, use the
+\fB\-disableassertions\fR
+(\fB\-da\fR) option\&. If a single command contains multiple instances of these switches, then they are processed in order before loading any classes\&. For example, to run the
+\fBMyClass\fR
+application with assertions enabled only in package
+\fBcom\&.wombat\&.fruitbat\fR
+(and any subpackages) but disabled in class
+\fBcom\&.wombat\&.fruitbat\&.Brickbat\fR, use the following command:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjava \-ea:com\&.wombat\&.fruitbat\&.\&.\&. \-da:com\&.wombat\&.fruitbat\&.Brickbat MyClass\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-enablesystemassertions
.br
+\-esa
+.RS 4
Enables assertions in all system classes\&.
-.TP
--help, -?
-.br
-Displays usage information for the \f3java\fR command without actually running the JVM\&.
-.TP
--jar \fIfilename\fR
+.RE
+.PP
+\-help
.br
-Executes a program encapsulated in a JAR file\&. The \fIfilename\fR argument is the name of a JAR file with a manifest that contains a line in the form \f3Main-Class:\fR\fIclassname\fR that defines the class with the \f3public static void main(String[] args)\fR method that serves as your application\&'s starting point\&.
-
-When you use the \f3-jar\fR option, the specified JAR file is the source of all user classes, and other class path settings are ignored\&.
-
+\-?
+.RS 4
+Displays usage information for the
+\fBjava\fR
+command without actually running the JVM\&.
+.RE
+.PP
+\-jar \fIfilename\fR
+.RS 4
+Executes a program encapsulated in a JAR file\&. The
+\fIfilename\fR
+argument is the name of a JAR file with a manifest that contains a line in the form
+\fBMain\-Class:\fR\fIclassname\fR
+that defines the class with the
+\fBpublic static void main(String[] args)\fR
+method that serves as your application\*(Aqs starting point\&.
+.sp
+When you use the
+\fB\-jar\fR
+option, the specified JAR file is the source of all user classes, and other class path settings are ignored\&.
+.sp
For more information about JAR files, see the following resources:
-.RS
-.TP 0.2i
-\(bu
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
jar(1)
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
The Java Archive (JAR) Files guide at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/jar/index\&.html
-.TP 0.2i
-\(bu
-Lesson: Packaging Programs in JAR Files at http://docs\&.oracle\&.com/javase/tutorial/deployment/jar/index\&.html
-.RE
-
-.TP
--javaagent:\fIjarpath\fR[=\fIoptions\fR]
-.br
-Loads the specified Java programming language agent\&. For more information about instrumenting Java applications, see the \f3java\&.lang\&.instrument\fR package description in the Java API documentation at http://docs\&.oracle\&.com/javase/8/docs/api/java/lang/instrument/package-summary\&.html
-.TP
--jre-restrict-search
-.br
-Includes user-private JREs in the version search\&.
-.TP
--no-jre-restrict-search
-.br
-Excludes user-private JREs from the version search\&.
-.TP
--server
-.br
-Selects the Java HotSpot Server VM\&. The 64-bit version of the JDK supports only the Server VM, so in that case the option is implicit\&.
-
-For default JVM selection, see Server-Class Machine Detection at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/server-class\&.html
-.TP
--showversion
-.br
-Displays version information and continues execution of the application\&. This option is equivalent to the \f3-version\fR option except that the latter instructs the JVM to exit after displaying version information\&.
-.TP
--splash:\fIimgname\fR
-.br
-Shows the splash screen with the image specified by \fIimgname\fR\&. For example, to show the \f3splash\&.gif\fR file from the \f3images\fR directory when starting your application, use the following option:
-.sp
-.nf
-\f3\-splash:images/splash\&.gif\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Lesson: Packaging Programs in JAR Files at
+
+http://docs\&.oracle\&.com/javase/tutorial/deployment/jar/index\&.html
+.RE
+.RE
+.PP
+\-javaagent:\fIjarpath\fR[=\fIoptions\fR]
+.RS 4
+Loads the specified Java programming language agent\&. For more information about instrumenting Java applications, see the
+\fBjava\&.lang\&.instrument\fR
+package description in the Java API documentation at http://docs\&.oracle\&.com/javase/8/docs/api/java/lang/instrument/package\-summary\&.html
+.RE
+.PP
+\-jre\-restrict\-search
+.RS 4
+Includes user\-private JREs in the version search\&.
+.RE
+.PP
+\-no\-jre\-restrict\-search
+.RS 4
+Excludes user\-private JREs from the version search\&.
+.RE
+.PP
+\-server
+.RS 4
+Selects the Java HotSpot Server VM\&. The 64\-bit version of the JDK supports only the Server VM, so in that case the option is implicit\&.
+.sp
+For default JVM selection, see Server\-Class Machine Detection at
-.TP
--verbose:class
-.br
+http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/server\-class\&.html
+.RE
+.PP
+\-showversion
+.RS 4
+Displays version information and continues execution of the application\&. This option is equivalent to the
+\fB\-version\fR
+option except that the latter instructs the JVM to exit after displaying version information\&.
+.RE
+.PP
+\-splash:\fIimgname\fR
+.RS 4
+Shows the splash screen with the image specified by
+\fIimgname\fR\&. For example, to show the
+\fBsplash\&.gif\fR
+file from the
+\fBimages\fR
+directory when starting your application, use the following option:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-splash:images/splash\&.gif\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-verbose:class
+.RS 4
Displays information about each loaded class\&.
-.TP
--verbose:gc
-.br
+.RE
+.PP
+\-verbose:gc
+.RS 4
Displays information about each garbage collection (GC) event\&.
-.TP
--verbose:jni
-.br
+.RE
+.PP
+\-verbose:jni
+.RS 4
Displays information about the use of native methods and other Java Native Interface (JNI) activity\&.
-.TP
--version
-.br
-Displays version information and then exits\&. This option is equivalent to the \f3-showversion\fR option except that the latter does not instruct the JVM to exit after displaying version information\&.
-.TP
--version:\fIrelease\fR
-.br
-Specifies the release version to be used for running the application\&. If the version of the \f3java\fR command called does not meet this specification and an appropriate implementation is found on the system, then the appropriate implementation will be used\&.
-
-The \fIrelease\fR argument specifies either the exact version string, or a list of version strings and ranges separated by spaces\&. A \fIversion string\fR is the developer designation of the version number in the following form: \f31\&.\fR\fIx\fR\f3\&.0_\fR\fIu\fR (where \fIx\fR is the major version number, and \fIu\fR is the update version number)\&. A \fIversion range\fR is made up of a version string followed by a plus sign (\f3+\fR) to designate this version or later, or a part of a version string followed by an asterisk (\f3*\fR) to designate any version string with a matching prefix\&. Version strings and ranges can be combined using a space for a logical \fIOR\fR combination, or an ampersand (\f3&\fR) for a logical \fIAND\fR combination of two version strings/ranges\&. For example, if running the class or JAR file requires either JRE 6u13 (1\&.6\&.0_13), or any JRE 6 starting from 6u10 (1\&.6\&.0_10), specify the following:
-.sp
-.nf
-\f3\-version:"1\&.6\&.0_13 1\&.6* & 1\&.6\&.0_10+"\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-Quotation marks are necessary only if there are spaces in the \fIrelease\fR parameter\&.
-
+.RE
+.PP
+\-version
+.RS 4
+Displays version information and then exits\&. This option is equivalent to the
+\fB\-showversion\fR
+option except that the latter does not instruct the JVM to exit after displaying version information\&.
+.RE
+.PP
+\-version:\fIrelease\fR
+.RS 4
+Specifies the release version to be used for running the application\&. If the version of the
+\fBjava\fR
+command called does not meet this specification and an appropriate implementation is found on the system, then the appropriate implementation will be used\&.
+.sp
+The
+\fIrelease\fR
+argument specifies either the exact version string, or a list of version strings and ranges separated by spaces\&. A
+\fIversion string\fR
+is the developer designation of the version number in the following form:
+\fB1\&.\fR\fIx\fR\fB\&.0_\fR\fIu\fR
+(where
+\fIx\fR
+is the major version number, and
+\fIu\fR
+is the update version number)\&. A
+\fIversion range\fR
+is made up of a version string followed by a plus sign (\fB+\fR) to designate this version or later, or a part of a version string followed by an asterisk (\fB*\fR) to designate any version string with a matching prefix\&. Version strings and ranges can be combined using a space for a logical
+\fIOR\fR
+combination, or an ampersand (\fB&\fR) for a logical
+\fIAND\fR
+combination of two version strings/ranges\&. For example, if running the class or JAR file requires either JRE 6u13 (1\&.6\&.0_13), or any JRE 6 starting from 6u10 (1\&.6\&.0_10), specify the following:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-version:"1\&.6\&.0_13 1\&.6* & 1\&.6\&.0_10+"\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Quotation marks are necessary only if there are spaces in the
+\fIrelease\fR
+parameter\&.
+.sp
For JAR files, the preference is to specify version requirements in the JAR file manifest rather than on the command line\&.
-.SS NON-STANDARD\ OPTIONS
+.RE
+.SS "Non\-Standard Options"
+.PP
These options are general purpose options that are specific to the Java HotSpot Virtual Machine\&.
-.TP
--X
-.br
-Displays help for all available \f3-X\fR options\&.
-.TP
--Xbatch
-.br
-Disables background compilation\&. By default, the JVM compiles the method as a background task, running the method in interpreter mode until the background compilation is finished\&. The \f3-Xbatch\fR flag disables background compilation so that compilation of all methods proceeds as a foreground task until completed\&.
-
-This option is equivalent to \f3-XX:-BackgroundCompilation\fR\&.
-.TP
--Xbootclasspath:\fIpath\fR
-.br
+.PP
+\-X
+.RS 4
+Displays help for all available
+\fB\-X\fR
+options\&.
+.RE
+.PP
+\-Xbatch
+.RS 4
+Disables background compilation\&. By default, the JVM compiles the method as a background task, running the method in interpreter mode until the background compilation is finished\&. The
+\fB\-Xbatch\fR
+flag disables background compilation so that compilation of all methods proceeds as a foreground task until completed\&.
+.sp
+This option is equivalent to
+\fB\-XX:\-BackgroundCompilation\fR\&.
+.RE
+.PP
+\-Xbootclasspath:\fIpath\fR
+.RS 4
Specifies a list of directories, JAR files, and ZIP archives separated by colons (:) to search for boot class files\&. These are used in place of the boot class files included in the JDK\&.
-
-\fI\fRDo not deploy applications that use this option to override a class in \f3rt\&.jar\fR, because this violates the JRE binary code license\&.
-.TP
--Xbootclasspath/a:\fIpath\fR
-.br
+.sp
+Do not deploy applications that use this option to override a class in
+\fBrt\&.jar\fR, because this violates the JRE binary code license\&.
+.RE
+.PP
+\-Xbootclasspath/a:\fIpath\fR
+.RS 4
Specifies a list of directories, JAR files, and ZIP archives separated by colons (:) to append to the end of the default bootstrap class path\&.
-
-Do not deploy applications that use this option to override a class in \f3rt\&.jar\fR, because this violates the JRE binary code license\&.
-.TP
--Xbootclasspath/p:\fIpath\fR
-.br
+.sp
+Do not deploy applications that use this option to override a class in
+\fBrt\&.jar\fR, because this violates the JRE binary code license\&.
+.RE
+.PP
+\-Xbootclasspath/p:\fIpath\fR
+.RS 4
Specifies a list of directories, JAR files, and ZIP archives separated by colons (:) to prepend to the front of the default bootstrap class path\&.
-
-Do not deploy applications that use this option to override a class in \f3rt\&.jar\fR, because this violates the JRE binary code license\&.
-.TP
--Xboundthreads
-.br
-Binds user-level threads to kernel threads\&.
-.TP
--Xcheck:jni
-.br
+.sp
+Do not deploy applications that use this option to override a class in
+\fBrt\&.jar\fR, because this violates the JRE binary code license\&.
+.RE
+.PP
+\-Xcheck:jni
+.RS 4
Performs additional checks for Java Native Interface (JNI) functions\&. Specifically, it validates the parameters passed to the JNI function and the runtime environment data before processing the JNI request\&. Any invalid data encountered indicates a problem in the native code, and the JVM will terminate with an irrecoverable error in such cases\&. Expect a performance degradation when this option is used\&.
-.TP
--Xcomp
-.br
-Forces compilation of methods on first invocation\&. By default, the Client VM (\f3-client\fR) performs 1,000 interpreted method invocations and the Server VM (\f3-server\fR) performs 10,000 interpreted method invocations to gather information for efficient compilation\&. Specifying the \f3-Xcomp\fR option disables interpreted method invocations to increase compilation performance at the expense of efficiency\&.
-
-You can also change the number of interpreted method invocations before compilation using the \f3-XX:CompileThreshold\fR option\&.
-.TP
--Xdebug
-.br
+.RE
+.PP
+\-Xcomp
+.RS 4
+Forces compilation of methods on first invocation\&. By default, the Client VM (\fB\-client\fR) performs 1,000 interpreted method invocations and the Server VM (\fB\-server\fR) performs 10,000 interpreted method invocations to gather information for efficient compilation\&. Specifying the
+\fB\-Xcomp\fR
+option disables interpreted method invocations to increase compilation performance at the expense of efficiency\&.
+.sp
+You can also change the number of interpreted method invocations before compilation using the
+\fB\-XX:CompileThreshold\fR
+option\&.
+.RE
+.PP
+\-Xdebug
+.RS 4
Does nothing\&. Provided for backward compatibility\&.
-.TP
--Xdiag
-.br
+.RE
+.PP
+\-Xdiag
+.RS 4
Shows additional diagnostic messages\&.
-.TP
--Xfuture
-.br
-Enables strict class-file format checks that enforce close conformance to the class-file format specification\&. Developers are encouraged to use this flag when developing new code because the stricter checks will become the default in future releases\&.
-.TP
--Xint
-.br
-Runs the application in interpreted-only mode\&. Compilation to native code is disabled, and all bytecode is executed by the interpreter\&. The performance benefits offered by the just in time (JIT) compiler are not present in this mode\&.
-.TP
--Xinternalversion
-.br
-Displays more detailed JVM version information than the \f3-version\fR option, and then exits\&.
-.TP
--Xloggc:\fIfilename\fR
-.br
-Sets the file to which verbose GC events information should be redirected for logging\&. The information written to this file is similar to the output of \f3-verbose:gc\fR with the time elapsed since the first GC event preceding each logged event\&. The \f3-Xloggc\fR option overrides \f3-verbose:gc\fR if both are given with the same \f3java\fR command\&.
-
+.RE
+.PP
+\-Xfuture
+.RS 4
+Enables strict class\-file format checks that enforce close conformance to the class\-file format specification\&. Developers are encouraged to use this flag when developing new code because the stricter checks will become the default in future releases\&.
+.RE
+.PP
+\-Xint
+.RS 4
+Runs the application in interpreted\-only mode\&. Compilation to native code is disabled, and all bytecode is executed by the interpreter\&. The performance benefits offered by the just in time (JIT) compiler are not present in this mode\&.
+.RE
+.PP
+\-Xinternalversion
+.RS 4
+Displays more detailed JVM version information than the
+\fB\-version\fR
+option, and then exits\&.
+.RE
+.PP
+\-Xloggc:\fIfilename\fR
+.RS 4
+Sets the file to which verbose GC events information should be redirected for logging\&. The information written to this file is similar to the output of
+\fB\-verbose:gc\fR
+with the time elapsed since the first GC event preceding each logged event\&. The
+\fB\-Xloggc\fR
+option overrides
+\fB\-verbose:gc\fR
+if both are given with the same
+\fBjava\fR
+command\&.
+.sp
Example:
-.sp
-.nf
-\f3\-Xloggc:garbage\-collection\&.log\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--Xmaxjitcodesize=\fIsize\fR
-.br
-Specifies the maximum code cache size (in bytes) for JIT-compiled code\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. By default, the value is set to 48 MB:
-.sp
-.nf
-\f3\-Xmaxjitcodesize=48m\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-This option is equivalent to \f3-XX:ReservedCodeCacheSize\fR\&.
-.TP
--Xmixed
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-Xloggc:garbage\-collection\&.log\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-Xmaxjitcodesize=\fIsize\fR
+.RS 4
+Specifies the maximum code cache size (in bytes) for JIT\-compiled code\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. By default, the value is set to 48 MB:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-Xmaxjitcodesize=48m\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+This option is equivalent to
+\fB\-XX:ReservedCodeCacheSize\fR\&.
+.RE
+.PP
+\-Xmixed
+.RS 4
Executes all bytecode by the interpreter except for hot methods, which are compiled to native code\&.
-.TP
--Xmn\fIsize\fR
-.br
-Sets the initial and maximum size (in bytes) of the heap for the young generation (nursery)\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&.
-
+.RE
+.PP
+\-Xmn\fIsize\fR
+.RS 4
+Sets the initial and maximum size (in bytes) of the heap for the young generation (nursery)\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&.
+.sp
The young generation region of the heap is used for new objects\&. GC is performed in this region more often than in other regions\&. If the size for the young generation is too small, then a lot of minor garbage collections will be performed\&. If the size is too large, then only full garbage collections will be performed, which can take a long time to complete\&. Oracle recommends that you keep the size for the young generation between a half and a quarter of the overall heap size\&.
-
+.sp
The following examples show how to set the initial and maximum size of young generation to 256 MB using various units:
-.sp
-.nf
-\f3\-Xmn256m\fP
-.fi
-.nf
-\f3\-Xmn262144k\fP
-.fi
-.nf
-\f3\-Xmn268435456\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-Instead of the \f3-Xmn\fR option to set both the initial and maximum size of the heap for the young generation, you can use \f3-XX:NewSize\fR to set the initial size and \f3-XX:MaxNewSize\fR to set the maximum size\&.
-.TP
--Xms\fIsize\fR
-.br
-Sets the initial size (in bytes) of the heap\&. This value must be a multiple of 1024 and greater than 1 MB\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&.
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-Xmn256m\fR
+\fB\-Xmn262144k\fR
+\fB\-Xmn268435456\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Instead of the
+\fB\-Xmn\fR
+option to set both the initial and maximum size of the heap for the young generation, you can use
+\fB\-XX:NewSize\fR
+to set the initial size and
+\fB\-XX:MaxNewSize\fR
+to set the maximum size\&.
+.RE
+.PP
+\-Xms\fIsize\fR
+.RS 4
+Sets the initial size (in bytes) of the heap\&. This value must be a multiple of 1024 and greater than 1 MB\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&.
+.sp
The following examples show how to set the size of allocated memory to 6 MB using various units:
-.sp
-.nf
-\f3\-Xms6291456\fP
-.fi
-.nf
-\f3\-Xms6144k\fP
-.fi
-.nf
-\f3\-Xms6m\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-If you do not set this option, then the initial size will be set as the sum of the sizes allocated for the old generation and the young generation\&. The initial size of the heap for the young generation can be set using the \f3-Xmn\fR option or the \f3-XX:NewSize\fR option\&.
-.TP
--Xmx\fIsize\fR
-.br
-Specifies the maximum size (in bytes) of the memory allocation pool in bytes\&. This value must be a multiple of 1024 and greater than 2 MB\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. The default value is chosen at runtime based on system configuration\&. For server deployments, \f3-Xms\fR and \f3-Xmx\fR are often set to the same value\&. For more information, see Garbage Collector Ergonomics at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/gc-ergonomics\&.html
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-Xms6291456\fR
+\fB\-Xms6144k\fR
+\fB\-Xms6m\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+If you do not set this option, then the initial size will be set as the sum of the sizes allocated for the old generation and the young generation\&. The initial size of the heap for the young generation can be set using the
+\fB\-Xmn\fR
+option or the
+\fB\-XX:NewSize\fR
+option\&.
+.RE
+.PP
+\-Xmx\fIsize\fR
+.RS 4
+Specifies the maximum size (in bytes) of the memory allocation pool in bytes\&. This value must be a multiple of 1024 and greater than 2 MB\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. The default value is chosen at runtime based on system configuration\&. For server deployments,
+\fB\-Xms\fR
+and
+\fB\-Xmx\fR
+are often set to the same value\&. For more information, see Garbage Collector Ergonomics at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/gc\-ergonomics\&.html
+.sp
The following examples show how to set the maximum allowed size of allocated memory to 80 MB using various units:
-.sp
-.nf
-\f3\-Xmx83886080\fP
-.fi
-.nf
-\f3\-Xmx81920k\fP
-.fi
-.nf
-\f3\-Xmx80m\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-The \f3-Xmx\fR option is equivalent to \f3-XX:MaxHeapSize\fR\&.
-.TP
--Xnoclassgc
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-Xmx83886080\fR
+\fB\-Xmx81920k\fR
+\fB\-Xmx80m\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The
+\fB\-Xmx\fR
+option is equivalent to
+\fB\-XX:MaxHeapSize\fR\&.
+.RE
+.PP
+\-Xnoclassgc
+.RS 4
Disables garbage collection (GC) of classes\&. This can save some GC time, which shortens interruptions during the application run\&.
-
-When you specify \f3-Xnoclassgc\fR at startup, the class objects in the application will be left untouched during GC and will always be considered live\&. This can result in more memory being permanently occupied which, if not used carefully, will throw an out of memory exception\&.
-.TP
--Xprof
-.br
+.sp
+When you specify
+\fB\-Xnoclassgc\fR
+at startup, the class objects in the application will be left untouched during GC and will always be considered live\&. This can result in more memory being permanently occupied which, if not used carefully, will throw an out of memory exception\&.
+.RE
+.PP
+\-Xprof
+.RS 4
Profiles the running program and sends profiling data to standard output\&. This option is provided as a utility that is useful in program development and is not intended to be used in production systems\&.
-.TP
--Xrs
-.br
+.RE
+.PP
+\-Xrs
+.RS 4
Reduces the use of operating system signals by the JVM\&.
-
+.sp
Shutdown hooks enable orderly shutdown of a Java application by running user cleanup code (such as closing database connections) at shutdown, even if the JVM terminates abruptly\&.
-
-The JVM catches signals to implement shutdown hooks for unexpected termination\&. The JVM uses \f3SIGHUP\fR, \f3SIGINT\fR, and \f3SIGTERM\fR to initiate the running of shutdown hooks\&.
-
-The JVM uses a similar mechanism to implement the feature of dumping thread stacks for debugging purposes\&. The JVM uses \f3SIGQUIT\fR to perform thread dumps\&.
-
-Applications embedding the JVM frequently need to trap signals such as \f3SIGINT\fR or \f3SIGTERM\fR, which can lead to interference with the JVM signal handlers\&. The \f3-Xrs\fR option is available to address this issue\&. When \f3-Xrs\fR is used, the signal masks for \f3SIGINT\fR, \f3SIGTERM\fR, \f3SIGHUP\fR, and \f3SIGQUIT\fR are not changed by the JVM, and signal handlers for these signals are not installed\&.
-
-There are two consequences of specifying \f3-Xrs\fR:
-.RS
-.TP 0.2i
-\(bu
-\f3SIGQUIT\fR thread dumps are not available\&.
-.TP 0.2i
-\(bu
-User code is responsible for causing shutdown hooks to run, for example, by calling \f3System\&.exit()\fR when the JVM is to be terminated\&.
-.RE
-
-.TP
--Xshare:\fImode\fR
-.br
-Sets the class data sharing mode\&. Possible \fImode\fR arguments for this option include the following:
-.RS
-.TP
+.sp
+The JVM catches signals to implement shutdown hooks for unexpected termination\&. The JVM uses
+\fBSIGHUP\fR,
+\fBSIGINT\fR, and
+\fBSIGTERM\fR
+to initiate the running of shutdown hooks\&.
+.sp
+The JVM uses a similar mechanism to implement the feature of dumping thread stacks for debugging purposes\&. The JVM uses
+\fBSIGQUIT\fR
+to perform thread dumps\&.
+.sp
+Applications embedding the JVM frequently need to trap signals such as
+\fBSIGINT\fR
+or
+\fBSIGTERM\fR, which can lead to interference with the JVM signal handlers\&. The
+\fB\-Xrs\fR
+option is available to address this issue\&. When
+\fB\-Xrs\fR
+is used, the signal masks for
+\fBSIGINT\fR,
+\fBSIGTERM\fR,
+\fBSIGHUP\fR, and
+\fBSIGQUIT\fR
+are not changed by the JVM, and signal handlers for these signals are not installed\&.
+.sp
+There are two consequences of specifying
+\fB\-Xrs\fR:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fBSIGQUIT\fR
+thread dumps are not available\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+User code is responsible for causing shutdown hooks to run, for example, by calling
+\fBSystem\&.exit()\fR
+when the JVM is to be terminated\&.
+.RE
+.RE
+.PP
+\-Xshare:\fImode\fR
+.RS 4
+Sets the class data sharing mode\&. Possible
+\fImode\fR
+arguments for this option include the following:
+.PP
auto
-Use shared class data if possible\&. This is the default value for Java HotSpot 32-Bit Client VM\&.
-.TP
+.RS 4
+Use shared class data if possible\&. This is the default value for Java HotSpot 32\-Bit Client VM\&.
+.RE
+.PP
on
+.RS 4
Require the use of class data sharing\&. Print an error message and exit if class data sharing cannot be used\&.
-.TP
+.RE
+.PP
off
-Do not use shared class data\&. This is the default value for Java HotSpot 32-Bit Server VM, Java HotSpot 64-Bit Client VM, and Java HotSpot 64-Bit Server VM\&.
-.TP
+.RS 4
+Do not use shared class data\&. This is the default value for Java HotSpot 32\-Bit Server VM, Java HotSpot 64\-Bit Client VM, and Java HotSpot 64\-Bit Server VM\&.
+.RE
+.PP
dump
+.RS 4
Manually generate the class data sharing archive\&.
-.RE
-
-.TP
--XshowSettings:\fIcategory\fR
-.br
-Shows settings and continues\&. Possible \fIcategory\fR arguments for this option include the following:
-.RS
-.TP
+.RE
+.RE
+.PP
+\-XshowSettings:\fIcategory\fR
+.RS 4
+Shows settings and continues\&. Possible
+\fIcategory\fR
+arguments for this option include the following:
+.PP
all
+.RS 4
Shows all categories of settings\&. This is the default value\&.
-.TP
+.RE
+.PP
locale
+.RS 4
Shows settings related to locale\&.
-.TP
+.RE
+.PP
properties
+.RS 4
Shows settings related to system properties\&.
-.TP
+.RE
+.PP
vm
+.RS 4
Shows the settings of the JVM\&.
-.RE
-
-.TP
--Xss\fIsize\fR
-.br
-Sets the thread stack size (in bytes)\&. Append the letter \f3k\fR or \f3K\fR to indicate KB, \f3m\fR or \f3M\fR to indicate MB, \f3g\fR or \f3G\fR to indicate GB\&. The default value depends on the platform:
-.RS
-.TP 0.2i
-\(bu
-Linux/ARM (32-bit): 320 KB
-.TP 0.2i
-\(bu
-Linux/i386 (32-bit): 320 KB
-.TP 0.2i
-\(bu
-Linux/x64 (64-bit): 1024 KB
-.TP 0.2i
-\(bu
-OS X (64-bit): 1024 KB
-.TP 0.2i
-\(bu
-Oracle Solaris/i386 (32-bit): 320 KB
-.TP 0.2i
-\(bu
-Oracle Solaris/x64 (64-bit): 1024 KB
-.TP 0.2i
-\(bu
+.RE
+.RE
+.PP
+\-Xss\fIsize\fR
+.RS 4
+Sets the thread stack size (in bytes)\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate KB,
+\fBm\fR
+or
+\fBM\fR
+to indicate MB,
+\fBg\fR
+or
+\fBG\fR
+to indicate GB\&. The default value depends on the platform:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Linux/ARM (32\-bit): 320 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Linux/i386 (32\-bit): 320 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Linux/x64 (64\-bit): 1024 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+OS X (64\-bit): 1024 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Oracle Solaris/i386 (32\-bit): 320 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Oracle Solaris/x64 (64\-bit): 1024 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
Windows: depends on virtual memory
.RE
-.RS
+.sp
The following examples set the thread stack size to 1024 KB in different units:
-.sp
-.nf
-\f3\-Xss1m\fP
-.fi
-.nf
-\f3\-Xss1024k\fP
-.fi
-.nf
-\f3\-Xss1048576\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-This option is equivalent to \f3-XX:ThreadStackSize\fR\&.
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-Xss1m\fR
+\fB\-Xss1024k\fR
+\fB\-Xss1048576\fR
+
+.fi
+.if n \{\
.RE
-.TP
--Xusealtsigs
-.br
-Use alternative signals instead of \f3SIGUSR1\fR and \f3SIGUSR2\fR for JVM internal signals\&. This option is equivalent to \f3-XX:+UseAltSigs\fR\&.
-.TP
--Xverify:\fImode\fR
-.br
-Sets the mode of the bytecode verifier\&. Bytecode verification helps to troubleshoot some problems, but it also adds overhead to the running application\&. Possible \fImode\fR arguments for this option include the following:
-.RS
-.TP
+.\}
+This option is equivalent to
+\fB\-XX:ThreadStackSize\fR\&.
+.RE
+.PP
+\-Xusealtsigs
+.RS 4
+Use alternative signals instead of
+\fBSIGUSR1\fR
+and
+\fBSIGUSR2\fR
+for JVM internal signals\&. This option is equivalent to
+\fB\-XX:+UseAltSigs\fR\&.
+.RE
+.PP
+\-Xverify:\fImode\fR
+.RS 4
+Sets the mode of the bytecode verifier\&. Bytecode verification helps to troubleshoot some problems, but it also adds overhead to the running application\&. Possible
+\fImode\fR
+arguments for this option include the following:
+.PP
none
+.RS 4
Do not verify the bytecode\&. This reduces startup time and also reduces the protection provided by Java\&.
-.TP
+.RE
+.PP
remote
-Verify only those classes that are loaded remotely over the network\&. This is the default behavior if you do not specify the \f3-Xverify\fR option\&.
-.TP
+.RS 4
+Verify only those classes that are loaded remotely over the network\&. This is the default behavior if you do not specify the
+\fB\-Xverify\fR
+option\&.
+.RE
+.PP
all
+.RS 4
Verify all classes\&.
-.RE
-
-.SS ADVANCED\ RUNTIME\ OPTIONS
+.RE
+.RE
+.SS "Advanced Runtime Options"
+.PP
These options control the runtime behavior of the Java HotSpot VM\&.
-.TP
--XX:+DisableAttachMechanism
-.br
-Enables the option that disables the mechanism that lets tools attach to the JVM\&. By default, this option is disabled, meaning that the attach mechanism is enabled and you can use tools such as \f3jcmd\fR, \f3jstack\fR, \f3jmap\fR, and \f3jinfo\fR\&.
-.TP
--XX:ErrorFile=\fIfilename\fR
-.br
-Specifies the path and file name to which error data is written when an irrecoverable error occurs\&. By default, this file is created in the current working directory and named \f3hs_err_pid\fR\fIpid\fR\f3\&.log\fR where \fIpid\fR is the identifier of the process that caused the error\&. The following example shows how to set the default log file (note that the identifier of the process is specified as \f3%p\fR):
-.sp
-.nf
-\f3\-XX:ErrorFile=\&./hs_err_pid%p\&.log\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-The following example shows how to set the error log to \f3/var/log/java/java_error\&.log\fR:
-.sp
-.nf
-\f3\-XX:ErrorFile=/var/log/java/java_error\&.log\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-If the file cannot be created in the specified directory (due to insufficient space, permission problem, or another issue), then the file is created in the temporary directory for the operating system\&. The temporary directory is \f3/tmp\fR\&.
-.TP
--XX:LargePageSizeInBytes=\fIsize\fR
-.br
-Sets the maximum size (in bytes) for large pages used for Java heap\&. The \fIsize\fR argument must be a power of 2 (2, 4, 8, 16, \&.\&.\&.)\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. By default, the size is set to 0, meaning that the JVM chooses the size for large pages automatically\&.
-
+.PP
+\-XX:+DisableAttachMechanism
+.RS 4
+Enables the option that disables the mechanism that lets tools attach to the JVM\&. By default, this option is disabled, meaning that the attach mechanism is enabled and you can use tools such as
+\fBjcmd\fR,
+\fBjstack\fR,
+\fBjmap\fR, and
+\fBjinfo\fR\&.
+.RE
+.PP
+\-XX:ErrorFile=\fIfilename\fR
+.RS 4
+Specifies the path and file name to which error data is written when an irrecoverable error occurs\&. By default, this file is created in the current working directory and named
+\fBhs_err_pid\fR\fIpid\fR\fB\&.log\fR
+where
+\fIpid\fR
+is the identifier of the process that caused the error\&. The following example shows how to set the default log file (note that the identifier of the process is specified as
+\fB%p\fR):
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:ErrorFile=\&./hs_err_pid%p\&.log\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The following example shows how to set the error log to
+\fB/var/log/java/java_error\&.log\fR:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:ErrorFile=/var/log/java/java_error\&.log\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+If the file cannot be created in the specified directory (due to insufficient space, permission problem, or another issue), then the file is created in the temporary directory for the operating system\&. The temporary directory is
+\fB/tmp\fR\&.
+.RE
+.PP
+\-XX:+FailOverToOldVerifier
+.RS 4
+Enables automatic failover to the old verifier when the new type checker fails\&. By default, this option is disabled and it is ignored (that is, treated as disabled) for classes with a recent bytecode version\&. You can enable it for classes with older versions of the bytecode\&.
+.RE
+.PP
+\-XX:LargePageSizeInBytes=\fIsize\fR
+.RS 4
+Sets the maximum size (in bytes) for large pages used for Java heap\&. The
+\fIsize\fR
+argument must be a power of 2 (2, 4, 8, 16, \&.\&.\&.)\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. By default, the size is set to 0, meaning that the JVM chooses the size for large pages automatically\&.
+.sp
The following example illustrates how to set the large page size to 4 megabytes (MB):
-.sp
-.nf
-\f3\-XX:LargePageSizeInBytes=4m\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:MaxDirectMemorySize=\fIsize\fR
-.br
-Sets the maximum total size (in bytes) of the New I/O (the \f3java\&.nio\fR package) direct-buffer allocations\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. By default, the size is set to 0, meaning that the JVM chooses the size for NIO direct-buffer allocations automatically\&.
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:LargePageSizeInBytes=4m\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:MaxDirectMemorySize=\fIsize\fR
+.RS 4
+Sets the maximum total size (in bytes) of the New I/O (the
+\fBjava\&.nio\fR
+package) direct\-buffer allocations\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. By default, the size is set to 0, meaning that the JVM chooses the size for NIO direct\-buffer allocations automatically\&.
+.sp
The following examples illustrate how to set the NIO size to 1024 KB in different units:
-.sp
-.nf
-\f3\-XX:MaxDirectMemorySize=1m\fP
-.fi
-.nf
-\f3\-XX:MaxDirectMemorySize=1024k\fP
-.fi
-.nf
-\f3\-XX:MaxDirectMemorySize=1048576\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:NativeMemoryTracking=\fImode\fR
-.br
-Specifies the mode for tracking JVM native memory usage\&. Possible \fImode\fR arguments for this option include the following:
-.RS
-.TP
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:MaxDirectMemorySize=1m\fR
+\fB\-XX:MaxDirectMemorySize=1024k\fR
+\fB\-XX:MaxDirectMemorySize=1048576\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:NativeMemoryTracking=\fImode\fR
+.RS 4
+Specifies the mode for tracking JVM native memory usage\&. Possible
+\fImode\fR
+arguments for this option include the following:
+.PP
off
-Do not track JVM native memory usage\&. This is the default behavior if you do not specify the \f3-XX:NativeMemoryTracking\fR option\&.
-.TP
+.RS 4
+Do not track JVM native memory usage\&. This is the default behavior if you do not specify the
+\fB\-XX:NativeMemoryTracking\fR
+option\&.
+.RE
+.PP
summary
+.RS 4
Only track memory usage by JVM subsystems, such as Java heap, class, code, and thread\&.
-.TP
+.RE
+.PP
detail
-In addition to tracking memory usage by JVM subsystems, track memory usage by individual \f3CallSite\fR, individual virtual memory region and its committed regions\&.
-.RE
-
-.TP
--XX:OnError=\fIstring\fR
-.br
-Sets a custom command or a series of semicolon-separated commands to run when an irrecoverable error occurs\&. If the string contains spaces, then it must be enclosed in quotation marks\&.
-
-\fI\fRThe following example shows how the \f3-XX:OnError\fR option can be used to run the \f3gcore\fR command to create the core image, and the debugger is started to attach to the process in case of an irrecoverable error (the \f3%p\fR designates the current process):
-.sp
-.nf
-\f3\-XX:OnError="gcore %p;dbx \- %p"\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:OnOutOfMemoryError=\fIstring\fR
-.br
-Sets a custom command or a series of semicolon-separated commands to run when an \f3OutOfMemoryError\fR exception is first thrown\&. If the string contains spaces, then it must be enclosed in quotation marks\&. For an example of a command string, see the description of the \f3-XX:OnError\fR option\&.
-.TP
--XX:+PrintCommandLineFlags
-.br
+.RS 4
+In addition to tracking memory usage by JVM subsystems, track memory usage by individual
+\fBCallSite\fR, individual virtual memory region and its committed regions\&.
+.RE
+.RE
+.PP
+\-XX:OnError=\fIstring\fR
+.RS 4
+Sets a custom command or a series of semicolon\-separated commands to run when an irrecoverable error occurs\&. If the string contains spaces, then it must be enclosed in quotation marks\&.
+.sp
+The following example shows how the
+\fB\-XX:OnError\fR
+option can be used to run the
+\fBgcore\fR
+command to create the core image, and the debugger is started to attach to the process in case of an irrecoverable error (the
+\fB%p\fR
+designates the current process):
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:OnError="gcore %p;dbx \- %p"\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:OnOutOfMemoryError=\fIstring\fR
+.RS 4
+Sets a custom command or a series of semicolon\-separated commands to run when an
+\fBOutOfMemoryError\fR
+exception is first thrown\&. If the string contains spaces, then it must be enclosed in quotation marks\&. For an example of a command string, see the description of the
+\fB\-XX:OnError\fR
+option\&.
+.RE
+.PP
+\-XX:+PrintCommandLineFlags
+.RS 4
Enables printing of ergonomically selected JVM flags that appeared on the command line\&. It can be useful to know the ergonomic values set by the JVM, such as the heap space size and the selected garbage collector\&. By default, this option is disabled and flags are not printed\&.
-.TP
--XX:+PrintNMTStatistics
-.br
-Enables printing of collected native memory tracking data at JVM exit when native memory tracking is enabled (see \f3-XX:NativeMemoryTracking\fR)\&. By default, this option is disabled and native memory tracking data is not printed\&.
-.TP
--XX:+ShowMessageBoxOnError
-.br
+.RE
+.PP
+\-XX:+PrintNMTStatistics
+.RS 4
+Enables printing of collected native memory tracking data at JVM exit when native memory tracking is enabled (see
+\fB\-XX:NativeMemoryTracking\fR)\&. By default, this option is disabled and native memory tracking data is not printed\&.
+.RE
+.PP
+\-XX:+RelaxAccessControlCheck
+.RS 4
+Decreases the amount of access control checks in the verifier\&. By default, this option is disabled, and it is ignored (that is, treated as disabled) for classes with a recent bytecode version\&. You can enable it for classes with older versions of the bytecode\&.
+.RE
+.PP
+\-XX:+ShowMessageBoxOnError
+.RS 4
Enables displaying of a dialog box when the JVM experiences an irrecoverable error\&. This prevents the JVM from exiting and keeps the process active so that you can attach a debugger to it to investigate the cause of the error\&. By default, this option is disabled\&.
-.TP
--XX:ThreadStackSize=\fIsize\fR
-.br
-Sets the thread stack size (in bytes)\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. The default value depends on the platform:
-.RS
-.TP 0.2i
-\(bu
-Linux/ARM (32-bit): 320 KB
-.TP 0.2i
-\(bu
-Linux/i386 (32-bit): 320 KB
-.TP 0.2i
-\(bu
-Linux/x64 (64-bit): 1024 KB
-.TP 0.2i
-\(bu
-OS X (64-bit): 1024 KB
-.TP 0.2i
-\(bu
-Oracle Solaris/i386 (32-bit): 320 KB
-.TP 0.2i
-\(bu
-Oracle Solaris/x64 (64-bit): 1024 KB
-.TP 0.2i
-\(bu
+.RE
+.PP
+\-XX:ThreadStackSize=\fIsize\fR
+.RS 4
+Sets the thread stack size (in bytes)\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. The default value depends on the platform:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Linux/ARM (32\-bit): 320 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Linux/i386 (32\-bit): 320 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Linux/x64 (64\-bit): 1024 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+OS X (64\-bit): 1024 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Oracle Solaris/i386 (32\-bit): 320 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Oracle Solaris/x64 (64\-bit): 1024 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
Windows: depends on virtual memory
.RE
-.RS
+.sp
The following examples show how to set the thread stack size to 1024 KB in different units:
-.sp
-.nf
-\f3\-XX:ThreadStackSize=1m\fP
-.fi
-.nf
-\f3\-XX:ThreadStackSize=1024k\fP
-.fi
-.nf
-\f3\-XX:ThreadStackSize=1048576\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-This option is equivalent to \f3-Xss\fR\&.
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:ThreadStackSize=1m\fR
+\fB\-XX:ThreadStackSize=1024k\fR
+\fB\-XX:ThreadStackSize=1048576\fR
+
+.fi
+.if n \{\
.RE
-.TP
--XX:+TraceClassLoading
-.br
+.\}
+This option is equivalent to
+\fB\-Xss\fR\&.
+.RE
+.PP
+\-XX:+TraceClassLoading
+.RS 4
Enables tracing of classes as they are loaded\&. By default, this option is disabled and classes are not traced\&.
-.TP
--XX:+TraceClassLoadingPreorder
-.br
+.RE
+.PP
+\-XX:+TraceClassLoadingPreorder
+.RS 4
Enables tracing of all loaded classes in the order in which they are referenced\&. By default, this option is disabled and classes are not traced\&.
-.TP
--XX:+TraceClassResolution
-.br
+.RE
+.PP
+\-XX:+TraceClassResolution
+.RS 4
Enables tracing of constant pool resolutions\&. By default, this option is disabled and constant pool resolutions are not traced\&.
-.TP
--XX:+TraceClassUnloading
-.br
+.RE
+.PP
+\-XX:+TraceClassUnloading
+.RS 4
Enables tracing of classes as they are unloaded\&. By default, this option is disabled and classes are not traced\&.
-.TP
--XX:+TraceLoaderConstraints
-.br
-Enables tracing of the loader constraints recording\&. By default, this option is disabled and loader constraints recoding is not traced\&.
-.TP
--XX:+UseAltSigs
-.br
-Enables the use of alternative signals instead of \f3SIGUSR1\fR and \f3SIGUSR2\fR for JVM internal signals\&. By default, this option is disabled and alternative signals are not used\&. This option is equivalent to \f3-Xusealtsigs\fR\&.
-.TP
--XX:+UseBiasedLocking
-.br
-Enables the use of biased locking\&. Some applications with significant amounts of uncontended synchronization may attain significant speedups with this flag enabled, whereas applications with certain patterns of locking may see slowdowns\&. For more information about the biased locking technique, see the example in Java Tuning White Paper at http://www\&.oracle\&.com/technetwork/java/tuning-139912\&.html#section4\&.2\&.5
-
-By default, this option is disabled and biased locking is not used\&.
-.TP
--XX:+UseCompressedOops
-.br
-Enables the use of compressed pointers\&. When this option is enabled, object references are represented as 32-bit offsets instead of 64-bit pointers, which typically increases performance when running the application with Java heap sizes less than 32 GB\&. This option works only for 64-bit JVMs\&.
-
-By default, this option is disabled and compressed pointers are not used\&.
-.TP
--XX:+UseLargePages
-.br
-Enables the use of large page memory\&. This option is enabled by default\&. To disable the use of large page memory, specify \f3-XX:-UseLargePages\fR\&.
-
-For more information, see Java Support for Large Memory Pages at http://www\&.oracle\&.com/technetwork/java/javase/tech/largememory-jsp-137182\&.html
-.TP
--XX:+UseMembar
-.br
-Enables issuing of membars on thread state transitions\&. This option is disabled by default on all platforms except Power PC and ARM servers, where it is enabled\&. To disable issuing of membars on thread state transitions for Power PC and ARM, specify \f3-XX:-UseMembar\fR\&.
-.TP
--XX:+UsePerfData
-.br
-Enables the \f3perfdata\fR feature\&. This option is enabled by default to allow JVM monitoring and performance testing\&. Disabling it suppresses the creation of the \f3hsperfdata_userid\fR directories\&. To disable the \f3perfdata\fR feature, specify \f3-XX:-UsePerfData\fR\&.
-.TP
--XX:+AllowUserSignalHandlers
-.br
+.RE
+.PP
+\-XX:+TraceLoaderConstraints
+.RS 4
+Enables tracing of the loader constraints recording\&. By default, this option is disabled and loader constraints recording is not traced\&.
+.RE
+.PP
+\-XX:+UseAltSigs
+.RS 4
+Enables the use of alternative signals instead of
+\fBSIGUSR1\fR
+and
+\fBSIGUSR2\fR
+for JVM internal signals\&. By default, this option is disabled and alternative signals are not used\&. This option is equivalent to
+\fB\-Xusealtsigs\fR\&.
+.RE
+.PP
+\-XX:\-UseBiasedLocking
+.RS 4
+Disables the use of biased locking\&. Some applications with significant amounts of uncontended synchronization may attain significant speedups with this flag enabled, whereas applications with certain patterns of locking may see slowdowns\&. For more information about the biased locking technique, see the example in Java Tuning White Paper at http://www\&.oracle\&.com/technetwork/java/tuning\-139912\&.html#section4\&.2\&.5
+.sp
+By default, this option is enabled\&.
+.RE
+.PP
+\-XX:\-UseCompressedOops
+.RS 4
+Disables the use of compressed pointers\&. By default, this option is enabled, and compressed pointers are used when Java heap sizes are less than 32 GB\&. When this option is enabled, object references are represented as 32\-bit offsets instead of 64\-bit pointers, which typically increases performance when running the application with Java heap sizes less than 32 GB\&. This option works only for 64\-bit JVMs\&.
+.RE
+.PP
+\-XX:\-UseLargePages
+.RS 4
+Disables the use of large page memory\&. This option is enabled by default\&.
+.sp
+For more information, see Java Support for Large Memory Pages at http://www\&.oracle\&.com/technetwork/java/javase/tech/largememory\-jsp\-137182\&.html
+.RE
+.PP
+\-XX:+UseMembar
+.RS 4
+Enables issuing of membars on thread state transitions\&. This option is disabled by default on all platforms except ARM servers, where it is enabled\&. (It is recommended that you do not disable this option on ARM servers\&.)
+.RE
+.PP
+\-XX:+UsePerfData
+.RS 4
+Enables the
+\fBperfdata\fR
+feature\&. This option is enabled by default to allow JVM monitoring and performance testing\&. Disabling it suppresses the creation of the
+\fBhsperfdata_userid\fR
+directories\&. To disable the
+\fBperfdata\fR
+feature, specify
+\fB\-XX:\-UsePerfData\fR\&.
+.RE
+.PP
+\-XX:+AllowUserSignalHandlers
+.RS 4
Enables installation of signal handlers by the application\&. By default, this option is disabled and the application is not allowed to install signal handlers\&.
-.SS ADVANCED\ JIT\ COMPILER\ OPTIONS
-These options control the dynamic just-in-time (JIT) compilation performed by the Java HotSpot VM\&.
-.TP
--XX:+AggressiveOpts
-.br
+.RE
+.SS "Advanced JIT Compiler Options"
+.PP
+These options control the dynamic just\-in\-time (JIT) compilation performed by the Java HotSpot VM\&.
+.PP
+\-XX:+AggressiveOpts
+.RS 4
Enables the use of aggressive performance optimization features, which are expected to become default in upcoming releases\&. By default, this option is disabled and experimental performance features are not used\&.
-.TP
--XX:AllocateInstancePrefetchLines=\fIlines\fR
-.br
+.RE
+.PP
+\-XX:AllocateInstancePrefetchLines=\fIlines\fR
+.RS 4
Sets the number of lines to prefetch ahead of the instance allocation pointer\&. By default, the number of lines to prefetch is set to 1:
-.sp
-.nf
-\f3\-XX:AllocateInstancePrefetchLines=1\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:AllocatePrefetchInstr=\fIinstruction\fR
-.br
-Sets the prefetch instruction to prefetch ahead of the allocation pointer\&. Possible values are from 0 to 3\&. The actual instructions behind the values depend on the platform\&. By default, the prefetch instruction is set to 0:
-.sp
-.nf
-\f3\-XX:AllocatePrefetchInstr=0\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:AllocatePrefetchStepSize=\fIsize\fR
-.br
-Sets the step size (in bytes) for sequential prefetch instructions\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. By default, the step size is set to 16 bytes:
-.sp
-.nf
-\f3\-XX:AllocatePrefetchStepSize=16\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:+BackgroundCompilation
-.br
-Enables background compilation\&. This option is enabled by default\&. To disable background compilation, specify \f3-XX:-BackgroundCompilation\fR (this is equivalent to specifying \f3-Xbatch\fR)\&.
-.TP
--XX:CICompilerCount=\fIthreads\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:AllocateInstancePrefetchLines=1\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Only the Java HotSpot Server VM supports this option\&.
+.RE
+.PP
+\-XX:AllocatePrefetchDistance=\fIsize\fR
+.RS 4
+Sets the size (in bytes) of the prefetch distance for object allocation\&. Memory about to be written with the value of new objects is prefetched up to this distance starting from the address of the last allocated object\&. Each Java thread has its own allocation point\&.
+.sp
+Negative values denote that prefetch distance is chosen based on the platform\&. Positive values are bytes to prefetch\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. The default value is set to \-1\&.
+.sp
+The following example shows how to set the prefetch distance to 1024 bytes:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:AllocatePrefetchDistance=1024\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Only the Java HotSpot Server VM supports this option\&.
+.RE
+.PP
+\-XX:AllocatePrefetchInstr=\fIinstruction\fR
+.RS 4
+Sets the prefetch instruction to prefetch ahead of the allocation pointer\&. Only the Java HotSpot Server VM supports this option\&. Possible values are from 0 to 3\&. The actual instructions behind the values depend on the platform\&. By default, the prefetch instruction is set to 0:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:AllocatePrefetchInstr=0\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Only the Java HotSpot Server VM supports this option\&.
+.RE
+.PP
+\-XX:AllocatePrefetchLines=\fIlines\fR
+.RS 4
+Sets the number of cache lines to load after the last object allocation by using the prefetch instructions generated in compiled code\&. The default value is 1 if the last allocated object was an instance, and 3 if it was an array\&.
+.sp
+The following example shows how to set the number of loaded cache lines to 5:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:AllocatePrefetchLines=5\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Only the Java HotSpot Server VM supports this option\&.
+.RE
+.PP
+\-XX:AllocatePrefetchStepSize=\fIsize\fR
+.RS 4
+Sets the step size (in bytes) for sequential prefetch instructions\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. By default, the step size is set to 16 bytes:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:AllocatePrefetchStepSize=16\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Only the Java HotSpot Server VM supports this option\&.
+.RE
+.PP
+\-XX:AllocatePrefetchStyle=\fIstyle\fR
+.RS 4
+Sets the generated code style for prefetch instructions\&. The
+\fIstyle\fR
+argument is an integer from 0 to 3:
+.PP
+0
+.RS 4
+Do not generate prefetch instructions\&.
+.RE
+.PP
+1
+.RS 4
+Execute prefetch instructions after each allocation\&. This is the default parameter\&.
+.RE
+.PP
+2
+.RS 4
+Use the thread\-local allocation block (TLAB) watermark pointer to determine when prefetch instructions are executed\&.
+.RE
+.PP
+3
+.RS 4
+Use BIS instruction on SPARC for allocation prefetch\&.
+.RE
+.sp
+Only the Java HotSpot Server VM supports this option\&.
+.RE
+.PP
+\-XX:+BackgroundCompilation
+.RS 4
+Enables background compilation\&. This option is enabled by default\&. To disable background compilation, specify
+\fB\-XX:\-BackgroundCompilation\fR
+(this is equivalent to specifying
+\fB\-Xbatch\fR)\&.
+.RE
+.PP
+\-XX:CICompilerCount=\fIthreads\fR
+.RS 4
Sets the number of compiler threads to use for compilation\&. By default, the number of threads is set to 2 for the server JVM, to 1 for the client JVM, and it scales to the number of cores if tiered compilation is used\&. The following example shows how to set the number of threads to 2:
-.sp
-.nf
-\f3\-XX:CICompilerCount=2\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:CodeCacheMinimumFreeSpace=\fIsize\fR
-.br
-Sets the minimum free space (in bytes) required for compilation\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. When less than the minimum free space remains, compiling stops\&. By default, this option is set to 500 KB\&. The following example shows how to set the minimum free space to 1024 MB:
-.sp
-.nf
-\f3\-XX:CodeCacheMinimumFreeSpace=1024m\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:CompileCommand=\fIcommand\fR,\fImethod\fR[,\fIoption\fR]
-.br
-Specifies a command to perform on a method\&. For example, to exclude the \f3indexOf()\fR method of the \f3String\fR class from being compiled, use the following:
-.sp
-.nf
-\f3\-XX:CompileCommand=exclude,java/lang/String\&.indexOf\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-Note that the full class name is specified, including all packages and subpackages separated by a slash (\f3/\fR)\&. For easier cut and paste operations, it is also possible to use the method name format produced by the \f3-XX:+PrintCompilation\fR and \f3-XX:+LogCompilation\fR options:
-.sp
-.nf
-\f3\-XX:CompileCommand=exclude,java\&.lang\&.String::indexOf\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-If the method is specified without the signature, the command will be applied to all methods with the specified name\&. However, you can also specify the signature of the method in the class file format\&. In this case, you should enclose the arguments in quotation marks, because otherwise the shell treats the semicolon as command end\&. For example, if you want to exclude only the \f3indexOf(String)\fR method of the \f3String\fR class from being compiled, use the following:
-.sp
-.nf
-\f3\-XX:CompileCommand="exclude,java/lang/String\&.indexOf,(Ljava/lang/String;)I"\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-You can also use the asterisk (*) as a wildcard for class and method names\&. For example, to exclude all \f3indexOf()\fR methods in all classes from being compiled, use the following:
-.sp
-.nf
-\f3\-XX:CompileCommand=exclude,*\&.indexOf\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-The commas and periods are aliases for spaces, making it easier to pass compiler commands through a shell\&. You can pass arguments to \f3-XX:CompileCommand\fR using spaces as separators by enclosing the argument in quotation marks:
-.sp
-.nf
-\f3\-XX:CompileCommand="exclude java/lang/String indexOf"\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-Note that after parsing the commands passed on the command line using the \f3-XX:CompileCommand\fR options, the JIT compiler then reads commands from the \f3\&.hotspot_compiler\fR file\&. You can add commands to this file or specify a different file using the \f3-XX:CompileCommandFile\fR option\&.
-
-To add several commands, either specify the \f3-XX:CompileCommand\fR option multiple times, or separate each argument with the newline separator (\f3\en\fR)\&. The following commands are available:
-.RS
-.TP
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CICompilerCount=2\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:CodeCacheMinimumFreeSpace=\fIsize\fR
+.RS 4
+Sets the minimum free space (in bytes) required for compilation\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. When less than the minimum free space remains, compiling stops\&. By default, this option is set to 500 KB\&. The following example shows how to set the minimum free space to 1024 MB:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CodeCacheMinimumFreeSpace=1024m\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:CompileCommand=\fIcommand\fR,\fImethod\fR[,\fIoption\fR]
+.RS 4
+Specifies a command to perform on a method\&. For example, to exclude the
+\fBindexOf()\fR
+method of the
+\fBString\fR
+class from being compiled, use the following:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CompileCommand=exclude,java/lang/String\&.indexOf\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Note that the full class name is specified, including all packages and subpackages separated by a slash (\fB/\fR)\&. For easier cut and paste operations, it is also possible to use the method name format produced by the
+\fB\-XX:+PrintCompilation\fR
+and
+\fB\-XX:+LogCompilation\fR
+options:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CompileCommand=exclude,java\&.lang\&.String::indexOf\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+If the method is specified without the signature, the command will be applied to all methods with the specified name\&. However, you can also specify the signature of the method in the class file format\&. In this case, you should enclose the arguments in quotation marks, because otherwise the shell treats the semicolon as command end\&. For example, if you want to exclude only the
+\fBindexOf(String)\fR
+method of the
+\fBString\fR
+class from being compiled, use the following:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CompileCommand="exclude,java/lang/String\&.indexOf,(Ljava/lang/String;)I"\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+You can also use the asterisk (*) as a wildcard for class and method names\&. For example, to exclude all
+\fBindexOf()\fR
+methods in all classes from being compiled, use the following:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CompileCommand=exclude,*\&.indexOf\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The commas and periods are aliases for spaces, making it easier to pass compiler commands through a shell\&. You can pass arguments to
+\fB\-XX:CompileCommand\fR
+using spaces as separators by enclosing the argument in quotation marks:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CompileCommand="exclude java/lang/String indexOf"\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Note that after parsing the commands passed on the command line using the
+\fB\-XX:CompileCommand\fR
+options, the JIT compiler then reads commands from the
+\fB\&.hotspot_compiler\fR
+file\&. You can add commands to this file or specify a different file using the
+\fB\-XX:CompileCommandFile\fR
+option\&.
+.sp
+To add several commands, either specify the
+\fB\-XX:CompileCommand\fR
+option multiple times, or separate each argument with the newline separator (\fB\en\fR)\&. The following commands are available:
+.PP
break
+.RS 4
Set a breakpoint when debugging the JVM to stop at the beginning of compilation of the specified method\&.
-.TP
+.RE
+.PP
compileonly
-Exclude all methods from compilation except for the specified method\&. As an alternative, you can use the \f3-XX:CompileOnly\fR option, which allows to specify several methods\&.
-.TP
+.RS 4
+Exclude all methods from compilation except for the specified method\&. As an alternative, you can use the
+\fB\-XX:CompileOnly\fR
+option, which allows to specify several methods\&.
+.RE
+.PP
dontinline
+.RS 4
Prevent inlining of the specified method\&.
-.TP
+.RE
+.PP
exclude
+.RS 4
Exclude the specified method from compilation\&.
-.TP
+.RE
+.PP
help
-Print a help message for the \f3-XX:CompileCommand\fR option\&.
-.TP
+.RS 4
+Print a help message for the
+\fB\-XX:CompileCommand\fR
+option\&.
+.RE
+.PP
inline
+.RS 4
Attempt to inline the specified method\&.
-.TP
+.RE
+.PP
log
-Exclude compilation logging (with the \f3-XX:+LogCompilation\fR option) for all methods except for the specified method\&. By default, logging is performed for all compiled methods\&.
-.TP
+.RS 4
+Exclude compilation logging (with the
+\fB\-XX:+LogCompilation\fR
+option) for all methods except for the specified method\&. By default, logging is performed for all compiled methods\&.
+.RE
+.PP
option
-This command can be used to pass a JIT compilation option to the specified method in place of the last argument (\fIoption\fR)\&. The compilation option is set at the end, after the method name\&. For example, to enable the \f3BlockLayoutByFrequency\fR option for the \f3append()\fR method of the \f3StringBuffer\fR class, use the following:
-.sp
-.nf
-\f3\-XX:CompileCommand=option,java/lang/StringBuffer\&.append,BlockLayoutByFrequency\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.RS 4
+This command can be used to pass a JIT compilation option to the specified method in place of the last argument (\fIoption\fR)\&. The compilation option is set at the end, after the method name\&. For example, to enable the
+\fBBlockLayoutByFrequency\fR
+option for the
+\fBappend()\fR
+method of the
+\fBStringBuffer\fR
+class, use the following:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CompileCommand=option,java/lang/StringBuffer\&.append,BlockLayoutByFrequency\fR
+
+.fi
+.if n \{\
+.RE
+.\}
You can specify multiple compilation options, separated by commas or spaces\&.
-.TP
+.RE
+.PP
print
+.RS 4
Print generated assembler code after compilation of the specified method\&.
-.TP
+.RE
+.PP
quiet
-Do not print the compile commands\&. By default, the commands that you specify with the -\f3XX:CompileCommand\fR option are printed; for example, if you exclude from compilation the \f3indexOf()\fR method of the \f3String\fR class, then the following will be printed to standard output:
-.sp
-.nf
-\f3CompilerOracle: exclude java/lang/String\&.indexOf\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-You can suppress this by specifying the \f3-XX:CompileCommand=quiet\fR option before other \f3-XX:CompileCommand\fR options\&.
-.RE
-
-.TP
--XX:CompileCommandFile=\fIfilename\fR
-.br
-Sets the file from which JIT compiler commands are read\&. By default, the \f3\&.hotspot_compiler\fR file is used to store commands performed by the JIT compiler\&.
-
-Each line in the command file represents a command, a class name, and a method name for which the command is used\&. For example, this line prints assembly code for the \f3toString()\fR method of the \f3String\fR class:
-.sp
-.nf
-\f3print java/lang/String toString\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-For more information about specifying the commands for the JIT compiler to perform on methods, see the \f3-XX:CompileCommand\fR option\&.
-.TP
--XX:CompileOnly=\fImethods\fR
-.br
-Sets the list of methods (separated by commas) to which compilation should be restricted\&. Only the specified methods will be compiled\&. Specify each method with the full class name (including the packages and subpackages)\&. For example, to compile only the \f3length()\fR method of the \f3String\fR class and the \f3size()\fR method of the \f3List\fR class, use the following:
-.sp
-.nf
-\f3\-XX:CompileOnly=java/lang/String\&.length,java/util/List\&.size\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-Note that the full class name is specified, including all packages and subpackages separated by a slash (\f3/\fR)\&. For easier cut and paste operations, it is also possible to use the method name format produced by the \f3-XX:+PrintCompilation\fR and \f3-XX:+LogCompilation\fR options:
-.sp
-.nf
-\f3\-XX:CompileOnly=java\&.lang\&.String::length,java\&.util\&.List::size\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.RS 4
+Do not print the compile commands\&. By default, the commands that you specify with the \-\fBXX:CompileCommand\fR
+option are printed; for example, if you exclude from compilation the
+\fBindexOf()\fR
+method of the
+\fBString\fR
+class, then the following will be printed to standard output:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBCompilerOracle: exclude java/lang/String\&.indexOf\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+You can suppress this by specifying the
+\fB\-XX:CompileCommand=quiet\fR
+option before other
+\fB\-XX:CompileCommand\fR
+options\&.
+.RE
+.RE
+.PP
+\-XX:CompileCommandFile=\fIfilename\fR
+.RS 4
+Sets the file from which JIT compiler commands are read\&. By default, the
+\fB\&.hotspot_compiler\fR
+file is used to store commands performed by the JIT compiler\&.
+.sp
+Each line in the command file represents a command, a class name, and a method name for which the command is used\&. For example, this line prints assembly code for the
+\fBtoString()\fR
+method of the
+\fBString\fR
+class:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBprint java/lang/String toString\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+For more information about specifying the commands for the JIT compiler to perform on methods, see the
+\fB\-XX:CompileCommand\fR
+option\&.
+.RE
+.PP
+\-XX:CompileOnly=\fImethods\fR
+.RS 4
+Sets the list of methods (separated by commas) to which compilation should be restricted\&. Only the specified methods will be compiled\&. Specify each method with the full class name (including the packages and subpackages)\&. For example, to compile only the
+\fBlength()\fR
+method of the
+\fBString\fR
+class and the
+\fBsize()\fR
+method of the
+\fBList\fR
+class, use the following:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CompileOnly=java/lang/String\&.length,java/util/List\&.size\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Note that the full class name is specified, including all packages and subpackages separated by a slash (\fB/\fR)\&. For easier cut and paste operations, it is also possible to use the method name format produced by the
+\fB\-XX:+PrintCompilation\fR
+and
+\fB\-XX:+LogCompilation\fR
+options:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CompileOnly=java\&.lang\&.String::length,java\&.util\&.List::size\fR
+
+.fi
+.if n \{\
+.RE
+.\}
Although wildcards are not supported, you can specify only the class or package name to compile all methods in that class or package, as well as specify just the method to compile methods with this name in any class:
-.sp
-.nf
-\f3\-XX:CompileOnly=java/lang/String\fP
-.fi
-.nf
-\f3\-XX:CompileOnly=java/lang\fP
-.fi
-.nf
-\f3\-XX:CompileOnly=\&.length\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:CompileThreshold=\fIinvocations\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CompileOnly=java/lang/String\fR
+\fB\-XX:CompileOnly=java/lang\fR
+\fB\-XX:CompileOnly=\&.length\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:CompileThreshold=\fIinvocations\fR
+.RS 4
Sets the number of interpreted method invocations before compilation\&. By default, in the server JVM, the JIT compiler performs 10,000 interpreted method invocations to gather information for efficient compilation\&. For the client JVM, the default setting is 1,500 invocations\&. The following example shows how to set the number of interpreted method invocations to 5,000:
-.sp
-.nf
-\f3\-XX:CompileThreshold=5000\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-You can completely disable interpretation of Java methods before compilation by specifying the \f3-Xcomp\fR option\&.
-.TP
--XX:+DoEscapeAnalysis
-.br
-Enables the use of escape analysis\&. This option is enabled by default\&. To disable the use of escape analysis, specify \f3-XX:-DoEscapeAnalysis\fR\&.
-.TP
--XX:+FailOverToOldVerifier
-.br
-Enables automatic failover to the old verifier when the new type checker fails\&. By default, this option is disabled and it is ignored (that is, treated as disabled) for classes with a recent bytecode version\&. You can enable it for classes with older versions of the bytecode\&.
-.TP
--XX:InitialCodeCacheSize=\fIsize\fR
-.br
-Sets the initial code cache size (in bytes)\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. The default value is set to 500 KB\&. The following example shows how to set the initial code cache size to 32 KB:
-.sp
-.nf
-\f3\-XX:InitialCodeCacheSize=32k\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:+Inline
-.br
-Enables method inlining\&. This option is enabled by default to increase performance\&. To disable method inlining, specify \f3-XX:-Inline\fR\&.
-.TP
--XX:InlineSmallCode=\fIsize\fR
-.br
-Sets the maximum code size (in bytes) for compiled methods that should be inlined\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. Only compiled methods with the size smaller than the specified size will be inlined\&. By default, the maximum code size is set to 1000 bytes:
-.sp
-.nf
-\f3\-XX:InlineSmallCode=1000\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:+LogCompilation
-.br
-Enables logging of compilation activity to a file named \f3hotspot\&.log\fR in the current working directory\&. You can specify a different log file path and name using the \f3-XX:LogFile\fR option\&.
-
-By default, this option is disabled and compilation activity is not logged\&. The \f3-XX:+LogCompilation\fR option has to be used together with the \f3-XX:UnlockDiagnosticVMOptions\fR option that unlocks diagnostic JVM options\&.
-
-You can enable verbose diagnostic output with a message printed to the console every time a method is compiled by using the \f3-XX:+PrintCompilation\fR option\&.
-.TP
--XX:MaxInlineSize=\fIsize\fR
-.br
-Sets the maximum bytecode size (in bytes) of a method to be inlined\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. By default, the maximum bytecode size is set to 35 bytes:
-.sp
-.nf
-\f3\-XX:MaxInlineSize=35\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:MaxNodeLimit=\fInodes\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CompileThreshold=5000\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+You can completely disable interpretation of Java methods before compilation by specifying the
+\fB\-Xcomp\fR
+option\&.
+.RE
+.PP
+\-XX:+DoEscapeAnalysis
+.RS 4
+Enables the use of escape analysis\&. This option is enabled by default\&. To disable the use of escape analysis, specify
+\fB\-XX:\-DoEscapeAnalysis\fR\&. Only the Java HotSpot Server VM supports this option\&.
+.RE
+.PP
+\-XX:InitialCodeCacheSize=\fIsize\fR
+.RS 4
+Sets the initial code cache size (in bytes)\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. The default value is set to 500 KB\&. The following example shows how to set the initial code cache size to 32 KB:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:InitialCodeCacheSize=32k\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:+Inline
+.RS 4
+Enables method inlining\&. This option is enabled by default to increase performance\&. To disable method inlining, specify
+\fB\-XX:\-Inline\fR\&.
+.RE
+.PP
+\-XX:InlineSmallCode=\fIsize\fR
+.RS 4
+Sets the maximum code size (in bytes) for compiled methods that should be inlined\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. Only compiled methods with the size smaller than the specified size will be inlined\&. By default, the maximum code size is set to 1000 bytes:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:InlineSmallCode=1000\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:+LogCompilation
+.RS 4
+Enables logging of compilation activity to a file named
+\fBhotspot\&.log\fR
+in the current working directory\&. You can specify a different log file path and name using the
+\fB\-XX:LogFile\fR
+option\&.
+.sp
+By default, this option is disabled and compilation activity is not logged\&. The
+\fB\-XX:+LogCompilation\fR
+option has to be used together with the
+\fB\-XX:UnlockDiagnosticVMOptions\fR
+option that unlocks diagnostic JVM options\&.
+.sp
+You can enable verbose diagnostic output with a message printed to the console every time a method is compiled by using the
+\fB\-XX:+PrintCompilation\fR
+option\&.
+.RE
+.PP
+\-XX:MaxInlineSize=\fIsize\fR
+.RS 4
+Sets the maximum bytecode size (in bytes) of a method to be inlined\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. By default, the maximum bytecode size is set to 35 bytes:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:MaxInlineSize=35\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:MaxNodeLimit=\fInodes\fR
+.RS 4
Sets the maximum number of nodes to be used during single method compilation\&. By default, the maximum number of nodes is set to 65,000:
-.sp
-.nf
-\f3\-XX:MaxNodeLimit=65000\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:MaxTrivialSize=\fIsize\fR
-.br
-Sets the maximum bytecode size (in bytes) of a trivial method to be inlined\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. By default, the maximum bytecode size of a trivial method is set to 6 bytes:
-.sp
-.nf
-\f3\-XX:MaxTrivialSize=6\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:+OptimizeStringConcat
-.br
-Enables the optimization of \f3String\fR concatenation operations\&. This option is enabled by default\&. To disable the optimization of \f3String\fR concatenation operations, specify \f3-XX:-OptimizeStringConcat\fR\&.
-.TP
--XX:+PrintAssembly
-.br
-Enables printing of assembly code for bytecoded and native methods by using the external \f3disassembler\&.so\fR library\&. This enables you to see the generated code, which may help you to diagnose performance issues\&.
-
-By default, this option is disabled and assembly code is not printed\&. The \f3-XX:+PrintAssembly\fR option has to be used together with the \f3-XX:UnlockDiagnosticVMOptions\fR option that unlocks diagnostic JVM options\&.
-.TP
--XX:+PrintCompilation
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:MaxNodeLimit=65000\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:MaxTrivialSize=\fIsize\fR
+.RS 4
+Sets the maximum bytecode size (in bytes) of a trivial method to be inlined\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. By default, the maximum bytecode size of a trivial method is set to 6 bytes:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:MaxTrivialSize=6\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:+OptimizeStringConcat
+.RS 4
+Enables the optimization of
+\fBString\fR
+concatenation operations\&. This option is enabled by default\&. To disable the optimization of
+\fBString\fR
+concatenation operations, specify
+\fB\-XX:\-OptimizeStringConcat\fR\&. Only the Java HotSpot Server VM supports this option\&.
+.RE
+.PP
+\-XX:+PrintAssembly
+.RS 4
+Enables printing of assembly code for bytecoded and native methods by using the external
+\fBdisassembler\&.so\fR
+library\&. This enables you to see the generated code, which may help you to diagnose performance issues\&.
+.sp
+By default, this option is disabled and assembly code is not printed\&. The
+\fB\-XX:+PrintAssembly\fR
+option has to be used together with the
+\fB\-XX:UnlockDiagnosticVMOptions\fR
+option that unlocks diagnostic JVM options\&.
+.RE
+.PP
+\-XX:+PrintCompilation
+.RS 4
Enables verbose diagnostic output from the JVM by printing a message to the console every time a method is compiled\&. This enables you to see which methods actually get compiled\&. By default, this option is disabled and diagnostic output is not printed\&.
-
-You can also log compilation activity to a file by using the \f3-XX:+LogCompilation\fR option\&.
-.TP
--XX:+PrintInlining
-.br
+.sp
+You can also log compilation activity to a file by using the
+\fB\-XX:+LogCompilation\fR
+option\&.
+.RE
+.PP
+\-XX:+PrintInlining
+.RS 4
Enables printing of inlining decisions\&. This enables you to see which methods are getting inlined\&.
-
-By default, this option is disabled and inlining information is not printed\&. The \f3-XX:+PrintInlining\fR option has to be used together with the \f3-XX:+UnlockDiagnosticVMOptions\fR option that unlocks diagnostic JVM options\&.
-.TP
--XX:+RelaxAccessControlCheck
-.br
-Decreases the amount of access control checks in the verifier\&. By default, this option is disabled, and it is ignored (that is, treated as disabled) for classes with a recent bytecode version\&. You can enable it for classes with older versions of the bytecode\&.
-.TP
--XX:ReservedCodeCacheSize=\fIsize\fR
-.br
-Sets the maximum code cache size (in bytes) for JIT-compiled code\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. This option is equivalent to \f3-Xmaxjitcodesize\fR\&.
-.TP
--XX:+TieredCompilation
-.br
-Enables the use of tiered compilation\&. By default, this option is disabled and tiered compilation is not used\&.
-.TP
--XX:+UseCodeCacheFlushing
-.br
-Enables flushing of the code cache before shutting down the compiler\&. This option is enabled by default\&. To disable flushing of the code cache before shutting down the compiler, specify \f3-XX:-UseCodeCacheFlushing\fR\&.
-.TP
--XX:+UseCondCardMark
-.br
-Enables checking of whether the card is already marked before updating the card table\&. This option is disabled by default and should only be used on machines with multiple sockets, where it will increase performance of Java applications that rely heavily on concurrent operations\&.
-.TP
--XX:+UseSuperWord
-.br
-Enables the transformation of scalar operations into superword operations\&. This option is enabled by default\&. To disable the transformation of scalar operations into superword operations, specify \f3-XX:-UseSuperWord\fR\&.
-.SS ADVANCED\ SERVICEABILITY\ OPTIONS
+.sp
+By default, this option is disabled and inlining information is not printed\&. The
+\fB\-XX:+PrintInlining\fR
+option has to be used together with the
+\fB\-XX:+UnlockDiagnosticVMOptions\fR
+option that unlocks diagnostic JVM options\&.
+.RE
+.PP
+\-XX:ReservedCodeCacheSize=\fIsize\fR
+.RS 4
+Sets the maximum code cache size (in bytes) for JIT\-compiled code\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. This option is equivalent to
+\fB\-Xmaxjitcodesize\fR\&.
+.RE
+.PP
+\-XX:+TieredCompilation
+.RS 4
+Enables the use of tiered compilation\&. By default, this option is enabled\&. Only the Java HotSpot Server VM supports this option\&.
+.RE
+.PP
+\-XX:+UseAES
+.RS 4
+Enables hardware\-based AES intrinsics for Intel, AMD, and SPARC hardware\&. Intel Westmere (2010 and newer), AMD Bulldozer (2011 and newer), and SPARC (T4 and newer) are the supported hardware\&. UseAES is used in conjunction with UseAESIntrinsics\&.
+.RE
+.PP
+\-XX:+UseAESIntrinsics
+.RS 4
+UseAES and UseAESIntrinsics flags are enabled by default and are supported only for Java HotSpot Server VM 32\-bit and 64\-bit\&. To disable hardware\-based AES intrinsics, specify
+\fB\-XX:\-UseAES \-XX:\-UseAESIntrinsics\fR\&. For example, to enable hardware AES, use the following flags:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:+UseAES \-XX:+UseAESIntrinsics\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+To support UseAES and UseAESIntrinsics flags for 32\-bit and 64\-bit use
+\fB\-server\fR
+option to choose Java HotSpot Server VM\&. These flags are not supported on Client VM\&.
+.RE
+.PP
+\-XX:+UseCodeCacheFlushing
+.RS 4
+Enables flushing of the code cache before shutting down the compiler\&. This option is enabled by default\&. To disable flushing of the code cache before shutting down the compiler, specify
+\fB\-XX:\-UseCodeCacheFlushing\fR\&.
+.RE
+.PP
+\-XX:+UseCondCardMark
+.RS 4
+Enables checking of whether the card is already marked before updating the card table\&. This option is disabled by default and should only be used on machines with multiple sockets, where it will increase performance of Java applications that rely heavily on concurrent operations\&. Only the Java HotSpot Server VM supports this option\&.
+.RE
+.PP
+\-XX:+UseSuperWord
+.RS 4
+Enables the transformation of scalar operations into superword operations\&. This option is enabled by default\&. To disable the transformation of scalar operations into superword operations, specify
+\fB\-XX:\-UseSuperWord\fR\&. Only the Java HotSpot Server VM supports this option\&.
+.RE
+.SS "Experimental JIT Compiler Options"
+.PP
+The options related to the Restricted Transactional Memory (RTM) locking feature in this section are experimental and are not officially supported in Java SE 8u20; you must enable the
+\fB\-XX:+UnlockExperimentalVMOptions\fR
+option to use them\&. These options are only available for the Java HotSpot Server VM on x86 CPUs that support Transactional Synchronization Extensions (TSX)\&.
+.PP
+\-XX:RTMAbortRatio=\fIabort_ratio\fR
+.RS 4
+The RTM abort ratio is specified as a percentage (%) of all executed RTM transactions\&. If a number of aborted transactions becomes greater than this ratio, then the compiled code will be deoptimized\&. This ratio is used when the
+\fB\-XX:+UseRTMDeopt\fR
+option is enabled\&. The default value of this option is 50\&. This means that the compiled code will be deoptimized if 50% of all transactions are aborted\&.
+.RE
+.PP
+\-XX:RTMRetryCount=\fInumber_of_retries\fR
+.RS 4
+RTM locking code will be retried, when it is aborted or busy, the number of times specified by this option before falling back to the normal locking mechanism\&. The default value for this option is 5\&. The
+\fB\-XX:UseRTMLocking\fR
+option must be enabled\&.
+.RE
+.PP
+\-XX:+UseRTMDeopt
+.RS 4
+Auto\-tunes RTM locking depending on the abort ratio\&. This ratio is specified by
+\fB\-XX:RTMAbortRatio\fR
+option\&. If the number of aborted transactions exceeds the abort ratio, then the method containing the lock will be deoptimized and recompiled with all locks as normal locks\&. This option is disabled by default\&. The
+\fB\-XX:UseRTMLocking\fR
+option must be enabled\&.
+.RE
+.PP
+\-XX:+UseRTMLocking
+.RS 4
+Generate Restricted Transactional Memory (RTM) locking code for all inflated locks, with the normal locking mechanism as the fallback handler\&. This option is disabled by default\&.
+.sp
+RTM is part of Intel\*(Aqs Transactional Synchronization Extensions (TSX), which is an x86 instruction set extension and facilitates the creation of multithreaded applications\&. RTM introduces the new instructions
+\fBXBEGIN\fR,
+\fBXABORT\fR,
+\fBXEND\fR, and
+\fBXTEST\fR\&. The
+\fBXBEGIN\fR
+and
+\fBXEND\fR
+instructions enclose a set of instructions to run as a transaction\&. If no conflict is found when running the transaction, the memory and register modifications are committed together at the
+\fBXEND\fR
+instruction\&. The
+\fBXABORT\fR
+instruction can be used to explicitly abort a transaction and the
+\fBXEND\fR
+instruction to check if a set of instructions are being run in a transaction\&.
+.sp
+A lock on a transaction is inflated when another thread tries to access the same transaction, thereby blocking the thread that did not originally request access to the transaction\&. RTM requires that a fallback set of operations be specified in case a transaction aborts or fails\&. An RTM lock is a lock that has been delegated to the TSX\*(Aqs system\&.
+.sp
+RTM improves performance for highly contended locks with low conflict in a critical region (which is code that must not be accessed by more than one thread concurrently)\&. RTM also improves the performance of coarse\-grain locking, which typically does not perform well in multithreaded applications\&. (Coarse\-grain locking is the strategy of holding locks for long periods to minimize the overhead of taking and releasing locks, while fine\-grained locking is the strategy of trying to achieve maximum parallelism by locking only when necessary and unlocking as soon as possible\&.) Also, for lightly contended locks that are used by different threads, RTM can reduce false cache line sharing, also known as cache line ping\-pong\&. This occurs when multiple threads from different processors are accessing different resources, but the resources share the same cache line\&. As a result, the processors repeatedly invalidate the cache lines of other processors, which forces them to read from main memory instead of their cache\&.
+.RE
+.SS "Advanced Serviceability Options"
+.PP
These options provide the ability to gather system information and perform extensive debugging\&.
-.TP
--XX:+ExtendedDTraceProbes
-.br
-Enables additional \f3dtrace\fR tool probes that impact the performance\&. By default, this option is disabled and \f3dtrace\fR performs only standard probes\&.
-.TP
--XX:+HeapDumpOnOutOfMemory
-.br
-Enables the dumping of the Java heap to a file in the current directory by using the heap profiler (HPROF) when a \f3java\&.lang\&.OutOfMemoryError\fR exception is thrown\&. You can explicitly set the heap dump file path and name using the \f3-XX:HeapDumpPath\fR option\&. By default, this option is disabled and the heap is not dumped when an \f3OutOfMemoryError\fR exception is thrown\&.
-.TP
--XX:HeapDumpPath=\fIpath\fR
-.br
-Sets the path and file name for writing the heap dump provided by the heap profiler (HPROF) when the \f3-XX:+HeapDumpOnOutOfMemoryError\fR option is set\&. By default, the file is created in the current working directory, and it is named \f3java_pid\fR\fIpid\fR\f3\&.hprof\fR where \fIpid\fR is the identifier of the process that caused the error\&. The following example shows how to set the default file explicitly (\f3%p\fR represents the current process identificator):
-.sp
-.nf
-\f3\-XX:HeapDumpPath=\&./java_pid%p\&.hprof\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-\fI\fRThe following example shows how to set the heap dump file to \f3/var/log/java/java_heapdump\&.hprof\fR:
-.sp
-.nf
-\f3\-XX:HeapDumpPath=/var/log/java/java_heapdump\&.hprof\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:LogFile=\fIpath\fR
-.br
-Sets the path and file name where log data is written\&. By default, the file is created in the current working directory, and it is named \f3hotspot\&.log\fR\&.
-
-\fI\fRThe following example shows how to set the log file to \f3/var/log/java/hotspot\&.log\fR:
-.sp
-.nf
-\f3\-XX:LogFile=/var/log/java/hotspot\&.log\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:+PrintClassHistogram
-.br
-\fI\fREnables printing of a class instance histogram after a \f3Control+C\fR event (\f3SIGTERM\fR)\&. By default, this option is disabled\&.
-
-Setting this option is equivalent to running the \f3jmap -histo\fR command, or the \f3jcmd\fR\fIpid\fR\f3GC\&.class_histogram\fR command, where \fIpid\fR is the current Java process identifier\&.
-.TP
--XX:+PrintConcurrentLocks
-
-
-Enables printing of j\f3ava\&.util\&.concurrent\fR locks after a \f3Control+C\fR event (\f3SIGTERM\fR)\&. By default, this option is disabled\&.
-
-Setting this option is equivalent to running the \f3jstack -l\fR command or the \f3jcmd\fR\fIpid\fR\f3Thread\&.print -l\fR command, where \fIpid\fR is the current Java process identifier\&.
-.TP
--XX:+UnlockDiagnosticVMOptions
-.br
+.PP
+\-XX:+ExtendedDTraceProbes
+.RS 4
+Enables additional
+\fBdtrace\fR
+tool probes that impact the performance\&. By default, this option is disabled and
+\fBdtrace\fR
+performs only standard probes\&.
+.RE
+.PP
+\-XX:+HeapDumpOnOutOfMemory
+.RS 4
+Enables the dumping of the Java heap to a file in the current directory by using the heap profiler (HPROF) when a
+\fBjava\&.lang\&.OutOfMemoryError\fR
+exception is thrown\&. You can explicitly set the heap dump file path and name using the
+\fB\-XX:HeapDumpPath\fR
+option\&. By default, this option is disabled and the heap is not dumped when an
+\fBOutOfMemoryError\fR
+exception is thrown\&.
+.RE
+.PP
+\-XX:HeapDumpPath=\fIpath\fR
+.RS 4
+Sets the path and file name for writing the heap dump provided by the heap profiler (HPROF) when the
+\fB\-XX:+HeapDumpOnOutOfMemoryError\fR
+option is set\&. By default, the file is created in the current working directory, and it is named
+\fBjava_pid\fR\fIpid\fR\fB\&.hprof\fR
+where
+\fIpid\fR
+is the identifier of the process that caused the error\&. The following example shows how to set the default file explicitly (\fB%p\fR
+represents the current process identificator):
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:HeapDumpPath=\&./java_pid%p\&.hprof\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The following example shows how to set the heap dump file to
+\fB/var/log/java/java_heapdump\&.hprof\fR:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:HeapDumpPath=/var/log/java/java_heapdump\&.hprof\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:LogFile=\fIpath\fR
+.RS 4
+Sets the path and file name where log data is written\&. By default, the file is created in the current working directory, and it is named
+\fBhotspot\&.log\fR\&.
+.sp
+The following example shows how to set the log file to
+\fB/var/log/java/hotspot\&.log\fR:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:LogFile=/var/log/java/hotspot\&.log\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:+PrintClassHistogram
+.RS 4
+Enables printing of a class instance histogram after a
+\fBControl+C\fR
+event (\fBSIGTERM\fR)\&. By default, this option is disabled\&.
+.sp
+Setting this option is equivalent to running the
+\fBjmap \-histo\fR
+command, or the
+\fBjcmd \fR\fIpid\fR\fB GC\&.class_histogram\fR
+command, where
+\fIpid\fR
+is the current Java process identifier\&.
+.RE
+.PP
+\-XX:+PrintConcurrentLocks
+.RS 4
+Enables printing of j locks after a event\&. By default, this option is disabled\&.
+.sp
+Enables printing of j\fBava\&.util\&.concurrent\fR
+locks after a
+\fBControl+C\fR
+event (\fBSIGTERM\fR)\&. By default, this option is disabled\&.
+.sp
+Setting this option is equivalent to running the
+\fBjstack \-l\fR
+command or the
+\fBjcmd \fR\fIpid\fR\fB Thread\&.print \-l\fR
+command, where
+\fIpid\fR
+is the current Java process identifier\&.
+.RE
+.PP
+\-XX:+UnlockDiagnosticVMOptions
+.RS 4
Unlocks the options intended for diagnosing the JVM\&. By default, this option is disabled and diagnostic options are not available\&.
-.SS ADVANCED\ GARBAGE\ COLLECTION\ OPTIONS
+.RE
+.SS "Advanced Garbage Collection Options"
+.PP
These options control how garbage collection (GC) is performed by the Java HotSpot VM\&.
-.TP
--XX:+AggressiveHeap
-.br
-Enables Java heap optimization\&. This sets various parameters to be optimal for long-running jobs with intensive memory allocation, based on the configuration of the computer (RAM and CPU)\&. By default, the option is disabled and the heap is not optimized\&.
-.TP
--XX:AllocatePrefetchDistance=\fIsize\fR
-.br
-Sets the size (in bytes) of the prefetch distance for object allocation\&. Memory about to be written with the value of new objects is prefetched up to this distance starting from the address of the last allocated object\&. Each Java thread has its own allocation point\&.
-
-Negative values denote that prefetch distance is chosen based on the platform\&. Positive values are bytes to prefetch\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. The default value is set to -1\&.
-
-The following example shows how to set the prefetch distance to 1024 bytes:
-.sp
-.nf
-\f3\-XX:AllocatePrefetchDistance=1024\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:AllocatePrefetchLines=\fIlines\fR
-.br
-Sets the number of cache lines to load after the last object allocation by using the prefetch instructions generated in compiled code\&. The default value is 1 if the last allocated object was an instance, and 3 if it was an array\&.
-
-The following example shows how to set the number of loaded cache lines to 5:
-.sp
-.nf
-\f3\-XX:AllocatePrefetchLines=5\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:AllocatePrefetchStyle=\fIstyle\fR
-.br
-Sets the generated code style for prefetch instructions\&. The \fIstyle\fR argument is an integer from 0 to 3:
-.RS
-.TP
-0
-Do not generate prefetch instructions\&.
-.TP
-1
-Execute prefetch instructions after each allocation\&. This is the default parameter\&.
-.TP
-2
-Use the thread-local allocation block (TLAB) watermark pointer to determine when prefetch instructions are executed\&.
-.TP
-3
-Use BIS instruction on SPARC for allocation prefetch\&.
-.RE
-
-.TP
--XX:+AlwaysPreTouch
-.br
-Enables touching of every page on the Java heap during JVM initialization\&. This gets all pages into the memory before entering the \f3main()\fR method\&. The option can be used in testing to simulate a long-running system with all virtual memory mapped to physical memory\&. By default, this option is disabled and all pages are committed as JVM heap space fills\&.
-.TP
--XX:+CMSClassUnloadingEnabled
-.br
-Enables class unloading when using the concurrent mark-sweep (CMS) garbage collector\&. This option is enabled by default\&. To disable class unloading for the CMS garbage collector, specify \f3-XX:-CMSClassUnloadingEnabled\fR\&.
-.TP
--XX:CMSExpAvgFactor=\fIpercent\fR
-.br
+.PP
+\-XX:+AggressiveHeap
+.RS 4
+Enables Java heap optimization\&. This sets various parameters to be optimal for long\-running jobs with intensive memory allocation, based on the configuration of the computer (RAM and CPU)\&. By default, the option is disabled and the heap is not optimized\&.
+.RE
+.PP
+\-XX:+AlwaysPreTouch
+.RS 4
+Enables touching of every page on the Java heap during JVM initialization\&. This gets all pages into the memory before entering the
+\fBmain()\fR
+method\&. The option can be used in testing to simulate a long\-running system with all virtual memory mapped to physical memory\&. By default, this option is disabled and all pages are committed as JVM heap space fills\&.
+.RE
+.PP
+\-XX:+CMSClassUnloadingEnabled
+.RS 4
+Enables class unloading when using the concurrent mark\-sweep (CMS) garbage collector\&. This option is enabled by default\&. To disable class unloading for the CMS garbage collector, specify
+\fB\-XX:\-CMSClassUnloadingEnabled\fR\&.
+.RE
+.PP
+\-XX:CMSExpAvgFactor=\fIpercent\fR
+.RS 4
Sets the percentage of time (0 to 100) used to weight the current sample when computing exponential averages for the concurrent collection statistics\&. By default, the exponential averages factor is set to 25%\&. The following example shows how to set the factor to 15%:
-.sp
-.nf
-\f3\-XX:CMSExpAvgFactor=15\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:CMSInitiatingOccupancyFraction=\fIpercent\fR
-.br
-Sets the percentage of the old generation occupancy (0 to 100) at which to start a CMS collection cycle\&. The default value is set to -1\&. Any negative value (including the default) implies that \f3-XX:CMSTriggerRatio\fR is used to define the value of the initiating occupancy fraction\&.
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CMSExpAvgFactor=15\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:CMSInitiatingOccupancyFraction=\fIpercent\fR
+.RS 4
+Sets the percentage of the old generation occupancy (0 to 100) at which to start a CMS collection cycle\&. The default value is set to \-1\&. Any negative value (including the default) implies that
+\fB\-XX:CMSTriggerRatio\fR
+is used to define the value of the initiating occupancy fraction\&.
+.sp
The following example shows how to set the occupancy fraction to 20%:
-.sp
-.nf
-\f3\-XX:CMSInitiatingOccupancyFraction=20\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:+CMSScavengeBeforeRemark
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CMSInitiatingOccupancyFraction=20\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:+CMSScavengeBeforeRemark
+.RS 4
Enables scavenging attempts before the CMS remark step\&. By default, this option is disabled\&.
-.TP
--XX:CMSTriggerRatio=\fIpercent\fR
-.br
-Sets the percentage (0 to 100) of the value specified by \f3-XX:MinHeapFreeRatio\fR that is allocated before a CMS collection cycle commences\&. The default value is set to 80%\&.
-
+.RE
+.PP
+\-XX:CMSTriggerRatio=\fIpercent\fR
+.RS 4
+Sets the percentage (0 to 100) of the value specified by
+\fB\-XX:MinHeapFreeRatio\fR
+that is allocated before a CMS collection cycle commences\&. The default value is set to 80%\&.
+.sp
The following example shows how to set the occupancy fraction to 75%:
-.sp
-.nf
-\f3\-XX:CMSTriggerRatio=75\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:ConcGCThreads=\fIthreads\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CMSTriggerRatio=75\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:ConcGCThreads=\fIthreads\fR
+.RS 4
Sets the number of threads used for concurrent GC\&. The default value depends on the number of CPUs available to the JVM\&.
-
+.sp
For example, to set the number of threads for concurrent GC to 2, specify the following option:
-.sp
-.nf
-\f3\-XX:ConcGCThreads=2\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:+DisableExplicitGC
-.br
-Enables the option that disables processing of calls to \f3System\&.gc()\fR\&. This option is disabled by default, meaning that calls to \f3System\&.gc()\fR are processed\&. If processing of calls to \f3System\&.gc()\fR is disabled, the JVM still performs GC when necessary\&.
-.TP
--XX:+ExplicitGCInvokesConcurrent
-.br
-Enables invoking of concurrent GC by using the \f3System\&.gc()\fR request\&. This option is disabled by default and can be enabled only together with the \f3-XX:+UseConcMarkSweepGC\fR option\&.
-.TP
--XX:+ExplicitGCInvokesConcurrentAndUnloadsClasses
-.br
-Enables invoking of concurrent GC by using the \f3System\&.gc()\fR request and unloading of classes during the concurrent GC cycle\&. This option is disabled by default and can be enabled only together with the \f3-XX:+UseConcMarkSweepGC\fR option\&.
-.TP
--XX:G1HeapRegionSize=\fIsize\fR
-.br
-Sets the size of the regions into which the Java heap is subdivided when using the garbage-first (G1) collector\&. The value can be between 1 MB and 32 MB\&. The default region size is determined ergonomically based on the heap size\&.
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:ConcGCThreads=2\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:+DisableExplicitGC
+.RS 4
+Enables the option that disables processing of calls to
+\fBSystem\&.gc()\fR\&. This option is disabled by default, meaning that calls to
+\fBSystem\&.gc()\fR
+are processed\&. If processing of calls to
+\fBSystem\&.gc()\fR
+is disabled, the JVM still performs GC when necessary\&.
+.RE
+.PP
+\-XX:+ExplicitGCInvokesConcurrent
+.RS 4
+Enables invoking of concurrent GC by using the
+\fBSystem\&.gc()\fR
+request\&. This option is disabled by default and can be enabled only together with the
+\fB\-XX:+UseConcMarkSweepGC\fR
+option\&.
+.RE
+.PP
+\-XX:+ExplicitGCInvokesConcurrentAndUnloadsClasses
+.RS 4
+Enables invoking of concurrent GC by using the
+\fBSystem\&.gc()\fR
+request and unloading of classes during the concurrent GC cycle\&. This option is disabled by default and can be enabled only together with the
+\fB\-XX:+UseConcMarkSweepGC\fR
+option\&.
+.RE
+.PP
+\-XX:G1HeapRegionSize=\fIsize\fR
+.RS 4
+Sets the size of the regions into which the Java heap is subdivided when using the garbage\-first (G1) collector\&. The value can be between 1 MB and 32 MB\&. The default region size is determined ergonomically based on the heap size\&.
+.sp
The following example shows how to set the size of the subdivisions to 16 MB:
-.sp
-.nf
-\f3\-XX:G1HeapRegionSize=16m\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:+G1PrintHeapRegions
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:G1HeapRegionSize=16m\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:+G1PrintHeapRegions
+.RS 4
Enables the printing of information about which regions are allocated and which are reclaimed by the G1 collector\&. By default, this option is disabled\&.
-.TP
--XX:G1ReservePercent=\fIpercent\fR
-.br
+.RE
+.PP
+\-XX:G1ReservePercent=\fIpercent\fR
+.RS 4
Sets the percentage of the heap (0 to 50) that is reserved as a false ceiling to reduce the possibility of promotion failure for the G1 collector\&. By default, this option is set to 10%\&.
-
+.sp
The following example shows how to set the reserved heap to 20%:
-.sp
-.nf
-\f3\-XX:G1ReservePercent=20\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:InitialHeapSize=\fIsize\fR
-.br
-Sets the initial size (in bytes) of the memory allocation pool\&. This value must be either 0, or a multiple of 1024 and greater than 1 MB\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. The default value is chosen at runtime based on system configuration\&. For more information, see Garbage Collector Ergonomics at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/gc-ergonomics\&.html
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:G1ReservePercent=20\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:InitialHeapSize=\fIsize\fR
+.RS 4
+Sets the initial size (in bytes) of the memory allocation pool\&. This value must be either 0, or a multiple of 1024 and greater than 1 MB\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. The default value is chosen at runtime based on system configuration\&. For more information, see Garbage Collector Ergonomics at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/gc\-ergonomics\&.html
+.sp
The following examples show how to set the size of allocated memory to 6 MB using various units:
-.sp
-.nf
-\f3\-XX:InitialHeapSize=6291456\fP
-.fi
-.nf
-\f3\-XX:InitialHeapSize=6144k\fP
-.fi
-.nf
-\f3\-XX:InitialHeapSize=6m\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-If you set this option to 0, then the initial size will be set as the sum of the sizes allocated for the old generation and the young generation\&. The size of the heap for the young generation can be set using the \f3-XX:NewSize\fR option\&.
-.TP
--XX:InitialSurvivorRatio=\fIratio\fR
-.br
-Sets the initial survivor space ratio used by the throughput garbage collector (which is enabled by the \f3-XX:+UseParallelGC\fR and/or -\f3XX:+UseParallelOldGC\fR options)\&. Adaptive sizing is enabled by default with the throughput garbage collector by using the \f3-XX:+UseParallelGC\fR and \f3-XX:+UseParallelOldGC\fR options, and survivor space is resized according to the application behavior, starting with the initial value\&. If adaptive sizing is disabled (using the \f3-XX:-UseAdaptiveSizePolicy\fR option), then the \f3-XX:SurvivorRatio\fR option should be used to set the size of the survivor space for the entire execution of the application\&.
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:InitialHeapSize=6291456\fR
+\fB\-XX:InitialHeapSize=6144k\fR
+\fB\-XX:InitialHeapSize=6m\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+If you set this option to 0, then the initial size will be set as the sum of the sizes allocated for the old generation and the young generation\&. The size of the heap for the young generation can be set using the
+\fB\-XX:NewSize\fR
+option\&.
+.RE
+.PP
+\-XX:InitialSurvivorRatio=\fIratio\fR
+.RS 4
+Sets the initial survivor space ratio used by the throughput garbage collector (which is enabled by the
+\fB\-XX:+UseParallelGC\fR
+and/or \-\fBXX:+UseParallelOldGC\fR
+options)\&. Adaptive sizing is enabled by default with the throughput garbage collector by using the
+\fB\-XX:+UseParallelGC\fR
+and
+\fB\-XX:+UseParallelOldGC\fR
+options, and survivor space is resized according to the application behavior, starting with the initial value\&. If adaptive sizing is disabled (using the
+\fB\-XX:\-UseAdaptiveSizePolicy\fR
+option), then the
+\fB\-XX:SurvivorRatio\fR
+option should be used to set the size of the survivor space for the entire execution of the application\&.
+.sp
The following formula can be used to calculate the initial size of survivor space (S) based on the size of the young generation (Y), and the initial survivor space ratio (R):
-.sp
-.nf
-\f3S=Y/(R+2)\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBS=Y/(R+2)\fR
+
+.fi
+.if n \{\
+.RE
+.\}
The 2 in the equation denotes two survivor spaces\&. The larger the value specified as the initial survivor space ratio, the smaller the initial survivor space size\&.
-
+.sp
By default, the initial survivor space ratio is set to 8\&. If the default value for the young generation space size is used (2 MB), the initial size of the survivor space will be 0\&.2 MB\&.
-
+.sp
The following example shows how to set the initial survivor space ratio to 4:
-.sp
-.nf
-\f3\-XX:InitialSurvivorRatio=4\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:InitiatingHeapOccupancyPercent=\fIpercent\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:InitialSurvivorRatio=4\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:InitiatingHeapOccupancyPercent=\fIpercent\fR
+.RS 4
Sets the percentage of the heap occupancy (0 to 100) at which to start a concurrent GC cycle\&. It is used by garbage collectors that trigger a concurrent GC cycle based on the occupancy of the entire heap, not just one of the generations (for example, the G1 garbage collector)\&.
-
+.sp
By default, the initiating value is set to 45%\&. A value of 0 implies nonstop GC cycles\&. The following example shows how to set the initiating heap occupancy to 75%:
-.sp
-.nf
-\f3\-XX:InitiatingHeapOccupancyPercent=75\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:MaxGCPauseMillis=\fItime\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:InitiatingHeapOccupancyPercent=75\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:MaxGCPauseMillis=\fItime\fR
+.RS 4
Sets a target for the maximum GC pause time (in milliseconds)\&. This is a soft goal, and the JVM will make its best effort to achieve it\&. By default, there is no maximum pause time value\&.
-
+.sp
The following example shows how to set the maximum target pause time to 500 ms:
-.sp
-.nf
-\f3\-XX:MaxGCPauseMillis=500\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:MaxHeapSize=\fIsize\fR
-.br
-Sets the maximum size (in byes) of the memory allocation pool\&. This value must be a multiple of 1024 and greater than 2 MB\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. The default value is chosen at runtime based on system configuration\&. For server deployments, \f3-XX:InitialHeapSize\fR and \f3-XX:MaxHeapSize\fR are often set to the same value\&. For more information, see Garbage Collector Ergonomics at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/gc-ergonomics\&.html
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:MaxGCPauseMillis=500\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:MaxHeapSize=\fIsize\fR
+.RS 4
+Sets the maximum size (in byes) of the memory allocation pool\&. This value must be a multiple of 1024 and greater than 2 MB\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. The default value is chosen at runtime based on system configuration\&. For server deployments,
+\fB\-XX:InitialHeapSize\fR
+and
+\fB\-XX:MaxHeapSize\fR
+are often set to the same value\&. For more information, see Garbage Collector Ergonomics at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/gc\-ergonomics\&.html
+.sp
The following examples show how to set the maximum allowed size of allocated memory to 80 MB using various units:
-.sp
-.nf
-\f3\-XX:MaxHeapSize=83886080\fP
-.fi
-.nf
-\f3\-XX:MaxHeapSize=81920k\fP
-.fi
-.nf
-\f3\-XX:MaxHeapSize=80m\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:MaxHeapSize=83886080\fR
+\fB\-XX:MaxHeapSize=81920k\fR
+\fB\-XX:MaxHeapSize=80m\fR
+
+.fi
+.if n \{\
+.RE
+.\}
On Oracle Solaris 7 and Oracle Solaris 8 SPARC platforms, the upper limit for this value is approximately 4,000 MB minus overhead amounts\&. On Oracle Solaris 2\&.6 and x86 platforms, the upper limit is approximately 2,000 MB minus overhead amounts\&. On Linux platforms, the upper limit is approximately 2,000 MB minus overhead amounts\&.
-
-The \f3-XX:MaxHeapSize\fR option is equivalent to \f3-Xmx\fR\&.
-.TP
--XX:MaxHeapFreeRatio=\fIpercent\fR
-.br
+.sp
+The
+\fB\-XX:MaxHeapSize\fR
+option is equivalent to
+\fB\-Xmx\fR\&.
+.RE
+.PP
+\-XX:MaxHeapFreeRatio=\fIpercent\fR
+.RS 4
Sets the maximum allowed percentage of free heap space (0 to 100) after a GC event\&. If free heap space expands above this value, then the heap will be shrunk\&. By default, this value is set to 70%\&.
-
+.sp
The following example shows how to set the maximum free heap ratio to 75%:
-.sp
-.nf
-\f3\-XX:MaxHeapFreeRatio=75\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:MaxMetaspaceSize=\fIsize\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:MaxHeapFreeRatio=75\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:MaxMetaspaceSize=\fIsize\fR
+.RS 4
Sets the maximum amount of native memory that can be allocated for class metadata\&. By default, the size is not limited\&. The amount of metadata for an application depends on the application itself, other running applications, and the amount of memory available on the system\&.
-
+.sp
The following example shows how to set the maximum class metadata size to 256 MB:
-.sp
-.nf
-\f3\-XX:MaxMetaspaceSize=256m\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:MaxNewSize=\fIsize\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:MaxMetaspaceSize=256m\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:MaxNewSize=\fIsize\fR
+.RS 4
Sets the maximum size (in bytes) of the heap for the young generation (nursery)\&. The default value is set ergonomically\&.
-.TP
--XX:MaxTenuringThreshold=\fIthreshold\fR
-.br
+.RE
+.PP
+\-XX:MaxTenuringThreshold=\fIthreshold\fR
+.RS 4
Sets the maximum tenuring threshold for use in adaptive GC sizing\&. The largest value is 15\&. The default value is 15 for the parallel (throughput) collector, and 6 for the CMS collector\&.
-
+.sp
The following example shows how to set the maximum tenuring threshold to 10:
-.sp
-.nf
-\f3\-XX:MaxTenuringThreshold=10\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:MetaspaceSize=\fIsize\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:MaxTenuringThreshold=10\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:MetaspaceSize=\fIsize\fR
+.RS 4
Sets the size of the allocated class metadata space that will trigger a garbage collection the first time it is exceeded\&. This threshold for a garbage collection is increased or decreased depending on the amount of metadata used\&. The default size depends on the platform\&.
-.TP
--XX:MinHeapFreeRatio=\fIpercent\fR
-.br
+.RE
+.PP
+\-XX:MinHeapFreeRatio=\fIpercent\fR
+.RS 4
Sets the minimum allowed percentage of free heap space (0 to 100) after a GC event\&. If free heap space falls below this value, then the heap will be expanded\&. By default, this value is set to 40%\&.
-
+.sp
The following example shows how to set the minimum free heap ratio to 25%:
-.sp
-.nf
-\f3\-XX:MinHeapFreeRatio=25\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:NewRatio=\fIratio\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:MinHeapFreeRatio=25\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:NewRatio=\fIratio\fR
+.RS 4
Sets the ratio between young and old generation sizes\&. By default, this option is set to 2\&. The following example shows how to set the young/old ratio to 1:
-.sp
-.nf
-\f3\-XX:NewRatio=1\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:NewSize=\fIsize\fR
-.br
-Sets the initial size (in bytes) of the heap for the young generation (nursery)\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&.
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:NewRatio=1\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:NewSize=\fIsize\fR
+.RS 4
+Sets the initial size (in bytes) of the heap for the young generation (nursery)\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&.
+.sp
The young generation region of the heap is used for new objects\&. GC is performed in this region more often than in other regions\&. If the size for the young generation is too low, then a large number of minor GCs will be performed\&. If the size is too high, then only full GCs will be performed, which can take a long time to complete\&. Oracle recommends that you keep the size for the young generation between a half and a quarter of the overall heap size\&.
-
+.sp
The following examples show how to set the initial size of young generation to 256 MB using various units:
-.sp
-.nf
-\f3\-XX:NewSize=256m\fP
-.fi
-.nf
-\f3\-XX:NewSize=262144k\fP
-.fi
-.nf
-\f3\-XX:NewSize=268435456\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-The \f3-XX:NewSize\fR option is equivalent to \f3-Xmn\fR\&.
-.TP
--XX:ParallelGCThreads=\fIthreads\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:NewSize=256m\fR
+\fB\-XX:NewSize=262144k\fR
+\fB\-XX:NewSize=268435456\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The
+\fB\-XX:NewSize\fR
+option is equivalent to
+\fB\-Xmn\fR\&.
+.RE
+.PP
+\-XX:ParallelGCThreads=\fIthreads\fR
+.RS 4
Sets the number of threads used for parallel garbage collection in the young and old generations\&. The default value depends on the number of CPUs available to the JVM\&.
-
+.sp
For example, to set the number of threads for parallel GC to 2, specify the following option:
-.sp
-.nf
-\f3\-XX:ParallelGCThreads=2\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:+ParallelRefProcEnabled
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:ParallelGCThreads=2\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:+ParallelRefProcEnabled
+.RS 4
Enables parallel reference processing\&. By default, this option is disabled\&.
-.TP
--XX:+PrintAdaptiveSizePolicy
-.br
+.RE
+.PP
+\-XX:+PrintAdaptiveSizePolicy
+.RS 4
Enables printing of information about adaptive generation sizing\&. By default, this option is disabled\&.
-.TP
--XX:+PrintGC
-.br
+.RE
+.PP
+\-XX:+PrintGC
+.RS 4
Enables printing of messages at every GC\&. By default, this option is disabled\&.
-.TP
--XX:+PrintGCApplicationConcurrentTime
-.br
+.RE
+.PP
+\-XX:+PrintGCApplicationConcurrentTime
+.RS 4
Enables printing of how much time elapsed since the last pause (for example, a GC pause)\&. By default, this option is disabled\&.
-.TP
--XX:+PrintGCApplicationStoppedTime
-.br
+.RE
+.PP
+\-XX:+PrintGCApplicationStoppedTime
+.RS 4
Enables printing of how much time the pause (for example, a GC pause) lasted\&. By default, this option is disabled\&.
-.TP
--XX+PrintGCDateStamp
-.br
+.RE
+.PP
+\-XX:+PrintGCDateStamps
+.RS 4
Enables printing of a date stamp at every GC\&. By default, this option is disabled\&.
-.TP
--XX:+PrintGCDetails
-.br
+.RE
+.PP
+\-XX:+PrintGCDetails
+.RS 4
Enables printing of detailed messages at every GC\&. By default, this option is disabled\&.
-.TP
--XX:+PrintGCTaskTimeStamps
-.br
+.RE
+.PP
+\-XX:+PrintGCTaskTimeStamps
+.RS 4
Enables printing of time stamps for every individual GC worker thread task\&. By default, this option is disabled\&.
-.TP
--XX:+PrintGCTimeStamp
-.br
+.RE
+.PP
+\-XX:+PrintGCTimeStamps
+.RS 4
Enables printing of time stamps at every GC\&. By default, this option is disabled\&.
-.TP
--XX:+PrintTenuringDistribution
-.br
+.RE
+.PP
+\-XX:+PrintStringDeduplicationStatistics
+.RS 4
+Prints detailed deduplication statistics\&. By default, this option is disabled\&. See the
+\fB\-XX:+UseStringDeduplication\fR
+option\&.
+.RE
+.PP
+\-XX:+PrintTenuringDistribution
+.RS 4
Enables printing of tenuring age information\&. The following is an example of the output:
-.sp
-.nf
-\f3Desired survivor size 48286924 bytes, new threshold 10 (max 10)\fP
-.fi
-.nf
-\f3\- age 1: 28992024 bytes, 28992024 total\fP
-.fi
-.nf
-\f3\- age 2: 1366864 bytes, 30358888 total\fP
-.fi
-.nf
-\f3\- age 3: 1425912 bytes, 31784800 total\fP
-.fi
-.nf
-\f3\&.\&.\&.\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBDesired survivor size 48286924 bytes, new threshold 10 (max 10)\fR
+\fB\- age 1: 28992024 bytes, 28992024 total\fR
+\fB\- age 2: 1366864 bytes, 30358888 total\fR
+\fB\- age 3: 1425912 bytes, 31784800 total\fR
+\fB\&.\&.\&.\fR
+
+.fi
+.if n \{\
+.RE
+.\}
Age 1 objects are the youngest survivors (they were created after the previous scavenge, survived the latest scavenge, and moved from eden to survivor space)\&. Age 2 objects have survived two scavenges (during the second scavenge they were copied from one survivor space to the next)\&. And so on\&.
-
+.sp
In the preceding example, 28 992 024 bytes survived one scavenge and were copied from eden to survivor space, 1 366 864 bytes are occupied by age 2 objects, etc\&. The third value in each row is the cumulative size of objects of age n or less\&.
-
+.sp
By default, this option is disabled\&.
-.TP
--XX:+ScavengeBeforeFullGC
-.br
-Enables GC of the young generation before each full GC\&. This option is enabled by default\&. Oracle recommends that you \fIdo not\fR disable it, because scavenging the young generation before a full GC can reduce the number of objects reachable from the old generation space into the young generation space\&. To disable GC of the young generation before each full GC, specify \f3-XX:-ScavengeBeforeFullGC\fR\&.
-.TP
--XX:SoftRefLRUPolicyMSPerMB=\fItime\fR
-.br
-Sets the amount of time (in milliseconds) a softly reachable object is kept active on the heap after the last time it was referenced\&. The default value is one second of lifetime per free megabyte in the heap\&. The \f3-XX:SoftRefLRUPolicyMSPerMB\fR option accepts integer values representing milliseconds per one megabyte of the current heap size (for Java HotSpot Client VM) or the maximum possible heap size (for Java HotSpot Server VM)\&. This difference means that the Client VM tends to flush soft references rather than grow the heap, whereas the Server VM tends to grow the heap rather than flush soft references\&. In the latter case, the value of the \f3-Xmx\fR option has a significant effect on how quickly soft references are garbage collected\&.
-
+.RE
+.PP
+\-XX:+ScavengeBeforeFullGC
+.RS 4
+Enables GC of the young generation before each full GC\&. This option is enabled by default\&. Oracle recommends that you
+\fIdo not\fR
+disable it, because scavenging the young generation before a full GC can reduce the number of objects reachable from the old generation space into the young generation space\&. To disable GC of the young generation before each full GC, specify
+\fB\-XX:\-ScavengeBeforeFullGC\fR\&.
+.RE
+.PP
+\-XX:SoftRefLRUPolicyMSPerMB=\fItime\fR
+.RS 4
+Sets the amount of time (in milliseconds) a softly reachable object is kept active on the heap after the last time it was referenced\&. The default value is one second of lifetime per free megabyte in the heap\&. The
+\fB\-XX:SoftRefLRUPolicyMSPerMB\fR
+option accepts integer values representing milliseconds per one megabyte of the current heap size (for Java HotSpot Client VM) or the maximum possible heap size (for Java HotSpot Server VM)\&. This difference means that the Client VM tends to flush soft references rather than grow the heap, whereas the Server VM tends to grow the heap rather than flush soft references\&. In the latter case, the value of the
+\fB\-Xmx\fR
+option has a significant effect on how quickly soft references are garbage collected\&.
+.sp
The following example shows how to set the value to 2\&.5 seconds:
-.sp
-.nf
-\f3\-XX:SoftRefLRUPolicyMSPerMB=2500\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:SurvivorRatio=\fIratio\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:SoftRefLRUPolicyMSPerMB=2500\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:StringDeduplicationAgeThreshold=\fIthreshold\fR
+.RS 4
+\fBString\fR
+objects reaching the specified age are considered candidates for deduplication\&. An object\*(Aqs age is a measure of how many times it has survived garbage collection\&. This is sometimes referred to as tenuring; see the
+\fB\-XX:+PrintTenuringDistribution\fR
+option\&. Note that
+\fBString\fR
+objects that are promoted to an old heap region before this age has been reached are always considered candidates for deduplication\&. The default value for this option is
+\fB3\fR\&. See the
+\fB\-XX:+UseStringDeduplication\fR
+option\&.
+.RE
+.PP
+\-XX:SurvivorRatio=\fIratio\fR
+.RS 4
Sets the ratio between eden space size and survivor space size\&. By default, this option is set to 8\&. The following example shows how to set the eden/survivor space ratio to 4:
-.sp
-.nf
-\f3\-XX:SurvivorRatio=4\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:TargetSurvivorRatio=\fIpercent\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:SurvivorRatio=4\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:TargetSurvivorRatio=\fIpercent\fR
+.RS 4
Sets the desired percentage of survivor space (0 to 100) used after young garbage collection\&. By default, this option is set to 50%\&.
-
+.sp
The following example shows how to set the target survivor space ratio to 30%:
-.sp
-.nf
-\f3\-XX:TargetSurvivorRatio=30\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:TLABSize=\fIsize\fR
-.br
-Sets the initial size (in bytes) of a thread-local allocation buffer (TLAB)\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. If this option is set to 0, then the JVM chooses the initial size automatically\&.
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:TargetSurvivorRatio=30\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:TLABSize=\fIsize\fR
+.RS 4
+Sets the initial size (in bytes) of a thread\-local allocation buffer (TLAB)\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. If this option is set to 0, then the JVM chooses the initial size automatically\&.
+.sp
The following example shows how to set the initial TLAB size to 512 KB:
-.sp
-.nf
-\f3\-XX:TLABSize=512k\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:+UseAdaptiveSizePolicy
-.br
-Enables the use of adaptive generation sizing\&. This option is enabled by default\&. To disable adaptive generation sizing, specify \f3-XX:-UseAdaptiveSizePolicy\fR and set the size of the memory allocation pool explicitly (see the \f3-XX:SurvivorRatio\fR option)\&.
-.TP
--XX:+UseCMSInitiatingOccupancyOnly
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:TLABSize=512k\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:+UseAdaptiveSizePolicy
+.RS 4
+Enables the use of adaptive generation sizing\&. This option is enabled by default\&. To disable adaptive generation sizing, specify
+\fB\-XX:\-UseAdaptiveSizePolicy\fR
+and set the size of the memory allocation pool explicitly (see the
+\fB\-XX:SurvivorRatio\fR
+option)\&.
+.RE
+.PP
+\-XX:+UseCMSInitiatingOccupancyOnly
+.RS 4
Enables the use of the occupancy value as the only criterion for initiating the CMS collector\&. By default, this option is disabled and other criteria may be used\&.
-.TP
--XX:+UseConcMarkSweepGC
-.br
-Enables the use of the CMS garbage collector for the old generation\&. Oracle recommends that you use the CMS garbage collector when application latency requirements cannot be met by the throughput (\f3-XX:+UseParallelGC\fR) garbage collector\&. The G1 garbage collector (\f3-XX:+UseG1GC\fR) is another alternative\&.
-
-By default, this option is disabled and the collector is chosen automatically based on the configuration of the machine and type of the JVM\&. When this option is enabled, the \f3-XX:+UseParNewGC\fR option is automatically set and you should not disable it, because the following combination of options has been deprecated in JDK 8: \f3-XX:+UseConcMarkSweepGC -XX:-UseParNewGC\fR\&.
-.TP
--XX:+UseG1GC
-.br
-Enables the use of the G1 garbage collector\&. It is a server-style garbage collector, targeted for multiprocessor machines with a large amount of RAM\&. It meets GC pause time goals with high probability, while maintaining good throughput\&. The G1 collector is recommended for applications requiring large heaps (sizes of around 6 GB or larger) with limited GC latency requirements (stable and predictable pause time below 0\&.5 seconds)\&.
-
+.RE
+.PP
+\-XX:+UseConcMarkSweepGC
+.RS 4
+Enables the use of the CMS garbage collector for the old generation\&. Oracle recommends that you use the CMS garbage collector when application latency requirements cannot be met by the throughput (\fB\-XX:+UseParallelGC\fR) garbage collector\&. The G1 garbage collector (\fB\-XX:+UseG1GC\fR) is another alternative\&.
+.sp
+By default, this option is disabled and the collector is chosen automatically based on the configuration of the machine and type of the JVM\&. When this option is enabled, the
+\fB\-XX:+UseParNewGC\fR
+option is automatically set and you should not disable it, because the following combination of options has been deprecated in JDK 8:
+\fB\-XX:+UseConcMarkSweepGC \-XX:\-UseParNewGC\fR\&.
+.RE
+.PP
+\-XX:+UseG1GC
+.RS 4
+Enables the use of the garbage\-first (G1) garbage collector\&. It is a server\-style garbage collector, targeted for multiprocessor machines with a large amount of RAM\&. It meets GC pause time goals with high probability, while maintaining good throughput\&. The G1 collector is recommended for applications requiring large heaps (sizes of around 6 GB or larger) with limited GC latency requirements (stable and predictable pause time below 0\&.5 seconds)\&.
+.sp
By default, this option is disabled and the collector is chosen automatically based on the configuration of the machine and type of the JVM\&.
-.TP
--XX:+UseGCOverheadLimit
-.br
-Enables the use of a policy that limits the proportion of time spent by the JVM on GC before an \f3OutOfMemoryError\fR exception is thrown\&. This option is enabled, by default and the parallel GC will throw an \f3OutOfMemoryError\fR if more than 98% of the total time is spent on garbage collection and less than 2% of the heap is recovered\&. When the heap is small, this feature can be used to prevent applications from running for long periods of time with little or no progress\&. To disable this option, specify \f3-XX:-UseGCOverheadLimit\fR\&.
-.TP
--XX:+UseNUMA
-.br
-Enables performance optimization of an application on a machine with nonuniform memory architecture (NUMA) by increasing the application\&'s use of lower latency memory\&. By default, this option is disabled and no optimization for NUMA is made\&. The option is only available when the parallel garbage collector is used (\f3-XX:+UseParallelGC\fR)\&.
-.TP
--XX:+UseParallelGC
-.br
+.RE
+.PP
+\-XX:+UseGCOverheadLimit
+.RS 4
+Enables the use of a policy that limits the proportion of time spent by the JVM on GC before an
+\fBOutOfMemoryError\fR
+exception is thrown\&. This option is enabled, by default and the parallel GC will throw an
+\fBOutOfMemoryError\fR
+if more than 98% of the total time is spent on garbage collection and less than 2% of the heap is recovered\&. When the heap is small, this feature can be used to prevent applications from running for long periods of time with little or no progress\&. To disable this option, specify
+\fB\-XX:\-UseGCOverheadLimit\fR\&.
+.RE
+.PP
+\-XX:+UseNUMA
+.RS 4
+Enables performance optimization of an application on a machine with nonuniform memory architecture (NUMA) by increasing the application\*(Aqs use of lower latency memory\&. By default, this option is disabled and no optimization for NUMA is made\&. The option is only available when the parallel garbage collector is used (\fB\-XX:+UseParallelGC\fR)\&.
+.RE
+.PP
+\-XX:+UseParallelGC
+.RS 4
Enables the use of the parallel scavenge garbage collector (also known as the throughput collector) to improve the performance of your application by leveraging multiple processors\&.
-
-By default, this option is disabled and the collector is chosen automatically based on the configuration of the machine and type of the JVM\&. If it is enabled, then the \f3-XX:+UseParallelOldGC\fR option is automatically enabled, unless you explicitly disable it\&.
-.TP
--XX:+UseParallelOldGC
-.br
-Enables the use of the parallel garbage collector for full GCs\&. By default, this option is disabled\&. Enabling it automatically enables the \f3-XX:+UseParallelGC\fR option\&.
-.TP
--XX:+UseParNewGC
-.br
-Enables the use of parallel threads for collection in the young generation\&. By default, this option is disabled\&. It is automatically enabled when you set the \f3-XX:+UseConcMarkSweepGC\fR option\&. Using the \f3-XX:+UseParNewGC\fR option without the \f3-XX:+UseConcMarkSweepGC\fR option was deprecated in JDK 8\&.
-.TP
--XX:+UseSerialGC
-.br
+.sp
+By default, this option is disabled and the collector is chosen automatically based on the configuration of the machine and type of the JVM\&. If it is enabled, then the
+\fB\-XX:+UseParallelOldGC\fR
+option is automatically enabled, unless you explicitly disable it\&.
+.RE
+.PP
+\-XX:+UseParallelOldGC
+.RS 4
+Enables the use of the parallel garbage collector for full GCs\&. By default, this option is disabled\&. Enabling it automatically enables the
+\fB\-XX:+UseParallelGC\fR
+option\&.
+.RE
+.PP
+\-XX:+UseParNewGC
+.RS 4
+Enables the use of parallel threads for collection in the young generation\&. By default, this option is disabled\&. It is automatically enabled when you set the
+\fB\-XX:+UseConcMarkSweepGC\fR
+option\&. Using the
+\fB\-XX:+UseParNewGC\fR
+option without the
+\fB\-XX:+UseConcMarkSweepGC\fR
+option was deprecated in JDK 8\&.
+.RE
+.PP
+\-XX:+UseSerialGC
+.RS 4
Enables the use of the serial garbage collector\&. This is generally the best choice for small and simple applications that do not require any special functionality from garbage collection\&. By default, this option is disabled and the collector is chosen automatically based on the configuration of the machine and type of the JVM\&.
-.TP
--XX:+UseTLAB
-.br
-Enables the use of thread-local allocation blocks (TLABs) in the young generation space\&. This option is enabled by default\&. To disable the use of TLABs, specify \f3-XX:-UseTLAB\fR\&.
-.SS DEPRECATED\ AND\ REMOVED\ OPTIONS
+.RE
+.PP
+\-XX:+UseStringDeduplication
+.RS 4
+Enables string deduplication\&. By default, this option is disabled\&. To use this option, you must enable the garbage\-first (G1) garbage collector\&. See the
+\fB\-XX:+UseG1GC\fR
+option\&.
+.sp
+\fIString deduplication\fR
+reduces the memory footprint of
+\fBString\fR
+objects on the Java heap by taking advantage of the fact that many
+\fBString\fR
+objects are identical\&. Instead of each
+\fBString\fR
+object pointing to its own character array, identical
+\fBString\fR
+objects can point to and share the same character array\&.
+.RE
+.PP
+\-XX:+UseTLAB
+.RS 4
+Enables the use of thread\-local allocation blocks (TLABs) in the young generation space\&. This option is enabled by default\&. To disable the use of TLABs, specify
+\fB\-XX:\-UseTLAB\fR\&.
+.RE
+.SS "Deprecated and Removed Options"
+.PP
These options were included in the previous release, but have since been considered unnecessary\&.
-.TP
--Xincgc
-.br
+.PP
+\-Xincgc
+.RS 4
Enables incremental garbage collection\&. This option was deprecated in JDK 8 with no replacement\&.
-.TP
--Xrun\fIlibname\fR
-.br
-Loads the specified debugging/profiling library\&. This option was superseded by the \f3-agentlib\fR option\&.
-.TP
--XX:CMSIncrementalDutyCycle=\fIpercent\fR
-.br
-Sets the percentage of time (0 to 100) between minor collections that the concurrent collector is allowed to run\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the \f3-XX:+CMSIncrementalMode\fR option\&.
-.TP
--XX:CMSIncrementalDutyCycleMin=\fIpercent\fR
-.br
-Sets the percentage of time (0 to 100) between minor collections that is the lower bound for the duty cycle when \f3-XX:+CMSIncrementalPacing\fR is enabled\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the \f3-XX:+CMSIncrementalMode\fR option\&.
-.TP
--XX:+CMSIncrementalMode
-.br
-Enables the incremental mode for the CMS collector\&. This option was deprecated in JDK 8 with no replacement, along with other options that start with \f3CMSIncremental\fR\&.
-.TP
--XX:CMSIncrementalOffset=\fIpercent\fR
-.br
-Sets the percentage of time (0 to 100) by which the incremental mode duty cycle is shifted to the right within the period between minor collections\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the \f3-XX:+CMSIncrementalMode\fR option\&.
-.TP
--XX:+CMSIncrementalPacing
-.br
-Enables automatic adjustment of the incremental mode duty cycle based on statistics collected while the JVM is running\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the \f3-XX:+CMSIncrementalMode\fR option\&.
-.TP
--XX:CMSIncrementalSafetyFactor=\fIpercent\fR
-.br
-Sets the percentage of time (0 to 100) used to add conservatism when computing the duty cycle\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the \f3-XX:+CMSIncrementalMode\fR option\&.
-.TP
--XX:CMSInitiatingPermOccupancyFraction=\fIpercent\fR
-.br
+.RE
+.PP
+\-Xrun\fIlibname\fR
+.RS 4
+Loads the specified debugging/profiling library\&. This option was superseded by the
+\fB\-agentlib\fR
+option\&.
+.RE
+.PP
+\-XX:CMSIncrementalDutyCycle=\fIpercent\fR
+.RS 4
+Sets the percentage of time (0 to 100) between minor collections that the concurrent collector is allowed to run\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the
+\fB\-XX:+CMSIncrementalMode\fR
+option\&.
+.RE
+.PP
+\-XX:CMSIncrementalDutyCycleMin=\fIpercent\fR
+.RS 4
+Sets the percentage of time (0 to 100) between minor collections that is the lower bound for the duty cycle when
+\fB\-XX:+CMSIncrementalPacing\fR
+is enabled\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the
+\fB\-XX:+CMSIncrementalMode\fR
+option\&.
+.RE
+.PP
+\-XX:+CMSIncrementalMode
+.RS 4
+Enables the incremental mode for the CMS collector\&. This option was deprecated in JDK 8 with no replacement, along with other options that start with
+\fBCMSIncremental\fR\&.
+.RE
+.PP
+\-XX:CMSIncrementalOffset=\fIpercent\fR
+.RS 4
+Sets the percentage of time (0 to 100) by which the incremental mode duty cycle is shifted to the right within the period between minor collections\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the
+\fB\-XX:+CMSIncrementalMode\fR
+option\&.
+.RE
+.PP
+\-XX:+CMSIncrementalPacing
+.RS 4
+Enables automatic adjustment of the incremental mode duty cycle based on statistics collected while the JVM is running\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the
+\fB\-XX:+CMSIncrementalMode\fR
+option\&.
+.RE
+.PP
+\-XX:CMSIncrementalSafetyFactor=\fIpercent\fR
+.RS 4
+Sets the percentage of time (0 to 100) used to add conservatism when computing the duty cycle\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the
+\fB\-XX:+CMSIncrementalMode\fR
+option\&.
+.RE
+.PP
+\-XX:CMSInitiatingPermOccupancyFraction=\fIpercent\fR
+.RS 4
Sets the percentage of the permanent generation occupancy (0 to 100) at which to start a GC\&. This option was deprecated in JDK 8 with no replacement\&.
-.TP
--XX:MaxPermSize=\fIsize\fR
-.br
-Sets the maximum permanent generation space size (in bytes)\&. This option was deprecated in JDK 8, and superseded by the \f3-XX:MaxMetaspaceSize\fR option\&.
-.TP
--XX:PermSize=\fIsize\fR
-.br
-Sets the space (in bytes) allocated to the permanent generation that triggers a garbage collection if it is exceeded\&. This option was deprecated un JDK 8, and superseded by the \f3-XX:MetaspaceSize\fR option\&.
-.TP
--XX:+UseSplitVerifier
-.br
+.RE
+.PP
+\-XX:MaxPermSize=\fIsize\fR
+.RS 4
+Sets the maximum permanent generation space size (in bytes)\&. This option was deprecated in JDK 8, and superseded by the
+\fB\-XX:MaxMetaspaceSize\fR
+option\&.
+.RE
+.PP
+\-XX:PermSize=\fIsize\fR
+.RS 4
+Sets the space (in bytes) allocated to the permanent generation that triggers a garbage collection if it is exceeded\&. This option was deprecated un JDK 8, and superseded by the
+\fB\-XX:MetaspaceSize\fR
+option\&.
+.RE
+.PP
+\-XX:+UseSplitVerifier
+.RS 4
Enables splitting of the verification process\&. By default, this option was enabled in the previous releases, and verification was split into two phases: type referencing (performed by the compiler) and type checking (performed by the JVM runtime)\&. This option was deprecated in JDK 8, and verification is now split by default without a way to disable it\&.
-.TP
--XX:+UseStringCache
-.br
+.RE
+.PP
+\-XX:+UseStringCache
+.RS 4
Enables caching of commonly allocated strings\&. This option was removed from JDK 8 with no replacement\&.
-.SH PERFORMANCE\ TUNING\ EXAMPLES
+.RE
+.SH "PERFORMANCE TUNING EXAMPLES"
+.PP
The following examples show how to use experimental tuning flags to either optimize throughput or to provide lower response time\&.
.PP
-\f3Example 1 Tuning for Higher Throughput\fR
-.sp
-.nf
-\f3java \-d64 \-server \-XX:+AggressiveOpts \-XX:+UseLargePages \-Xmn10g \-Xms26g \-Xmx26g\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-\f3Example 2 Tuning for Lower Response Time\fR
-.sp
-.nf
-\f3java \-d64 \-XX:+UseG1GC \-Xms26g Xmx26g \-XX:MaxGCPauseMillis=500 \-XX:+PrintGCTimeStamp\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-.SH EXIT\ STATUS
-The following exit values are typically returned by the launcher when the launcher is called with the wrong arguments, serious errors, or exceptions thrown by the JVM\&. However, a Java application may choose to return any value by using the API call \f3System\&.exit(exitValue)\fR\&. The values are:
-.TP 0.2i
-\(bu
-\f30\fR: Successful completion
-.TP 0.2i
-\(bu
-\f3>0\fR: An error occurred
-.SH SEE\ ALSO
-.TP 0.2i
-\(bu
+\fBExample 1\fR
+.br
+Tuning for Higher Throughput
+.RS 4
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjava \-d64 \-server \-XX:+AggressiveOpts \-XX:+UseLargePages \-Xmn10g \-Xms26g \-Xmx26g\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBExample 2\fR
+.br
+Tuning for Lower Response Time
+.RS 4
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjava \-d64 \-XX:+UseG1GC \-Xms26g Xmx26g \-XX:MaxGCPauseMillis=500 \-XX:+PrintGCTimeStamp\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.SH "EXIT STATUS"
+.PP
+The following exit values are typically returned by the launcher when the launcher is called with the wrong arguments, serious errors, or exceptions thrown by the JVM\&. However, a Java application may choose to return any value by using the API call
+\fBSystem\&.exit(exitValue)\fR\&. The values are:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fB0\fR: Successful completion
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fB>0\fR: An error occurred
+.RE
+.SH "SEE ALSO"
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
javac(1)
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
jdb(1)
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
javah(1)
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
jar(1)
-.RE
-.br
-'pl 8.5i
-'bp
+.RE
+.br
+'pl 8.5i
+'bp
diff --git a/src/linux/doc/man/javac.1 b/src/linux/doc/man/javac.1
index 3cbc97614..a3d55e275 100644
--- a/src/linux/doc/man/javac.1
+++ b/src/linux/doc/man/javac.1
@@ -1,1364 +1,2116 @@
'\" t
-.\" Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
-.\"
-.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-.\"
-.\" This code is free software; you can redistribute it and/or modify it
-.\" under the terms of the GNU General Public License version 2 only, as
-.\" published by the Free Software Foundation.
-.\"
-.\" 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.
-.\"
-.\" Arch: generic
-.\" Software: JDK 8
-.\" Date: 21 November 2013
-.\" SectDesc: Basic Tools
-.\" Title: javac.1
+.\" Copyright (c) 1994, 2014, Oracle and/or its affiliates. All rights reserved.
+.\"
+.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+.\"
+.\" This code is free software; you can redistribute it and/or modify it
+.\" under the terms of the GNU General Public License version 2 only, as
+.\" published by the Free Software Foundation.
+.\"
+.\" 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.
+.\"
+.\" Title: javac
+.\" Language: English
+.\" Date: 8 August 2014
+.\" SectDesc: Basic Tools
+.\" Software: JDK 8
+.\" Arch: generic
+.\" Part Number: E38207-03
.\"
.if n .pl 99999
-.TH javac 1 "21 November 2013" "JDK 8" "Basic Tools"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-
-.SH NAME
+.TH "javac" "1" "8 August 2014" "JDK 8" "Basic Tools"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
javac \- Reads Java class and interface definitions and compiles them into bytecode and class files\&.
-.SH SYNOPSIS
-.sp
-.nf
-
+.SH "SYNOPSIS"
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
\fBjavac\fR [ \fIoptions\fR ] [ \fIsourcefiles\fR ] [ \fIclasses\fR] [ \fI@argfiles\fR ]
-.fi
-.sp
+.fi
+.if n \{\
+.RE
+.\}
+.PP
Arguments can be in any order:
-.TP
+.PP
\fIoptions\fR
-Command-line options\&. See Options\&.
-.TP
+.RS 4
+Command\-line options\&. See Options\&.
+.RE
+.PP
\fIsourcefiles\fR
-One or more source files to be compiled (such as \f3MyClass\&.java\fR)\&.
-.TP
+.RS 4
+One or more source files to be compiled (such as
+\fBMyClass\&.java\fR)\&.
+.RE
+.PP
\fIclasses\fR
-One or more classes to be processed for annotations (such as \f3MyPackage\&.MyClass\fR)\&.
-.TP
+.RS 4
+One or more classes to be processed for annotations (such as
+\fBMyPackage\&.MyClass\fR)\&.
+.RE
+.PP
\fI@argfiles\fR
-One or more files that list options and source files\&. The \f3-J\fR options are not allowed in these files\&. See Command-Line Argument Files\&.
-.SH DESCRIPTION
-The \f3javac\fR command reads class and interface definitions, written in the Java programming language, and compiles them into bytecode class files\&. The \f3javac\fR command can also process annotations in Java source files and classes\&.
+.RS 4
+One or more files that list options and source files\&. The
+\fB\-J\fR
+options are not allowed in these files\&. See Command\-Line Argument Files\&.
+.RE
+.SH "DESCRIPTION"
+.PP
+The
+\fBjavac\fR
+command reads class and interface definitions, written in the Java programming language, and compiles them into bytecode class files\&. The
+\fBjavac\fR
+command can also process annotations in Java source files and classes\&.
.PP
-There are two ways to pass source code file names to \f3javac\fR\&.
-.TP 0.2i
-\(bu
+There are two ways to pass source code file names to
+\fBjavac\fR\&.
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
For a small number of source files, list the file names on the command line\&.
-.TP 0.2i
-\(bu
-For a large number of source files, list the file names in a file that is separated by blanks or line breaks\&. Use the list file name preceded by an at sign (@) with the \f3javac\fR command\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+For a large number of source files, list the file names in a file that is separated by blanks or line breaks\&. Use the list file name preceded by an at sign (@) with the
+\fBjavac\fR
+command\&.
+.RE
.PP
-Source code file names must have \&.java suffixes, class file names must have \&.class suffixes, and both source and class files must have root names that identify the class\&. For example, a class called \f3MyClass\fR would be written in a source file called \f3MyClass\&.java\fR and compiled into a bytecode class file called \f3MyClass\&.class\fR\&.
+Source code file names must have \&.java suffixes, class file names must have \&.class suffixes, and both source and class files must have root names that identify the class\&. For example, a class called
+\fBMyClass\fR
+would be written in a source file called
+\fBMyClass\&.java\fR
+and compiled into a bytecode class file called
+\fBMyClass\&.class\fR\&.
.PP
-Inner class definitions produce additional class files\&. These class files have names that combine the inner and outer class names, such as \f3MyClass$MyInnerClass\&.class\fR\&.
+Inner class definitions produce additional class files\&. These class files have names that combine the inner and outer class names, such as
+\fBMyClass$MyInnerClass\&.class\fR\&.
.PP
-Arrange source files in a directory tree that reflects their package tree\&. For example, if all of your source files are in \f3/workspace\fR, then put the source code for \f3com\&.mysoft\&.mypack\&.MyClass\fR in \f3/workspace/com/mysoft/mypack/MyClass\&.java\fR\&.
+Arrange source files in a directory tree that reflects their package tree\&. For example, if all of your source files are in
+\fB/workspace\fR, then put the source code for
+\fBcom\&.mysoft\&.mypack\&.MyClass\fR
+in
+\fB/workspace/com/mysoft/mypack/MyClass\&.java\fR\&.
.PP
-By default, the compiler puts each class file in the same directory as its source file\&. You can specify a separate destination directory with the \f3-d\fR option\&.
-.SH OPTIONS
-The compiler has a set of standard options that are supported on the current development environment\&. An additional set of nonstandard options are specific to the current virtual machine and compiler implementations and are subject to change in the future\&. Nonstandard options begin with the \f3-X\fR option\&.
-.TP 0.2i
-\(bu
-See also Cross-Compilation Options
-.TP 0.2i
-\(bu
+By default, the compiler puts each class file in the same directory as its source file\&. You can specify a separate destination directory with the
+\fB\-d\fR
+option\&.
+.SH "OPTIONS"
+.PP
+The compiler has a set of standard options that are supported on the current development environment\&. An additional set of nonstandard options are specific to the current virtual machine and compiler implementations and are subject to change in the future\&. Nonstandard options begin with the
+\fB\-X\fR
+option\&.
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+See also Cross\-Compilation Options
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
See also Nonstandard Options
-.SS STANDARD\ OPTIONS
-.TP
--A\fIkey\fR[\fI=value\fR]
-.br
-Specifies options to pass to annotation processors\&. These options are not interpreted by \f3javac\fR directly, but are made available for use by individual processors\&. The \f3key\fR value should be one or more identifiers separated by a dot (\&.)\&.
-.TP
--cp \fIpath\fR or -classpath \fIpath\fR
-.br
-Specifies where to find user class files, and (optionally) annotation processors and source files\&. This class path overrides the user class path in the \f3CLASSPATH\fR environment variable\&. If neither \f3CLASSPATH\fR, \f3-cp\fR nor \f3-classpath\fR is specified, then the user \fIclass path\fR is the current directory\&. See Setting the Class Path\&.
-
-If the \f3-sourcepath\fR option is not specified, then the user class path is also searched for source files\&.
-
-If the \f3-processorpath\fR option is not specified, then the class path is also searched for annotation processors\&.
-.TP
--Djava\&.ext\&.dirs=\fIdirectories\fR
-.br
+.RE
+.SS "Standard Options"
+.PP
+\-A\fIkey\fR[\fI=value\fR]
+.RS 4
+Specifies options to pass to annotation processors\&. These options are not interpreted by
+\fBjavac\fR
+directly, but are made available for use by individual processors\&. The
+\fBkey\fR
+value should be one or more identifiers separated by a dot (\&.)\&.
+.RE
+.PP
+\-cp \fIpath\fR or \-classpath \fIpath\fR
+.RS 4
+Specifies where to find user class files, and (optionally) annotation processors and source files\&. This class path overrides the user class path in the
+\fBCLASSPATH\fR
+environment variable\&. If neither
+\fBCLASSPATH\fR,
+\fB\-cp\fR
+nor
+\fB\-classpath\fR
+is specified, then the user
+\fIclass path\fR
+is the current directory\&. See Setting the Class Path \&.
+.sp
+If the
+\fB\-sourcepath\fR
+option is not specified, then the user class path is also searched for source files\&.
+.sp
+If the
+\fB\-processorpath\fR
+option is not specified, then the class path is also searched for annotation processors\&.
+.RE
+.PP
+\-Djava\&.ext\&.dirs=\fIdirectories\fR
+.RS 4
Overrides the location of installed extensions\&.
-.TP
--Djava\&.endorsed\&.dirs=\fIdirectories\fR
-.br
+.RE
+.PP
+\-Djava\&.endorsed\&.dirs=\fIdirectories\fR
+.RS 4
Overrides the location of the endorsed standards path\&.
-.TP
--d \fIdirectory\fR
-.br
-Sets the destination directory for class files\&. The directory must already exist because \f3javac\fR does not create it\&. If a class is part of a package, then \f3javac\fR puts the class file in a subdirectory that reflects the package name and creates directories as needed\&.
-
-If you specify \f3-d\fR\f3/home/myclasses\fR and the class is called \f3com\&.mypackage\&.MyClass\fR, then the class file is \f3/home/myclasses/com/mypackage/MyClass\&.class\fR\&.
-
-If the \fI-d\fR option is not specified, then \f3javac\fR puts each class file in the same directory as the source file from which it was generated\&.
-
-\fINote:\fR The directory specified by the \fI-d\fR option is not automatically added to your user class path\&.
-.TP
--deprecation
-.br
-Shows a description of each use or override of a deprecated member or class\&. Without the \f3-deprecation\fR option, \f3javac\fR shows a summary of the source files that use or override deprecated members or classes\&. The \f3-deprecation\fR option is shorthand for \f3-Xlint:deprecation\fR\&.
-.TP
--encoding \fIencoding\fR
-.br
-Sets the source file encoding name, such as EUC-JP and UTF-8\&. If the \f3-encoding\fR option is not specified, then the platform default converter is used\&.
-.TP
--endorseddirs \fIdirectories\fR
-.br
+.RE
+.PP
+\-d \fIdirectory\fR
+.RS 4
+Sets the destination directory for class files\&. The directory must already exist because
+\fBjavac\fR
+does not create it\&. If a class is part of a package, then
+\fBjavac\fR
+puts the class file in a subdirectory that reflects the package name and creates directories as needed\&.
+.sp
+If you specify
+\fB\-d\fR
+\fB/home/myclasses\fR
+and the class is called
+\fBcom\&.mypackage\&.MyClass\fR, then the class file is
+\fB/home/myclasses/com/mypackage/MyClass\&.class\fR\&.
+.sp
+If the
+\fI\-d\fR
+option is not specified, then
+\fBjavac\fR
+puts each class file in the same directory as the source file from which it was generated\&.
+.sp
+\fBNote:\fR
+The directory specified by the
+\fI\-d\fR
+option is not automatically added to your user class path\&.
+.RE
+.PP
+\-deprecation
+.RS 4
+Shows a description of each use or override of a deprecated member or class\&. Without the
+\fB\-deprecation\fR
+option,
+\fBjavac\fR
+shows a summary of the source files that use or override deprecated members or classes\&. The
+\fB\-deprecation\fR
+option is shorthand for
+\fB\-Xlint:deprecation\fR\&.
+.RE
+.PP
+\-encoding \fIencoding\fR
+.RS 4
+Sets the source file encoding name, such as EUC\-JP and UTF\-8\&. If the
+\fB\-encoding\fR
+option is not specified, then the platform default converter is used\&.
+.RE
+.PP
+\-endorseddirs \fIdirectories\fR
+.RS 4
Overrides the location of the endorsed standards path\&.
-.TP
--extdirs \fIdirectories\fR
-.br
-Overrides the location of the \f3ext\fR directory\&. The directories variable is a colon-separated list of directories\&. Each JAR file in the specified directories is searched for class files\&. All JAR files found become part of the class path\&.
-
-If you are cross-compiling (compiling classes against bootstrap and extension classes of a different Java platform implementation), then this option specifies the directories that contain the extension classes\&. See Cross-Compilation Options for more information\&.
-.TP
--g
-.br
+.RE
+.PP
+\-extdirs \fIdirectories\fR
+.RS 4
+Overrides the location of the
+\fBext\fR
+directory\&. The directories variable is a colon\-separated list of directories\&. Each JAR file in the specified directories is searched for class files\&. All JAR files found become part of the class path\&.
+.sp
+If you are cross\-compiling (compiling classes against bootstrap and extension classes of a different Java platform implementation), then this option specifies the directories that contain the extension classes\&. See Cross\-Compilation Options for more information\&.
+.RE
+.PP
+\-g
+.RS 4
Generates all debugging information, including local variables\&. By default, only line number and source file information is generated\&.
-.TP
--g:none
-.br
+.RE
+.PP
+\-g:none
+.RS 4
Does not generate any debugging information\&.
-.TP
--g:[\fIkeyword list\fR]
-.br
+.RE
+.PP
+\-g:[\fIkeyword list\fR]
+.RS 4
Generates only some kinds of debugging information, specified by a comma separated list of keywords\&. Valid keywords are:
-.RS
-.TP
+.PP
source
+.RS 4
Source file debugging information\&.
-.TP
+.RE
+.PP
lines
+.RS 4
Line number debugging information\&.
-.TP
+.RE
+.PP
vars
+.RS 4
Local variable debugging information\&.
-.RE
-
-.TP
--help
-.br
+.RE
+.RE
+.PP
+\-help
+.RS 4
Prints a synopsis of standard options\&.
-.TP
--implicit:[\fIclass, none\fR]
-.br
-Controls the generation of class files for implicitly loaded source files\&. To automatically generate class files, use \f3-implicit:class\fR\&. To suppress class file generation, use \f3-implicit:none\fR\&. If this option is not specified, then the default is to automatically generate class files\&. In this case, the compiler issues a warning if any such class files are generated when also doing annotation processing\&. The warning is not issued when the \f3-implicit\fR option is set explicitly\&. See Searching for Types\&.
-.TP
--J\fIoption\fR
-.br
-Passes \f3option\fR to the Java Virtual Machine (JVM), where option is one of the options described on the reference page for the Java launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
-
-\fINote:\fR The \fICLASSPATH\fR, \f3-classpath\fR, \f3-bootclasspath\fR, and \f3-extdirs\fR options do not specify the classes used to run \f3javac\fR\&. Trying to customize the compiler implementation with these options and variables is risky and often does not accomplish what you want\&. If you must customize the complier implementation, then use the \f3-J\fR option to pass options through to the underlying \f3\fRJava launcher\&.
-.TP
--nowarn
-.br
-Disables warning messages\&. This option operates the same as the \f3-Xlint:none\fR option\&.
-.TP
--parameters
-.br
-Stores formal parameter names of constructors and methods in the generated class file so that the method \f3java\&.lang\&.reflect\&.Executable\&.getParameters\fR from the Reflection API can retrieve them\&.
-.TP
--proc: [\fInone\fR, \fIonly\fR]
-.br
-Controls whether annotation processing and compilation are done\&. \f3-proc:none\fR means that compilation takes place without annotation processing\&. \f3-proc:only\fR means that only annotation processing is done, without any subsequent compilation\&.
-.TP
--processor \fIclass1\fR [,\fIclass2\fR,\fIclass3\fR\&.\&.\&.]
-.br
+.RE
+.PP
+\-implicit:[\fIclass, none\fR]
+.RS 4
+Controls the generation of class files for implicitly loaded source files\&. To automatically generate class files, use
+\fB\-implicit:class\fR\&. To suppress class file generation, use
+\fB\-implicit:none\fR\&. If this option is not specified, then the default is to automatically generate class files\&. In this case, the compiler issues a warning if any such class files are generated when also doing annotation processing\&. The warning is not issued when the
+\fB\-implicit\fR
+option is set explicitly\&. See Searching for Types\&.
+.RE
+.PP
+\-J\fIoption\fR
+.RS 4
+Passes
+\fBoption\fR
+to the Java Virtual Machine (JVM), where option is one of the options described on the reference page for the Java launcher\&. For example,
+\fB\-J\-Xms48m\fR
+sets the startup memory to 48 MB\&. See
+java(1)\&.
+.sp
+\fBNote:\fR
+The
+\fICLASSPATH\fR,
+\fB\-classpath\fR,
+\fB\-bootclasspath\fR, and
+\fB\-extdirs\fR
+options do not specify the classes used to run
+\fBjavac\fR\&. Trying to customize the compiler implementation with these options and variables is risky and often does not accomplish what you want\&. If you must customize the complier implementation, then use the
+\fB\-J\fR
+option to pass options through to the underlying Java launcher\&.
+.RE
+.PP
+\-nowarn
+.RS 4
+Disables warning messages\&. This option operates the same as the
+\fB\-Xlint:none\fR
+option\&.
+.RE
+.PP
+\-parameters
+.RS 4
+Stores formal parameter names of constructors and methods in the generated class file so that the method
+\fBjava\&.lang\&.reflect\&.Executable\&.getParameters\fR
+from the Reflection API can retrieve them\&.
+.RE
+.PP
+\-proc: [\fInone\fR, \fIonly\fR]
+.RS 4
+Controls whether annotation processing and compilation are done\&.
+\fB\-proc:none\fR
+means that compilation takes place without annotation processing\&.
+\fB\-proc:only\fR
+means that only annotation processing is done, without any subsequent compilation\&.
+.RE
+.PP
+\-processor \fIclass1\fR [,\fIclass2\fR,\fIclass3\fR\&.\&.\&.]
+.RS 4
Names of the annotation processors to run\&. This bypasses the default discovery process\&.
-.TP
--processorpath \fIpath\fR
-.br
+.RE
+.PP
+\-processorpath \fIpath\fR
+.RS 4
Specifies where to find annotation processors\&. If this option is not used, then the class path is searched for processors\&.
-.TP
--s \fIdir\fR
-.br
-Specifies the directory where to place the generated source files\&. The directory must already exist because \f3javac\fR does not create it\&. If a class is part of a package, then the compiler puts the source file in a subdirectory that reflects the package name and creates directories as needed\&.
-
-If you specify \f3-s /home/mysrc\fR and the class is called \f3com\&.mypackage\&.MyClass\fR, then the source file is put in \f3/home/mysrc/com/mypackage/MyClass\&.java\fR\&.
-.TP
--source \fIrelease\fR
-.br
-Specifies the version of source code accepted\&. The following values for \f3release\fR are allowed:
-.RS
-.TP
+.RE
+.PP
+\-s \fIdir\fR
+.RS 4
+Specifies the directory where to place the generated source files\&. The directory must already exist because
+\fBjavac\fR
+does not create it\&. If a class is part of a package, then the compiler puts the source file in a subdirectory that reflects the package name and creates directories as needed\&.
+.sp
+If you specify
+\fB\-s /home/mysrc\fR
+and the class is called
+\fBcom\&.mypackage\&.MyClass\fR, then the source file is put in
+\fB/home/mysrc/com/mypackage/MyClass\&.java\fR\&.
+.RE
+.PP
+\-source \fIrelease\fR
+.RS 4
+Specifies the version of source code accepted\&. The following values for
+\fBrelease\fR
+are allowed:
+.PP
1\&.3
+.RS 4
The compiler does not support assertions, generics, or other language features introduced after Java SE 1\&.3\&.
-.TP
+.RE
+.PP
1\&.4
+.RS 4
The compiler accepts code containing assertions, which were introduced in Java SE 1\&.4\&.
-.TP
+.RE
+.PP
1\&.5
+.RS 4
The compiler accepts code containing generics and other language features introduced in Java SE 5\&.
-.TP
+.RE
+.PP
5
+.RS 4
Synonym for 1\&.5\&.
-.TP
+.RE
+.PP
1\&.6
+.RS 4
No language changes were introduced in Java SE 6\&. However, encoding errors in source files are now reported as errors instead of warnings as in earlier releases of Java Platform, Standard Edition\&.
-.TP
+.RE
+.PP
6
+.RS 4
Synonym for 1\&.6\&.
-.TP
+.RE
+.PP
1\&.7
-This is the default value\&. The compiler accepts code with features introduced in Java SE 7\&.
-.TP
+.RS 4
+The compiler accepts code with features introduced in Java SE 7\&.
+.RE
+.PP
7
+.RS 4
Synonym for 1\&.7\&.
-.RE
-
-.TP
--sourcepath \fIsourcepath\fR
-.br
+.RE
+.PP
+1\&.8
+.RS 4
+This is the default value\&. The compiler accepts code with features introduced in Java SE 8\&.
+.RE
+.PP
+8
+.RS 4
+Synonym for 1\&.8\&.
+.RE
+.RE
+.PP
+\-sourcepath \fIsourcepath\fR
+.RS 4
Specifies the source code path to search for class or interface definitions\&. As with the user class path, source path entries are separated by colons (:) on Oracle Solaris and semicolons on Windows and can be directories, JAR archives, or ZIP archives\&. If packages are used, then the local path name within the directory or archive must reflect the package name\&.
-
-\fINote:\fR Classes found through the class path might be recompiled when their source files are also found\&. See Searching for Types\&.
-.TP
--verbose
-.br
+.sp
+\fBNote:\fR
+Classes found through the class path might be recompiled when their source files are also found\&. See Searching for Types\&.
+.RE
+.PP
+\-verbose
+.RS 4
Uses verbose output, which includes information about each class loaded and each source file compiled\&.
-.TP
--version
-.br
+.RE
+.PP
+\-version
+.RS 4
Prints release information\&.
-.TP
--werror
-.br
+.RE
+.PP
+\-werror
+.RS 4
Terminates compilation when warnings occur\&.
-.TP
--X
-.br
+.RE
+.PP
+\-X
+.RS 4
Displays information about nonstandard options and exits\&.
-.SS CROSS-COMPILATION\ OPTIONS
-By default, classes are compiled against the bootstrap and extension classes of the platform that \f3javac\fR shipped with\&. But \f3javac\fR also supports cross-compiling, where classes are compiled against a bootstrap and extension classes of a different Java platform implementation\&. It is important to use the \f3-bootclasspath\fR and \f3-extdirs\fR options when cross-compiling\&.
-.TP
--target \fIversion\fR
-.br
-Generates class files that target a specified release of the virtual machine\&. Class files will run on the specified target and on later releases, but not on earlier releases of the JVM\&. Valid targets are 1\&.1, 1\&.2, 1\&.3, 1\&.4, 1\&.5 (also 5), 1\&.6 (also 6), and 1\&.7 (also 7)\&.
-
-The default for the \f3-target\fR option depends on the value of the \f3-source\fR option:
-.RS
-.TP 0.2i
-\(bu
-If the \f3-source\fR option is not specified, then the value of the \f3-target\fR option is 1\&.7
-.TP 0.2i
-\(bu
-If the \f3-source\fR option is 1\&.2, then the value of the \f3-target\fR option is 1\&.4
-.TP 0.2i
-\(bu
-If the \f3-source\fR option is 1\&.3, then the value of the \f3-target\fR option is 1\&.4
-.TP 0.2i
-\(bu
-If the \f3-source\fR option is 1\&.5, then the value of the \f3-target\fR option is 1\&.7
-.TP 0.2i
-\(bu
-If the \f3-source\fR option is 1\&.6, then the value of the \f3-target\fR is option 1\&.7
-.TP 0.2i
-\(bu
-For all other values of the \f3-source\fR option, the value of the \f3-target\fR option is the value of the \f3-source\fR option\&.
-.RE
-
-.TP
--bootclasspath \fIbootclasspath\fR
-.br
-Cross-compiles against the specified set of boot classes\&. As with the user class path, boot class path entries are separated by colons (:) and can be directories, JAR archives, or ZIP archives\&.
-.SS COMPACT\ PROFILE\ OPTION
-Beginning with JDK 8, the \f3javac\fR compiler supports compact profiles\&. With compact profiles, applications that do not require the entire Java platform can be deployed and run with a smaller footprint\&. The compact profiles feature could be used to shorten the download time for applications from app stores\&. This feature makes for more compact deployment of Java applications that bundle the JRE\&. This feature is also useful in small devices\&.
+.RE
+.SS "Cross\-Compilation Options"
.PP
-The supported profile values are \f3compact1\fR, \f3compact2\fR, and \f3compact3\fR\&. These are additive layers\&. Each higher-numbered compact profile contains all of the APIs in profiles with smaller number names\&.
-.TP
--profile
-.br
+By default, classes are compiled against the bootstrap and extension classes of the platform that
+\fBjavac\fR
+shipped with\&. But
+\fBjavac\fR
+also supports cross\-compiling, where classes are compiled against a bootstrap and extension classes of a different Java platform implementation\&. It is important to use the
+\fB\-bootclasspath\fR
+and
+\fB\-extdirs\fR
+options when cross\-compiling\&.
+.PP
+\-target \fIversion\fR
+.RS 4
+Generates class files that target a specified release of the virtual machine\&. Class files will run on the specified target and on later releases, but not on earlier releases of the JVM\&. Valid targets are 1\&.1, 1\&.2, 1\&.3, 1\&.4, 1\&.5 (also 5), 1\&.6 (also 6), 1\&.7 (also 7), and 1\&.8 (also 8)\&.
+.sp
+The default for the
+\fB\-target\fR
+option depends on the value of the
+\fB\-source\fR
+option:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+If the
+\fB\-source\fR
+option is not specified, then the value of the
+\fB\-target\fR
+option is 1\&.8
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+If the
+\fB\-source\fR
+option is 1\&.2, then the value of the
+\fB\-target\fR
+option is 1\&.4
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+If the
+\fB\-source\fR
+option is 1\&.3, then the value of the
+\fB\-target\fR
+option is 1\&.4
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+If the
+\fB\-source\fR
+option is 1\&.5, then the value of the
+\fB\-target\fR
+option is 1\&.8
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+If the
+\fB\-source\fR
+option is 1\&.6, then the value of the
+\fB\-target\fR
+is option 1\&.8
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+If the
+\fB\-source\fR
+option is 1\&.7, then the value of the
+\fB\-target\fR
+is option 1\&.8
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+For all other values of the
+\fB\-source\fR
+option, the value of the
+\fB\-target\fR
+option is the value of the
+\fB\-source\fR
+option\&.
+.RE
+.RE
+.PP
+\-bootclasspath \fIbootclasspath\fR
+.RS 4
+Cross\-compiles against the specified set of boot classes\&. As with the user class path, boot class path entries are separated by colons (:) and can be directories, JAR archives, or ZIP archives\&.
+.RE
+.SS "Compact Profile Option"
+.PP
+Beginning with JDK 8, the
+\fBjavac\fR
+compiler supports compact profiles\&. With compact profiles, applications that do not require the entire Java platform can be deployed and run with a smaller footprint\&. The compact profiles feature could be used to shorten the download time for applications from app stores\&. This feature makes for more compact deployment of Java applications that bundle the JRE\&. This feature is also useful in small devices\&.
+.PP
+The supported profile values are
+\fBcompact1\fR,
+\fBcompact2\fR, and
+\fBcompact3\fR\&. These are additive layers\&. Each higher\-numbered compact profile contains all of the APIs in profiles with smaller number names\&.
+.PP
+\-profile
+.RS 4
When using compact profiles, this option specifies the profile name when compiling\&. For example:
-.sp
-.nf
-\f3javac \-profile compact1 Hello\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac \-profile compact1 Hello\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
javac does not compile source code that uses any Java SE APIs that is not in the specified profile\&. Here is an example of the error message that results from attempting to compile such source code:
-.sp
-.nf
-\f3cd jdk1\&.8\&.0/bin\fP
-.fi
-.nf
-\f3\&./javac \-profile compact1 Paint\&.java\fP
-.fi
-.nf
-\f3Paint\&.java:5: error: Applet is not available in profile \&'compact1\&'\fP
-.fi
-.nf
-\f3import java\&.applet\&.Applet;\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-In this example, you can correct the error by modifying the source to not use the \f3Applet\fR class\&. You could also correct the error by compiling without the -profile option\&. Then the compilation would be run against the full set of Java SE APIs\&. (None of the compact profiles include the \f3Applet\fR class\&.)
-
-An alternative way to compile with compact profiles is to use the \f3-bootclasspath\fR option to specify a path to an \f3rt\&.jar\fR file that specifies a profile\&'s image\&. Using the \f3-profile\fR option instead does not require a profile image to be present on the system at compile time\&. This is useful when cross-compiling\&.
-.SS NONSTANDARD\ OPTIONS
-.TP
--Xbootclasspath/p:\fIpath\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBcd jdk1\&.8\&.0/bin\fR
+\fB\&./javac \-profile compact1 Paint\&.java\fR
+\fBPaint\&.java:5: error: Applet is not available in profile \*(Aqcompact1\*(Aq\fR
+\fBimport java\&.applet\&.Applet;\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+In this example, you can correct the error by modifying the source to not use the
+\fBApplet\fR
+class\&. You could also correct the error by compiling without the \-profile option\&. Then the compilation would be run against the full set of Java SE APIs\&. (None of the compact profiles include the
+\fBApplet\fR
+class\&.)
+.sp
+An alternative way to compile with compact profiles is to use the
+\fB\-bootclasspath\fR
+option to specify a path to an
+\fBrt\&.jar\fR
+file that specifies a profile\*(Aqs image\&. Using the
+\fB\-profile\fR
+option instead does not require a profile image to be present on the system at compile time\&. This is useful when cross\-compiling\&.
+.RE
+.SS "Nonstandard Options"
+.PP
+\-Xbootclasspath/p:\fIpath\fR
+.RS 4
Adds a suffix to the bootstrap class path\&.
-.TP
--Xbootclasspath/a:\fIpath\fR
-.br
+.RE
+.PP
+\-Xbootclasspath/a:\fIpath\fR
+.RS 4
Adds a prefix to the bootstrap class path\&.
-.TP
--Xbootclasspath/:\fIpath\fR
-.br
+.RE
+.PP
+\-Xbootclasspath/:\fIpath\fR
+.RS 4
Overrides the location of the bootstrap class files\&.
-.TP
--Xdoclint:[-]\fIgroup\fR [\fI/access\fR]
-.br
-Enables or disables specific groups of checks, where \fIgroup\fR is one of the following values: \f3accessibility\fR, \f3syntax\fR, \f3reference\fR, \f3html\fR or \f3missing\fR\&. For more information about these groups of checks see the \f3-Xdoclint\fR option of the \f3javadoc\fR command\&. The \f3-Xdoclint\fR option is disabled by default in the \f3javac\fR command\&.
-
-The variable \fIaccess\fR specifies the minimum visibility level of classes and members that the \f3-Xdoclint\fR option checks\&. It can have one of the following values (in order of most to least visible) : \f3public\fR, \f3protected\fR, \f3package\fR and \f3private\fR\&. For example, the following option checks classes and members (with all groups of checks) that have the access level protected and higher (which includes protected, package and public):
-.sp
-.nf
-\f3\-Xdoclint:all/protected\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.RE
+.PP
+\-Xdoclint:[\-]\fIgroup\fR [\fI/access\fR]
+.RS 4
+Enables or disables specific groups of checks, where
+\fIgroup\fR
+is one of the following values:
+\fBaccessibility\fR,
+\fBsyntax\fR,
+\fBreference\fR,
+\fBhtml\fR
+or
+\fBmissing\fR\&. For more information about these groups of checks see the
+\fB\-Xdoclint\fR
+option of the
+\fBjavadoc\fR
+command\&. The
+\fB\-Xdoclint\fR
+option is disabled by default in the
+\fBjavac\fR
+command\&.
+.sp
+The variable
+\fIaccess\fR
+specifies the minimum visibility level of classes and members that the
+\fB\-Xdoclint\fR
+option checks\&. It can have one of the following values (in order of most to least visible) :
+\fBpublic\fR,
+\fBprotected\fR,
+\fBpackage\fR
+and
+\fBprivate\fR\&. For example, the following option checks classes and members (with all groups of checks) that have the access level protected and higher (which includes protected, package and public):
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-Xdoclint:all/protected\fR
+
+.fi
+.if n \{\
+.RE
+.\}
The following option enables all groups of checks for all access levels, except it will not check for HTML errors for classes and members that have access level package and higher (which includes package and public):
-.sp
-.nf
-\f3\-Xdoclint:all,\-html/package\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--Xdoclint:none
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-Xdoclint:all,\-html/package\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-Xdoclint:none
+.RS 4
Disables all groups of checks\&.
-.TP
--Xdoclint:all[\fI/access\fR]
-.br
+.RE
+.PP
+\-Xdoclint:all[\fI/access\fR]
+.RS 4
Enables all groups of checks\&.
-.TP
--Xlint
-.br
-\fI\fREnables all recommended warnings\&. In this release, enabling all available warnings is recommended\&.
-.TP
--Xlint:all
-.br
-\fI\fREnables all recommended warnings\&. In this release, enabling all available warnings is recommended\&.
-.TP
--Xlint:none
-.br
+.RE
+.PP
+\-Xlint
+.RS 4
+Enables all recommended warnings\&. In this release, enabling all available warnings is recommended\&.
+.RE
+.PP
+\-Xlint:all
+.RS 4
+Enables all recommended warnings\&. In this release, enabling all available warnings is recommended\&.
+.RE
+.PP
+\-Xlint:none
+.RS 4
Disables all warnings\&.
-.TP
--Xlint:\fIname\fR
-.br
-Disables warning name\&. See Enable or Disable Warnings with the -Xlint Option for a list of warnings you can disable with this option\&.
-.TP
--Xlint:\fI-name\fR
-.br
-Disables warning name\&. See Enable or Disable Warnings with the -Xlint Option with the \f3-Xlint\fR option to get a list of warnings that you can disable with this option\&.
-.TP
--Xmaxerrs \fInumber\fR
-.br
+.RE
+.PP
+\-Xlint:\fIname\fR
+.RS 4
+Disables warning name\&. See Enable or Disable Warnings with the \-Xlint Option for a list of warnings you can disable with this option\&.
+.RE
+.PP
+\-Xlint:\fI\-name\fR
+.RS 4
+Disables warning name\&. See Enable or Disable Warnings with the \-Xlint Option with the
+\fB\-Xlint\fR
+option to get a list of warnings that you can disable with this option\&.
+.RE
+.PP
+\-Xmaxerrs \fInumber\fR
+.RS 4
Sets the maximum number of errors to print\&.
-.TP
--Xmaxwarns \fInumber\fR
-.br
+.RE
+.PP
+\-Xmaxwarns \fInumber\fR
+.RS 4
Sets the maximum number of warnings to print\&.
-.TP
--Xstdout \fIfilename\fR
-.br
-Sends compiler messages to the named file\&. By default, compiler messages go to \f3System\&.err\fR\&.
-.TP
--Xprefer:[\fInewer,source\fR]
-.br
-Specifies which file to read when both a source file and class file are found for a type\&. (See Searching for Types)\&. If the \f3-Xprefer:newer\fR option is used, then it reads the newer of the source or class file for a type (default)\&. If the \f3-Xprefer:source\fR option is used, then it reads the source file\&. Use -\f3Xprefer:source\fR when you want to be sure that any annotation processors can access annotations declared with a retention policy of \f3SOURCE\fR\&.
-.TP
--Xpkginfo:[\fIalways\fR,\fIlegacy\fR,\fInonempty\fR]
-.br
-Control whether javac generates \f3package-info\&.class\fR files from package-info\&.java files\&. Possible mode arguments for this option include the following\&.
-.RS
-.TP
+.RE
+.PP
+\-Xstdout \fIfilename\fR
+.RS 4
+Sends compiler messages to the named file\&. By default, compiler messages go to
+\fBSystem\&.err\fR\&.
+.RE
+.PP
+\-Xprefer:[\fInewer,source\fR]
+.RS 4
+Specifies which file to read when both a source file and class file are found for a type\&. (See Searching for Types)\&. If the
+\fB\-Xprefer:newer\fR
+option is used, then it reads the newer of the source or class file for a type (default)\&. If the
+\fB\-Xprefer:source\fR
+option is used, then it reads the source file\&. Use \-\fBXprefer:source\fR
+when you want to be sure that any annotation processors can access annotations declared with a retention policy of
+\fBSOURCE\fR\&.
+.RE
+.PP
+\-Xpkginfo:[\fIalways\fR,\fIlegacy\fR,\fInonempty\fR]
+.RS 4
+Control whether javac generates
+\fBpackage\-info\&.class\fR
+files from package\-info\&.java files\&. Possible mode arguments for this option include the following\&.
+.PP
always
-Always generate a \f3package-info\&.class\fR file for every \f3package-info\&.java\fR file\&. This option may be useful if you use a build system such as Ant, which checks that each \f3\&.java\fR file has a corresponding \f3\&.class\fR file\&.
-.TP
+.RS 4
+Always generate a
+\fBpackage\-info\&.class\fR
+file for every
+\fBpackage\-info\&.java\fR
+file\&. This option may be useful if you use a build system such as Ant, which checks that each
+\fB\&.java\fR
+file has a corresponding
+\fB\&.class\fR
+file\&.
+.RE
+.PP
legacy
-Generate a \f3package-info\&.class\fR file only if package-info\&.java contains annotations\&. Don\&'t generate a \f3package-info\&.class\fR file if package-info\&.java only contains comments\&.
-
-\fINote:\fR A \f3package-info\&.class\fR file might be generated but be empty if all the annotations in the package-info\&.java file have \f3RetentionPolicy\&.SOURCE\fR\&.
-.TP
+.RS 4
+Generate a
+\fBpackage\-info\&.class\fR
+file only if package\-info\&.java contains annotations\&. Don\*(Aqt generate a
+\fBpackage\-info\&.class\fR
+file if package\-info\&.java only contains comments\&.
+.sp
+\fBNote:\fR
+A
+\fBpackage\-info\&.class\fR
+file might be generated but be empty if all the annotations in the package\-info\&.java file have
+\fBRetentionPolicy\&.SOURCE\fR\&.
+.RE
+.PP
nonempty
-Generate a \f3package-info\&.class\fR file only if package-info\&.java contains annotations with \f3RetentionPolicy\&.CLASS\fR or \f3RetentionPolicy\&.RUNTIME\fR\&.
-.RE
-
-.TP
--Xprint
-.br
+.RS 4
+Generate a
+\fBpackage\-info\&.class\fR
+file only if package\-info\&.java contains annotations with
+\fBRetentionPolicy\&.CLASS\fR
+or
+\fBRetentionPolicy\&.RUNTIME\fR\&.
+.RE
+.RE
+.PP
+\-Xprint
+.RS 4
Prints a textual representation of specified types for debugging purposes\&. Perform neither annotation processing nor compilation\&. The format of the output could change\&.
-.TP
--XprintProcessorInfo
-.br
+.RE
+.PP
+\-XprintProcessorInfo
+.RS 4
Prints information about which annotations a processor is asked to process\&.
-.TP
--XprintRounds
-.br
+.RE
+.PP
+\-XprintRounds
+.RS 4
Prints information about initial and subsequent annotation processing rounds\&.
-.SH ENABLE\ OR\ DISABLE\ WARNINGS\ WITH\ THE\ -XLINT\ OPTION
-Enable warning \fIname\fR with the \f3-Xlint:name\fR option, where \f3name\fR is one of the following warning names\&. Note that you can disable a warning with the \f3-Xlint:-name:\fR option\&.
-.TP
+.RE
+.SH "ENABLE OR DISABLE WARNINGS WITH THE -XLINT OPTION"
+.PP
+Enable warning
+\fIname\fR
+with the
+\fB\-Xlint:name\fR
+option, where
+\fBname\fR
+is one of the following warning names\&. Note that you can disable a warning with the
+\fB\-Xlint:\-name:\fR
+option\&.
+.PP
cast
+.RS 4
Warns about unnecessary and redundant casts, for example:
-.sp
-.nf
-\f3String s = (String) "Hello!"\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBString s = (String) "Hello!"\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
classfile
+.RS 4
Warns about issues related to class file contents\&.
-.TP
+.RE
+.PP
deprecation
+.RS 4
Warns about the use of deprecated items, for example:
-.sp
-.nf
-\f3java\&.util\&.Date myDate = new java\&.util\&.Date();\fP
-.fi
-.nf
-\f3int currentDay = myDate\&.getDay();\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-The method \f3java\&.util\&.Date\&.getDay\fR has been deprecated since JDK 1\&.1
-.TP
-dep-ann
-Warns about items that are documented with an \f3@deprecated\fR Javadoc comment, but do not have a \f3@Deprecated\fR annotation, for example:
-.sp
-.nf
-\f3/**\fP
-.fi
-.nf
-\f3 * @deprecated As of Java SE 7, replaced by {@link #newMethod()}\fP
-.fi
-.nf
-\f3 */\fP
-.fi
-.nf
-\f3public static void deprecatedMethood() { }\fP
-.fi
-.nf
-\f3public static void newMethod() { }\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjava\&.util\&.Date myDate = new java\&.util\&.Date();\fR
+\fBint currentDay = myDate\&.getDay();\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The method
+\fBjava\&.util\&.Date\&.getDay\fR
+has been deprecated since JDK 1\&.1
+.RE
+.PP
+dep\-ann
+.RS 4
+Warns about items that are documented with an
+\fB@deprecated\fR
+Javadoc comment, but do not have a
+\fB@Deprecated\fR
+annotation, for example:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB/**\fR
+\fB * @deprecated As of Java SE 7, replaced by {@link #newMethod()}\fR
+\fB */\fR
+\fBpublic static void deprecatedMethood() { }\fR
+\fBpublic static void newMethod() { }\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
divzero
+.RS 4
Warns about division by the constant integer 0, for example:
-.sp
-.nf
-\f3int divideByZero = 42 / 0;\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBint divideByZero = 42 / 0;\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
empty
-Warns about empty statements after \f3if\fRstatements, for example:
-.sp
-.nf
-\f3class E {\fP
-.fi
-.nf
-\f3 void m() {\fP
-.fi
-.nf
-\f3 if (true) ;\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
+.RS 4
+Warns about empty statements after
+\fBif \fRstatements, for example:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBclass E {\fR
+\fB void m() {\fR
+\fB if (true) ;\fR
+\fB }\fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
fallthrough
-Checks the switch blocks for fall-through cases and provides a warning message for any that are found\&. Fall-through cases are cases in a switch block, other than the last case in the block, whose code does not include a break statement, allowing code execution to fall through from that case to the next case\&. For example, the code following the case 1 label in this switch block does not end with a break statement:
-.sp
-.nf
-\f3switch (x) {\fP
-.fi
-.nf
-\f3case 1:\fP
-.fi
-.nf
-\f3 System\&.out\&.println("1");\fP
-.fi
-.nf
-\f3 // No break statement here\&.\fP
-.fi
-.nf
-\f3case 2:\fP
-.fi
-.nf
-\f3 System\&.out\&.println("2");\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-If the \f3-Xlint:fallthrough\fR option was used when compiling this code, then the compiler emits a warning about possible fall-through into case, with the line number of the case in question\&.
-.TP
+.RS 4
+Checks the switch blocks for fall\-through cases and provides a warning message for any that are found\&. Fall\-through cases are cases in a switch block, other than the last case in the block, whose code does not include a break statement, allowing code execution to fall through from that case to the next case\&. For example, the code following the case 1 label in this switch block does not end with a break statement:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBswitch (x) {\fR
+\fBcase 1:\fR
+\fB System\&.out\&.println("1");\fR
+\fB // No break statement here\&.\fR
+\fBcase 2:\fR
+\fB System\&.out\&.println("2");\fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+If the
+\fB\-Xlint:fallthrough\fR
+option was used when compiling this code, then the compiler emits a warning about possible fall\-through into case, with the line number of the case in question\&.
+.RE
+.PP
finally
-Warns about \f3finally\fR clauses that cannot complete normally, for example:
-.sp
-.nf
-\f3public static int m() {\fP
-.fi
-.nf
-\f3 try {\fP
-.fi
-.nf
-\f3 throw new NullPointerException();\fP
-.fi
-.nf
-\f3 } catch (NullPointerException(); {\fP
-.fi
-.nf
-\f3 System\&.err\&.println("Caught NullPointerException\&.");\fP
-.fi
-.nf
-\f3 return 1;\fP
-.fi
-.nf
-\f3 } finally {\fP
-.fi
-.nf
-\f3 return 0;\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-The compiler generates a warning for the \f3finally\fR block in this example\&. When the \f3int\fR method is called, it returns a value of 0\&. A \f3finally\fR block executes when the \f3try\fR block exits\&. In this example, when control is transferred to the \f3catch\fR block, the \f3int\fR method exits\&. However, the \f3finally\fR block must execute, so it is executed, even though control was transferred outside the method\&.
-.TP
+.RS 4
+Warns about
+\fBfinally\fR
+clauses that cannot complete normally, for example:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBpublic static int m() {\fR
+\fB try {\fR
+\fB throw new NullPointerException();\fR
+\fB } catch (NullPointerException(); {\fR
+\fB System\&.err\&.println("Caught NullPointerException\&.");\fR
+\fB return 1;\fR
+\fB } finally {\fR
+\fB return 0;\fR
+\fB }\fR
+\fB }\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The compiler generates a warning for the
+\fBfinally\fR
+block in this example\&. When the
+\fBint\fR
+method is called, it returns a value of 0\&. A
+\fBfinally\fR
+block executes when the
+\fBtry\fR
+block exits\&. In this example, when control is transferred to the
+\fBcatch\fR
+block, the
+\fBint\fR
+method exits\&. However, the
+\fBfinally\fR
+block must execute, so it is executed, even though control was transferred outside the method\&.
+.RE
+.PP
options
-Warns about issues that related to the use of command-line options\&. See Cross-Compilation Options\&.
-.TP
+.RS 4
+Warns about issues that related to the use of command\-line options\&. See Cross\-Compilation Options\&.
+.RE
+.PP
overrides
+.RS 4
Warns about issues regarding method overrides\&. For example, consider the following two classes:
-.sp
-.nf
-\f3public class ClassWithVarargsMethod {\fP
-.fi
-.nf
-\f3 void varargsMethod(String\&.\&.\&. s) { }\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3public class ClassWithOverridingMethod extends ClassWithVarargsMethod {\fP
-.fi
-.nf
-\f3 @Override\fP
-.fi
-.nf
-\f3 void varargsMethod(String[] s) { }\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBpublic class ClassWithVarargsMethod {\fR
+\fB void varargsMethod(String\&.\&.\&. s) { }\fR
+\fB}\fR
+
+\fBpublic class ClassWithOverridingMethod extends ClassWithVarargsMethod {\fR
+\fB @Override\fR
+\fB void varargsMethod(String[] s) { }\fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
The compiler generates a warning similar to the following:\&.
-.sp
-.nf
-\f3warning: [override] varargsMethod(String[]) in ClassWithOverridingMethod \fP
-.fi
-.nf
-\f3overrides varargsMethod(String\&.\&.\&.) in ClassWithVarargsMethod; overriding\fP
-.fi
-.nf
-\f3method is missing \&'\&.\&.\&.\&'\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-When the compiler encounters a \f3varargs\fR method, it translates the \f3varargs\fR formal parameter into an array\&. In the method \f3ClassWithVarargsMethod\&.varargsMethod\fR, the compiler translates the \f3varargs\fR formal parameter \f3String\&.\&.\&. s\fR to the formal parameter \f3String[] s\fR, an array, which matches the formal parameter of the method \f3ClassWithOverridingMethod\&.varargsMethod\fR\&. Consequently, this example compiles\&.
-.TP
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBwarning: [override] varargsMethod(String[]) in ClassWithOverridingMethod \fR
+\fBoverrides varargsMethod(String\&.\&.\&.) in ClassWithVarargsMethod; overriding\fR
+\fBmethod is missing \*(Aq\&.\&.\&.\*(Aq\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+When the compiler encounters a
+\fBvarargs\fR
+method, it translates the
+\fBvarargs\fR
+formal parameter into an array\&. In the method
+\fBClassWithVarargsMethod\&.varargsMethod\fR, the compiler translates the
+\fBvarargs\fR
+formal parameter
+\fBString\&.\&.\&. s\fR
+to the formal parameter
+\fBString[] s\fR, an array, which matches the formal parameter of the method
+\fBClassWithOverridingMethod\&.varargsMethod\fR\&. Consequently, this example compiles\&.
+.RE
+.PP
path
-Warns about invalid path elements and nonexistent path directories on the command line (with regard to the class path, the source path, and other paths)\&. Such warnings cannot be suppressed with the \f3@SuppressWarnings\fR annotation, for example:
-.sp
-.nf
-\f3javac \-Xlint:path \-classpath /nonexistentpath Example\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
+.RS 4
+Warns about invalid path elements and nonexistent path directories on the command line (with regard to the class path, the source path, and other paths)\&. Such warnings cannot be suppressed with the
+\fB@SuppressWarnings\fR
+annotation, for example:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac \-Xlint:path \-classpath /nonexistentpath Example\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
processing
+.RS 4
Warn about issues regarding annotation processing\&. The compiler generates this warning when you have a class that has an annotation, and you use an annotation processor that cannot handle that type of exception\&. For example, the following is a simple annotation processor:
-
-\fISource file AnnocProc\&.java\fR:
-.sp
-.nf
-\f3import java\&.util\&.*;\fP
-.fi
-.nf
-\f3import javax\&.annotation\&.processing\&.*;\fP
-.fi
-.nf
-\f3import javax\&.lang\&.model\&.*;\fP
-.fi
-.nf
-\f3import\&.javaz\&.lang\&.model\&.element\&.*;\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3@SupportedAnnotationTypes("NotAnno")\fP
-.fi
-.nf
-\f3public class AnnoProc extends AbstractProcessor {\fP
-.fi
-.nf
-\f3 public boolean process(Set<? extends TypeElement> elems, RoundEnvironment renv){\fP
-.fi
-.nf
-\f3 return true;\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3 public SourceVersion getSupportedSourceVersion() {\fP
-.fi
-.nf
-\f3 return SourceVersion\&.latest();\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-\fISource file AnnosWithoutProcessors\&.java\fR:
-.sp
-.nf
-\f3@interface Anno { }\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3@Anno\fP
-.fi
-.nf
-\f3class AnnosWithoutProcessors { }\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-The following commands compile the annotation processor \f3AnnoProc\fR, then run this annotation processor against the source file \f3AnnosWithoutProcessors\&.java\fR:
-.sp
-.nf
-\f3javac AnnoProc\&.java\fP
-.fi
-.nf
-\f3javac \-cp \&. \-Xlint:processing \-processor AnnoProc \-proc:only AnnosWithoutProcessors\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-When the compiler runs the annotation processor against the source file \f3AnnosWithoutProcessors\&.java\fR, it generates the following warning:
-.sp
-.nf
-\f3warning: [processing] No processor claimed any of these annotations: Anno\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-To resolve this issue, you can rename the annotation defined and used in the class \f3AnnosWithoutProcessors\fR from \f3Anno\fR to \f3NotAnno\fR\&.
-.TP
+.sp
+\fBSource file AnnocProc\&.java\fR:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBimport java\&.util\&.*;\fR
+\fBimport javax\&.annotation\&.processing\&.*;\fR
+\fBimport javax\&.lang\&.model\&.*;\fR
+\fBimport\&.javaz\&.lang\&.model\&.element\&.*;\fR
+
+\fB@SupportedAnnotationTypes("NotAnno")\fR
+\fBpublic class AnnoProc extends AbstractProcessor {\fR
+\fB public boolean process(Set<? extends TypeElement> elems, RoundEnvironment renv){\fR
+\fB return true;\fR
+\fB }\fR
+
+\fB public SourceVersion getSupportedSourceVersion() {\fR
+\fB return SourceVersion\&.latest();\fR
+\fB }\fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+\fBSource file AnnosWithoutProcessors\&.java\fR:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB@interface Anno { }\fR
+\fB \fR
+\fB@Anno\fR
+\fBclass AnnosWithoutProcessors { }\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The following commands compile the annotation processor
+\fBAnnoProc\fR, then run this annotation processor against the source file
+\fBAnnosWithoutProcessors\&.java\fR:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac AnnoProc\&.java\fR
+\fBjavac \-cp \&. \-Xlint:processing \-processor AnnoProc \-proc:only AnnosWithoutProcessors\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+When the compiler runs the annotation processor against the source file
+\fBAnnosWithoutProcessors\&.java\fR, it generates the following warning:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBwarning: [processing] No processor claimed any of these annotations: Anno\fR
+\fB \fR
+.fi
+.if n \{\
+.RE
+.\}
+To resolve this issue, you can rename the annotation defined and used in the class
+\fBAnnosWithoutProcessors\fR
+from
+\fBAnno\fR
+to
+\fBNotAnno\fR\&.
+.RE
+.PP
rawtypes
-Warns about unchecked operations on raw types\&. The following statement generates a \f3rawtypes\fR warning:
-.sp
-.nf
-\f3void countElements(List l) { \&.\&.\&. }\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-The following example does not generate a \f3rawtypes\fR warning
-.sp
-.nf
-\f3void countElements(List<?> l) { \&.\&.\&. }\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-\f3List\fR is a raw type\&. However, \f3List<?>\fR is an unbounded wildcard parameterized type\&. Because \f3List\fR is a parameterized interface, always specify its type argument\&. In this example, the \f3List\fR formal argument is specified with an unbounded wildcard (\f3?\fR) as its formal type parameter, which means that the \f3countElements\fR method can accept any instantiation of the \f3List\fR interface\&.
-.TP
+.RS 4
+Warns about unchecked operations on raw types\&. The following statement generates a
+\fBrawtypes\fR
+warning:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBvoid countElements(List l) { \&.\&.\&. }\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The following example does not generate a
+\fBrawtypes\fR
+warning
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBvoid countElements(List<?> l) { \&.\&.\&. }\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+\fBList\fR
+is a raw type\&. However,
+\fBList<?>\fR
+is an unbounded wildcard parameterized type\&. Because
+\fBList\fR
+is a parameterized interface, always specify its type argument\&. In this example, the
+\fBList\fR
+formal argument is specified with an unbounded wildcard (\fB?\fR) as its formal type parameter, which means that the
+\fBcountElements\fR
+method can accept any instantiation of the
+\fBList\fR
+interface\&.
+.RE
+.PP
Serial
-Warns about missing \f3serialVersionUID\fR definitions on serializable classes, for example:
-.sp
-.nf
-\f3public class PersistentTime implements Serializable\fP
-.fi
-.nf
-\f3{\fP
-.fi
-.nf
-\f3 private Date time;\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3 public PersistentTime() {\fP
-.fi
-.nf
-\f3 time = Calendar\&.getInstance()\&.getTime();\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3 public Date getTime() {\fP
-.fi
-.nf
-\f3 return time;\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.RS 4
+Warns about missing
+\fBserialVersionUID\fR
+definitions on serializable classes, for example:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBpublic class PersistentTime implements Serializable\fR
+\fB{\fR
+\fB private Date time;\fR
+\fB \fR
+\fB public PersistentTime() {\fR
+\fB time = Calendar\&.getInstance()\&.getTime();\fR
+\fB }\fR
+\fB \fR
+\fB public Date getTime() {\fR
+\fB return time;\fR
+\fB }\fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
The compiler generates the following warning:
-.sp
-.nf
-\f3warning: [serial] serializable class PersistentTime has no definition of\fP
-.fi
-.nf
-\f3serialVersionUID\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-If a serializable class does not explicitly declare a field named \f3serialVersionUID\fR, then the serialization runtime environment calculates a default \f3serialVersionUID\fR value for that class based on various aspects of the class, as described in the Java Object Serialization Specification\&. However, it is strongly recommended that all serializable classes explicitly declare \f3serialVersionUID\fR values because the default process of computing \f3serialVersionUID\fR vales is highly sensitive to class details that can vary depending on compiler implementations, and as a result, might cause an unexpected \f3InvalidClassExceptions\fR during deserialization\&. To guarantee a consistent \f3serialVersionUID\fR value across different Java compiler implementations, a serializable class must declare an explicit \f3serialVersionUID\fR value\&.
-.TP
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBwarning: [serial] serializable class PersistentTime has no definition of\fR
+\fBserialVersionUID\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+If a serializable class does not explicitly declare a field named
+\fBserialVersionUID\fR, then the serialization runtime environment calculates a default
+\fBserialVersionUID\fR
+value for that class based on various aspects of the class, as described in the Java Object Serialization Specification\&. However, it is strongly recommended that all serializable classes explicitly declare
+\fBserialVersionUID\fR
+values because the default process of computing
+\fBserialVersionUID\fR
+vales is highly sensitive to class details that can vary depending on compiler implementations, and as a result, might cause an unexpected
+\fBInvalidClassExceptions\fR
+during deserialization\&. To guarantee a consistent
+\fBserialVersionUID\fR
+value across different Java compiler implementations, a serializable class must declare an explicit
+\fBserialVersionUID\fR
+value\&.
+.RE
+.PP
static
+.RS 4
Warns about issues relating to the use of statics, for example:
-.sp
-.nf
-\f3class XLintStatic {\fP
-.fi
-.nf
-\f3 static void m1() { }\fP
-.fi
-.nf
-\f3 void m2() { this\&.m1(); }\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBclass XLintStatic {\fR
+\fB static void m1() { }\fR
+\fB void m2() { this\&.m1(); }\fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
The compiler generates the following warning:
-.sp
-.nf
-\f3warning: [static] static method should be qualified by type name, \fP
-.fi
-.nf
-\f3XLintStatic, instead of by an expression\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-To resolve this issue, you can call the \f3static\fR method \f3m1\fR as follows:
-.sp
-.nf
-\f3XLintStatic\&.m1();\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-Alternately, you can remove the \f3static\fR keyword from the declaration of the method \f3m1\fR\&.
-.TP
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBwarning: [static] static method should be qualified by type name, \fR
+\fBXLintStatic, instead of by an expression\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+To resolve this issue, you can call the
+\fBstatic\fR
+method
+\fBm1\fR
+as follows:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBXLintStatic\&.m1();\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Alternately, you can remove the
+\fBstatic\fR
+keyword from the declaration of the method
+\fBm1\fR\&.
+.RE
+.PP
try
-Warns about issues relating to use of \f3try\fR blocks, including try-with-resources statements\&. For example, a warning is generated for the following statement because the resource \f3ac\fR declared in the \f3try\fR block is not used:
-.sp
-.nf
-\f3try ( AutoCloseable ac = getResource() ) { // do nothing}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
+.RS 4
+Warns about issues relating to use of
+\fBtry\fR
+blocks, including try\-with\-resources statements\&. For example, a warning is generated for the following statement because the resource
+\fBac\fR
+declared in the
+\fBtry\fR
+block is not used:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBtry ( AutoCloseable ac = getResource() ) { // do nothing}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
unchecked
+.RS 4
Gives more detail for unchecked conversion warnings that are mandated by the Java Language Specification, for example:
-.sp
-.nf
-\f3List l = new ArrayList<Number>();\fP
-.fi
-.nf
-\f3List<String> ls = l; // unchecked warning\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-During type erasure, the types \f3ArrayList<Number>\fR and \f3List<String>\fR become \f3ArrayList\fR and \f3List\fR, respectively\&.
-
-The \f3ls\fR command has the parameterized type \f3List<String>\fR\&. When the \f3List\fR referenced by \f3l\fR is assigned to \f3ls\fR, the compiler generates an unchecked warning\&. At compile time, the compiler and JVM cannot determine whether \f3l\fR refers to a \f3List<String>\fR type\&. In this case, \f3l\fR does not refer to a \f3List<String>\fR type\&. As a result, heap pollution occurs\&.
-
-A heap pollution situation occurs when the \f3List\fR object \f3l\fR, whose static type is \f3List<Number>\fR, is assigned to another \f3List\fR object, \f3ls\fR, that has a different static type, \f3List<String>\fR\&. However, the compiler still allows this assignment\&. It must allow this assignment to preserve backward compatibility with releases of Java SE that do not support generics\&. Because of type erasure, \f3List<Number>\fR and \f3List<String>\fR both become \f3List\fR\&. Consequently, the compiler allows the assignment of the object \f3l\fR\f3,\fR which has a raw type of \f3List\fR, to the object \f3ls\fR\&.
-.TP
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBList l = new ArrayList<Number>();\fR
+\fBList<String> ls = l; // unchecked warning\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+During type erasure, the types
+\fBArrayList<Number>\fR
+and
+\fBList<String>\fR
+become
+\fBArrayList\fR
+and
+\fBList\fR, respectively\&.
+.sp
+The
+\fBls\fR
+command has the parameterized type
+\fBList<String>\fR\&. When the
+\fBList\fR
+referenced by
+\fBl\fR
+is assigned to
+\fBls\fR, the compiler generates an unchecked warning\&. At compile time, the compiler and JVM cannot determine whether
+\fBl\fR
+refers to a
+\fBList<String>\fR
+type\&. In this case,
+\fBl\fR
+does not refer to a
+\fBList<String>\fR
+type\&. As a result, heap pollution occurs\&.
+.sp
+A heap pollution situation occurs when the
+\fBList\fR
+object
+\fBl\fR, whose static type is
+\fBList<Number>\fR, is assigned to another
+\fBList\fR
+object,
+\fBls\fR, that has a different static type,
+\fBList<String>\fR\&. However, the compiler still allows this assignment\&. It must allow this assignment to preserve backward compatibility with releases of Java SE that do not support generics\&. Because of type erasure,
+\fBList<Number>\fR
+and
+\fBList<String>\fR
+both become
+\fBList\fR\&. Consequently, the compiler allows the assignment of the object
+\fBl\fR\fB,\fR
+which has a raw type of
+\fBList\fR, to the object
+\fBls\fR\&.
+.RE
+.PP
varargs
-Warns about unsafe usages of variable arguments (\f3varargs\fR) methods, in particular, those that contain non-reifiable arguments, for example:
-.sp
-.nf
-\f3public class ArrayBuilder {\fP
-.fi
-.nf
-\f3 public static <T> void addToList (List<T> listArg, T\&.\&.\&. elements) {\fP
-.fi
-.nf
-\f3 for (T x : elements) {\fP
-.fi
-.nf
-\f3 listArg\&.add(x);\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-\fINote:\fR A non-reifiable type is a type whose type information is not fully available at runtime\&.
-
-The compiler generates the following warning for the definition of the method \f3ArrayBuilder\&.addToList\fR
-.sp
-.nf
-\f3warning: [varargs] Possible heap pollution from parameterized vararg type T\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-When the compiler encounters a varargs method, it translates the \f3varargs\fR formal parameter into an array\&. However, the Java programming language does not permit the creation of arrays of parameterized types\&. In the method \f3ArrayBuilder\&.addToList\fR, the compiler translates the \f3varargs\fR formal parameter \f3T\&.\&.\&.\fR elements to the formal parameter \f3T[]\fR elements, an array\&. However, because of type erasure, the compiler converts the \f3varargs\fR formal parameter to \f3Object[]\fR elements\&. Consequently, there is a possibility of heap pollution\&.
-.SH COMMAND-LINE\ ARGUMENT\ FILES
-To shorten or simplify the \f3javac\fR command, you can specify one or more files that contain arguments to the \f3javac\fR command (except \f3-J\fR options)\&. This enables you to create \f3javac\fR commands of any length on any operating system\&.
-.PP
-An argument file can include \f3javac\fR options and source file names in any combination\&. The arguments within a file can be separated by spaces or new line characters\&. If a file name contains embedded spaces, then put the whole file name in double quotation marks\&.
-.PP
-File Names within an argument file are relative to the current directory, not the location of the argument file\&. Wild cards (*) are not allowed in these lists (such as for specifying \f3*\&.java\fR)\&. Use of the at sign (@) to recursively interpret files is not supported\&. The \f3-J\fR options are not supported because they are passed to the launcher, which does not support argument files\&.
-.PP
-When executing the \f3javac\fR command, pass in the path and name of each argument file with the at sign (@) leading character\&. When the \f3javac\fR command encounters an argument beginning with the at sign (@), it expands the contents of that file into the argument list\&.
-.PP
-\f3Example 1 Single Argument File\fR
-.PP
-You could use a single argument file named \f3argfile\fR to hold all \f3javac\fR arguments:
-.sp
-.nf
-\f3javac @argfile\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-This argument file could contain the contents of both files shown in Example 2
+.RS 4
+Warns about unsafe usages of variable arguments (\fBvarargs\fR) methods, in particular, those that contain non\-reifiable arguments, for example:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBpublic class ArrayBuilder {\fR
+\fB public static <T> void addToList (List<T> listArg, T\&.\&.\&. elements) {\fR
+\fB for (T x : elements) {\fR
+\fB listArg\&.add(x);\fR
+\fB }\fR
+\fB }\fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+\fBNote:\fR
+A non\-reifiable type is a type whose type information is not fully available at runtime\&.
+.sp
+The compiler generates the following warning for the definition of the method
+\fBArrayBuilder\&.addToList\fR
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBwarning: [varargs] Possible heap pollution from parameterized vararg type T\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+When the compiler encounters a varargs method, it translates the
+\fBvarargs\fR
+formal parameter into an array\&. However, the Java programming language does not permit the creation of arrays of parameterized types\&. In the method
+\fBArrayBuilder\&.addToList\fR, the compiler translates the
+\fBvarargs\fR
+formal parameter
+\fBT\&.\&.\&.\fR
+elements to the formal parameter
+\fBT[]\fR
+elements, an array\&. However, because of type erasure, the compiler converts the
+\fBvarargs\fR
+formal parameter to
+\fBObject[]\fR
+elements\&. Consequently, there is a possibility of heap pollution\&.
+.RE
+.SH "COMMAND-LINE ARGUMENT FILES"
+.PP
+To shorten or simplify the
+\fBjavac\fR
+command, you can specify one or more files that contain arguments to the
+\fBjavac\fR
+command (except
+\fB\-J\fR
+options)\&. This enables you to create
+\fBjavac\fR
+commands of any length on any operating system\&.
.PP
-\f3Example 2 Two Argument Files\fR
+An argument file can include
+\fBjavac\fR
+options and source file names in any combination\&. The arguments within a file can be separated by spaces or new line characters\&. If a file name contains embedded spaces, then put the whole file name in double quotation marks\&.
.PP
-You can create two argument files: one for the \f3javac\fR options and the other for the source file names\&. Note that the following lists have no line-continuation characters\&.
+File Names within an argument file are relative to the current directory, not the location of the argument file\&. Wild cards (*) are not allowed in these lists (such as for specifying
+\fB*\&.java\fR)\&. Use of the at sign (@) to recursively interpret files is not supported\&. The
+\fB\-J\fR
+options are not supported because they are passed to the launcher, which does not support argument files\&.
+.PP
+When executing the
+\fBjavac\fR
+command, pass in the path and name of each argument file with the at sign (@) leading character\&. When the
+\fBjavac\fR
+command encounters an argument beginning with the at sign (@), it expands the contents of that file into the argument list\&.
+.PP
+\fBExample 1\fR
+.br
+Single Argument File
+.RS 4
+You could use a single argument file named
+\fBargfile\fR
+to hold all
+\fBjavac\fR
+arguments:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac @argfile\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+This argument file could contain the contents of both files shown in Example 2
+.RE
.PP
+\fBExample 2\fR
+.br
+Two Argument Files
+.RS 4
+You can create two argument files: one for the
+\fBjavac\fR
+options and the other for the source file names\&. Note that the following lists have no line\-continuation characters\&.
+.sp
Create a file named options that contains the following:
-.sp
-.nf
-\f3\-d classes\fP
-.fi
-.nf
-\f3\-g\fP
-.fi
-.nf
-\f3\-sourcepath /java/pubs/ws/1\&.3/src/share/classes\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-d classes\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-g\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-sourcepath /java/pubs/ws/1\&.3/src/share/classes\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+
+.fi
+.if n \{\
+.RE
+.\}
Create a file named classes that contains the following:
-.sp
-.nf
-\f3MyClass1\&.java\fP
-.fi
-.nf
-\f3MyClass2\&.java\fP
-.fi
-.nf
-\f3MyClass3\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-Then, run the \f3javac\fR command as follows:
-.sp
-.nf
-\f3javac @options @classes\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-\f3Example 3 Argument Files with Paths\fR
-.PP
-The argument files can have paths, but any file names inside the files are relative to the current working directory (not \f3path1\fR or \f3path2\fR):
-.sp
-.nf
-\f3javac @path1/options @path2/classes\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-.SH ANNOTATION\ PROCESSING
-The \f3javac\fR command provides direct support for annotation processing, superseding the need for the separate annotation processing command, \f3apt\fR\&.
-.PP
-The API for annotation processors is defined in the \f3javax\&.annotation\&.processing\fR and j\f3avax\&.lang\&.model\fR packages and subpackages\&.
-.SS HOW\ ANNOTATION\ PROCESSING\ WORKS
-Unless annotation processing is disabled with the \f3-proc:none\fR option, the compiler searches for any annotation processors that are available\&. The search path can be specified with the \f3-processorpath\fR option\&. If no path is specified, then the user class path is used\&. Processors are located by means of service provider-configuration files named \f3META-INF/services/javax\&.annotation\&.processing\fR\&.Processor on the search path\&. Such files should contain the names of any annotation processors to be used, listed one per line\&. Alternatively, processors can be specified explicitly, using the \f3-processor\fR option\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBMyClass1\&.java\fR
+\fBMyClass2\&.java\fR
+\fBMyClass3\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Then, run the
+\fBjavac\fR
+command as follows:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac @options @classes\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBExample 3\fR
+.br
+Argument Files with Paths
+.RS 4
+The argument files can have paths, but any file names inside the files are relative to the current working directory (not
+\fBpath1\fR
+or
+\fBpath2\fR):
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac @path1/options @path2/classes\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.SH "ANNOTATION PROCESSING"
+.PP
+The
+\fBjavac\fR
+command provides direct support for annotation processing, superseding the need for the separate annotation processing command,
+\fBapt\fR\&.
+.PP
+The API for annotation processors is defined in the
+\fBjavax\&.annotation\&.processing\fR
+and j\fBavax\&.lang\&.model\fR
+packages and subpackages\&.
+.SS "How Annotation Processing Works"
+.PP
+Unless annotation processing is disabled with the
+\fB\-proc:none\fR
+option, the compiler searches for any annotation processors that are available\&. The search path can be specified with the
+\fB\-processorpath\fR
+option\&. If no path is specified, then the user class path is used\&. Processors are located by means of service provider\-configuration files named
+\fBMETA\-INF/services/javax\&.annotation\&.processing\fR\&.Processor on the search path\&. Such files should contain the names of any annotation processors to be used, listed one per line\&. Alternatively, processors can be specified explicitly, using the
+\fB\-processor\fR
+option\&.
.PP
After scanning the source files and classes on the command line to determine what annotations are present, the compiler queries the processors to determine what annotations they process\&. When a match is found, the processor is called\&. A processor can claim the annotations it processes, in which case no further attempt is made to find any processors for those annotations\&. After all of the annotations are claimed, the compiler does not search for additional processors\&.
.PP
If any processors generate new source files, then another round of annotation processing occurs: Any newly generated source files are scanned, and the annotations processed as before\&. Any processors called on previous rounds are also called on all subsequent rounds\&. This continues until no new source files are generated\&.
.PP
-After a round occurs where no new source files are generated, the annotation processors are called one last time, to give them a chance to complete any remaining work\&. Finally, unless the \f3-proc:only\fR option is used, the compiler compiles the original and all generated source files\&.
-.SS IMPLICITLY\ LOADED\ SOURCE\ FILES
-To compile a set of source files, the compiler might need to implicitly load additional source files\&. See Searching for Types\&. Such files are currently not subject to annotation processing\&. By default, the compiler gives a warning when annotation processing occurred and any implicitly loaded source files are compiled\&. The \f3-implicit\fR option provides a way to suppress the warning\&.
-.SH SEARCHING\ FOR\ TYPES
+After a round occurs where no new source files are generated, the annotation processors are called one last time, to give them a chance to complete any remaining work\&. Finally, unless the
+\fB\-proc:only\fR
+option is used, the compiler compiles the original and all generated source files\&.
+.SS "Implicitly Loaded Source Files"
+.PP
+To compile a set of source files, the compiler might need to implicitly load additional source files\&. See Searching for Types\&. Such files are currently not subject to annotation processing\&. By default, the compiler gives a warning when annotation processing occurred and any implicitly loaded source files are compiled\&. The
+\fB\-implicit\fR
+option provides a way to suppress the warning\&.
+.SH "SEARCHING FOR TYPES"
+.PP
To compile a source file, the compiler often needs information about a type, but the type definition is not in the source files specified on the command line\&. The compiler needs type information for every class or interface used, extended, or implemented in the source file\&. This includes classes and interfaces not explicitly mentioned in the source file, but that provide information through inheritance\&.
.PP
-For example, when you create a subclass \f3java\&.applet\&.Applet\fR, you are also using the ancestor classes of \f3Applet\fR: \f3java\&.awt\&.Panel\fR, \f3java\&.awt\&.Container\fR, \f3java\&.awt\&.Component\fR, and \f3java\&.lang\&.Object\fR\&.
-.PP
-When the compiler needs type information, it searches for a source file or class file that defines the type\&. The compiler searches for class files first in the bootstrap and extension classes, then in the user class path (which by default is the current directory)\&. The user class path is defined by setting the \f3CLASSPATH\fR environment variable or by using the \f3-classpath\fR option\&.
-.PP
-If you set the \f3-sourcepath\fR option, then the compiler searches the indicated path for source files\&. Otherwise, the compiler searches the user class path for both class files and source files\&.
-.PP
-You can specify different bootstrap or extension classes with the \f3-bootclasspath\fR and the \f3-extdirs\fR options\&. See Cross-Compilation Options\&.
-.PP
-A successful type search may produce a class file, a source file, or both\&. If both are found, then you can use the \f3-Xprefer\fR option to instruct the compiler which to use\&. If \f3newer\fR is specified, then the compiler uses the newer of the two files\&. If \f3source\fR is specified, the compiler uses the source file\&. The default is \f3newer\fR\&.
-.PP
-If a type search finds a source file for a required type, either by itself, or as a result of the setting for the \f3-Xprefer\fR option, then the compiler reads the source file to get the information it needs\&. By default the compiler also compiles the source file\&. You can use the \f3-implicit\fR option to specify the behavior\&. If \f3none\fR is specified, then no class files are generated for the source file\&. If \f3class\fR is specified, then class files are generated for the source file\&.
-.PP
-The compiler might not discover the need for some type information until after annotation processing completes\&. When the type information is found in a source file and no \f3-implicit\fR option is specified, the compiler gives a warning that the file is being compiled without being subject to annotation processing\&. To disable the warning, either specify the file on the command line (so that it will be subject to annotation processing) or use the \f3-implicit\fR option to specify whether or not class files should be generated for such source files\&.
-.SH PROGRAMMATIC\ INTERFACE
-The \f3javac\fR command supports the new Java Compiler API defined by the classes and interfaces in the \f3javax\&.tools\fR package\&.
-.SS EXAMPLE
-To compile as though providing command-line arguments, use the following syntax:
-.sp
-.nf
-\f3JavaCompiler javac = ToolProvider\&.getSystemJavaCompiler();\fP
-.fi
-.nf
-\f3JavaCompiler javac = ToolProvider\&.getSystemJavaCompiler();\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-The example writes diagnostics to the standard output stream and returns the exit code that \f3javac\fR would give when called from the command line\&.
-.PP
-You can use other methods in the \f3javax\&.tools\&.JavaCompiler\fR interface to handle diagnostics, control where files are read from and written to, and more\&.
-.SS OLD\ INTERFACE
-\fINote:\fR This API is retained for backward compatibility only\&. All new code should use the newer Java Compiler API\&.
-.PP
-The \f3com\&.sun\&.tools\&.javac\&.Main\fR class provides two static methods to call the compiler from a program:
-.sp
-.nf
-\f3public static int compile(String[] args);\fP
-.fi
-.nf
-\f3public static int compile(String[] args, PrintWriter out);\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-The \f3args\fR parameter represents any of the command-line arguments that would typically be passed to the compiler\&.
-.PP
-The \f3out\fR parameter indicates where the compiler diagnostic output is directed\&.
-.PP
-The \f3return\fR value is equivalent to the \f3exit\fR value from \f3javac\fR\&.
-.PP
-\fINote:\fR All other classes and methods found in a package with names that start with \f3com\&.sun\&.tools\&.javac\fR (subpackages of \f3com\&.sun\&.tools\&.javac\fR) are strictly internal and subject to change at any time\&.
-.SH EXAMPLES
-\f3Example 1 Compile a Simple Program\fR
-.PP
-This example shows how to compile the \f3Hello\&.java\fR source file in the greetings directory\&. The class defined in \f3Hello\&.java\fR is called \f3greetings\&.Hello\fR\&. The greetings directory is the package directory both for the source file and the class file and is underneath the current directory\&. This makes it possible to use the default user class path\&. It also makes it unnecessary to specify a separate destination directory with the \f3-d\fR option\&.
-.PP
-The source code in \f3Hello\&.java\fR:
-.sp
-.nf
-\f3package greetings;\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3public class Hello {\fP
-.fi
-.nf
-\f3 public static void main(String[] args) {\fP
-.fi
-.nf
-\f3 for (int i=0; i < args\&.length; i++) {\fP
-.fi
-.nf
-\f3 System\&.out\&.println("Hello " + args[i]);\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
+For example, when you create a subclass
+\fBjava\&.applet\&.Applet\fR, you are also using the ancestor classes of
+\fBApplet\fR:
+\fBjava\&.awt\&.Panel\fR,
+\fBjava\&.awt\&.Container\fR,
+\fBjava\&.awt\&.Component\fR, and
+\fBjava\&.lang\&.Object\fR\&.
+.PP
+When the compiler needs type information, it searches for a source file or class file that defines the type\&. The compiler searches for class files first in the bootstrap and extension classes, then in the user class path (which by default is the current directory)\&. The user class path is defined by setting the
+\fBCLASSPATH\fR
+environment variable or by using the
+\fB\-classpath\fR
+option\&.
+.PP
+If you set the
+\fB\-sourcepath\fR
+option, then the compiler searches the indicated path for source files\&. Otherwise, the compiler searches the user class path for both class files and source files\&.
+.PP
+You can specify different bootstrap or extension classes with the
+\fB\-bootclasspath\fR
+and the
+\fB\-extdirs\fR
+options\&. See Cross\-Compilation Options\&.
+.PP
+A successful type search may produce a class file, a source file, or both\&. If both are found, then you can use the
+\fB\-Xprefer\fR
+option to instruct the compiler which to use\&. If
+\fBnewer\fR
+is specified, then the compiler uses the newer of the two files\&. If
+\fBsource\fR
+is specified, the compiler uses the source file\&. The default is
+\fBnewer\fR\&.
+.PP
+If a type search finds a source file for a required type, either by itself, or as a result of the setting for the
+\fB\-Xprefer\fR
+option, then the compiler reads the source file to get the information it needs\&. By default the compiler also compiles the source file\&. You can use the
+\fB\-implicit\fR
+option to specify the behavior\&. If
+\fBnone\fR
+is specified, then no class files are generated for the source file\&. If
+\fBclass\fR
+is specified, then class files are generated for the source file\&.
+.PP
+The compiler might not discover the need for some type information until after annotation processing completes\&. When the type information is found in a source file and no
+\fB\-implicit\fR
+option is specified, the compiler gives a warning that the file is being compiled without being subject to annotation processing\&. To disable the warning, either specify the file on the command line (so that it will be subject to annotation processing) or use the
+\fB\-implicit\fR
+option to specify whether or not class files should be generated for such source files\&.
+.SH "PROGRAMMATIC INTERFACE"
+.PP
+The
+\fBjavac\fR
+command supports the new Java Compiler API defined by the classes and interfaces in the
+\fBjavax\&.tools\fR
+package\&.
+.SS "Example"
+.PP
+To compile as though providing command\-line arguments, use the following syntax:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBJavaCompiler javac = ToolProvider\&.getSystemJavaCompiler();\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+The example writes diagnostics to the standard output stream and returns the exit code that
+\fBjavac\fR
+would give when called from the command line\&.
+.PP
+You can use other methods in the
+\fBjavax\&.tools\&.JavaCompiler\fR
+interface to handle diagnostics, control where files are read from and written to, and more\&.
+.SS "Old Interface"
+.PP
+\fBNote:\fR
+This API is retained for backward compatibility only\&. All new code should use the newer Java Compiler API\&.
+.PP
+The
+\fBcom\&.sun\&.tools\&.javac\&.Main\fR
+class provides two static methods to call the compiler from a program:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBpublic static int compile(String[] args);\fR
+\fBpublic static int compile(String[] args, PrintWriter out);\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+The
+\fBargs\fR
+parameter represents any of the command\-line arguments that would typically be passed to the compiler\&.
+.PP
+The
+\fBout\fR
+parameter indicates where the compiler diagnostic output is directed\&.
+.PP
+The
+\fBreturn\fR
+value is equivalent to the
+\fBexit\fR
+value from
+\fBjavac\fR\&.
+.PP
+\fBNote:\fR
+All other classes and methods found in a package with names that start with
+\fBcom\&.sun\&.tools\&.javac\fR
+(subpackages of
+\fBcom\&.sun\&.tools\&.javac\fR) are strictly internal and subject to change at any time\&.
+.SH "EXAMPLES"
+.PP
+\fBExample 1\fR
+.br
+Compile a Simple Program
+.RS 4
+This example shows how to compile the
+\fBHello\&.java\fR
+source file in the greetings directory\&. The class defined in
+\fBHello\&.java\fR
+is called
+\fBgreetings\&.Hello\fR\&. The greetings directory is the package directory both for the source file and the class file and is underneath the current directory\&. This makes it possible to use the default user class path\&. It also makes it unnecessary to specify a separate destination directory with the
+\fB\-d\fR
+option\&.
+.sp
+The source code in
+\fBHello\&.java\fR:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBpackage greetings;\fR
+\fB \fR
+\fBpublic class Hello {\fR
+\fB public static void main(String[] args) {\fR
+\fB for (int i=0; i < args\&.length; i++) {\fR
+\fB System\&.out\&.println("Hello " + args[i]);\fR
+\fB }\fR
+\fB }\fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
Compile greetings\&.Hello:
-.sp
-.nf
-\f3javac greetings/Hello\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-Run \f3greetings\&.Hello\fR:
-.sp
-.nf
-\f3java greetings\&.Hello World Universe Everyone\fP
-.fi
-.nf
-\f3Hello World\fP
-.fi
-.nf
-\f3Hello Universe\fP
-.fi
-.nf
-\f3Hello Everyone\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-\f3Example 2 Compile Multiple Source Files\fR
-.PP
-This example compiles the \f3Aloha\&.java\fR, \f3GutenTag\&.java\fR, \f3Hello\&.java\fR, and \f3Hi\&.java\fR source files in the \f3greetings\fR package\&.
-.sp
-.nf
-\f3% javac greetings/*\&.java\fP
-.fi
-.nf
-\f3% ls greetings\fP
-.fi
-.nf
-\f3Aloha\&.class GutenTag\&.class Hello\&.class Hi\&.class\fP
-.fi
-.nf
-\f3Aloha\&.java GutenTag\&.java Hello\&.java Hi\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-\f3Example 3 Specify a User Class Path\fR
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac greetings/Hello\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Run
+\fBgreetings\&.Hello\fR:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjava greetings\&.Hello World Universe Everyone\fR
+\fBHello World\fR
+\fBHello Universe\fR
+\fBHello Everyone\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
.PP
+\fBExample 2\fR
+.br
+Compile Multiple Source Files
+.RS 4
+This example compiles the
+\fBAloha\&.java\fR,
+\fBGutenTag\&.java\fR,
+\fBHello\&.java\fR, and
+\fBHi\&.java\fR
+source files in the
+\fBgreetings\fR
+package\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB% javac greetings/*\&.java\fR
+\fB% ls greetings\fR
+\fBAloha\&.class GutenTag\&.class Hello\&.class Hi\&.class\fR
+\fBAloha\&.java GutenTag\&.java Hello\&.java Hi\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBExample 3\fR
+.br
+Specify a User Class Path
+.RS 4
After changing one of the source files in the previous example, recompile it:
-.sp
-.nf
-\f3pwd\fP
-.fi
-.nf
-\f3/examples\fP
-.fi
-.nf
-\f3javac greetings/Hi\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-Because \f3greetings\&.Hi\fR refers to other classes in the \f3greetings\fR package, the compiler needs to find these other classes\&. The previous example works because the default user class path is the directory that contains the package directory\&. If you want to recompile this file without concern for which directory you are in, then add the examples directory to the user class path by setting \f3CLASSPATH\fR\&. This example uses the \f3-classpath\fR option\&.
-.sp
-.nf
-\f3javac \-classpath /examples /examples/greetings/Hi\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-If you change \f3greetings\&.Hi\fR to use a banner utility, then that utility also needs to be accessible through the user class path\&.
-.sp
-.nf
-\f3javac \-classpath /examples:/lib/Banners\&.jar \e\fP
-.fi
-.nf
-\f3 /examples/greetings/Hi\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-To execute a class in the \f3greetings\fR package, the program needs access to the \f3greetings\fR package, and to the classes that the \f3greetings\fR classes use\&.
-.sp
-.nf
-\f3java \-classpath /examples:/lib/Banners\&.jar greetings\&.Hi\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-\f3Example 4 Separate Source Files and Class Files\fR
-.PP
-The following example uses \f3javac\fR to compile code that runs on JVM 1\&.6\&.
-.sp
-.nf
-\f3javac \-source 1\&.6 \-target 1\&.6 \-bootclasspath jdk1\&.6\&.0/lib/rt\&.jar \e \fP
-.fi
-.nf
-\f3\-extdirs "" OldCode\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-The \f3-source 1\&.6\fR option specifies that release 1\&.6 (or 6) of the Java programming language be used to compile \f3OldCode\&.java\fR\&. The option \f3-target 1\&.6\fR option ensures that the generated class files are compatible with JVM 1\&.6\&. Note that in most cases, the value of the \f3-target\fR option is the value of the \f3-source\fR option; in this example, you can omit the \f3-target\fR option\&.
-.PP
-You must specify the \f3-bootclasspath\fR option to specify the correct version of the bootstrap classes (the \f3rt\&.jar\fR library)\&. If not, then the compiler generates a warning:
-.sp
-.nf
-\f3javac \-source 1\&.6 OldCode\&.java\fP
-.fi
-.nf
-\f3warning: [options] bootstrap class path not set in conjunction with \fP
-.fi
-.nf
-\f3\-source 1\&.6\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-If you do not specify the correct version of bootstrap classes, then the compiler uses the old language rules (in this example, it uses version 1\&.6 of the Java programming language) combined with the new bootstrap classes, which can result in class files that do not work on the older platform (in this case, Java SE 6) because reference to nonexistent methods can get included\&.
-.PP
-\f3Example 5 Cross Compile\fR
-.PP
-This example uses \f3javac\fR to compile code that runs on JVM 1\&.6\&.
-.sp
-.nf
-\f3javac \-source 1\&.6 \-target 1\&.6 \-bootclasspath jdk1\&.6\&.0/lib/rt\&.jar \e\fP
-.fi
-.nf
-\f3 \-extdirs "" OldCode\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-The\f3-source 1\&.6\fR option specifies that release 1\&.6 (or 6) of the Java programming language to be used to compile OldCode\&.java\&. The \f3-target 1\&.6\fR option ensures that the generated class files are compatible with JVM 1\&.6\&. In most cases, the value of the \f3-target\fR is the value of \f3-source\fR\&. In this example, the \f3-target\fR option is omitted\&.
-.PP
-You must specify the \f3-bootclasspath\fR option to specify the correct version of the bootstrap classes (the \f3rt\&.jar\fR library)\&. If not, then the compiler generates a warning:
-.sp
-.nf
-\f3javac \-source 1\&.6 OldCode\&.java\fP
-.fi
-.nf
-\f3warning: [options] bootstrap class path not set in conjunction with \-source 1\&.6\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-If you do not specify the correct version of bootstrap classes, then the compiler uses the old language rules combined with the new bootstrap classes\&. This combination can result in class files that do not work on the older platform (in this case, Java SE 6) because reference to nonexistent methods can get included\&. In this example, the compiler uses release 1\&.6 of the Java programming language\&.
-.SH SEE\ ALSO
-.TP 0.2i
-\(bu
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBpwd\fR
+\fB/examples\fR
+\fBjavac greetings/Hi\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Because
+\fBgreetings\&.Hi\fR
+refers to other classes in the
+\fBgreetings\fR
+package, the compiler needs to find these other classes\&. The previous example works because the default user class path is the directory that contains the package directory\&. If you want to recompile this file without concern for which directory you are in, then add the examples directory to the user class path by setting
+\fBCLASSPATH\fR\&. This example uses the
+\fB\-classpath\fR
+option\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac \-classpath /examples /examples/greetings/Hi\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+If you change
+\fBgreetings\&.Hi\fR
+to use a banner utility, then that utility also needs to be accessible through the user class path\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac \-classpath /examples:/lib/Banners\&.jar \e\fR
+\fB /examples/greetings/Hi\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+To execute a class in the
+\fBgreetings\fR
+package, the program needs access to the
+\fBgreetings\fR
+package, and to the classes that the
+\fBgreetings\fR
+classes use\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjava \-classpath /examples:/lib/Banners\&.jar greetings\&.Hi\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBExample 4\fR
+.br
+Separate Source Files and Class Files
+.RS 4
+The following example uses
+\fBjavac\fR
+to compile code that runs on JVM 1\&.7\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac \-source 1\&.7 \-target 1\&.7 \-bootclasspath jdk1\&.7\&.0/lib/rt\&.jar \e \fR
+\fB\-extdirs "" OldCode\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The
+\fB\-source 1\&.7\fR
+option specifies that release 1\&.7 (or 7) of the Java programming language be used to compile
+\fBOldCode\&.java\fR\&. The option
+\fB\-target 1\&.7\fR
+option ensures that the generated class files are compatible with JVM 1\&.7\&. Note that in most cases, the value of the
+\fB\-target\fR
+option is the value of the
+\fB\-source\fR
+option; in this example, you can omit the
+\fB\-target\fR
+option\&.
+.sp
+You must specify the
+\fB\-bootclasspath\fR
+option to specify the correct version of the bootstrap classes (the
+\fBrt\&.jar\fR
+library)\&. If not, then the compiler generates a warning:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac \-source 1\&.7 OldCode\&.java\fR
+\fBwarning: [options] bootstrap class path not set in conjunction with \fR
+\fB\-source 1\&.7\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+If you do not specify the correct version of bootstrap classes, then the compiler uses the old language rules (in this example, it uses version 1\&.7 of the Java programming language) combined with the new bootstrap classes, which can result in class files that do not work on the older platform (in this case, Java SE 7) because reference to nonexistent methods can get included\&.
+.RE
+.PP
+\fBExample 5\fR
+.br
+Cross Compile
+.RS 4
+This example uses
+\fBjavac\fR
+to compile code that runs on JVM 1\&.7\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac \-source 1\&.7 \-target 1\&.7 \-bootclasspath jdk1\&.7\&.0/lib/rt\&.jar \e\fR
+\fB \-extdirs "" OldCode\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The\fB \-source 1\&.7\fR
+option specifies that release 1\&.7 (or 7) of the Java programming language to be used to compile OldCode\&.java\&. The
+\fB\-target 1\&.7\fR
+option ensures that the generated class files are compatible with JVM 1\&.7\&. In most cases, the value of the
+\fB\-target\fR
+is the value of
+\fB\-source\fR\&. In this example, the
+\fB\-target\fR
+option is omitted\&.
+.sp
+You must specify the
+\fB\-bootclasspath\fR
+option to specify the correct version of the bootstrap classes (the
+\fBrt\&.jar\fR
+library)\&. If not, then the compiler generates a warning:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac \-source 1\&.7 OldCode\&.java\fR
+\fBwarning: [options] bootstrap class path not set in conjunction with \-source 1\&.7\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+If you do not specify the correct version of bootstrap classes, then the compiler uses the old language rules combined with the new bootstrap classes\&. This combination can result in class files that do not work on the older platform (in this case, Java SE 7) because reference to nonexistent methods can get included\&. In this example, the compiler uses release 1\&.7 of the Java programming language\&.
+.RE
+.SH "SEE ALSO"
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
java(1)
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
jdb(1)
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
javah(1)
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
javadoc(1)
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
jar(1)
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
jdb(1)
-.RE
-.br
-'pl 8.5i
-'bp
+.RE
+.br
+'pl 8.5i
+'bp
diff --git a/src/linux/doc/man/javap.1 b/src/linux/doc/man/javap.1
index 353a13fb0..2580bf124 100644
--- a/src/linux/doc/man/javap.1
+++ b/src/linux/doc/man/javap.1
@@ -1,443 +1,392 @@
'\" t
-.\" Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
-.\"
-.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-.\"
-.\" This code is free software; you can redistribute it and/or modify it
-.\" under the terms of the GNU General Public License version 2 only, as
-.\" published by the Free Software Foundation.
-.\"
-.\" 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.
-.\"
-.\" Arch: generic
-.\" Software: JDK 8
-.\" Date: 21 November 2013
-.\" SectDesc: Basic Tools
-.\" Title: javap.1
+.\" Copyright (c) 1994, 2014, Oracle and/or its affiliates. All rights reserved.
+.\"
+.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+.\"
+.\" This code is free software; you can redistribute it and/or modify it
+.\" under the terms of the GNU General Public License version 2 only, as
+.\" published by the Free Software Foundation.
+.\"
+.\" 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.
+.\"
+.\" Title: javap
+.\" Language: English
+.\" Date: 8 August 2014
+.\" SectDesc: Basic Tools
+.\" Software: JDK 8
+.\" Arch: generic
+.\" Part Number: E38207-03
.\"
.if n .pl 99999
-.TH javap 1 "21 November 2013" "JDK 8" "Basic Tools"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-
-.SH NAME
+.TH "javap" "1" "8 August 2014" "JDK 8" "Basic Tools"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
javap \- Disassembles one or more class files\&.
-.SH SYNOPSIS
-.sp
-.nf
-
+.SH "SYNOPSIS"
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
\fBjavap\fR [\fIoptions\fR] \fIclassfile\fR\&.\&.\&.
-.fi
-.sp
-.TP
+.fi
+.if n \{\
+.RE
+.\}
+.PP
\fIoptions\fR
-The command-line options\&. See Options\&.
-.TP
+.RS 4
+The command\-line options\&. See Options\&.
+.RE
+.PP
\fIclassfile\fR
-One or more classes separated by spaces to be processed for annotations such as DocFooter\&.class\&. You can specify a class that can be found in the class path, by its file name or with a URL such as \f3file:///home/user/myproject/src/DocFooter\&.class\fR\&.
-.SH DESCRIPTION
-The \f3javap\fR command disassembles one or more class files\&. The output depends on the options used\&. When no options are used, then the \f3javap\fR command prints the package, protected and public fields, and methods of the classes passed to it\&. The \f3javap\fR command prints its output to \f3stdout\fR\&.
-.SH OPTIONS
-.TP
--help, --help, -?
+.RS 4
+One or more classes separated by spaces to be processed for annotations such as DocFooter\&.class\&. You can specify a class that can be found in the class path, by its file name or with a URL such as
+\fBfile:///home/user/myproject/src/DocFooter\&.class\fR\&.
+.RE
+.SH "DESCRIPTION"
+.PP
+The
+\fBjavap\fR
+command disassembles one or more class files\&. The output depends on the options used\&. When no options are used, then the
+\fBjavap\fR
+command prints the package, protected and public fields, and methods of the classes passed to it\&. The
+\fBjavap\fR
+command prints its output to
+\fBstdout\fR\&.
+.SH "OPTIONS"
+.PP
+\-help
.br
-Prints a help message for the \f3javap\fR command\&.
-.TP
--version
+\-\-help
.br
+\-?
+.RS 4
+Prints a help message for the
+\fBjavap\fR
+command\&.
+.RE
+.PP
+\-version
+.RS 4
Prints release information\&.
-.TP
--l
-.br
+.RE
+.PP
+\-l
+.RS 4
Prints line and local variable tables\&.
-.TP
--public
-.br
+.RE
+.PP
+\-public
+.RS 4
Shows only public classes and members\&.
-.TP
--protected
-.br
+.RE
+.PP
+\-protected
+.RS 4
Shows only protected and public classes and members\&.
-.TP
--private, -p
+.RE
+.PP
+\-private
.br
+\-p
+.RS 4
Shows all classes and members\&.
-.TP
--J\fIoption\fR
-.br
+.RE
+.PP
+\-J\fIoption\fR
+.RS 4
Passes the specified option to the JVM\&. For example:
-.sp
-.nf
-\f3javap \-J\-version\fP
-.fi
-.nf
-\f3javap \-J\-Djava\&.security\&.manager \-J\-Djava\&.security\&.policy=MyPolicy MyClassName\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-For more information about JVM options, see the \f3java(1)\fR command documentation\&.
-.TP
--s
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavap \-J\-version\fR
+\fBjavap \-J\-Djava\&.security\&.manager \-J\-Djava\&.security\&.policy=MyPolicy MyClassName\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+For more information about JVM options, see the command documentation\&.
+.RE
+.PP
+\-s
+.RS 4
Prints internal type signatures\&.
-.TP
--sysinfo
-.br
+.RE
+.PP
+\-sysinfo
+.RS 4
Shows system information (path, size, date, MD5 hash) of the class being processed\&.
-.TP
--constants
-.br
-Shows \f3static final\fR constants\&.
-.TP
--c
-.br
+.RE
+.PP
+\-constants
+.RS 4
+Shows
+\fBstatic final\fR
+constants\&.
+.RE
+.PP
+\-c
+.RS 4
Prints disassembled code, for example, the instructions that comprise the Java bytecodes, for each of the methods in the class\&.
-.TP
--verbose
-.br
+.RE
+.PP
+\-verbose
+.RS 4
Prints stack size, number of locals and arguments for methods\&.
-.TP
--classpath \fIpath\fR
-.br
-Specifies the path the \f3javap\fR command uses to look up classes\&. Overrides the default or the \f3CLASSPATH\fR environment variable when it is set\&.
-.TP
--bootclasspath \fIpath\fR
-.br
-Specifies the path from which to load bootstrap classes\&. By default, the bootstrap classes are the classes that implement the core Java platform located in \f3jre/lib/rt\&.jar\fR and several other JAR files\&.
-.TP
--extdir \fIdirs\fR
-.br
-Overrides the location at which installed extensions are searched for\&. The default location for extensions is the value of \f3java\&.ext\&.dirs\fR\&.
-.SH EXAMPLE
-Compile the following \f3DocFooter\fR class:
-.sp
-.nf
-\f3import java\&.awt\&.*;\fP
-.fi
-.nf
-\f3import java\&.applet\&.*;\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3public class DocFooter extends Applet {\fP
-.fi
-.nf
-\f3 String date;\fP
-.fi
-.nf
-\f3 String email;\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3 public void init() {\fP
-.fi
-.nf
-\f3 resize(500,100);\fP
-.fi
-.nf
-\f3 date = getParameter("LAST_UPDATED");\fP
-.fi
-.nf
-\f3 email = getParameter("EMAIL");\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3 public void paint(Graphics g) {\fP
-.fi
-.nf
-\f3 g\&.drawString(date + " by ",100, 15);\fP
-.fi
-.nf
-\f3 g\&.drawString(email,290,15);\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-The output from the \f3javap DocFooter\&.class\fR command yields the following:
-.sp
-.nf
-\f3Compiled from "DocFooter\&.java"\fP
-.fi
-.nf
-\f3public class DocFooter extends java\&.applet\&.Applet {\fP
-.fi
-.nf
-\f3 java\&.lang\&.String date;\fP
-.fi
-.nf
-\f3 java\&.lang\&.String email;\fP
-.fi
-.nf
-\f3 public DocFooter();\fP
-.fi
-.nf
-\f3 public void init();\fP
-.fi
-.nf
-\f3 public void paint(java\&.awt\&.Graphics);\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-The output from \f3javap -c DocFooter\&.class\fR command yields the following:
-.sp
-.nf
-\f3Compiled from "DocFooter\&.java"\fP
-.fi
-.nf
-\f3public class DocFooter extends java\&.applet\&.Applet {\fP
-.fi
-.nf
-\f3 java\&.lang\&.String date;\fP
-.fi
-.nf
-\f3 java\&.lang\&.String email;\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3 public DocFooter();\fP
-.fi
-.nf
-\f3 Code:\fP
-.fi
-.nf
-\f3 0: aload_0 \fP
-.fi
-.nf
-\f3 1: invokespecial #1 // Method\fP
-.fi
-.nf
-\f3java/applet/Applet\&."<init>":()V\fP
-.fi
-.nf
-\f3 4: return \fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3 public void init();\fP
-.fi
-.nf
-\f3 Code:\fP
-.fi
-.nf
-\f3 0: aload_0 \fP
-.fi
-.nf
-\f3 1: sipush 500\fP
-.fi
-.nf
-\f3 4: bipush 100\fP
-.fi
-.nf
-\f3 6: invokevirtual #2 // Method resize:(II)V\fP
-.fi
-.nf
-\f3 9: aload_0 \fP
-.fi
-.nf
-\f3 10: aload_0 \fP
-.fi
-.nf
-\f3 11: ldc #3 // String LAST_UPDATED\fP
-.fi
-.nf
-\f3 13: invokevirtual #4 // Method\fP
-.fi
-.nf
-\f3 getParameter:(Ljava/lang/String;)Ljava/lang/String;\fP
-.fi
-.nf
-\f3 16: putfield #5 // Field date:Ljava/lang/String;\fP
-.fi
-.nf
-\f3 19: aload_0 \fP
-.fi
-.nf
-\f3 20: aload_0 \fP
-.fi
-.nf
-\f3 21: ldc #6 // String EMAIL\fP
-.fi
-.nf
-\f3 23: invokevirtual #4 // Method\fP
-.fi
-.nf
-\f3 getParameter:(Ljava/lang/String;)Ljava/lang/String;\fP
-.fi
-.nf
-\f3 26: putfield #7 // Field email:Ljava/lang/String;\fP
-.fi
-.nf
-\f3 29: return \fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3 public void paint(java\&.awt\&.Graphics);\fP
-.fi
-.nf
-\f3 Code:\fP
-.fi
-.nf
-\f3 0: aload_1 \fP
-.fi
-.nf
-\f3 1: new #8 // class java/lang/StringBuilder\fP
-.fi
-.nf
-\f3 4: dup \fP
-.fi
-.nf
-\f3 5: invokespecial #9 // Method\fP
-.fi
-.nf
-\f3 java/lang/StringBuilder\&."<init>":()V\fP
-.fi
-.nf
-\f3 8: aload_0 \fP
-.fi
-.nf
-\f3 9: getfield #5 // Field date:Ljava/lang/String;\fP
-.fi
-.nf
-\f3 12: invokevirtual #10 // Method\fP
-.fi
-.nf
-\f3 java/lang/StringBuilder\&.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;\fP
-.fi
-.nf
-\f3 15: ldc #11 // String by \fP
-.fi
-.nf
-\f3 17: invokevirtual #10 // Method\fP
-.fi
-.nf
-\f3 java/lang/StringBuilder\&.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;\fP
-.fi
-.nf
-\f3 20: invokevirtual #12 // Method\fP
-.fi
-.nf
-\f3 java/lang/StringBuilder\&.toString:()Ljava/lang/String;\fP
-.fi
-.nf
-\f3 23: bipush 100\fP
-.fi
-.nf
-\f3 25: bipush 15\fP
-.fi
-.nf
-\f3 27: invokevirtual #13 // Method\fP
-.fi
-.nf
-\f3 java/awt/Graphics\&.drawString:(Ljava/lang/String;II)V\fP
-.fi
-.nf
-\f3 30: aload_1 \fP
-.fi
-.nf
-\f3 31: aload_0 \fP
-.fi
-.nf
-\f3 32: getfield #7 // Field email:Ljava/lang/String;\fP
-.fi
-.nf
-\f3 35: sipush 290\fP
-.fi
-.nf
-\f3 38: bipush 15\fP
-.fi
-.nf
-\f3 40: invokevirtual #13 // Method\fP
-.fi
-.nf
-\f3java/awt/Graphics\&.drawString:(Ljava/lang/String;II)V\fP
-.fi
-.nf
-\f3 43: return \fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-.SH SEE\ ALSO
-.TP 0.2i
-\(bu
-javac(1)
-.TP 0.2i
-\(bu
+.RE
+.PP
+\-classpath \fIpath\fR
+.RS 4
+Specifies the path the
+\fBjavap\fR
+command uses to look up classes\&. Overrides the default or the
+\fBCLASSPATH\fR
+environment variable when it is set\&.
+.RE
+.PP
+\-bootclasspath \fIpath\fR
+.RS 4
+Specifies the path from which to load bootstrap classes\&. By default, the bootstrap classes are the classes that implement the core Java platform located in
+\fBjre/lib/rt\&.jar\fR
+and several other JAR files\&.
+.RE
+.PP
+\-extdir \fIdirs\fR
+.RS 4
+Overrides the location at which installed extensions are searched for\&. The default location for extensions is the value of
+\fBjava\&.ext\&.dirs\fR\&.
+.RE
+.SH "EXAMPLE"
+.PP
+Compile the following
+\fBDocFooter\fR
+class:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBimport java\&.awt\&.*;\fR
+\fBimport java\&.applet\&.*;\fR
+\fB \fR
+\fBpublic class DocFooter extends Applet {\fR
+\fB String date;\fR
+\fB String email;\fR
+\fB \fR
+\fB public void init() {\fR
+\fB resize(500,100);\fR
+\fB date = getParameter("LAST_UPDATED");\fR
+\fB email = getParameter("EMAIL");\fR
+\fB }\fR
+\fB \fR
+\fB public void paint(Graphics g) {\fR
+\fB g\&.drawString(date + " by ",100, 15);\fR
+\fB g\&.drawString(email,290,15);\fR
+\fB }\fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+The output from the
+\fBjavap DocFooter\&.class\fR
+command yields the following:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBCompiled from "DocFooter\&.java"\fR
+\fBpublic class DocFooter extends java\&.applet\&.Applet {\fR
+\fB java\&.lang\&.String date;\fR
+\fB java\&.lang\&.String email;\fR
+\fB public DocFooter();\fR
+\fB public void init();\fR
+\fB public void paint(java\&.awt\&.Graphics);\fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+The output from
+\fBjavap \-c DocFooter\&.class\fR
+command yields the following:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBCompiled from "DocFooter\&.java"\fR
+\fBpublic class DocFooter extends java\&.applet\&.Applet {\fR
+\fB java\&.lang\&.String date;\fR
+\fB java\&.lang\&.String email;\fR
+
+\fB public DocFooter();\fR
+\fB Code:\fR
+\fB 0: aload_0 \fR
+\fB 1: invokespecial #1 // Method\fR
+\fBjava/applet/Applet\&."<init>":()V\fR
+\fB 4: return \fR
+
+\fB public void init();\fR
+\fB Code:\fR
+\fB 0: aload_0 \fR
+\fB 1: sipush 500\fR
+\fB 4: bipush 100\fR
+\fB 6: invokevirtual #2 // Method resize:(II)V\fR
+\fB 9: aload_0 \fR
+\fB 10: aload_0 \fR
+\fB 11: ldc #3 // String LAST_UPDATED\fR
+\fB 13: invokevirtual #4 // Method\fR
+\fB getParameter:(Ljava/lang/String;)Ljava/lang/String;\fR
+\fB 16: putfield #5 // Field date:Ljava/lang/String;\fR
+\fB 19: aload_0 \fR
+\fB 20: aload_0 \fR
+\fB 21: ldc #6 // String EMAIL\fR
+\fB 23: invokevirtual #4 // Method\fR
+\fB getParameter:(Ljava/lang/String;)Ljava/lang/String;\fR
+\fB 26: putfield #7 // Field email:Ljava/lang/String;\fR
+\fB 29: return \fR
+
+\fB public void paint(java\&.awt\&.Graphics);\fR
+\fB Code:\fR
+\fB 0: aload_1 \fR
+\fB 1: new #8 // class java/lang/StringBuilder\fR
+\fB 4: dup \fR
+\fB 5: invokespecial #9 // Method\fR
+\fB java/lang/StringBuilder\&."<init>":()V\fR
+\fB 8: aload_0 \fR
+\fB 9: getfield #5 // Field date:Ljava/lang/String;\fR
+\fB 12: invokevirtual #10 // Method\fR
+\fB java/lang/StringBuilder\&.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;\fR
+\fB 15: ldc #11 // String by \fR
+\fB 17: invokevirtual #10 // Method\fR
+\fB java/lang/StringBuilder\&.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;\fR
+\fB 20: invokevirtual #12 // Method\fR
+\fB java/lang/StringBuilder\&.toString:()Ljava/lang/String;\fR
+\fB 23: bipush 100\fR
+\fB 25: bipush 15\fR
+\fB 27: invokevirtual #13 // Method\fR
+\fB java/awt/Graphics\&.drawString:(Ljava/lang/String;II)V\fR
+\fB 30: aload_1 \fR
+\fB 31: aload_0 \fR
+\fB 32: getfield #7 // Field email:Ljava/lang/String;\fR
+\fB 35: sipush 290\fR
+\fB 38: bipush 15\fR
+\fB 40: invokevirtual #13 // Method\fR
+\fBjava/awt/Graphics\&.drawString:(Ljava/lang/String;II)V\fR
+\fB 43: return \fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.SH "SEE ALSO"
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
java(1)
-.TP 0.2i
-\(bu
-jdb(1)
-.TP 0.2i
-\(bu
-javah(1)
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+javac(1)
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
javadoc(1)
-.RE
-.br
-'pl 8.5i
-'bp
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+javah(1)
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+jdb(1)
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+jdeps(1)
+.RE
+.br
+'pl 8.5i
+'bp
diff --git a/src/macosx/classes/com/apple/laf/AquaComboBoxPopup.java b/src/macosx/classes/com/apple/laf/AquaComboBoxPopup.java
index 0607f9c36..b393338d0 100644
--- a/src/macosx/classes/com/apple/laf/AquaComboBoxPopup.java
+++ b/src/macosx/classes/com/apple/laf/AquaComboBoxPopup.java
@@ -120,6 +120,10 @@ class AquaComboBoxPopup extends BasicComboPopup {
public void show() {
final int startItemCount = comboBox.getItemCount();
+ if (startItemCount == 0) {
+ return;
+ }
+
final Rectangle popupBounds = adjustPopupAndGetBounds();
if (popupBounds == null) return; // null means don't show
diff --git a/src/macosx/classes/sun/lwawt/LWChoicePeer.java b/src/macosx/classes/sun/lwawt/LWChoicePeer.java
index bb360d6d6..27d43b1bf 100644
--- a/src/macosx/classes/sun/lwawt/LWChoicePeer.java
+++ b/src/macosx/classes/sun/lwawt/LWChoicePeer.java
@@ -171,7 +171,9 @@ final class LWChoicePeer extends LWComponentPeer<Choice, JComboBox<String>>
SwingUtilities.invokeLater(() -> {
JPopupMenu popupMenu = getPopupMenu();
// Need to override the invoker for proper grab handling
- if (popupMenu != null && popupMenu.getInvoker() != getTarget()) {
+ if (popupMenu != null
+ && popupMenu.isShowing()
+ && popupMenu.getInvoker() != getTarget()) {
// The popup is now visible with correct location
// Save it and restore after toggling visibility and changing invoker
Point loc = popupMenu.getLocationOnScreen();
diff --git a/src/macosx/classes/sun/lwawt/LWComponentPeer.java b/src/macosx/classes/sun/lwawt/LWComponentPeer.java
index 5880d06be..66fa8276c 100644
--- a/src/macosx/classes/sun/lwawt/LWComponentPeer.java
+++ b/src/macosx/classes/sun/lwawt/LWComponentPeer.java
@@ -319,6 +319,8 @@ public abstract class LWComponentPeer<T extends Component, D extends JComponent>
* subclasses to initialize specific peers properties.
*/
void initializeImpl() {
+ // note that these methods can be overridden by the user and
+ // can return some strange values like null.
setBackground(target.getBackground());
setForeground(target.getForeground());
setFont(target.getFont());
diff --git a/src/macosx/classes/sun/lwawt/LWWindowPeer.java b/src/macosx/classes/sun/lwawt/LWWindowPeer.java
index 226d8c686..b72ef77d8 100644
--- a/src/macosx/classes/sun/lwawt/LWWindowPeer.java
+++ b/src/macosx/classes/sun/lwawt/LWWindowPeer.java
@@ -444,6 +444,12 @@ public class LWWindowPeer
}
@Override
+ public void setBackground(final Color c) {
+ super.setBackground(c);
+ updateOpaque();
+ }
+
+ @Override
public void setOpacity(float opacity) {
getPlatformWindow().setOpacity(opacity);
repaintPeer();
diff --git a/src/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java b/src/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java
index 7aab0b58f..5251cb614 100644
--- a/src/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java
+++ b/src/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java
@@ -96,7 +96,8 @@ public class CEmbeddedFrame extends EmbeddedFrame {
public void handleKeyEvent(int eventType, int modifierFlags, String characters,
String charsIgnoringMods, boolean isRepeat, short keyCode,
boolean needsKeyTyped) {
- responder.handleKeyEvent(eventType, modifierFlags, charsIgnoringMods, keyCode, needsKeyTyped, isRepeat);
+ responder.handleKeyEvent(eventType, modifierFlags, characters, charsIgnoringMods,
+ keyCode, needsKeyTyped, isRepeat);
}
public void handleInputEvent(String text) {
diff --git a/src/macosx/classes/sun/lwawt/macosx/CPlatformLWWindow.java b/src/macosx/classes/sun/lwawt/macosx/CPlatformLWWindow.java
index d7a912643..9c2edf227 100644
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformLWWindow.java
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformLWWindow.java
@@ -29,12 +29,18 @@ import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.GraphicsDevice;
+import java.awt.GraphicsEnvironment;
import java.awt.Insets;
import java.awt.MenuBar;
import java.awt.Point;
+import java.awt.Rectangle;
import java.awt.Window;
+import sun.awt.CGraphicsDevice;
+import sun.awt.CGraphicsEnvironment;
import sun.awt.CausedFocusEvent;
+import sun.awt.LightweightFrame;
import sun.java2d.SurfaceData;
+import sun.lwawt.LWLightweightFramePeer;
import sun.lwawt.LWWindowPeer;
import sun.lwawt.PlatformWindow;
@@ -73,11 +79,6 @@ public class CPlatformLWWindow extends CPlatformWindow {
}
@Override
- public GraphicsDevice getGraphicsDevice() {
- return null;
- }
-
- @Override
public SurfaceData getScreenSurface() {
return null;
}
@@ -199,4 +200,24 @@ public class CPlatformLWWindow extends CPlatformWindow {
public long getLayerPtr() {
return 0;
}
+
+ @Override
+ public GraphicsDevice getGraphicsDevice() {
+ CGraphicsEnvironment ge = (CGraphicsEnvironment)GraphicsEnvironment.
+ getLocalGraphicsEnvironment();
+
+ LWLightweightFramePeer peer = (LWLightweightFramePeer)getPeer();
+ int scale = ((LightweightFrame)peer.getTarget()).getScaleFactor();
+
+ Rectangle bounds = ((LightweightFrame)peer.getTarget()).getHostBounds();
+ for (GraphicsDevice d : ge.getScreenDevices()) {
+ if (d.getDefaultConfiguration().getBounds().intersects(bounds) &&
+ ((CGraphicsDevice)d).getScaleFactor() == scale)
+ {
+ return d;
+ }
+ }
+ // We shouldn't be here...
+ return ge.getDefaultScreenDevice();
+ }
}
diff --git a/src/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java b/src/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java
index d8d155545..591c16d28 100644
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java
@@ -125,7 +125,7 @@ final class CPlatformResponder {
/**
* Handles key events.
*/
- void handleKeyEvent(int eventType, int modifierFlags, String chars,
+ void handleKeyEvent(int eventType, int modifierFlags, String chars, String charsIgnoringModifiers,
short keyCode, boolean needsKeyTyped, boolean needsKeyReleased) {
boolean isFlagsChangedEvent =
isNpapiCallback ? (eventType == CocoaConstants.NPCocoaEventFlagsChanged) :
@@ -153,7 +153,10 @@ final class CPlatformResponder {
testChar = chars.charAt(0);
}
- int[] in = new int[] {testChar, isDeadChar ? 1 : 0, modifierFlags, keyCode};
+ char testCharIgnoringModifiers = charsIgnoringModifiers != null && charsIgnoringModifiers.length() > 0 ?
+ charsIgnoringModifiers.charAt(0) : KeyEvent.CHAR_UNDEFINED;
+
+ int[] in = new int[] {testCharIgnoringModifiers, isDeadChar ? 1 : 0, modifierFlags, keyCode};
int[] out = new int[3]; // [jkeyCode, jkeyLocation, deadChar]
postsTyped = NSEvent.nsToJavaKeyInfo(in, out);
diff --git a/src/macosx/classes/sun/lwawt/macosx/CPlatformView.java b/src/macosx/classes/sun/lwawt/macosx/CPlatformView.java
index e81371b47..3c2cd2325 100644
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformView.java
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformView.java
@@ -200,7 +200,7 @@ public class CPlatformView extends CFRetainedResource {
}
private void deliverKeyEvent(NSEvent event) {
- responder.handleKeyEvent(event.getType(), event.getModifierFlags(),
+ responder.handleKeyEvent(event.getType(), event.getModifierFlags(), event.getCharacters(),
event.getCharactersIgnoringModifiers(), event.getKeyCode(), true, false);
}
diff --git a/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java b/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java
index a9de01d0d..aa21535d3 100644
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java
@@ -119,6 +119,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
static final int NONACTIVATING = 1 << 24;
static final int IS_DIALOG = 1 << 25;
static final int IS_MODAL = 1 << 26;
+ static final int IS_POPUP = 1 << 27;
static final int _STYLE_PROP_BITMASK = DECORATED | TEXTURED | UNIFIED | UTILITY | HUD | SHEET | CLOSEABLE | MINIMIZABLE | RESIZABLE;
@@ -318,6 +319,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
styleBits = SET(styleBits, TEXTURED, false);
// Popups in applets don't activate applet's process
styleBits = SET(styleBits, NONACTIVATING, true);
+ styleBits = SET(styleBits, IS_POPUP, true);
}
if (Window.Type.UTILITY.equals(target.getType())) {
@@ -745,20 +747,22 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
@Override
public void setOpaque(boolean isOpaque) {
CWrapper.NSWindow.setOpaque(getNSWindowPtr(), isOpaque);
- boolean isTextured = (peer == null)? false : peer.isTextured();
- if (!isOpaque && !isTextured) {
- long clearColor = CWrapper.NSColor.clearColor();
- CWrapper.NSWindow.setBackgroundColor(getNSWindowPtr(), clearColor);
+ boolean isTextured = (peer == null) ? false : peer.isTextured();
+ if (!isTextured) {
+ if (!isOpaque) {
+ CWrapper.NSWindow.setBackgroundColor(getNSWindowPtr(), 0);
+ } else if (peer != null) {
+ Color color = peer.getBackground();
+ if (color != null) {
+ int rgb = color.getRGB();
+ CWrapper.NSWindow.setBackgroundColor(getNSWindowPtr(), rgb);
+ }
+ }
}
//This is a temporary workaround. Looks like after 7124236 will be fixed
//the correct place for invalidateShadow() is CGLayer.drawInCGLContext.
- SwingUtilities.invokeLater(new Runnable() {
- @Override
- public void run() {
- invalidateShadow();
- }
- });
+ SwingUtilities.invokeLater(this::invalidateShadow);
}
@Override
diff --git a/src/macosx/classes/sun/lwawt/macosx/CWrapper.java b/src/macosx/classes/sun/lwawt/macosx/CWrapper.java
index 8c2e9c01f..f0fec624d 100644
--- a/src/macosx/classes/sun/lwawt/macosx/CWrapper.java
+++ b/src/macosx/classes/sun/lwawt/macosx/CWrapper.java
@@ -61,7 +61,14 @@ final class CWrapper {
static native void setAlphaValue(long window, float alpha);
static native void setOpaque(long window, boolean opaque);
- static native void setBackgroundColor(long window, long color);
+
+ /**
+ * Sets background color of the NSWindow.
+ *
+ * @param window the pointer of the NSWindow
+ * @param color the color in argb format
+ */
+ static native void setBackgroundColor(long window, int color);
static native void miniaturize(long window);
static native void deminiaturize(long window);
@@ -82,8 +89,4 @@ final class CWrapper {
static native void setToolTip(long view, String msg);
}
-
- static final class NSColor {
- static native long clearColor();
- }
}
diff --git a/src/macosx/classes/sun/lwawt/macosx/NSEvent.java b/src/macosx/classes/sun/lwawt/macosx/NSEvent.java
index ddb74d42b..d30a39cdf 100644
--- a/src/macosx/classes/sun/lwawt/macosx/NSEvent.java
+++ b/src/macosx/classes/sun/lwawt/macosx/NSEvent.java
@@ -47,13 +47,15 @@ final class NSEvent {
// Key event information
private short keyCode;
+ private String characters;
private String charactersIgnoringModifiers;
// Called from native
- NSEvent(int type, int modifierFlags, short keyCode, String charactersIgnoringModifiers) {
+ NSEvent(int type, int modifierFlags, short keyCode, String characters, String charactersIgnoringModifiers) {
this.type = type;
this.modifierFlags = modifierFlags;
this.keyCode = keyCode;
+ this.characters = characters;
this.charactersIgnoringModifiers = charactersIgnoringModifiers;
}
@@ -121,12 +123,16 @@ final class NSEvent {
return charactersIgnoringModifiers;
}
+ String getCharacters() {
+ return characters;
+ }
+
@Override
public String toString() {
return "NSEvent[" + getType() + " ," + getModifierFlags() + " ,"
+ getClickCount() + " ," + getButtonNumber() + " ," + getX() + " ,"
+ getY() + " ," + getAbsX() + " ," + getAbsY()+ " ," + getKeyCode() + " ,"
- + getCharactersIgnoringModifiers() + "]";
+ + getCharacters() + " ," + getCharactersIgnoringModifiers() + "]";
}
/*
diff --git a/src/macosx/native/sun/awt/AWTView.m b/src/macosx/native/sun/awt/AWTView.m
index 1608246e0..d200ed8f3 100644
--- a/src/macosx/native/sun/awt/AWTView.m
+++ b/src/macosx/native/sun/awt/AWTView.m
@@ -367,7 +367,7 @@ AWT_ASSERT_APPKIT_THREAD;
// TODO: need consitent way for doing that both with global as well as with local coordinates.
// The reason to do it here is one more native method for getting screen dimension otherwise.
- NSRect screenRect = [[NSScreen mainScreen] frame];
+ NSRect screenRect = [[[NSScreen screens] objectAtIndex:0] frame];
absP.y = screenRect.size.height - absP.y;
jint clickCount;
@@ -441,17 +441,20 @@ AWT_ASSERT_APPKIT_THREAD;
JNIEnv *env = [ThreadUtilities getJNIEnv];
jstring characters = NULL;
+ jstring charactersIgnoringModifiers = NULL;
if ([event type] != NSFlagsChanged) {
characters = JNFNSToJavaString(env, [event characters]);
+ charactersIgnoringModifiers = JNFNSToJavaString(env, [event charactersIgnoringModifiers]);
}
static JNF_CLASS_CACHE(jc_NSEvent, "sun/lwawt/macosx/NSEvent");
- static JNF_CTOR_CACHE(jctor_NSEvent, jc_NSEvent, "(IISLjava/lang/String;)V");
+ static JNF_CTOR_CACHE(jctor_NSEvent, jc_NSEvent, "(IISLjava/lang/String;Ljava/lang/String;)V");
jobject jevent = JNFNewObject(env, jctor_NSEvent,
[event type],
[event modifierFlags],
[event keyCode],
- characters);
+ characters,
+ charactersIgnoringModifiers);
static JNF_CLASS_CACHE(jc_PlatformView, "sun/lwawt/macosx/CPlatformView");
static JNF_MEMBER_CACHE(jm_deliverKeyEvent, jc_PlatformView,
diff --git a/src/macosx/native/sun/awt/AWTWindow.m b/src/macosx/native/sun/awt/AWTWindow.m
index 9a16249ec..4c13c08db 100644
--- a/src/macosx/native/sun/awt/AWTWindow.m
+++ b/src/macosx/native/sun/awt/AWTWindow.m
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -252,6 +252,10 @@ AWT_ASSERT_APPKIT_THREAD;
self.ownerWindow = owner;
[self setPropertiesForStyleBits:styleBits mask:MASK(_METHOD_PROP_BITMASK)];
+ if (IS(self.styleBits, IS_POPUP)) {
+ [self.nsWindow setCollectionBehavior:(1 << 8) /*NSWindowCollectionBehaviorFullScreenAuxiliary*/];
+ }
+
return self;
}
diff --git a/src/macosx/native/sun/awt/CGraphicsDevice.m b/src/macosx/native/sun/awt/CGraphicsDevice.m
index e20792a23..c04a6a380 100644
--- a/src/macosx/native/sun/awt/CGraphicsDevice.m
+++ b/src/macosx/native/sun/awt/CGraphicsDevice.m
@@ -57,7 +57,7 @@ static CFMutableArrayRef getAllValidDisplayModes(jint displayID){
CFArrayRef allModes = CGDisplayCopyAllDisplayModes(displayID, NULL);
CFIndex numModes = CFArrayGetCount(allModes);
- CFMutableArrayRef validModes = CFArrayCreateMutable(kCFAllocatorDefault, numModes + 1, NULL);
+ CFMutableArrayRef validModes = CFArrayCreateMutable(kCFAllocatorDefault, numModes + 1, &kCFTypeArrayCallBacks);
CFIndex n;
for (n=0; n < numModes; n++) {
diff --git a/src/macosx/native/sun/awt/CWrapper.m b/src/macosx/native/sun/awt/CWrapper.m
index 247358f0d..bf0d6b2fc 100644
--- a/src/macosx/native/sun/awt/CWrapper.m
+++ b/src/macosx/native/sun/awt/CWrapper.m
@@ -337,12 +337,17 @@ JNF_COCOA_EXIT(env);
*/
JNIEXPORT void JNICALL
Java_sun_lwawt_macosx_CWrapper_00024NSWindow_setBackgroundColor
-(JNIEnv *env, jclass cls, jlong windowPtr, jlong colorPtr)
+(JNIEnv *env, jclass cls, jlong windowPtr, jint rgb)
{
JNF_COCOA_ENTER(env);
NSWindow *window = (NSWindow *)jlong_to_ptr(windowPtr);
- NSColor *color = (NSColor *)jlong_to_ptr(colorPtr);
+ CGFloat alpha = (((rgb >> 24) & 0xff) / 255.0);
+ CGFloat red = (((rgb >> 16) & 0xff) / 255.0);
+ CGFloat green = (((rgb >> 8) & 0xff) / 255.0);
+ CGFloat blue = (((rgb >> 0) & 0xff) / 255.0);
+ NSColor *color = [NSColor colorWithCalibratedRed:red green:green blue:blue
+ alpha:alpha];
[ThreadUtilities performOnMainThreadWaiting:NO block:^(){
[window setBackgroundColor:color];
}];
@@ -575,26 +580,3 @@ JNF_COCOA_ENTER(env);
JNF_COCOA_EXIT(env);
}
-
-/*
- * Class: sun_lwawt_macosx_CWrapper$NSColor
- * Method: clearColor
- * Signature: ()J
- */
-JNIEXPORT jlong JNICALL
-Java_sun_lwawt_macosx_CWrapper_00024NSColor_clearColor
-(JNIEnv *env, jclass cls)
-{
- __block jlong clearColorPtr = 0L;
-
-JNF_COCOA_ENTER(env);
-
- [ThreadUtilities performOnMainThreadWaiting:YES block:^(){
- clearColorPtr = ptr_to_jlong([NSColor clearColor]);
- }];
-
-JNF_COCOA_EXIT(env);
-
- return clearColorPtr;
-}
-
diff --git a/src/share/classes/com/sun/jndi/ldap/Connection.java b/src/share/classes/com/sun/jndi/ldap/Connection.java
index 65a675ffd..d41c94480 100644
--- a/src/share/classes/com/sun/jndi/ldap/Connection.java
+++ b/src/share/classes/com/sun/jndi/ldap/Connection.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -459,10 +459,10 @@ public final class Connection implements Runnable {
// will be woken up before readTimeout only if reply is
// available
ldr.wait(readTimeout);
- waited = true;
} else {
ldr.wait(15 * 1000); // 15 second timeout
}
+ waited = true;
} else {
break;
}
@@ -474,7 +474,7 @@ public final class Connection implements Runnable {
}
if ((rber == null) && waited) {
- removeRequest(ldr);
+ abandonRequest(ldr, null);
throw new NamingException("LDAP response read timed out, timeout used:"
+ readTimeout + "ms." );
diff --git a/src/share/classes/java/awt/geom/Path2D.java b/src/share/classes/java/awt/geom/Path2D.java
index 9f7df2135..e5a1307d5 100644
--- a/src/share/classes/java/awt/geom/Path2D.java
+++ b/src/share/classes/java/awt/geom/Path2D.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -285,6 +285,8 @@ public abstract class Path2D implements Shape, Cloneable {
int grow = size;
if (grow > EXPAND_MAX) {
grow = EXPAND_MAX;
+ } else if (grow == 0) {
+ grow = 1;
}
pointTypes = Arrays.copyOf(pointTypes, size+grow);
}
@@ -1121,6 +1123,8 @@ public abstract class Path2D implements Shape, Cloneable {
int grow = size;
if (grow > EXPAND_MAX) {
grow = EXPAND_MAX;
+ } else if (grow == 0) {
+ grow = 1;
}
pointTypes = Arrays.copyOf(pointTypes, size+grow);
}
diff --git a/src/share/classes/java/lang/Class.java b/src/share/classes/java/lang/Class.java
index ea47cca2f..eb2b8b80a 100644
--- a/src/share/classes/java/lang/Class.java
+++ b/src/share/classes/java/lang/Class.java
@@ -2697,12 +2697,26 @@ public final class Class<T> implements java.io.Serializable,
}
static class MethodArray {
+ // Don't add or remove methods except by add() or remove() calls.
private Method[] methods;
private int length;
+ private int defaults;
MethodArray() {
- methods = new Method[20];
+ this(20);
+ }
+
+ MethodArray(int initialSize) {
+ if (initialSize < 2)
+ throw new IllegalArgumentException("Size should be 2 or more");
+
+ methods = new Method[initialSize];
length = 0;
+ defaults = 0;
+ }
+
+ boolean hasDefaults() {
+ return defaults != 0;
}
void add(Method m) {
@@ -2710,6 +2724,9 @@ public final class Class<T> implements java.io.Serializable,
methods = Arrays.copyOf(methods, 2 * methods.length);
}
methods[length++] = m;
+
+ if (m != null && m.isDefault())
+ defaults++;
}
void addAll(Method[] ma) {
@@ -2743,7 +2760,10 @@ public final class Class<T> implements java.io.Serializable,
}
}
- void addAllNonStatic(Method[] methods) {
+ /* Add Methods declared in an interface to this MethodArray.
+ * Static methods declared in interfaces are not inherited.
+ */
+ void addInterfaceMethods(Method[] methods) {
for (Method candidate : methods) {
if (!Modifier.isStatic(candidate.getModifiers())) {
add(candidate);
@@ -2759,19 +2779,35 @@ public final class Class<T> implements java.io.Serializable,
return methods[i];
}
- void removeByNameAndSignature(Method toRemove) {
+ Method getFirst() {
+ for (Method m : methods)
+ if (m != null)
+ return m;
+ return null;
+ }
+
+ void removeByNameAndDescriptor(Method toRemove) {
for (int i = 0; i < length; i++) {
Method m = methods[i];
- if (m != null &&
- m.getReturnType() == toRemove.getReturnType() &&
- m.getName() == toRemove.getName() &&
- arrayContentsEq(m.getParameterTypes(),
- toRemove.getParameterTypes())) {
- methods[i] = null;
+ if (m != null && matchesNameAndDescriptor(m, toRemove)) {
+ remove(i);
}
}
}
+ private void remove(int i) {
+ if (methods[i] != null && methods[i].isDefault())
+ defaults--;
+ methods[i] = null;
+ }
+
+ private boolean matchesNameAndDescriptor(Method m1, Method m2) {
+ return m1.getReturnType() == m2.getReturnType() &&
+ m1.getName() == m2.getName() && // name is guaranteed to be interned
+ arrayContentsEq(m1.getParameterTypes(),
+ m2.getParameterTypes());
+ }
+
void compactAndTrim() {
int newPos = 0;
// Get rid of null slots
@@ -2789,9 +2825,48 @@ public final class Class<T> implements java.io.Serializable,
}
}
+ /* Removes all Methods from this MethodArray that have a more specific
+ * default Method in this MethodArray.
+ *
+ * Users of MethodArray are responsible for pruning Methods that have
+ * a more specific <em>concrete</em> Method.
+ */
+ void removeLessSpecifics() {
+ if (!hasDefaults())
+ return;
+
+ for (int i = 0; i < length; i++) {
+ Method m = get(i);
+ if (m == null || !m.isDefault())
+ continue;
+
+ for (int j = 0; j < length; j++) {
+ if (i == j)
+ continue;
+
+ Method candidate = get(j);
+ if (candidate == null)
+ continue;
+
+ if (!matchesNameAndDescriptor(m, candidate))
+ continue;
+
+ if (hasMoreSpecificClass(m, candidate))
+ remove(j);
+ }
+ }
+ }
+
Method[] getArray() {
return methods;
}
+
+ // Returns true if m1 is more specific than m2
+ static boolean hasMoreSpecificClass(Method m1, Method m2) {
+ Class<?> m1Class = m1.getDeclaringClass();
+ Class<?> m2Class = m2.getDeclaringClass();
+ return m1Class != m2Class && m2Class.isAssignableFrom(m1Class);
+ }
}
@@ -2819,9 +2894,8 @@ public final class Class<T> implements java.io.Serializable,
// out concrete implementations inherited from superclasses at
// the end.
MethodArray inheritedMethods = new MethodArray();
- Class<?>[] interfaces = getInterfaces();
- for (int i = 0; i < interfaces.length; i++) {
- inheritedMethods.addAllNonStatic(interfaces[i].privateGetPublicMethods());
+ for (Class<?> i : getInterfaces()) {
+ inheritedMethods.addInterfaceMethods(i.privateGetPublicMethods());
}
if (!isInterface()) {
Class<?> c = getSuperclass();
@@ -2832,8 +2906,10 @@ public final class Class<T> implements java.io.Serializable,
// interface methods
for (int i = 0; i < supers.length(); i++) {
Method m = supers.get(i);
- if (m != null && !Modifier.isAbstract(m.getModifiers())) {
- inheritedMethods.removeByNameAndSignature(m);
+ if (m != null &&
+ !Modifier.isAbstract(m.getModifiers()) &&
+ !m.isDefault()) {
+ inheritedMethods.removeByNameAndDescriptor(m);
}
}
// Insert superclass's inherited methods before
@@ -2846,9 +2922,10 @@ public final class Class<T> implements java.io.Serializable,
// Filter out all local methods from inherited ones
for (int i = 0; i < methods.length(); i++) {
Method m = methods.get(i);
- inheritedMethods.removeByNameAndSignature(m);
+ inheritedMethods.removeByNameAndDescriptor(m);
}
methods.addAllIfNotPresent(inheritedMethods);
+ methods.removeLessSpecifics();
methods.compactAndTrim();
res = methods.getArray();
if (rd != null) {
@@ -2923,8 +3000,21 @@ public final class Class<T> implements java.io.Serializable,
return (res == null ? res : getReflectionFactory().copyMethod(res));
}
-
private Method getMethod0(String name, Class<?>[] parameterTypes, boolean includeStaticMethods) {
+ MethodArray interfaceCandidates = new MethodArray(2);
+ Method res = privateGetMethodRecursive(name, parameterTypes, includeStaticMethods, interfaceCandidates);
+ if (res != null)
+ return res;
+
+ // Not found on class or superclass directly
+ interfaceCandidates.removeLessSpecifics();
+ return interfaceCandidates.getFirst(); // may be null
+ }
+
+ private Method privateGetMethodRecursive(String name,
+ Class<?>[] parameterTypes,
+ boolean includeStaticMethods,
+ MethodArray allInterfaceCandidates) {
// Note: the intent is that the search algorithm this routine
// uses be equivalent to the ordering imposed by
// privateGetPublicMethods(). It fetches only the declared
@@ -2932,6 +3022,14 @@ public final class Class<T> implements java.io.Serializable,
// number of Method objects which have to be created for the
// common case where the method being requested is declared in
// the class which is being queried.
+ //
+ // Due to default methods, unless a method is found on a superclass,
+ // methods declared in any superinterface needs to be considered.
+ // Collect all candidates declared in superinterfaces in {@code
+ // allInterfaceCandidates} and select the most specific if no match on
+ // a superclass is found.
+
+ // Must _not_ return root methods
Method res;
// Search declared public methods
if ((res = searchMethods(privateGetDeclaredMethods(true),
@@ -2953,7 +3051,7 @@ public final class Class<T> implements java.io.Serializable,
Class<?>[] interfaces = getInterfaces();
for (Class<?> c : interfaces)
if ((res = c.getMethod0(name, parameterTypes, false)) != null)
- return res;
+ allInterfaceCandidates.add(res);
// Not found
return null;
}
diff --git a/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java b/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java
index 43bb0d164..55260ee5a 100644
--- a/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java
+++ b/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java
@@ -39,6 +39,7 @@ import java.lang.reflect.*;
import static java.lang.invoke.MethodHandleStatics.*;
import static java.lang.invoke.MethodHandleNatives.Constants.*;
import sun.invoke.util.VerifyType;
+import sun.reflect.misc.ReflectUtil;
/**
* Code generation backend for LambdaForm.
@@ -595,6 +596,8 @@ class InvokerBytecodeGenerator {
return false; // inner class of some sort
if (cls.getClassLoader() != MethodHandle.class.getClassLoader())
return false; // not on BCP
+ if (ReflectUtil.isVMAnonymousClass(cls)) // FIXME: switch to supported API once it is added
+ return false;
MethodType mtype = member.getMethodOrFieldType();
if (!isStaticallyNameable(mtype.returnType()))
return false;
@@ -613,6 +616,8 @@ class InvokerBytecodeGenerator {
cls = cls.getComponentType();
if (cls.isPrimitive())
return true; // int[].class, for example
+ if (ReflectUtil.isVMAnonymousClass(cls)) // FIXME: switch to supported API once it is added
+ return false;
// could use VerifyAccess.isClassAccessible but the following is a safe approximation
if (cls.getClassLoader() != Object.class.getClassLoader())
return false;
diff --git a/src/share/classes/java/lang/invoke/LambdaForm.java b/src/share/classes/java/lang/invoke/LambdaForm.java
index a5e40ed52..a8291e273 100644
--- a/src/share/classes/java/lang/invoke/LambdaForm.java
+++ b/src/share/classes/java/lang/invoke/LambdaForm.java
@@ -482,7 +482,7 @@ class LambdaForm {
assert(m.getName().equals("interpret" + sig.substring(sig.indexOf('_'))));
LambdaForm form = new LambdaForm(sig);
form.vmentry = m;
- mt.form().setCachedLambdaForm(MethodTypeForm.LF_COUNTER, form);
+ form = mt.form().setCachedLambdaForm(MethodTypeForm.LF_COUNTER, form);
// FIXME: get rid of PREPARED_FORMS; use MethodTypeForm cache only
forms.put(sig, form);
}
diff --git a/src/share/classes/java/lang/invoke/LambdaMetafactory.java b/src/share/classes/java/lang/invoke/LambdaMetafactory.java
index 5bea02055..b6ef976c5 100644
--- a/src/share/classes/java/lang/invoke/LambdaMetafactory.java
+++ b/src/share/classes/java/lang/invoke/LambdaMetafactory.java
@@ -313,7 +313,8 @@ public class LambdaMetafactory {
* reference expression</em> features of the Java Programming Language.
*
* <p>This is the general, more flexible metafactory; a streamlined version
- * is provided by {@link #altMetafactory(MethodHandles.Lookup, String, MethodType, Object...)}.
+ * is provided by {@link #metafactory(java.lang.invoke.MethodHandles.Lookup,
+ * String, MethodType, MethodType, MethodHandle, MethodType)}.
* A general description of the behavior of this method is provided
* {@link LambdaMetafactory above}.
*
diff --git a/src/share/classes/java/lang/invoke/MethodHandleImpl.java b/src/share/classes/java/lang/invoke/MethodHandleImpl.java
index cdf6e5a75..ee1584f80 100644
--- a/src/share/classes/java/lang/invoke/MethodHandleImpl.java
+++ b/src/share/classes/java/lang/invoke/MethodHandleImpl.java
@@ -692,8 +692,7 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
lform = new LambdaForm("guardWithCatch", lambdaType.parameterCount(), names);
- basicType.form().setCachedLambdaForm(MethodTypeForm.LF_GWC, lform);
- return lform;
+ return basicType.form().setCachedLambdaForm(MethodTypeForm.LF_GWC, lform);
}
static
diff --git a/src/share/classes/java/lang/invoke/MethodHandles.java b/src/share/classes/java/lang/invoke/MethodHandles.java
index f3b904ea9..09103d534 100644
--- a/src/share/classes/java/lang/invoke/MethodHandles.java
+++ b/src/share/classes/java/lang/invoke/MethodHandles.java
@@ -1617,23 +1617,30 @@ return mh1;
checkSecurityManager(refc, method);
assert(!method.isMethodHandleInvoke());
- Class<?> refcAsSuper;
if (refKind == REF_invokeSpecial &&
refc != lookupClass() &&
!refc.isInterface() &&
- refc != (refcAsSuper = lookupClass().getSuperclass()) &&
+ refc != lookupClass().getSuperclass() &&
refc.isAssignableFrom(lookupClass())) {
assert(!method.getName().equals("<init>")); // not this code path
// Per JVMS 6.5, desc. of invokespecial instruction:
// If the method is in a superclass of the LC,
// and if our original search was above LC.super,
- // repeat the search (symbolic lookup) from LC.super.
+ // repeat the search (symbolic lookup) from LC.super
+ // and continue with the direct superclass of that class,
+ // and so forth, until a match is found or no further superclasses exist.
// FIXME: MemberName.resolve should handle this instead.
- MemberName m2 = new MemberName(refcAsSuper,
- method.getName(),
- method.getMethodType(),
- REF_invokeSpecial);
- m2 = IMPL_NAMES.resolveOrNull(refKind, m2, lookupClassOrNull());
+ Class<?> refcAsSuper = lookupClass();
+ MemberName m2;
+ do {
+ refcAsSuper = refcAsSuper.getSuperclass();
+ m2 = new MemberName(refcAsSuper,
+ method.getName(),
+ method.getMethodType(),
+ REF_invokeSpecial);
+ m2 = IMPL_NAMES.resolveOrNull(refKind, m2, lookupClassOrNull());
+ } while (m2 == null && // no method is found yet
+ refc != refcAsSuper); // search up to refc
if (m2 == null) throw new InternalError(method.toString());
method = m2;
refc = refcAsSuper;
diff --git a/src/share/classes/java/lang/invoke/MethodTypeForm.java b/src/share/classes/java/lang/invoke/MethodTypeForm.java
index ee5e6221b..d34a2998c 100644
--- a/src/share/classes/java/lang/invoke/MethodTypeForm.java
+++ b/src/share/classes/java/lang/invoke/MethodTypeForm.java
@@ -91,8 +91,10 @@ final class MethodTypeForm {
return lambdaForms[which];
}
- public LambdaForm setCachedLambdaForm(int which, LambdaForm form) {
- // Should we perform some sort of CAS, to avoid racy duplication?
+ synchronized public LambdaForm setCachedLambdaForm(int which, LambdaForm form) {
+ // Simulate a CAS, to avoid racy duplication of results.
+ LambdaForm prev = lambdaForms[which];
+ if (prev != null) return prev;
return lambdaForms[which] = form;
}
diff --git a/src/share/classes/java/lang/reflect/Executable.java b/src/share/classes/java/lang/reflect/Executable.java
index 95665706c..bf9c9b89b 100644
--- a/src/share/classes/java/lang/reflect/Executable.java
+++ b/src/share/classes/java/lang/reflect/Executable.java
@@ -644,7 +644,7 @@ public abstract class Executable extends AccessibleObject
getConstantPool(getDeclaringClass()),
this,
getDeclaringClass(),
- getParameterTypes(),
+ getGenericParameterTypes(),
TypeAnnotation.TypeAnnotationTarget.METHOD_FORMAL_PARAMETER);
}
diff --git a/src/share/classes/java/time/Instant.java b/src/share/classes/java/time/Instant.java
index 1b944a50c..42e1b8df9 100644
--- a/src/share/classes/java/time/Instant.java
+++ b/src/share/classes/java/time/Instant.java
@@ -375,7 +375,7 @@ public final class Instant
return Instant.ofEpochSecond(instantSecs, nanoOfSecond);
} catch (DateTimeException ex) {
throw new DateTimeException("Unable to obtain Instant from TemporalAccessor: " +
- temporal + " of type " + temporal.getClass().getName());
+ temporal + " of type " + temporal.getClass().getName(), ex);
}
}
@@ -1058,7 +1058,8 @@ public final class Instant
}
// inline TemporalAccessor.super.query(query) as an optimization
if (query == TemporalQueries.chronology() || query == TemporalQueries.zoneId() ||
- query == TemporalQueries.zone() || query == TemporalQueries.offset()) {
+ query == TemporalQueries.zone() || query == TemporalQueries.offset() ||
+ query == TemporalQueries.localDate() || query == TemporalQueries.localTime()) {
return null;
}
return query.queryFrom(this);
diff --git a/src/share/classes/java/time/OffsetDateTime.java b/src/share/classes/java/time/OffsetDateTime.java
index cd0eff6e5..4e505fcaa 100644
--- a/src/share/classes/java/time/OffsetDateTime.java
+++ b/src/share/classes/java/time/OffsetDateTime.java
@@ -357,10 +357,11 @@ public final class OffsetDateTime
}
try {
ZoneOffset offset = ZoneOffset.from(temporal);
- try {
- LocalDateTime ldt = LocalDateTime.from(temporal);
- return OffsetDateTime.of(ldt, offset);
- } catch (DateTimeException ignore) {
+ LocalDate date = temporal.query(TemporalQueries.localDate());
+ LocalTime time = temporal.query(TemporalQueries.localTime());
+ if (date != null && time != null) {
+ return OffsetDateTime.of(date, time, offset);
+ } else {
Instant instant = Instant.from(temporal);
return OffsetDateTime.ofInstant(instant, offset);
}
diff --git a/src/share/classes/java/time/ZonedDateTime.java b/src/share/classes/java/time/ZonedDateTime.java
index 752756bb7..a23ac821d 100644
--- a/src/share/classes/java/time/ZonedDateTime.java
+++ b/src/share/classes/java/time/ZonedDateTime.java
@@ -81,6 +81,7 @@ import java.time.temporal.TemporalAccessor;
import java.time.temporal.TemporalAdjuster;
import java.time.temporal.TemporalAmount;
import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
import java.time.temporal.TemporalQuery;
import java.time.temporal.TemporalUnit;
import java.time.temporal.UnsupportedTemporalTypeException;
@@ -550,14 +551,14 @@ public final class ZonedDateTime
}
try {
ZoneId zone = ZoneId.from(temporal);
- try {
+ if (temporal.isSupported(INSTANT_SECONDS)) {
long epochSecond = temporal.getLong(INSTANT_SECONDS);
int nanoOfSecond = temporal.get(NANO_OF_SECOND);
return create(epochSecond, nanoOfSecond, zone);
-
- } catch (DateTimeException ex1) {
- LocalDateTime ldt = LocalDateTime.from(temporal);
- return of(ldt, zone);
+ } else {
+ LocalDate date = LocalDate.from(temporal);
+ LocalTime time = LocalTime.from(temporal);
+ return of(date, time, zone);
}
} catch (DateTimeException ex) {
throw new DateTimeException("Unable to obtain ZonedDateTime from TemporalAccessor: " +
@@ -2037,8 +2038,12 @@ public final class ZonedDateTime
* @throws DateTimeException if unable to query (defined by the query)
* @throws ArithmeticException if numeric overflow occurs (defined by the query)
*/
+ @SuppressWarnings("unchecked")
@Override // override for Javadoc
public <R> R query(TemporalQuery<R> query) {
+ if (query == TemporalQueries.localDate()) {
+ return (R) toLocalDate();
+ }
return ChronoZonedDateTime.super.query(query);
}
diff --git a/src/share/classes/java/time/format/DateTimeFormatterBuilder.java b/src/share/classes/java/time/format/DateTimeFormatterBuilder.java
index f04d59b23..d0db09f07 100644
--- a/src/share/classes/java/time/format/DateTimeFormatterBuilder.java
+++ b/src/share/classes/java/time/format/DateTimeFormatterBuilder.java
@@ -3286,7 +3286,7 @@ public final class DateTimeFormatterBuilder {
} catch (RuntimeException ex) {
return ~position;
}
- int successPos = text.length();
+ int successPos = pos;
successPos = context.setParsedField(INSTANT_SECONDS, instantSecs, position, successPos);
return context.setParsedField(NANO_OF_SECOND, nano, position, successPos);
}
diff --git a/src/share/classes/java/time/format/Parsed.java b/src/share/classes/java/time/format/Parsed.java
index 1ae19b58a..1eb884544 100644
--- a/src/share/classes/java/time/format/Parsed.java
+++ b/src/share/classes/java/time/format/Parsed.java
@@ -66,6 +66,7 @@ import static java.time.temporal.ChronoField.CLOCK_HOUR_OF_AMPM;
import static java.time.temporal.ChronoField.CLOCK_HOUR_OF_DAY;
import static java.time.temporal.ChronoField.HOUR_OF_AMPM;
import static java.time.temporal.ChronoField.HOUR_OF_DAY;
+import static java.time.temporal.ChronoField.INSTANT_SECONDS;
import static java.time.temporal.ChronoField.MICRO_OF_DAY;
import static java.time.temporal.ChronoField.MICRO_OF_SECOND;
import static java.time.temporal.ChronoField.MILLI_OF_DAY;
@@ -74,14 +75,17 @@ import static java.time.temporal.ChronoField.MINUTE_OF_DAY;
import static java.time.temporal.ChronoField.MINUTE_OF_HOUR;
import static java.time.temporal.ChronoField.NANO_OF_DAY;
import static java.time.temporal.ChronoField.NANO_OF_SECOND;
+import static java.time.temporal.ChronoField.OFFSET_SECONDS;
import static java.time.temporal.ChronoField.SECOND_OF_DAY;
import static java.time.temporal.ChronoField.SECOND_OF_MINUTE;
import java.time.DateTimeException;
+import java.time.Instant;
import java.time.LocalDate;
import java.time.LocalTime;
import java.time.Period;
import java.time.ZoneId;
+import java.time.ZoneOffset;
import java.time.chrono.ChronoLocalDate;
import java.time.chrono.ChronoLocalDateTime;
import java.time.chrono.ChronoZonedDateTime;
@@ -241,12 +245,15 @@ final class Parsed implements TemporalAccessor {
resolveTimeLenient();
crossCheck();
resolvePeriod();
+ resolveFractional();
+ resolveInstant();
return this;
}
//-----------------------------------------------------------------------
private void resolveFields() {
// resolve ChronoField
+ resolveInstantFields();
resolveDateFields();
resolveTimeFields();
@@ -300,6 +307,7 @@ final class Parsed implements TemporalAccessor {
}
// if something changed then have to redo ChronoField resolve
if (changedCount > 0) {
+ resolveInstantFields();
resolveDateFields();
resolveTimeFields();
}
@@ -316,6 +324,29 @@ final class Parsed implements TemporalAccessor {
}
//-----------------------------------------------------------------------
+ private void resolveInstantFields() {
+ // resolve parsed instant seconds to date and time if zone available
+ if (fieldValues.containsKey(INSTANT_SECONDS)) {
+ if (zone != null) {
+ resolveInstantFields0(zone);
+ } else {
+ Long offsetSecs = fieldValues.get(OFFSET_SECONDS);
+ if (offsetSecs != null) {
+ ZoneOffset offset = ZoneOffset.ofTotalSeconds(offsetSecs.intValue());
+ resolveInstantFields0(offset);
+ }
+ }
+ }
+ }
+
+ private void resolveInstantFields0(ZoneId selectedZone) {
+ Instant instant = Instant.ofEpochSecond(fieldValues.remove(INSTANT_SECONDS));
+ ChronoZonedDateTime<?> zdt = chrono.zonedDateTime(instant, selectedZone);
+ updateCheckConflict(zdt.toLocalDate());
+ updateCheckConflict(INSTANT_SECONDS, SECOND_OF_DAY, (long) zdt.toLocalTime().toSecondOfDay());
+ }
+
+ //-----------------------------------------------------------------------
private void resolveDateFields() {
updateCheckConflict(chrono.resolveDate(fieldValues, resolverStyle));
}
@@ -533,6 +564,42 @@ final class Parsed implements TemporalAccessor {
}
}
+ private void resolveFractional() {
+ // ensure fractional seconds available as ChronoField requires
+ // resolveTimeLenient() will have merged MICRO_OF_SECOND/MILLI_OF_SECOND to NANO_OF_SECOND
+ if (time == null &&
+ (fieldValues.containsKey(INSTANT_SECONDS) ||
+ fieldValues.containsKey(SECOND_OF_DAY) ||
+ fieldValues.containsKey(SECOND_OF_MINUTE))) {
+ if (fieldValues.containsKey(NANO_OF_SECOND)) {
+ long nos = fieldValues.get(NANO_OF_SECOND);
+ fieldValues.put(MICRO_OF_SECOND, nos / 1000);
+ fieldValues.put(MILLI_OF_SECOND, nos / 1000000);
+ } else {
+ fieldValues.put(NANO_OF_SECOND, 0L);
+ fieldValues.put(MICRO_OF_SECOND, 0L);
+ fieldValues.put(MILLI_OF_SECOND, 0L);
+ }
+ }
+ }
+
+ private void resolveInstant() {
+ // add instant seconds if we have date, time and zone
+ if (date != null && time != null) {
+ if (zone != null) {
+ long instant = date.atTime(time).atZone(zone).getLong(ChronoField.INSTANT_SECONDS);
+ fieldValues.put(INSTANT_SECONDS, instant);
+ } else {
+ Long offsetSecs = fieldValues.get(OFFSET_SECONDS);
+ if (offsetSecs != null) {
+ ZoneOffset offset = ZoneOffset.ofTotalSeconds(offsetSecs.intValue());
+ long instant = date.atTime(time).atZone(offset).getLong(ChronoField.INSTANT_SECONDS);
+ fieldValues.put(INSTANT_SECONDS, instant);
+ }
+ }
+ }
+ }
+
private void updateCheckConflict(LocalTime timeToSet, Period periodToSet) {
if (time != null) {
if (time.equals(timeToSet) == false) {
@@ -568,18 +635,20 @@ final class Parsed implements TemporalAccessor {
for (Iterator<Entry<TemporalField, Long>> it = fieldValues.entrySet().iterator(); it.hasNext(); ) {
Entry<TemporalField, Long> entry = it.next();
TemporalField field = entry.getKey();
- long val1;
- try {
- val1 = target.getLong(field);
- } catch (RuntimeException ex) {
- continue;
- }
- long val2 = entry.getValue();
- if (val1 != val2) {
- throw new DateTimeException("Conflict found: Field " + field + " " + val1 +
- " differs from " + field + " " + val2 + " derived from " + target);
+ if (target.isSupported(field)) {
+ long val1;
+ try {
+ val1 = target.getLong(field);
+ } catch (RuntimeException ex) {
+ continue;
+ }
+ long val2 = entry.getValue();
+ if (val1 != val2) {
+ throw new DateTimeException("Conflict found: Field " + field + " " + val1 +
+ " differs from " + field + " " + val2 + " derived from " + target);
+ }
+ it.remove();
}
- it.remove();
}
}
diff --git a/src/share/classes/java/time/temporal/IsoFields.java b/src/share/classes/java/time/temporal/IsoFields.java
index 8d9cc84f3..70c3ffb39 100644
--- a/src/share/classes/java/time/temporal/IsoFields.java
+++ b/src/share/classes/java/time/temporal/IsoFields.java
@@ -535,11 +535,17 @@ public final class IsoFields {
if (isSupportedBy(temporal) == false) {
throw new UnsupportedTemporalTypeException("Unsupported field: WeekBasedYear");
}
- int newVal = range().checkValidIntValue(newValue, WEEK_BASED_YEAR); // strict check
+ int newWby = range().checkValidIntValue(newValue, WEEK_BASED_YEAR); // strict check
LocalDate date = LocalDate.from(temporal);
+ int dow = date.get(DAY_OF_WEEK);
int week = getWeek(date);
- date = date.withDayOfYear(180).withYear(newVal).with(WEEK_OF_WEEK_BASED_YEAR, week);
- return (R) date.with(date);
+ if (week == 53 && getWeekRange(newWby) == 52) {
+ week = 52;
+ }
+ LocalDate resolved = LocalDate.of(newWby, 1, 4); // 4th is guaranteed to be in week one
+ int days = (dow - resolved.get(DAY_OF_WEEK)) + ((week - 1) * 7);
+ resolved = resolved.plusDays(days);
+ return (R) temporal.with(resolved);
}
@Override
public String toString() {
@@ -577,12 +583,16 @@ public final class IsoFields {
private static ValueRange getWeekRange(LocalDate date) {
int wby = getWeekBasedYear(date);
- date = date.withDayOfYear(1).withYear(wby);
+ return ValueRange.of(1, getWeekRange(wby));
+ }
+
+ private static int getWeekRange(int wby) {
+ LocalDate date = LocalDate.of(wby, 1, 1);
// 53 weeks if standard year starts on Thursday, or Wed in a leap year
if (date.getDayOfWeek() == THURSDAY || (date.getDayOfWeek() == WEDNESDAY && date.isLeapYear())) {
- return ValueRange.of(1, 53);
+ return 53;
}
- return ValueRange.of(1, 52);
+ return 52;
}
private static int getWeek(LocalDate date) {
diff --git a/src/share/classes/java/time/temporal/WeekFields.java b/src/share/classes/java/time/temporal/WeekFields.java
index 3aa362cea..faee176d3 100644
--- a/src/share/classes/java/time/temporal/WeekFields.java
+++ b/src/share/classes/java/time/temporal/WeekFields.java
@@ -700,7 +700,7 @@ public final class WeekFields implements Serializable {
* @see WeekFields#weekOfWeekBasedYear()
*/
static ComputedDayOfField ofWeekOfWeekBasedYearField(WeekFields weekDef) {
- return new ComputedDayOfField("WeekOfWeekBasedYear", weekDef, WEEKS, IsoFields.WEEK_BASED_YEARS, WEEK_OF_YEAR_RANGE);
+ return new ComputedDayOfField("WeekOfWeekBasedYear", weekDef, WEEKS, IsoFields.WEEK_BASED_YEARS, WEEK_OF_WEEK_BASED_YEAR_RANGE);
}
/**
@@ -753,6 +753,7 @@ public final class WeekFields implements Serializable {
private static final ValueRange DAY_OF_WEEK_RANGE = ValueRange.of(1, 7);
private static final ValueRange WEEK_OF_MONTH_RANGE = ValueRange.of(0, 1, 4, 6);
private static final ValueRange WEEK_OF_YEAR_RANGE = ValueRange.of(0, 1, 52, 54);
+ private static final ValueRange WEEK_OF_WEEK_BASED_YEAR_RANGE = ValueRange.of(1, 52, 53);
@Override
public long getFrom(TemporalAccessor temporal) {
diff --git a/src/share/classes/java/util/HashMap.java b/src/share/classes/java/util/HashMap.java
index ac3f635e4..46a59a796 100644
--- a/src/share/classes/java/util/HashMap.java
+++ b/src/share/classes/java/util/HashMap.java
@@ -1967,7 +1967,7 @@ public class HashMap<K,V> extends AbstractMap<K,V>
dir = -1;
else if (ph < h)
dir = 1;
- else if ((pk = p.key) == k || (pk != null && k.equals(pk)))
+ else if ((pk = p.key) == k || (k != null && k.equals(pk)))
return p;
else if ((kc == null &&
(kc = comparableClassFor(k)) == null) ||
diff --git a/src/share/classes/java/util/zip/ZipInputStream.java b/src/share/classes/java/util/zip/ZipInputStream.java
index 77a598df8..7b4ccc86c 100644
--- a/src/share/classes/java/util/zip/ZipInputStream.java
+++ b/src/share/classes/java/util/zip/ZipInputStream.java
@@ -319,7 +319,8 @@ class ZipInputStream extends InflaterInputStream implements ZipConstants {
if (len > 0) {
byte[] extra = new byte[len];
readFully(extra, 0, len);
- e.setExtra0(extra, true);
+ e.setExtra0(extra,
+ e.csize == ZIP64_MAGICVAL || e.size == ZIP64_MAGICVAL);
}
return e;
}
diff --git a/src/share/classes/javax/swing/DefaultDesktopManager.java b/src/share/classes/javax/swing/DefaultDesktopManager.java
index 806ec3421..e44c9d939 100644
--- a/src/share/classes/javax/swing/DefaultDesktopManager.java
+++ b/src/share/classes/javax/swing/DefaultDesktopManager.java
@@ -677,6 +677,11 @@ public class DefaultDesktopManager implements DesktopManager, java.io.Serializab
f.setBounds(currentBounds);
+ if (!floaterCollision) {
+ Rectangle r = currentBounds;
+ currentManager.notifyRepaintPerformed(parent, r.x, r.y, r.width, r.height);
+ }
+
if(floaterCollision) {
// since we couldn't blit we just redraw as fast as possible
// the isDragging mucking is to avoid activating emergency
@@ -706,6 +711,8 @@ public class DefaultDesktopManager implements DesktopManager, java.io.Serializab
// Fix the damage
for (int i = 0; i < dirtyRects.length; i++) {
parent.paintImmediately(dirtyRects[i]);
+ Rectangle r = dirtyRects[i];
+ currentManager.notifyRepaintPerformed(parent, r.x, r.y, r.width, r.height);
}
// new areas of blit were exposed
@@ -716,9 +723,10 @@ public class DefaultDesktopManager implements DesktopManager, java.io.Serializab
dirtyRects[i].x += newX - previousBounds.x;
dirtyRects[i].y += newY - previousBounds.y;
((JInternalFrame)f).isDragging = false;
-
parent.paintImmediately(dirtyRects[i]);
((JInternalFrame)f).isDragging = true;
+ Rectangle r = dirtyRects[i];
+ currentManager.notifyRepaintPerformed(parent, r.x, r.y, r.width, r.height);
}
}
diff --git a/src/share/classes/javax/swing/JComboBox.java b/src/share/classes/javax/swing/JComboBox.java
index a5af75305..1e0be3c8f 100644
--- a/src/share/classes/javax/swing/JComboBox.java
+++ b/src/share/classes/javax/swing/JComboBox.java
@@ -1307,13 +1307,15 @@ implements ItemSelectable,ListDataListener,ActionListener, Accessible {
* do not call or override.
*/
public void actionPerformed(ActionEvent e) {
- Object newItem = getEditor().getItem();
- setPopupVisible(false);
- getModel().setSelectedItem(newItem);
- String oldCommand = getActionCommand();
- setActionCommand("comboBoxEdited");
- fireActionEvent();
- setActionCommand(oldCommand);
+ ComboBoxEditor editor = getEditor();
+ if ((editor != null) && (e != null) && (editor == e.getSource())) {
+ setPopupVisible(false);
+ getModel().setSelectedItem(editor.getItem());
+ String oldCommand = getActionCommand();
+ setActionCommand("comboBoxEdited");
+ fireActionEvent();
+ setActionCommand(oldCommand);
+ }
}
/**
diff --git a/src/share/classes/javax/swing/JComponent.java b/src/share/classes/javax/swing/JComponent.java
index 8a1bc1826..803c13fd0 100644
--- a/src/share/classes/javax/swing/JComponent.java
+++ b/src/share/classes/javax/swing/JComponent.java
@@ -3676,8 +3676,8 @@ public abstract class JComponent extends Container implements Serializable,
private volatile transient int propertyListenersCount = 0;
/**
- * This field duplicates the one in java.awt.Component.AccessibleAWTComponent,
- * so it has been deprecated.
+ * This field duplicates the function of the accessibleAWTFocusHandler field
+ * in java.awt.Component.AccessibleAWTComponent, so it has been deprecated.
*/
@Deprecated
protected FocusListener accessibleFocusHandler = null;
@@ -3735,14 +3735,10 @@ public abstract class JComponent extends Container implements Serializable,
* @param listener the PropertyChangeListener to be added
*/
public void addPropertyChangeListener(PropertyChangeListener listener) {
- if (accessibleFocusHandler == null) {
- accessibleFocusHandler = new AccessibleFocusHandler();
- }
if (accessibleContainerHandler == null) {
accessibleContainerHandler = new AccessibleContainerHandler();
}
if (propertyListenersCount++ == 0) {
- JComponent.this.addFocusListener(accessibleFocusHandler);
JComponent.this.addContainerListener(accessibleContainerHandler);
}
super.addPropertyChangeListener(listener);
@@ -3757,7 +3753,6 @@ public abstract class JComponent extends Container implements Serializable,
*/
public void removePropertyChangeListener(PropertyChangeListener listener) {
if (--propertyListenersCount == 0) {
- JComponent.this.removeFocusListener(accessibleFocusHandler);
JComponent.this.removeContainerListener(accessibleContainerHandler);
}
super.removePropertyChangeListener(listener);
diff --git a/src/share/classes/javax/swing/JDialog.java b/src/share/classes/javax/swing/JDialog.java
index 4ae5e434c..51228851f 100644
--- a/src/share/classes/javax/swing/JDialog.java
+++ b/src/share/classes/javax/swing/JDialog.java
@@ -646,6 +646,7 @@ public class JDialog extends Dialog implements WindowConstants,
enableEvents(AWTEvent.KEY_EVENT_MASK | AWTEvent.WINDOW_EVENT_MASK);
setLocale( JComponent.getDefaultLocale() );
setRootPane(createRootPane());
+ setBackground(UIManager.getColor("control"));
setRootPaneCheckingEnabled(true);
if (JDialog.isDefaultLookAndFeelDecorated()) {
boolean supportsWindowDecorations =
diff --git a/src/share/classes/javax/swing/JViewport.java b/src/share/classes/javax/swing/JViewport.java
index f8a97e37a..4e5b7240c 100644
--- a/src/share/classes/javax/swing/JViewport.java
+++ b/src/share/classes/javax/swing/JViewport.java
@@ -25,8 +25,6 @@
package javax.swing;
-import sun.swing.JLightweightFrame;
-
import java.awt.*;
import java.awt.event.*;
import java.awt.peer.ComponentPeer;
@@ -37,10 +35,8 @@ import javax.swing.event.*;
import javax.swing.border.*;
import javax.accessibility.*;
-
import java.io.Serializable;
-
/**
* The "viewport" or "porthole" through which you see the underlying
* information. When you scroll, what moves is the viewport. It is like
@@ -363,18 +359,6 @@ public class JViewport extends JComponent implements Accessible
super.remove(child);
}
- @Override
- public void addNotify() {
- super.addNotify();
- // JLightweightFrame does not support BLIT_SCROLL_MODE, so it should be replaced
- Window rootWindow = SwingUtilities.getWindowAncestor(this);
- if (rootWindow instanceof JLightweightFrame
- && getScrollMode() == BLIT_SCROLL_MODE) {
- setScrollMode(BACKINGSTORE_SCROLL_MODE);
- }
- }
-
-
/**
* Scrolls the view so that <code>Rectangle</code>
* within the view becomes visible.
@@ -1108,13 +1092,15 @@ public class JViewport extends JComponent implements Accessible
Graphics g = JComponent.safelyGetGraphics(this);
flushViewDirtyRegion(g, dirty);
view.setLocation(newX, newY);
- g.setClip(0,0,getWidth(), Math.min(getHeight(),
- jview.getHeight()));
+ Rectangle r = new Rectangle(
+ 0, 0, getWidth(), Math.min(getHeight(), jview.getHeight()));
+ g.setClip(r);
// Repaint the complete component if the blit succeeded
// and needsRepaintAfterBlit returns true.
repaintAll = (windowBlitPaint(g) &&
needsRepaintAfterBlit());
g.dispose();
+ rm.notifyRepaintPerformed(this, r.x, r.y, r.width, r.height);
rm.markCompletelyClean((JComponent)getParent());
rm.markCompletelyClean(this);
rm.markCompletelyClean(jview);
diff --git a/src/share/classes/javax/swing/PopupFactory.java b/src/share/classes/javax/swing/PopupFactory.java
index 275a1d3c8..99d0359d3 100644
--- a/src/share/classes/javax/swing/PopupFactory.java
+++ b/src/share/classes/javax/swing/PopupFactory.java
@@ -25,10 +25,14 @@
package javax.swing;
+import sun.awt.EmbeddedFrame;
+import sun.awt.OSInfo;
+
import java.applet.Applet;
import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
+import java.security.AccessController;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -226,7 +230,12 @@ public class PopupFactory {
case MEDIUM_WEIGHT_POPUP:
return getMediumWeightPopup(owner, contents, ownerX, ownerY);
case HEAVY_WEIGHT_POPUP:
- return getHeavyWeightPopup(owner, contents, ownerX, ownerY);
+ Popup popup = getHeavyWeightPopup(owner, contents, ownerX, ownerY);
+ if ((AccessController.doPrivileged(OSInfo.getOSTypeAction()) ==
+ OSInfo.OSType.MACOSX) && (EmbeddedFrame.getAppletIfAncestorOf(owner) != null)) {
+ ((HeavyWeightPopup)popup).setCacheEnabled(false);
+ }
+ return popup;
}
return null;
}
@@ -294,6 +303,8 @@ public class PopupFactory {
private static final Object heavyWeightPopupCacheKey =
new StringBuffer("PopupFactory.heavyWeightPopupCache");
+ private volatile boolean isCacheEnabled = true;
+
/**
* Returns either a new or recycled <code>Popup</code> containing
* the specified children.
@@ -448,12 +459,23 @@ public class PopupFactory {
}
}
+ /**
+ * Enables or disables cache for current object.
+ */
+ void setCacheEnabled(boolean enable) {
+ isCacheEnabled = enable;
+ }
+
//
// Popup methods
//
public void hide() {
super.hide();
- recycleHeavyWeightPopup(this);
+ if (isCacheEnabled) {
+ recycleHeavyWeightPopup(this);
+ } else {
+ this._dispose();
+ }
}
/**
diff --git a/src/share/classes/javax/swing/RepaintManager.java b/src/share/classes/javax/swing/RepaintManager.java
index 5f103d968..c65c826eb 100644
--- a/src/share/classes/javax/swing/RepaintManager.java
+++ b/src/share/classes/javax/swing/RepaintManager.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -45,6 +45,8 @@ import sun.misc.SharedSecrets;
import sun.security.action.GetPropertyAction;
import com.sun.java.swing.SwingUtilities3;
+import sun.swing.SwingAccessor;
+import sun.swing.SwingUtilities2.RepaintListener;
/**
* This class manages repaint requests, allowing the number
@@ -184,6 +186,17 @@ public class RepaintManager
static {
+ SwingAccessor.setRepaintManagerAccessor(new SwingAccessor.RepaintManagerAccessor() {
+ @Override
+ public void addRepaintListener(RepaintManager rm, RepaintListener l) {
+ rm.addRepaintListener(l);
+ }
+ @Override
+ public void removeRepaintListener(RepaintManager rm, RepaintListener l) {
+ rm.removeRepaintListener(l);
+ }
+ });
+
volatileImageBufferEnabled = "true".equals(AccessController.
doPrivileged(new GetPropertyAction(
"swing.volatileImageBufferEnabled", "true")));
@@ -1267,6 +1280,33 @@ public class RepaintManager
getPaintManager().copyArea(c, g, x, y, w, h, deltaX, deltaY, clip);
}
+ private java.util.List<RepaintListener> repaintListeners = new ArrayList<>(1);
+
+ private void addRepaintListener(RepaintListener l) {
+ repaintListeners.add(l);
+ }
+
+ private void removeRepaintListener(RepaintListener l) {
+ repaintListeners.remove(l);
+ }
+
+ /**
+ * Notify the attached repaint listeners that an area of the {@code c} component
+ * has been immediately repainted, that is without scheduling a repaint runnable,
+ * due to performing a "blit" (via calling the {@code copyArea} method).
+ *
+ * @param c the component
+ * @param x the x coordinate of the area
+ * @param y the y coordinate of the area
+ * @param w the width of the area
+ * @param h the height of the area
+ */
+ void notifyRepaintPerformed(JComponent c, int x, int y, int w, int h) {
+ for (RepaintListener l : repaintListeners) {
+ l.repaintPerformed(c, x, y, w, h);
+ }
+ }
+
/**
* Invoked prior to any paint/copyArea method calls. This will
* be followed by an invocation of <code>endPaint</code>.
diff --git a/src/share/classes/javax/swing/plaf/metal/MetalTabbedPaneUI.java b/src/share/classes/javax/swing/plaf/metal/MetalTabbedPaneUI.java
index d036a5e0d..9d34a4dd5 100644
--- a/src/share/classes/javax/swing/plaf/metal/MetalTabbedPaneUI.java
+++ b/src/share/classes/javax/swing/plaf/metal/MetalTabbedPaneUI.java
@@ -806,9 +806,8 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI {
// Paint the background for the tab area
if ( tabPane.isOpaque() ) {
- Color bg = UIManager.getColor("TabbedPane.tabAreaBackground");
- if (bg != null) {
- g.setColor(bg);
+ if (!c.isBackgroundSet() && (tabAreaBackground != null)) {
+ g.setColor(tabAreaBackground);
}
else {
g.setColor( c.getBackground() );
diff --git a/src/share/classes/jdk/internal/org/objectweb/asm/ClassWriter.java b/src/share/classes/jdk/internal/org/objectweb/asm/ClassWriter.java
index 66e8e7e3f..f5b24254e 100644
--- a/src/share/classes/jdk/internal/org/objectweb/asm/ClassWriter.java
+++ b/src/share/classes/jdk/internal/org/objectweb/asm/ClassWriter.java
@@ -785,11 +785,29 @@ public class ClassWriter extends ClassVisitor {
if (innerClasses == null) {
innerClasses = new ByteVector();
}
- ++innerClassesCount;
- innerClasses.putShort(name == null ? 0 : newClass(name));
- innerClasses.putShort(outerName == null ? 0 : newClass(outerName));
- innerClasses.putShort(innerName == null ? 0 : newUTF8(innerName));
- innerClasses.putShort(access);
+ // Sec. 4.7.6 of the JVMS states "Every CONSTANT_Class_info entry in the
+ // constant_pool table which represents a class or interface C that is
+ // not a package member must have exactly one corresponding entry in the
+ // classes array". To avoid duplicates we keep track in the intVal field
+ // of the Item of each CONSTANT_Class_info entry C whether an inner
+ // class entry has already been added for C (this field is unused for
+ // class entries, and changing its value does not change the hashcode
+ // and equality tests). If so we store the index of this inner class
+ // entry (plus one) in intVal. This hack allows duplicate detection in
+ // O(1) time.
+ Item nameItem = newClassItem(name);
+ if (nameItem.intVal == 0) {
+ ++innerClassesCount;
+ innerClasses.putShort(nameItem.index);
+ innerClasses.putShort(outerName == null ? 0 : newClass(outerName));
+ innerClasses.putShort(innerName == null ? 0 : newUTF8(innerName));
+ innerClasses.putShort(access);
+ nameItem.intVal = innerClassesCount;
+ } else {
+ // Compare the inner classes entry nameItem.intVal - 1 with the
+ // arguments of this method and throw an exception if there is a
+ // difference?
+ }
}
@Override
diff --git a/src/share/classes/jdk/internal/org/objectweb/asm/Frame.java b/src/share/classes/jdk/internal/org/objectweb/asm/Frame.java
index e32a13af9..811b74c72 100644
--- a/src/share/classes/jdk/internal/org/objectweb/asm/Frame.java
+++ b/src/share/classes/jdk/internal/org/objectweb/asm/Frame.java
@@ -1455,16 +1455,20 @@ final class Frame {
| cw.getMergedType(t & BASE_VALUE, u & BASE_VALUE);
} else {
// if u and t are array types, but not with the same element
- // type, merge(u,t)=java/lang/Object
- v = OBJECT | cw.addType("java/lang/Object");
+ // type, merge(u,t) = dim(u) - 1 | java/lang/Object
+ int vdim = ELEMENT_OF + (u & DIM);
+ v = vdim | OBJECT | cw.addType("java/lang/Object");
}
} else if ((t & BASE_KIND) == OBJECT || (t & DIM) != 0) {
// if t is any other reference or array type, the merged type
- // is Object, or min(dim(u), dim(t)) | java/lang/Object is u
- // and t have different array dimensions
- int tdim = t & DIM;
- int udim = u & DIM;
- v = (udim != tdim ? Math.min(tdim, udim) : 0) | OBJECT
+ // is min(udim, tdim) | java/lang/Object, where udim is the
+ // array dimension of u, minus 1 if u is an array type with a
+ // primitive element type (and similarly for tdim).
+ int tdim = (((t & DIM) == 0 || (t & BASE_KIND) == OBJECT) ? 0
+ : ELEMENT_OF) + (t & DIM);
+ int udim = (((u & DIM) == 0 || (u & BASE_KIND) == OBJECT) ? 0
+ : ELEMENT_OF) + (u & DIM);
+ v = Math.min(tdim, udim) | OBJECT
| cw.addType("java/lang/Object");
} else {
// if t is any other type, merge(u,t)=TOP
diff --git a/src/share/classes/jdk/internal/org/objectweb/asm/Item.java b/src/share/classes/jdk/internal/org/objectweb/asm/Item.java
index 90ff74377..b5be50e77 100644
--- a/src/share/classes/jdk/internal/org/objectweb/asm/Item.java
+++ b/src/share/classes/jdk/internal/org/objectweb/asm/Item.java
@@ -237,9 +237,10 @@ final class Item {
this.strVal2 = strVal2;
this.strVal3 = strVal3;
switch (type) {
+ case ClassWriter.CLASS:
+ this.intVal = 0; // intVal of a class must be zero, see visitInnerClass
case ClassWriter.UTF8:
case ClassWriter.STR:
- case ClassWriter.CLASS:
case ClassWriter.MTYPE:
case ClassWriter.TYPE_NORMAL:
hashCode = 0x7FFFFFFF & (type + strVal1.hashCode());
diff --git a/src/share/classes/jdk/internal/org/objectweb/asm/Label.java b/src/share/classes/jdk/internal/org/objectweb/asm/Label.java
index f4bc30df4..bbea00012 100644
--- a/src/share/classes/jdk/internal/org/objectweb/asm/Label.java
+++ b/src/share/classes/jdk/internal/org/objectweb/asm/Label.java
@@ -502,7 +502,7 @@ public class Label {
void addToSubroutine(final long id, final int nbSubroutines) {
if ((status & VISITED) == 0) {
status |= VISITED;
- srcAndRefPositions = new int[(nbSubroutines - 1) / 32 + 1];
+ srcAndRefPositions = new int[nbSubroutines / 32 + 1];
}
srcAndRefPositions[(int) (id >>> 32)] |= (int) id;
}
diff --git a/src/share/classes/jdk/internal/org/objectweb/asm/MethodWriter.java b/src/share/classes/jdk/internal/org/objectweb/asm/MethodWriter.java
index 81a82804d..e02fad465 100644
--- a/src/share/classes/jdk/internal/org/objectweb/asm/MethodWriter.java
+++ b/src/share/classes/jdk/internal/org/objectweb/asm/MethodWriter.java
@@ -1430,6 +1430,14 @@ class MethodWriter extends MethodVisitor {
@Override
public void visitMaxs(final int maxStack, final int maxLocals) {
+ if (resize) {
+ // replaces the temporary jump opcodes introduced by Label.resolve.
+ if (ClassReader.RESIZE) {
+ resizeInstructions();
+ } else {
+ throw new RuntimeException("Method code too large!");
+ }
+ }
if (ClassReader.FRAMES && compute == FRAMES) {
// completes the control flow graph with exception handler blocks
Handler handler = firstHandler;
@@ -1987,43 +1995,43 @@ class MethodWriter extends MethodVisitor {
stackMap.putByte(v);
}
} else {
- StringBuffer buf = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
d >>= 28;
while (d-- > 0) {
- buf.append('[');
+ sb.append('[');
}
if ((t & Frame.BASE_KIND) == Frame.OBJECT) {
- buf.append('L');
- buf.append(cw.typeTable[t & Frame.BASE_VALUE].strVal1);
- buf.append(';');
+ sb.append('L');
+ sb.append(cw.typeTable[t & Frame.BASE_VALUE].strVal1);
+ sb.append(';');
} else {
switch (t & 0xF) {
case 1:
- buf.append('I');
+ sb.append('I');
break;
case 2:
- buf.append('F');
+ sb.append('F');
break;
case 3:
- buf.append('D');
+ sb.append('D');
break;
case 9:
- buf.append('Z');
+ sb.append('Z');
break;
case 10:
- buf.append('B');
+ sb.append('B');
break;
case 11:
- buf.append('C');
+ sb.append('C');
break;
case 12:
- buf.append('S');
+ sb.append('S');
break;
default:
- buf.append('J');
+ sb.append('J');
}
}
- stackMap.putByte(7).putShort(cw.newClass(buf.toString()));
+ stackMap.putByte(7).putShort(cw.newClass(sb.toString()));
}
}
}
@@ -2051,14 +2059,6 @@ class MethodWriter extends MethodVisitor {
if (classReaderOffset != 0) {
return 6 + classReaderLength;
}
- if (resize) {
- // replaces the temporary jump opcodes introduced by Label.resolve.
- if (ClassReader.RESIZE) {
- resizeInstructions();
- } else {
- throw new RuntimeException("Method code too large!");
- }
- }
int size = 8;
if (code.length > 0) {
if (code.length > 65536) {
@@ -2715,49 +2715,50 @@ class MethodWriter extends MethodVisitor {
}
}
- // recomputes the stack map frames
- if (frameCount > 0) {
- if (compute == FRAMES) {
- frameCount = 0;
- stackMap = null;
- previousFrame = null;
- frame = null;
- Frame f = new Frame();
- f.owner = labels;
- Type[] args = Type.getArgumentTypes(descriptor);
- f.initInputFrame(cw, access, args, maxLocals);
- visitFrame(f);
- Label l = labels;
- while (l != null) {
- /*
- * here we need the original label position. getNewOffset
- * must therefore never have been called for this label.
- */
- u = l.position - 3;
- if ((l.status & Label.STORE) != 0 || (u >= 0 && resize[u])) {
- getNewOffset(allIndexes, allSizes, l);
- // TODO update offsets in UNINITIALIZED values
- visitFrame(l.frame);
- }
- l = l.successor;
- }
- } else {
+ // updates the stack map frame labels
+ if (compute == FRAMES) {
+ Label l = labels;
+ while (l != null) {
/*
- * Resizing an existing stack map frame table is really hard.
- * Not only the table must be parsed to update the offets, but
- * new frames may be needed for jump instructions that were
- * inserted by this method. And updating the offsets or
- * inserting frames can change the format of the following
- * frames, in case of packed frames. In practice the whole table
- * must be recomputed. For this the frames are marked as
- * potentially invalid. This will cause the whole class to be
- * reread and rewritten with the COMPUTE_FRAMES option (see the
- * ClassWriter.toByteArray method). This is not very efficient
- * but is much easier and requires much less code than any other
- * method I can think of.
+ * Detects the labels that are just after an IF instruction that
+ * has been resized with the IFNOT GOTO_W pattern. These labels
+ * are now the target of a jump instruction (the IFNOT
+ * instruction). Note that we need the original label position
+ * here. getNewOffset must therefore never have been called for
+ * this label.
*/
- cw.invalidFrames = true;
+ u = l.position - 3;
+ if (u >= 0 && resize[u]) {
+ l.status |= Label.TARGET;
+ }
+ getNewOffset(allIndexes, allSizes, l);
+ l = l.successor;
}
+ // Update the offsets in the uninitialized types
+ for (i = 0; i < cw.typeTable.length; ++i) {
+ Item item = cw.typeTable[i];
+ if (item != null && item.type == ClassWriter.TYPE_UNINIT) {
+ item.intVal = getNewOffset(allIndexes, allSizes, 0,
+ item.intVal);
+ }
+ }
+ // The stack map frames are not serialized yet, so we don't need
+ // to update them. They will be serialized in visitMaxs.
+ } else if (frameCount > 0) {
+ /*
+ * Resizing an existing stack map frame table is really hard. Not
+ * only the table must be parsed to update the offets, but new
+ * frames may be needed for jump instructions that were inserted by
+ * this method. And updating the offsets or inserting frames can
+ * change the format of the following frames, in case of packed
+ * frames. In practice the whole table must be recomputed. For this
+ * the frames are marked as potentially invalid. This will cause the
+ * whole class to be reread and rewritten with the COMPUTE_FRAMES
+ * option (see the ClassWriter.toByteArray method). This is not very
+ * efficient but is much easier and requires much less code than any
+ * other method I can think of.
+ */
+ cw.invalidFrames = true;
}
// updates the exception handler block labels
Handler h = firstHandler;
diff --git a/src/share/classes/jdk/internal/org/objectweb/asm/Type.java b/src/share/classes/jdk/internal/org/objectweb/asm/Type.java
index e385f9f64..633a4a024 100644
--- a/src/share/classes/jdk/internal/org/objectweb/asm/Type.java
+++ b/src/share/classes/jdk/internal/org/objectweb/asm/Type.java
@@ -585,11 +585,11 @@ public class Type {
case DOUBLE:
return "double";
case ARRAY:
- StringBuffer b = new StringBuffer(getElementType().getClassName());
+ StringBuilder sb = new StringBuilder(getElementType().getClassName());
for (int i = getDimensions(); i > 0; --i) {
- b.append("[]");
+ sb.append("[]");
}
- return b.toString();
+ return sb.toString();
case OBJECT:
return new String(buf, off, len).replace('/', '.');
default:
diff --git a/src/share/classes/jdk/internal/org/objectweb/asm/commons/InstructionAdapter.java b/src/share/classes/jdk/internal/org/objectweb/asm/commons/InstructionAdapter.java
index 4ece2dba9..2c54ea475 100644
--- a/src/share/classes/jdk/internal/org/objectweb/asm/commons/InstructionAdapter.java
+++ b/src/share/classes/jdk/internal/org/objectweb/asm/commons/InstructionAdapter.java
@@ -1089,7 +1089,7 @@ public class InstructionAdapter extends MethodVisitor {
@Deprecated
public void invokestatic(final String owner, final String name,
final String desc) {
- if (api < Opcodes.ASM5) {
+ if (api >= Opcodes.ASM5) {
invokestatic(owner, name, desc, false);
return;
}
diff --git a/src/share/classes/jdk/internal/org/objectweb/asm/commons/Method.java b/src/share/classes/jdk/internal/org/objectweb/asm/commons/Method.java
index df97a3657..92a83ff8e 100644
--- a/src/share/classes/jdk/internal/org/objectweb/asm/commons/Method.java
+++ b/src/share/classes/jdk/internal/org/objectweb/asm/commons/Method.java
@@ -205,7 +205,7 @@ public class Method {
}
String returnType = method.substring(0, space);
String methodName = method.substring(space + 1, start - 1).trim();
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append('(');
int p;
do {
@@ -229,7 +229,7 @@ public class Method {
return type;
}
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
int index = 0;
while ((index = type.indexOf("[]", index) + 1) > 0) {
sb.append('[');
diff --git a/src/share/classes/jdk/internal/org/objectweb/asm/commons/Remapper.java b/src/share/classes/jdk/internal/org/objectweb/asm/commons/Remapper.java
index 2b4f7201d..d5edd0636 100644
--- a/src/share/classes/jdk/internal/org/objectweb/asm/commons/Remapper.java
+++ b/src/share/classes/jdk/internal/org/objectweb/asm/commons/Remapper.java
@@ -147,17 +147,17 @@ public abstract class Remapper {
}
Type[] args = Type.getArgumentTypes(desc);
- StringBuffer s = new StringBuffer("(");
+ StringBuilder sb = new StringBuilder("(");
for (int i = 0; i < args.length; i++) {
- s.append(mapDesc(args[i].getDescriptor()));
+ sb.append(mapDesc(args[i].getDescriptor()));
}
Type returnType = Type.getReturnType(desc);
if (returnType == Type.VOID_TYPE) {
- s.append(")V");
- return s.toString();
+ sb.append(")V");
+ return sb.toString();
}
- s.append(')').append(mapDesc(returnType.getDescriptor()));
- return s.toString();
+ sb.append(')').append(mapDesc(returnType.getDescriptor()));
+ return sb.toString();
}
public Object mapValue(Object value) {
diff --git a/src/share/classes/jdk/internal/org/objectweb/asm/commons/SerialVersionUIDAdder.java b/src/share/classes/jdk/internal/org/objectweb/asm/commons/SerialVersionUIDAdder.java
index de8915125..51fcb4c46 100644
--- a/src/share/classes/jdk/internal/org/objectweb/asm/commons/SerialVersionUIDAdder.java
+++ b/src/share/classes/jdk/internal/org/objectweb/asm/commons/SerialVersionUIDAdder.java
@@ -239,7 +239,9 @@ public class SerialVersionUIDAdder extends ClassVisitor {
if (computeSVUID) {
this.name = name;
this.access = access;
- this.interfaces = Arrays.copyOf(interfaces, interfaces.length);
+ this.interfaces = new String[interfaces.length];
+ System.arraycopy(interfaces, 0, this.interfaces, 0,
+ interfaces.length);
}
super.visit(version, access, name, signature, superName, interfaces);
diff --git a/src/share/classes/jdk/internal/org/objectweb/asm/tree/MethodNode.java b/src/share/classes/jdk/internal/org/objectweb/asm/tree/MethodNode.java
index dfd58a0fe..bb01f7a7a 100644
--- a/src/share/classes/jdk/internal/org/objectweb/asm/tree/MethodNode.java
+++ b/src/share/classes/jdk/internal/org/objectweb/asm/tree/MethodNode.java
@@ -351,6 +351,7 @@ public class MethodNode extends MethodVisitor {
}
@Override
+ @SuppressWarnings("serial")
public AnnotationVisitor visitAnnotationDefault() {
return new AnnotationNode(new ArrayList<Object>(0) {
@Override
diff --git a/src/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/AnalyzerException.java b/src/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/AnalyzerException.java
index c3678c891..fc22dc320 100644
--- a/src/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/AnalyzerException.java
+++ b/src/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/AnalyzerException.java
@@ -66,6 +66,7 @@ import jdk.internal.org.objectweb.asm.tree.AbstractInsnNode;
* @author Bing Ran
* @author Eric Bruneton
*/
+@SuppressWarnings("serial")
public class AnalyzerException extends Exception {
public final AbstractInsnNode node;
diff --git a/src/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Frame.java b/src/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Frame.java
index f6b8db3dd..cbb5f86f5 100644
--- a/src/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Frame.java
+++ b/src/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Frame.java
@@ -754,14 +754,14 @@ public class Frame<V extends Value> {
*/
@Override
public String toString() {
- StringBuffer b = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
for (int i = 0; i < getLocals(); ++i) {
- b.append(getLocal(i));
+ sb.append(getLocal(i));
}
- b.append(' ');
+ sb.append(' ');
for (int i = 0; i < getStackSize(); ++i) {
- b.append(getStack(i).toString());
+ sb.append(getStack(i).toString());
}
- return b.toString();
+ return sb.toString();
}
}
diff --git a/src/share/classes/jdk/internal/org/objectweb/asm/util/ASMifier.java b/src/share/classes/jdk/internal/org/objectweb/asm/util/ASMifier.java
index a9487e16f..26e208a4c 100644
--- a/src/share/classes/jdk/internal/org/objectweb/asm/util/ASMifier.java
+++ b/src/share/classes/jdk/internal/org/objectweb/asm/util/ASMifier.java
@@ -206,7 +206,6 @@ public class ASMifier extends Printer {
}
text.add("import java.util.*;\n");
text.add("import jdk.internal.org.objectweb.asm.*;\n");
- text.add("import jdk.internal.org.objectweb.asm.attrs.*;\n");
text.add("public class " + simpleName + "Dump implements Opcodes {\n\n");
text.add("public static byte[] dump () throws Exception {\n\n");
text.add("ClassWriter cw = new ClassWriter(0);\n");
diff --git a/src/share/classes/jdk/internal/org/objectweb/asm/util/CheckClassAdapter.java b/src/share/classes/jdk/internal/org/objectweb/asm/util/CheckClassAdapter.java
index 5105db7f9..22dddf2d5 100644
--- a/src/share/classes/jdk/internal/org/objectweb/asm/util/CheckClassAdapter.java
+++ b/src/share/classes/jdk/internal/org/objectweb/asm/util/CheckClassAdapter.java
@@ -298,26 +298,26 @@ public class CheckClassAdapter extends ClassVisitor {
for (int j = 0; j < method.instructions.size(); ++j) {
method.instructions.get(j).accept(mv);
- StringBuffer s = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
Frame<BasicValue> f = frames[j];
if (f == null) {
- s.append('?');
+ sb.append('?');
} else {
for (int k = 0; k < f.getLocals(); ++k) {
- s.append(getShortName(f.getLocal(k).toString()))
+ sb.append(getShortName(f.getLocal(k).toString()))
.append(' ');
}
- s.append(" : ");
+ sb.append(" : ");
for (int k = 0; k < f.getStackSize(); ++k) {
- s.append(getShortName(f.getStack(k).toString()))
+ sb.append(getShortName(f.getStack(k).toString()))
.append(' ');
}
}
- while (s.length() < method.maxStack + method.maxLocals + 1) {
- s.append(' ');
+ while (sb.length() < method.maxStack + method.maxLocals + 1) {
+ sb.append(' ');
}
pw.print(Integer.toString(j + 100000).substring(1));
- pw.print(" " + s + " : " + t.text.get(t.text.size() - 1));
+ pw.print(" " + sb + " : " + t.text.get(t.text.size() - 1));
}
for (int j = 0; j < method.tryCatchBlocks.size(); ++j) {
method.tryCatchBlocks.get(j).accept(mv);
diff --git a/src/share/classes/jdk/internal/org/objectweb/asm/util/Textifier.java b/src/share/classes/jdk/internal/org/objectweb/asm/util/Textifier.java
index 5c2c8bf47..c210e2c40 100644
--- a/src/share/classes/jdk/internal/org/objectweb/asm/util/Textifier.java
+++ b/src/share/classes/jdk/internal/org/objectweb/asm/util/Textifier.java
@@ -443,7 +443,7 @@ public class Textifier extends Printer {
}
buf.append(tab);
- appendAccess(access);
+ appendAccess(access & ~Opcodes.ACC_VOLATILE);
if ((access & Opcodes.ACC_NATIVE) != 0) {
buf.append("native ");
}
diff --git a/src/share/classes/jdk/internal/org/objectweb/asm/version.txt b/src/share/classes/jdk/internal/org/objectweb/asm/version.txt
index c6f8ad648..b1d916092 100644
--- a/src/share/classes/jdk/internal/org/objectweb/asm/version.txt
+++ b/src/share/classes/jdk/internal/org/objectweb/asm/version.txt
@@ -1,12 +1,12 @@
Path: .
-Working Copy Root Path: /hudson/jobs/objectweb-pull/workspace/asm-svn-2014-03-12
+Working Copy Root Path: /hudson/jobs/objectweb-pull/workspace/asm-svn-2014-05-27
URL: file:///svnroot/asm/trunk/asm
Repository Root: file:///svnroot/asm
Repository UUID: 271bd773-ee82-43a6-9b2b-1890ed8ce7f9
-Revision: 1721
+Revision: 1748
Node Kind: directory
Schedule: normal
Last Changed Author: ebruneton
-Last Changed Rev: 1721
-Last Changed Date: 2014-03-02 17:25:35 +0100 (Sun, 02 Mar 2014)
+Last Changed Rev: 1747
+Last Changed Date: 2014-05-24 10:22:13 +0200 (Sat, 24 May 2014)
diff --git a/src/share/classes/jdk/net/ExtendedSocketOptions.java b/src/share/classes/jdk/net/ExtendedSocketOptions.java
index 8be1fe6a5..f2a0be33c 100644
--- a/src/share/classes/jdk/net/ExtendedSocketOptions.java
+++ b/src/share/classes/jdk/net/ExtendedSocketOptions.java
@@ -31,8 +31,6 @@ import java.net.SocketOption;
* Defines extended socket options, beyond those defined in
* {@link java.net.StandardSocketOptions}. These options may be platform
* specific.
- *
- * @since 1.9
*/
@jdk.Exported
public final class ExtendedSocketOptions {
diff --git a/src/share/classes/jdk/net/NetworkPermission.java b/src/share/classes/jdk/net/NetworkPermission.java
index 90202739d..753e84ec9 100644
--- a/src/share/classes/jdk/net/NetworkPermission.java
+++ b/src/share/classes/jdk/net/NetworkPermission.java
@@ -57,8 +57,6 @@ import java.security.BasicPermission;
* </tr></table>
*
* @see jdk.net.ExtendedSocketOptions
- *
- * @since 1.9
*/
@jdk.Exported
diff --git a/src/share/classes/jdk/net/SocketFlow.java b/src/share/classes/jdk/net/SocketFlow.java
index a102a3f35..a3132eaad 100644
--- a/src/share/classes/jdk/net/SocketFlow.java
+++ b/src/share/classes/jdk/net/SocketFlow.java
@@ -42,8 +42,6 @@ import java.lang.annotation.Native;
* <p>
* When a security manager is installed, a {@link NetworkPermission}
* is required to set or get this option.
- *
- * @since 1.9
*/
@jdk.Exported
public class SocketFlow {
@@ -65,8 +63,6 @@ public class SocketFlow {
* socket option. Both setting and getting the option return
* one of these statuses, which reflect the state of socket's
* flow.
- *
- * @since 1.9
*/
@jdk.Exported
public enum Status {
diff --git a/src/share/classes/jdk/net/Sockets.java b/src/share/classes/jdk/net/Sockets.java
index 8362fc60d..ef75631a0 100644
--- a/src/share/classes/jdk/net/Sockets.java
+++ b/src/share/classes/jdk/net/Sockets.java
@@ -51,7 +51,7 @@ import sun.net.ExtendedOptionsImpl;
* When a security manager is installed, some non-standard socket options
* may require a security permission before being set or get.
* The details are specified in {@link ExtendedSocketOptions}. No permission
- * is required for {@link java.net.StandardSocketOption}s.
+ * is required for {@link java.net.StandardSocketOptions}.
*
* @see java.nio.channels.NetworkChannel
*/
diff --git a/src/share/classes/jdk/net/package-info.java b/src/share/classes/jdk/net/package-info.java
index 236d640db..b05d5439b 100644
--- a/src/share/classes/jdk/net/package-info.java
+++ b/src/share/classes/jdk/net/package-info.java
@@ -26,8 +26,6 @@
/**
* Platform specific socket options for the {@code java.net} and {@code java.nio.channels}
* socket classes.
- *
- * @since 1.9
*/
@jdk.Exported
diff --git a/src/share/classes/sun/awt/LightweightFrame.java b/src/share/classes/sun/awt/LightweightFrame.java
index 71e3dd303..85d05924a 100644
--- a/src/share/classes/sun/awt/LightweightFrame.java
+++ b/src/share/classes/sun/awt/LightweightFrame.java
@@ -31,6 +31,7 @@ import java.awt.Graphics;
import java.awt.Image;
import java.awt.MenuBar;
import java.awt.MenuComponent;
+import java.awt.Rectangle;
import java.awt.Toolkit;
import java.awt.peer.FramePeer;
@@ -124,4 +125,48 @@ public abstract class LightweightFrame extends Frame {
* @see SunToolkit#ungrab(java.awt.Window)
*/
public abstract void ungrabFocus();
+
+ /**
+ * Returns the scale factor of this frame. The default value is 1.
+ *
+ * @return the scale factor
+ * @see #notifyDisplayChanged(int)
+ */
+ public abstract int getScaleFactor();
+
+ /**
+ * Called when display of the hosted frame is changed.
+ *
+ * @param scaleFactor the scale factor
+ */
+ public abstract void notifyDisplayChanged(int scaleFactor);
+
+ /**
+ * Host window absolute bounds.
+ */
+ private int hostX, hostY, hostW, hostH;
+
+ /**
+ * Returns the absolute bounds of the host (embedding) window.
+ *
+ * @return the host window bounds
+ */
+ public Rectangle getHostBounds() {
+ if (hostX == 0 && hostY == 0 && hostW == 0 && hostH == 0) {
+ // The client app is probably unaware of the setHostBounds.
+ // A safe fall-back:
+ return getBounds();
+ }
+ return new Rectangle(hostX, hostY, hostW, hostH);
+ }
+
+ /**
+ * Sets the absolute bounds of the host (embedding) window.
+ */
+ public void setHostBounds(int x, int y, int w, int h) {
+ hostX = x;
+ hostY = y;
+ hostW = w;
+ hostH = h;
+ }
}
diff --git a/src/share/classes/sun/awt/image/FileImageSource.java b/src/share/classes/sun/awt/image/FileImageSource.java
index f448b0723..8f75aa81b 100644
--- a/src/share/classes/sun/awt/image/FileImageSource.java
+++ b/src/share/classes/sun/awt/image/FileImageSource.java
@@ -48,6 +48,10 @@ public class FileImageSource extends InputStreamImageSource {
}
protected ImageDecoder getDecoder() {
+ if (imagefile == null) {
+ return null;
+ }
+
InputStream is;
try {
is = new BufferedInputStream(new FileInputStream(imagefile));
diff --git a/src/share/classes/sun/java2d/SunGraphics2D.java b/src/share/classes/sun/java2d/SunGraphics2D.java
index 287549c20..0ad5e1655 100644
--- a/src/share/classes/sun/java2d/SunGraphics2D.java
+++ b/src/share/classes/sun/java2d/SunGraphics2D.java
@@ -2105,7 +2105,7 @@ public final class SunGraphics2D
if (theData.copyArea(this, x, y, w, h, dx, dy)) {
return;
}
- if (transformState >= TRANSFORM_TRANSLATESCALE) {
+ if (transformState > TRANSFORM_TRANSLATESCALE) {
throw new InternalError("transformed copyArea not implemented yet");
}
// REMIND: This method does not deal with missing data from the
@@ -2126,8 +2126,25 @@ public final class SunGraphics2D
lastCAcomp = comp;
}
- x += transX;
- y += transY;
+ double[] coords = {x, y, x + w, y + h, x + dx, y + dy};
+ transform.transform(coords, 0, coords, 0, 3);
+
+ x = (int)Math.ceil(coords[0] - 0.5);
+ y = (int)Math.ceil(coords[1] - 0.5);
+ w = ((int)Math.ceil(coords[2] - 0.5)) - x;
+ h = ((int)Math.ceil(coords[3] - 0.5)) - y;
+ dx = ((int)Math.ceil(coords[4] - 0.5)) - x;
+ dy = ((int)Math.ceil(coords[5] - 0.5)) - y;
+
+ // In case of negative scale transform, reflect the rect coords.
+ if (w < 0) {
+ w *= -1;
+ x -= w;
+ }
+ if (h < 0) {
+ h *= -1;
+ y -= h;
+ }
Blit ob = lastCAblit;
if (dy == 0 && dx > 0 && dx < w) {
diff --git a/src/share/classes/sun/java2d/opengl/OGLBlitLoops.java b/src/share/classes/sun/java2d/opengl/OGLBlitLoops.java
index a613daf48..abc78f210 100644
--- a/src/share/classes/sun/java2d/opengl/OGLBlitLoops.java
+++ b/src/share/classes/sun/java2d/opengl/OGLBlitLoops.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -71,6 +71,8 @@ class OGLBlitLoops {
// surface->sw ops
new OGLSurfaceToSwBlit(SurfaceType.IntArgb,
OGLSurfaceData.PF_INT_ARGB),
+ new OGLSurfaceToSwBlit(SurfaceType.IntArgbPre,
+ OGLSurfaceData.PF_INT_ARGB_PRE),
// sw->surface ops
blitIntArgbPreToSurface,
@@ -505,23 +507,79 @@ class OGLRTTSurfaceToSurfaceTransform extends TransformBlit {
}
}
-class OGLSurfaceToSwBlit extends Blit {
+final class OGLSurfaceToSwBlit extends Blit {
- private int typeval;
+ private final int typeval;
+ private WeakReference<SurfaceData> srcTmp;
- // REMIND: destination will actually be opaque/premultiplied...
- OGLSurfaceToSwBlit(SurfaceType dstType, int typeval) {
+ // destination will actually be ArgbPre or Argb
+ OGLSurfaceToSwBlit(final SurfaceType dstType,final int typeval) {
super(OGLSurfaceData.OpenGLSurface,
CompositeType.SrcNoEa,
dstType);
this.typeval = typeval;
}
+ private synchronized void complexClipBlit(SurfaceData src, SurfaceData dst,
+ Composite comp, Region clip,
+ int sx, int sy, int dx, int dy,
+ int w, int h) {
+ SurfaceData cachedSrc = null;
+ if (srcTmp != null) {
+ // use cached intermediate surface, if available
+ cachedSrc = srcTmp.get();
+ }
+
+ // We can convert argb_pre data from OpenGL surface in two places:
+ // - During OpenGL surface -> SW blit
+ // - During SW -> SW blit
+ // The first one is faster when we use opaque OGL surface, because in
+ // this case we simply skip conversion and use color components as is.
+ // Because of this we align intermediate buffer type with type of
+ // destination not source.
+ final int type = typeval == OGLSurfaceData.PF_INT_ARGB_PRE ?
+ BufferedImage.TYPE_INT_ARGB_PRE :
+ BufferedImage.TYPE_INT_ARGB;
+
+ src = convertFrom(this, src, sx, sy, w, h, cachedSrc, type);
+
+ // copy intermediate SW to destination SW using complex clip
+ final Blit performop = Blit.getFromCache(src.getSurfaceType(),
+ CompositeType.SrcNoEa,
+ dst.getSurfaceType());
+ performop.Blit(src, dst, comp, clip, 0, 0, dx, dy, w, h);
+
+ if (src != cachedSrc) {
+ // cache the intermediate surface
+ srcTmp = new WeakReference<>(src);
+ }
+ }
+
public void Blit(SurfaceData src, SurfaceData dst,
Composite comp, Region clip,
int sx, int sy, int dx, int dy,
int w, int h)
{
+ if (clip != null) {
+ clip = clip.getIntersectionXYWH(dx, dy, w, h);
+ // At the end this method will flush the RenderQueue, we should exit
+ // from it as soon as possible.
+ if (clip.isEmpty()) {
+ return;
+ }
+ sx += clip.getLoX() - dx;
+ sy += clip.getLoY() - dy;
+ dx = clip.getLoX();
+ dy = clip.getLoY();
+ w = clip.getWidth();
+ h = clip.getHeight();
+
+ if (!clip.isRectangular()) {
+ complexClipBlit(src, dst, comp, clip, sx, sy, dx, dy, w, h);
+ return;
+ }
+ }
+
OGLRenderQueue rq = OGLRenderQueue.getInstance();
rq.lock();
try {
diff --git a/src/share/classes/sun/security/krb5/KdcComm.java b/src/share/classes/sun/security/krb5/KdcComm.java
index caaf20a86..721c105d3 100644
--- a/src/share/classes/sun/security/krb5/KdcComm.java
+++ b/src/share/classes/sun/security/krb5/KdcComm.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -144,7 +144,8 @@ public final class KdcComm {
try {
Config cfg = Config.getInstance();
String temp = cfg.get("libdefaults", "kdc_timeout");
- timeout = parsePositiveIntString(temp);
+ timeout = parseTimeString(temp);
+
temp = cfg.get("libdefaults", "max_retries");
max_retries = parsePositiveIntString(temp);
temp = cfg.get("libdefaults", "udp_preference_limit");
@@ -426,6 +427,25 @@ public final class KdcComm {
}
/**
+ * Parses a time value string. If it ends with "s", parses as seconds.
+ * Otherwise, parses as milliseconds.
+ * @param s the time string
+ * @return the integer value in milliseconds, or -1 if input is null or
+ * has an invalid format
+ */
+ private static int parseTimeString(String s) {
+ if (s == null) {
+ return -1;
+ }
+ if (s.endsWith("s")) {
+ int seconds = parsePositiveIntString(s.substring(0, s.length()-1));
+ return (seconds < 0) ? -1 : (seconds*1000);
+ } else {
+ return parsePositiveIntString(s);
+ }
+ }
+
+ /**
* Returns krb5.conf setting of {@code key} for a specific realm,
* which can be:
* 1. defined in the sub-stanza for the given realm inside [realms], or
@@ -446,7 +466,11 @@ public final class KdcComm {
try {
String value =
Config.getInstance().get("realms", realm, key);
- temp = parsePositiveIntString(value);
+ if (key.equals("kdc_timeout")) {
+ temp = parseTimeString(value);
+ } else {
+ temp = parsePositiveIntString(value);
+ }
} catch (Exception exc) {
// Ignored, defValue will be picked up
}
diff --git a/src/share/classes/sun/security/smartcardio/CardImpl.java b/src/share/classes/sun/security/smartcardio/CardImpl.java
index 40cc25596..322726f9c 100644
--- a/src/share/classes/sun/security/smartcardio/CardImpl.java
+++ b/src/share/classes/sun/security/smartcardio/CardImpl.java
@@ -246,7 +246,7 @@ final class CardImpl extends Card {
}
checkExclusive();
try {
- SCardDisconnect(cardId, (reset ? SCARD_LEAVE_CARD : SCARD_RESET_CARD));
+ SCardDisconnect(cardId, (reset ? SCARD_RESET_CARD : SCARD_LEAVE_CARD));
} catch (PCSCException e) {
throw new CardException("disconnect() failed", e);
} finally {
diff --git a/src/share/classes/sun/security/tools/jarsigner/Main.java b/src/share/classes/sun/security/tools/jarsigner/Main.java
index 727f92f5b..35f33c85b 100644
--- a/src/share/classes/sun/security/tools/jarsigner/Main.java
+++ b/src/share/classes/sun/security/tools/jarsigner/Main.java
@@ -1553,8 +1553,7 @@ public class Main {
first = false;
}
try {
- CertPath cp = certificateFactory.generateCertPath(certs);
- validator.validate(cp, pkixParameters);
+ validateCertChain(certs);
} catch (Exception e) {
if (debug) {
e.printStackTrace();
@@ -1864,8 +1863,7 @@ public class Main {
printCert("", certChain[0], true, null, true);
try {
- CertPath cp = certificateFactory.generateCertPath(Arrays.asList(certChain));
- validator.validate(cp, pkixParameters);
+ validateCertChain(Arrays.asList(certChain));
} catch (Exception e) {
if (debug) {
e.printStackTrace();
@@ -1930,6 +1928,22 @@ public class Main {
System.exit(1);
}
+ void validateCertChain(List<? extends Certificate> certs) throws Exception {
+ int cpLen = 0;
+ out: for (; cpLen<certs.size(); cpLen++) {
+ for (TrustAnchor ta: pkixParameters.getTrustAnchors()) {
+ if (ta.getTrustedCert().equals(certs.get(cpLen))) {
+ break out;
+ }
+ }
+ }
+ if (cpLen > 0) {
+ CertPath cp = certificateFactory.generateCertPath(
+ (cpLen == certs.size())? certs: certs.subList(0, cpLen));
+ validator.validate(cp, pkixParameters);
+ }
+ }
+
char[] getPass(String prompt)
{
System.err.print(prompt);
diff --git a/src/share/classes/sun/swing/JLightweightFrame.java b/src/share/classes/sun/swing/JLightweightFrame.java
index dfba20fae..6566741de 100644
--- a/src/share/classes/sun/swing/JLightweightFrame.java
+++ b/src/share/classes/sun/swing/JLightweightFrame.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -36,6 +36,7 @@ import java.awt.Graphics2D;
import java.awt.MouseInfo;
import java.awt.Point;
import java.awt.Rectangle;
+import java.awt.Window;
import java.awt.event.ContainerEvent;
import java.awt.event.ContainerListener;
import java.awt.image.BufferedImage;
@@ -43,16 +44,20 @@ import java.awt.image.DataBufferInt;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.security.AccessController;
+import javax.swing.JComponent;
import javax.swing.JLayeredPane;
import javax.swing.JPanel;
import javax.swing.JRootPane;
import javax.swing.LayoutFocusTraversalPolicy;
+import javax.swing.RepaintManager;
import javax.swing.RootPaneContainer;
import javax.swing.SwingUtilities;
+import sun.awt.DisplayChangedListener;
import sun.awt.LightweightFrame;
import sun.security.action.GetPropertyAction;
+import sun.swing.SwingUtilities2.RepaintListener;
/**
* The frame serves as a lightweight container which paints its content
@@ -75,6 +80,8 @@ public final class JLightweightFrame extends LightweightFrame implements RootPan
private BufferedImage bbImage;
+ private volatile int scaleFactor = 1;
+
/**
* {@code copyBufferEnabled}, true by default, defines the following strategy.
* A duplicating (copy) buffer is created for the original pixel buffer.
@@ -85,10 +92,11 @@ public final class JLightweightFrame extends LightweightFrame implements RootPan
* by the lock (managed with the {@link LightweightContent#paintLock()},
* {@link LightweightContent#paintUnlock()} methods).
*/
- private boolean copyBufferEnabled;
+ private static boolean copyBufferEnabled;
private int[] copyBuffer;
private PropertyChangeListener layoutSizeListener;
+ private RepaintListener repaintListener;
static {
SwingAccessor.setJLightweightFrameAccessor(new SwingAccessor.JLightweightFrameAccessor() {
@@ -97,6 +105,8 @@ public final class JLightweightFrame extends LightweightFrame implements RootPan
frame.updateClientCursor();
}
});
+ copyBufferEnabled = "true".equals(AccessController.
+ doPrivileged(new GetPropertyAction("swing.jlf.copyBufferEnabled", "true")));
}
/**
@@ -130,6 +140,31 @@ public final class JLightweightFrame extends LightweightFrame implements RootPan
}
}
};
+
+ repaintListener = (JComponent c, int x, int y, int w, int h) -> {
+ Window jlf = SwingUtilities.getWindowAncestor(c);
+ if (jlf != JLightweightFrame.this) {
+ return;
+ }
+ Point p = SwingUtilities.convertPoint(c, x, y, jlf);
+ Rectangle r = new Rectangle(p.x, p.y, w, h).intersection(
+ new Rectangle(0, 0, bbImage.getWidth() / scaleFactor,
+ bbImage.getHeight() / scaleFactor));
+
+ if (!r.isEmpty()) {
+ notifyImageUpdated(r.x, r.y, r.width, r.height);
+ }
+ };
+
+ SwingAccessor.getRepaintManagerAccessor().addRepaintListener(
+ RepaintManager.currentManager(this), repaintListener);
+ }
+
+ @Override
+ public void dispose() {
+ SwingAccessor.getRepaintManagerAccessor().removeRepaintListener(
+ RepaintManager.currentManager(this), repaintListener);
+ super.dispose();
}
/**
@@ -168,6 +203,7 @@ public final class JLightweightFrame extends LightweightFrame implements RootPan
g.setBackground(getBackground());
g.setColor(getForeground());
g.setFont(getFont());
+ g.scale(scaleFactor, scaleFactor);
return g;
}
@@ -191,7 +227,39 @@ public final class JLightweightFrame extends LightweightFrame implements RootPan
if (content != null) content.focusUngrabbed();
}
- private void syncCopyBuffer(boolean reset, int x, int y, int w, int h) {
+ @Override
+ public int getScaleFactor() {
+ return scaleFactor;
+ }
+
+ @Override
+ public void notifyDisplayChanged(final int scaleFactor) {
+ if (scaleFactor != this.scaleFactor) {
+ if (!copyBufferEnabled) content.paintLock();
+ try {
+ if (bbImage != null) {
+ resizeBuffer(getWidth(), getHeight(), scaleFactor);
+ }
+ } finally {
+ if (!copyBufferEnabled) content.paintUnlock();
+ }
+ this.scaleFactor = scaleFactor;
+ }
+ if (getPeer() instanceof DisplayChangedListener) {
+ ((DisplayChangedListener)getPeer()).displayChanged();
+ }
+ repaint();
+ }
+
+ @Override
+ public void addNotify() {
+ super.addNotify();
+ if (getPeer() instanceof DisplayChangedListener) {
+ ((DisplayChangedListener)getPeer()).displayChanged();
+ }
+ }
+
+ private void syncCopyBuffer(boolean reset, int x, int y, int w, int h, int scale) {
content.paintLock();
try {
int[] srcBuffer = ((DataBufferInt)bbImage.getRaster().getDataBuffer()).getData();
@@ -200,6 +268,11 @@ public final class JLightweightFrame extends LightweightFrame implements RootPan
}
int linestride = bbImage.getWidth();
+ x *= scale;
+ y *= scale;
+ w *= scale;
+ h *= scale;
+
for (int i=0; i<h; i++) {
int from = (y + i) * linestride + x;
System.arraycopy(srcBuffer, from, copyBuffer, from, w);
@@ -209,6 +282,13 @@ public final class JLightweightFrame extends LightweightFrame implements RootPan
}
}
+ private void notifyImageUpdated(int x, int y, int width, int height) {
+ if (copyBufferEnabled) {
+ syncCopyBuffer(false, x, y, width, height, scaleFactor);
+ }
+ content.imageUpdated(x, y, width, height);
+ }
+
private void initInterior() {
contentPane = new JPanel() {
@Override
@@ -231,10 +311,8 @@ public final class JLightweightFrame extends LightweightFrame implements RootPan
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
- if (copyBufferEnabled) {
- syncCopyBuffer(false, clip.x, clip.y, clip.width, clip.height);
- }
- content.imageUpdated(clip.x, clip.y, clip.width, clip.height);
+ Rectangle c = contentPane.getBounds().intersection(clip);
+ notifyImageUpdated(c.x, c.y, c.width, c.height);
}
});
} finally {
@@ -288,48 +366,37 @@ public final class JLightweightFrame extends LightweightFrame implements RootPan
content.paintLock();
}
try {
- if ((bbImage == null) || (width != bbImage.getWidth()) || (height != bbImage.getHeight())) {
- boolean createBB = true;
- int newW = width;
- int newH = height;
- if (bbImage != null) {
- int oldW = bbImage.getWidth();
- int oldH = bbImage.getHeight();
- if ((oldW >= newW) && (oldH >= newH)) {
- createBB = false;
- } else {
- if (oldW >= newW) {
- newW = oldW;
- } else {
- newW = Math.max((int)(oldW * 1.2), width);
- }
- if (oldH >= newH) {
- newH = oldH;
+ boolean createBB = (bbImage == null);
+ int newW = width;
+ int newH = height;
+ if (bbImage != null) {
+ int imgWidth = bbImage.getWidth() / scaleFactor;
+ int imgHeight = bbImage.getHeight() / scaleFactor;
+ if (width != imgWidth || height != imgHeight) {
+ createBB = true;
+ if (bbImage != null) {
+ int oldW = imgWidth;
+ int oldH = imgHeight;
+ if ((oldW >= newW) && (oldH >= newH)) {
+ createBB = false;
} else {
- newH = Math.max((int)(oldH * 1.2), height);
+ if (oldW >= newW) {
+ newW = oldW;
+ } else {
+ newW = Math.max((int)(oldW * 1.2), width);
+ }
+ if (oldH >= newH) {
+ newH = oldH;
+ } else {
+ newH = Math.max((int)(oldH * 1.2), height);
+ }
}
}
}
- if (createBB) {
- BufferedImage oldBB = bbImage;
- bbImage = new BufferedImage(newW, newH, BufferedImage.TYPE_INT_ARGB_PRE);
- if (oldBB != null) {
- Graphics g = bbImage.getGraphics();
- try {
- g.drawImage(oldBB, 0, 0, newW, newH, null);
- } finally {
- g.dispose();
- oldBB.flush();
- }
- }
- int[] pixels = ((DataBufferInt)bbImage.getRaster().getDataBuffer()).getData();
- if (copyBufferEnabled) {
- syncCopyBuffer(true, 0, 0, width, height);
- pixels = copyBuffer;
- }
- content.imageBufferReset(pixels, 0, 0, width, height, bbImage.getWidth());
- return;
- }
+ }
+ if (createBB) {
+ resizeBuffer(newW, newH, scaleFactor);
+ return;
}
content.imageReshaped(0, 0, width, height);
@@ -340,6 +407,18 @@ public final class JLightweightFrame extends LightweightFrame implements RootPan
}
}
+ private void resizeBuffer(int width, int height, int newScaleFactor) {
+ bbImage = new BufferedImage(width*newScaleFactor,height*newScaleFactor,
+ BufferedImage.TYPE_INT_ARGB_PRE);
+ int[] pixels= ((DataBufferInt)bbImage.getRaster().getDataBuffer()).getData();
+ if (copyBufferEnabled) {
+ syncCopyBuffer(true, 0, 0, width, height, newScaleFactor);
+ pixels = copyBuffer;
+ }
+ content.imageBufferReset(pixels, 0, 0, width, height,
+ width * newScaleFactor, newScaleFactor);
+ }
+
@Override
public JRootPane getRootPane() {
return rootPane;
diff --git a/src/share/classes/sun/swing/LightweightContent.java b/src/share/classes/sun/swing/LightweightContent.java
index dd3373aea..2296a173f 100644
--- a/src/share/classes/sun/swing/LightweightContent.java
+++ b/src/share/classes/sun/swing/LightweightContent.java
@@ -85,31 +85,53 @@ public interface LightweightContent {
* {@code JLightweightFrame} calls this method to notify the client
* application that a new data buffer has been set as a content pixel
* buffer. Typically this occurs when a buffer of a larger size is
- * created in response to a content resize event. The method reports
- * a reference to the pixel data buffer, the content image bounds
- * within the buffer and the line stride of the buffer. These values
- * have the following correlation.
+ * created in response to a content resize event.
* <p>
- * The {@code width} and {@code height} matches the size of the content
+ * The method reports a reference to the pixel data buffer, the content
+ * image bounds within the buffer and the line stride of the buffer.
+ * These values have the following correlation.
+ * The {@code width} and {@code height} matches the layout size of the content
* (the component returned from the {@link #getComponent} method). The
* {@code x} and {@code y} is the origin of the content, {@code (0, 0)}
- * in the coordinate space of the content, appearing at
- * {@code data[y * linestride + x]} in the buffer. All indices
- * {@code data[(y + j) * linestride + (x + i)]} where
- * {@code (0 <= i < width)} and {@code (0 <= j < height)} will represent
- * valid pixel data, {@code (i, j)} in the coordinate space of the content.
+ * in the layout coordinate space of the content, appearing at
+ * {@code data[y * scale * linestride + x * scale]} in the buffer.
+ * A pixel with indices {@code (i, j)}, where {@code (0 <= i < width)} and
+ * {@code (0 <= j < height)}, in the layout coordinate space of the content
+ * is represented by a {@code scale^2} square of pixels in the physical
+ * coordinate space of the buffer. The top-left corner of the square has the
+ * following physical coordinate in the buffer:
+ * {@code data[(y + j) * scale * linestride + (x + i) * scale]}.
*
* @param data the content pixel data buffer of INT_ARGB_PRE type
- * @param x the x coordinate of the image
- * @param y the y coordinate of the image
- * @param width the width of the image
- * @param height the height of the image
+ * @param x the logical x coordinate of the image
+ * @param y the logical y coordinate of the image
+ * @param width the logical width of the image
+ * @param height the logical height of the image
* @param linestride the line stride of the pixel buffer
+ * @param scale the scale factor of the pixel buffer
+ */
+ default public void imageBufferReset(int[] data,
+ int x, int y,
+ int width, int height,
+ int linestride,
+ int scale)
+ {
+ imageBufferReset(data, x, y, width, height, linestride);
+ }
+
+ /**
+ * The default implementation for #imageBufferReset uses a hard-coded value
+ * of 1 for the scale factor. Both the old and the new methods provide
+ * default implementations in order to allow a client application to run
+ * with any JDK version without breaking backward compatibility.
*/
- public void imageBufferReset(int[] data,
+ default public void imageBufferReset(int[] data,
int x, int y,
int width, int height,
- int linestride);
+ int linestride)
+ {
+ imageBufferReset(data, x, y, width, height, linestride, 1);
+ }
/**
* {@code JLightweightFrame} calls this method to notify the client
diff --git a/src/share/classes/sun/swing/SwingAccessor.java b/src/share/classes/sun/swing/SwingAccessor.java
index 10d4de62e..797802abd 100644
--- a/src/share/classes/sun/swing/SwingAccessor.java
+++ b/src/share/classes/sun/swing/SwingAccessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@ package sun.swing;
import sun.misc.Unsafe;
import java.awt.Point;
+import javax.swing.RepaintManager;
import javax.swing.text.JTextComponent;
import javax.swing.TransferHandler;
@@ -82,6 +83,14 @@ public final class SwingAccessor {
}
/**
+ * An accessor for the RepaintManager class.
+ */
+ public interface RepaintManagerAccessor {
+ void addRepaintListener(RepaintManager rm, SwingUtilities2.RepaintListener l);
+ void removeRepaintListener(RepaintManager rm, SwingUtilities2.RepaintListener l);
+ }
+
+ /**
* The javax.swing.text.JTextComponent class accessor object.
*/
private static JTextComponentAccessor jtextComponentAccessor;
@@ -120,6 +129,31 @@ public final class SwingAccessor {
* Retrieve the accessor object for the JLightweightFrame class
*/
public static JLightweightFrameAccessor getJLightweightFrameAccessor() {
+ if (jLightweightFrameAccessor == null) {
+ unsafe.ensureClassInitialized(JLightweightFrame.class);
+ }
return jLightweightFrameAccessor;
}
+
+ /**
+ * The RepaintManager class accessor object.
+ */
+ private static RepaintManagerAccessor repaintManagerAccessor;
+
+ /**
+ * Set an accessor object for the RepaintManager class.
+ */
+ public static void setRepaintManagerAccessor(RepaintManagerAccessor accessor) {
+ repaintManagerAccessor = accessor;
+ }
+
+ /**
+ * Retrieve the accessor object for the RepaintManager class.
+ */
+ public static RepaintManagerAccessor getRepaintManagerAccessor() {
+ if (repaintManagerAccessor == null) {
+ unsafe.ensureClassInitialized(RepaintManager.class);
+ }
+ return repaintManagerAccessor;
+ }
}
diff --git a/src/share/classes/sun/swing/SwingUtilities2.java b/src/share/classes/sun/swing/SwingUtilities2.java
index 87b8fe26a..399a2fccb 100644
--- a/src/share/classes/sun/swing/SwingUtilities2.java
+++ b/src/share/classes/sun/swing/SwingUtilities2.java
@@ -2041,4 +2041,11 @@ public class SwingUtilities2 {
}
return path;
}
+
+ /**
+ * Used to listen to "blit" repaints in RepaintManager.
+ */
+ public interface RepaintListener {
+ void repaintPerformed(JComponent c, int x, int y, int w, int h);
+ }
}
diff --git a/src/share/classes/sun/text/resources/es/FormatData_es_DO.java b/src/share/classes/sun/text/resources/es/FormatData_es_DO.java
index c8f1345b2..4224a3a69 100644
--- a/src/share/classes/sun/text/resources/es/FormatData_es_DO.java
+++ b/src/share/classes/sun/text/resources/es/FormatData_es_DO.java
@@ -75,8 +75,8 @@ public class FormatData_es_DO extends ParallelListResourceBundle {
new String[] {
"EEEE d' de 'MMMM' de 'yyyy", // full date pattern
"d' de 'MMMM' de 'yyyy", // long date pattern
- "MM/dd/yyyy", // medium date pattern
- "MM/dd/yy", // short date pattern
+ "dd/MM/yyyy", // medium date pattern
+ "dd/MM/yy", // short date pattern
}
},
{ "DateTimePatterns",
diff --git a/src/share/native/java/util/zip/zlib-1.2.5/ChangeLog b/src/share/native/java/util/zip/zlib-1.2.8/ChangeLog
index f310bb0fc..f22aabaef 100644
--- a/src/share/native/java/util/zip/zlib-1.2.5/ChangeLog
+++ b/src/share/native/java/util/zip/zlib-1.2.8/ChangeLog
@@ -1,12 +1,276 @@
ChangeLog file for zlib
+Changes in 1.2.8 (28 Apr 2013)
+- Update contrib/minizip/iowin32.c for Windows RT [Vollant]
+- Do not force Z_CONST for C++
+- Clean up contrib/vstudio [Ro§]
+- Correct spelling error in zlib.h
+- Fix mixed line endings in contrib/vstudio
+
+Changes in 1.2.7.3 (13 Apr 2013)
+- Fix version numbers and DLL names in contrib/vstudio/*/zlib.rc
+
+Changes in 1.2.7.2 (13 Apr 2013)
+- Change check for a four-byte type back to hexadecimal
+- Fix typo in win32/Makefile.msc
+- Add casts in gzwrite.c for pointer differences
+
+Changes in 1.2.7.1 (24 Mar 2013)
+- Replace use of unsafe string functions with snprintf if available
+- Avoid including stddef.h on Windows for Z_SOLO compile [Niessink]
+- Fix gzgetc undefine when Z_PREFIX set [Turk]
+- Eliminate use of mktemp in Makefile (not always available)
+- Fix bug in 'F' mode for gzopen()
+- Add inflateGetDictionary() function
+- Correct comment in deflate.h
+- Use _snprintf for snprintf in Microsoft C
+- On Darwin, only use /usr/bin/libtool if libtool is not Apple
+- Delete "--version" file if created by "ar --version" [Richard G.]
+- Fix configure check for veracity of compiler error return codes
+- Fix CMake compilation of static lib for MSVC2010 x64
+- Remove unused variable in infback9.c
+- Fix argument checks in gzlog_compress() and gzlog_write()
+- Clean up the usage of z_const and respect const usage within zlib
+- Clean up examples/gzlog.[ch] comparisons of different types
+- Avoid shift equal to bits in type (caused endless loop)
+- Fix unintialized value bug in gzputc() introduced by const patches
+- Fix memory allocation error in examples/zran.c [Nor]
+- Fix bug where gzopen(), gzclose() would write an empty file
+- Fix bug in gzclose() when gzwrite() runs out of memory
+- Check for input buffer malloc failure in examples/gzappend.c
+- Add note to contrib/blast to use binary mode in stdio
+- Fix comparisons of differently signed integers in contrib/blast
+- Check for invalid code length codes in contrib/puff
+- Fix serious but very rare decompression bug in inftrees.c
+- Update inflateBack() comments, since inflate() can be faster
+- Use underscored I/O function names for WINAPI_FAMILY
+- Add _tr_flush_bits to the external symbols prefixed by --zprefix
+- Add contrib/vstudio/vc10 pre-build step for static only
+- Quote --version-script argument in CMakeLists.txt
+- Don't specify --version-script on Apple platforms in CMakeLists.txt
+- Fix casting error in contrib/testzlib/testzlib.c
+- Fix types in contrib/minizip to match result of get_crc_table()
+- Simplify contrib/vstudio/vc10 with 'd' suffix
+- Add TOP support to win32/Makefile.msc
+- Suport i686 and amd64 assembler builds in CMakeLists.txt
+- Fix typos in the use of _LARGEFILE64_SOURCE in zconf.h
+- Add vc11 and vc12 build files to contrib/vstudio
+- Add gzvprintf() as an undocumented function in zlib
+- Fix configure for Sun shell
+- Remove runtime check in configure for four-byte integer type
+- Add casts and consts to ease user conversion to C++
+- Add man pages for minizip and miniunzip
+- In Makefile uninstall, don't rm if preceding cd fails
+- Do not return Z_BUF_ERROR if deflateParam() has nothing to write
+
+Changes in 1.2.7 (2 May 2012)
+- Replace use of memmove() with a simple copy for portability
+- Test for existence of strerror
+- Restore gzgetc_ for backward compatibility with 1.2.6
+- Fix build with non-GNU make on Solaris
+- Require gcc 4.0 or later on Mac OS X to use the hidden attribute
+- Include unistd.h for Watcom C
+- Use __WATCOMC__ instead of __WATCOM__
+- Do not use the visibility attribute if NO_VIZ defined
+- Improve the detection of no hidden visibility attribute
+- Avoid using __int64 for gcc or solo compilation
+- Cast to char * in gzprintf to avoid warnings [Zinser]
+- Fix make_vms.com for VAX [Zinser]
+- Don't use library or built-in byte swaps
+- Simplify test and use of gcc hidden attribute
+- Fix bug in gzclose_w() when gzwrite() fails to allocate memory
+- Add "x" (O_EXCL) and "e" (O_CLOEXEC) modes support to gzopen()
+- Fix bug in test/minigzip.c for configure --solo
+- Fix contrib/vstudio project link errors [Mohanathas]
+- Add ability to choose the builder in make_vms.com [Schweda]
+- Add DESTDIR support to mingw32 win32/Makefile.gcc
+- Fix comments in win32/Makefile.gcc for proper usage
+- Allow overriding the default install locations for cmake
+- Generate and install the pkg-config file with cmake
+- Build both a static and a shared version of zlib with cmake
+- Include version symbols for cmake builds
+- If using cmake with MSVC, add the source directory to the includes
+- Remove unneeded EXTRA_CFLAGS from win32/Makefile.gcc [Truta]
+- Move obsolete emx makefile to old [Truta]
+- Allow the use of -Wundef when compiling or using zlib
+- Avoid the use of the -u option with mktemp
+- Improve inflate() documentation on the use of Z_FINISH
+- Recognize clang as gcc
+- Add gzopen_w() in Windows for wide character path names
+- Rename zconf.h in CMakeLists.txt to move it out of the way
+- Add source directory in CMakeLists.txt for building examples
+- Look in build directory for zlib.pc in CMakeLists.txt
+- Remove gzflags from zlibvc.def in vc9 and vc10
+- Fix contrib/minizip compilation in the MinGW environment
+- Update ./configure for Solaris, support --64 [Mooney]
+- Remove -R. from Solaris shared build (possible security issue)
+- Avoid race condition for parallel make (-j) running example
+- Fix type mismatch between get_crc_table() and crc_table
+- Fix parsing of version with "-" in CMakeLists.txt [Snider, Ziegler]
+- Fix the path to zlib.map in CMakeLists.txt
+- Force the native libtool in Mac OS X to avoid GNU libtool [Beebe]
+- Add instructions to win32/Makefile.gcc for shared install [Torri]
+
+Changes in 1.2.6.1 (12 Feb 2012)
+- Avoid the use of the Objective-C reserved name "id"
+- Include io.h in gzguts.h for Microsoft compilers
+- Fix problem with ./configure --prefix and gzgetc macro
+- Include gz_header definition when compiling zlib solo
+- Put gzflags() functionality back in zutil.c
+- Avoid library header include in crc32.c for Z_SOLO
+- Use name in GCC_CLASSIC as C compiler for coverage testing, if set
+- Minor cleanup in contrib/minizip/zip.c [Vollant]
+- Update make_vms.com [Zinser]
+- Remove unnecessary gzgetc_ function
+- Use optimized byte swap operations for Microsoft and GNU [Snyder]
+- Fix minor typo in zlib.h comments [Rzesniowiecki]
+
+Changes in 1.2.6 (29 Jan 2012)
+- Update the Pascal interface in contrib/pascal
+- Fix function numbers for gzgetc_ in zlibvc.def files
+- Fix configure.ac for contrib/minizip [Schiffer]
+- Fix large-entry detection in minizip on 64-bit systems [Schiffer]
+- Have ./configure use the compiler return code for error indication
+- Fix CMakeLists.txt for cross compilation [McClure]
+- Fix contrib/minizip/zip.c for 64-bit architectures [Dalsnes]
+- Fix compilation of contrib/minizip on FreeBSD [Marquez]
+- Correct suggested usages in win32/Makefile.msc [Shachar, Horvath]
+- Include io.h for Turbo C / Borland C on all platforms [Truta]
+- Make version explicit in contrib/minizip/configure.ac [Bosmans]
+- Avoid warning for no encryption in contrib/minizip/zip.c [Vollant]
+- Minor cleanup up contrib/minizip/unzip.c [Vollant]
+- Fix bug when compiling minizip with C++ [Vollant]
+- Protect for long name and extra fields in contrib/minizip [Vollant]
+- Avoid some warnings in contrib/minizip [Vollant]
+- Add -I../.. -L../.. to CFLAGS for minizip and miniunzip
+- Add missing libs to minizip linker command
+- Add support for VPATH builds in contrib/minizip
+- Add an --enable-demos option to contrib/minizip/configure
+- Add the generation of configure.log by ./configure
+- Exit when required parameters not provided to win32/Makefile.gcc
+- Have gzputc return the character written instead of the argument
+- Use the -m option on ldconfig for BSD systems [Tobias]
+- Correct in zlib.map when deflateResetKeep was added
+
+Changes in 1.2.5.3 (15 Jan 2012)
+- Restore gzgetc function for binary compatibility
+- Do not use _lseeki64 under Borland C++ [Truta]
+- Update win32/Makefile.msc to build test/*.c [Truta]
+- Remove old/visualc6 given CMakefile and other alternatives
+- Update AS400 build files and documentation [Monnerat]
+- Update win32/Makefile.gcc to build test/*.c [Truta]
+- Permit stronger flushes after Z_BLOCK flushes
+- Avoid extraneous empty blocks when doing empty flushes
+- Permit Z_NULL arguments to deflatePending
+- Allow deflatePrime() to insert bits in the middle of a stream
+- Remove second empty static block for Z_PARTIAL_FLUSH
+- Write out all of the available bits when using Z_BLOCK
+- Insert the first two strings in the hash table after a flush
+
+Changes in 1.2.5.2 (17 Dec 2011)
+- fix ld error: unable to find version dependency 'ZLIB_1.2.5'
+- use relative symlinks for shared libs
+- Avoid searching past window for Z_RLE strategy
+- Assure that high-water mark initialization is always applied in deflate
+- Add assertions to fill_window() in deflate.c to match comments
+- Update python link in README
+- Correct spelling error in gzread.c
+- Fix bug in gzgets() for a concatenated empty gzip stream
+- Correct error in comment for gz_make()
+- Change gzread() and related to ignore junk after gzip streams
+- Allow gzread() and related to continue after gzclearerr()
+- Allow gzrewind() and gzseek() after a premature end-of-file
+- Simplify gzseek() now that raw after gzip is ignored
+- Change gzgetc() to a macro for speed (~40% speedup in testing)
+- Fix gzclose() to return the actual error last encountered
+- Always add large file support for windows
+- Include zconf.h for windows large file support
+- Include zconf.h.cmakein for windows large file support
+- Update zconf.h.cmakein on make distclean
+- Merge vestigial vsnprintf determination from zutil.h to gzguts.h
+- Clarify how gzopen() appends in zlib.h comments
+- Correct documentation of gzdirect() since junk at end now ignored
+- Add a transparent write mode to gzopen() when 'T' is in the mode
+- Update python link in zlib man page
+- Get inffixed.h and MAKEFIXED result to match
+- Add a ./config --solo option to make zlib subset with no libary use
+- Add undocumented inflateResetKeep() function for CAB file decoding
+- Add --cover option to ./configure for gcc coverage testing
+- Add #define ZLIB_CONST option to use const in the z_stream interface
+- Add comment to gzdopen() in zlib.h to use dup() when using fileno()
+- Note behavior of uncompress() to provide as much data as it can
+- Add files in contrib/minizip to aid in building libminizip
+- Split off AR options in Makefile.in and configure
+- Change ON macro to Z_ARG to avoid application conflicts
+- Facilitate compilation with Borland C++ for pragmas and vsnprintf
+- Include io.h for Turbo C / Borland C++
+- Move example.c and minigzip.c to test/
+- Simplify incomplete code table filling in inflate_table()
+- Remove code from inflate.c and infback.c that is impossible to execute
+- Test the inflate code with full coverage
+- Allow deflateSetDictionary, inflateSetDictionary at any time (in raw)
+- Add deflateResetKeep and fix inflateResetKeep to retain dictionary
+- Fix gzwrite.c to accommodate reduced memory zlib compilation
+- Have inflate() with Z_FINISH avoid the allocation of a window
+- Do not set strm->adler when doing raw inflate
+- Fix gzeof() to behave just like feof() when read is not past end of file
+- Fix bug in gzread.c when end-of-file is reached
+- Avoid use of Z_BUF_ERROR in gz* functions except for premature EOF
+- Document gzread() capability to read concurrently written files
+- Remove hard-coding of resource compiler in CMakeLists.txt [Blammo]
+
+Changes in 1.2.5.1 (10 Sep 2011)
+- Update FAQ entry on shared builds (#13)
+- Avoid symbolic argument to chmod in Makefile.in
+- Fix bug and add consts in contrib/puff [Oberhumer]
+- Update contrib/puff/zeros.raw test file to have all block types
+- Add full coverage test for puff in contrib/puff/Makefile
+- Fix static-only-build install in Makefile.in
+- Fix bug in unzGetCurrentFileInfo() in contrib/minizip [Kuno]
+- Add libz.a dependency to shared in Makefile.in for parallel builds
+- Spell out "number" (instead of "nb") in zlib.h for total_in, total_out
+- Replace $(...) with `...` in configure for non-bash sh [Bowler]
+- Add darwin* to Darwin* and solaris* to SunOS\ 5* in configure [Groffen]
+- Add solaris* to Linux* in configure to allow gcc use [Groffen]
+- Add *bsd* to Linux* case in configure [Bar-Lev]
+- Add inffast.obj to dependencies in win32/Makefile.msc
+- Correct spelling error in deflate.h [Kohler]
+- Change libzdll.a again to libz.dll.a (!) in win32/Makefile.gcc
+- Add test to configure for GNU C looking for gcc in output of $cc -v
+- Add zlib.pc generation to win32/Makefile.gcc [Weigelt]
+- Fix bug in zlib.h for _FILE_OFFSET_BITS set and _LARGEFILE64_SOURCE not
+- Add comment in zlib.h that adler32_combine with len2 < 0 makes no sense
+- Make NO_DIVIDE option in adler32.c much faster (thanks to John Reiser)
+- Make stronger test in zconf.h to include unistd.h for LFS
+- Apply Darwin patches for 64-bit file offsets to contrib/minizip [Slack]
+- Fix zlib.h LFS support when Z_PREFIX used
+- Add updated as400 support (removed from old) [Monnerat]
+- Avoid deflate sensitivity to volatile input data
+- Avoid division in adler32_combine for NO_DIVIDE
+- Clarify the use of Z_FINISH with deflateBound() amount of space
+- Set binary for output file in puff.c
+- Use u4 type for crc_table to avoid conversion warnings
+- Apply casts in zlib.h to avoid conversion warnings
+- Add OF to prototypes for adler32_combine_ and crc32_combine_ [Miller]
+- Improve inflateSync() documentation to note indeterminancy
+- Add deflatePending() function to return the amount of pending output
+- Correct the spelling of "specification" in FAQ [Randers-Pehrson]
+- Add a check in configure for stdarg.h, use for gzprintf()
+- Check that pointers fit in ints when gzprint() compiled old style
+- Add dummy name before $(SHAREDLIBV) in Makefile [Bar-Lev, Bowler]
+- Delete line in configure that adds -L. libz.a to LDFLAGS [Weigelt]
+- Add debug records in assmebler code [Londer]
+- Update RFC references to use http://tools.ietf.org/html/... [Li]
+- Add --archs option, use of libtool to configure for Mac OS X [Borstel]
+
Changes in 1.2.5 (19 Apr 2010)
- Disable visibility attribute in win32/Makefile.gcc [Bar-Lev]
- Default to libdir as sharedlibdir in configure [Nieder]
- Update copyright dates on modified source files
- Update trees.c to be able to generate modified trees.h
- Exit configure for MinGW, suggesting win32/Makefile.gcc
+- Check for NULL path in gz_open [Homurlu]
Changes in 1.2.4.5 (18 Apr 2010)
- Set sharedlibdir in configure [Torok]
@@ -261,7 +525,7 @@ Changes in 1.2.3.4 (21 Dec 2009)
- Clear bytes after deflate lookahead to avoid use of uninitialized data
- Change a limit in inftrees.c to be more transparent to Coverity Prevent
- Update win32/zlib.def with exported symbols from zlib.h
-- Correct spelling error in zlib.h [Willem]
+- Correct spelling errors in zlib.h [Willem, Sobrado]
- Allow Z_BLOCK for deflate() to force a new block
- Allow negative bits in inflatePrime() to delete existing bit buffer
- Add Z_TREES flush option to inflate() to return at end of trees
diff --git a/src/share/native/java/util/zip/zlib-1.2.5/README b/src/share/native/java/util/zip/zlib-1.2.8/README
index d4219bf88..5ca9d127e 100644
--- a/src/share/native/java/util/zip/zlib-1.2.5/README
+++ b/src/share/native/java/util/zip/zlib-1.2.8/README
@@ -1,22 +1,22 @@
ZLIB DATA COMPRESSION LIBRARY
-zlib 1.2.5 is a general purpose data compression library. All the code is
+zlib 1.2.8 is a general purpose data compression library. All the code is
thread safe. The data format used by the zlib library is described by RFCs
(Request for Comments) 1950 to 1952 in the files
-http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format)
-and rfc1952.txt (gzip format).
+http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and
+rfc1952 (gzip format).
All functions of the compression library are documented in the file zlib.h
(volunteer to write man pages welcome, contact zlib@gzip.org). A usage example
-of the library is given in the file example.c which also tests that the library
-is working correctly. Another example is given in the file minigzip.c. The
-compression library itself is composed of all source files except example.c and
-minigzip.c.
+of the library is given in the file test/example.c which also tests that
+the library is working correctly. Another example is given in the file
+test/minigzip.c. The compression library itself is composed of all source
+files in the root directory.
To compile all files and run the test program, follow the instructions given at
the top of Makefile.in. In short "./configure; make test", and if that goes
-well, "make install" should work for most flavors of Unix. For Windows, use one
-of the special makefiles in win32/ or contrib/vstudio/ . For VMS, use
+well, "make install" should work for most flavors of Unix. For Windows, use
+one of the special makefiles in win32/ or contrib/vstudio/ . For VMS, use
make_vms.com.
Questions about zlib should be sent to <zlib@gzip.org>, or to Gilles Vollant
@@ -31,7 +31,7 @@ Mark Nelson <markn@ieee.org> wrote an article about zlib for the Jan. 1997
issue of Dr. Dobb's Journal; a copy of the article is available at
http://marknelson.us/1997/01/01/zlib-engine/ .
-The changes made in version 1.2.5 are documented in the file ChangeLog.
+The changes made in version 1.2.8 are documented in the file ChangeLog.
Unsupported third party contributions are provided in directory contrib/ .
@@ -44,7 +44,7 @@ http://search.cpan.org/~pmqs/IO-Compress-Zlib/ .
A Python interface to zlib written by A.M. Kuchling <amk@amk.ca> is
available in Python 1.5 and later versions, see
-http://www.python.org/doc/lib/module-zlib.html .
+http://docs.python.org/library/zlib.html .
zlib is built into tcl: http://wiki.tcl.tk/4610 .
@@ -84,7 +84,7 @@ Acknowledgments:
Copyright notice:
- (C) 1995-2010 Jean-loup Gailly and Mark Adler
+ (C) 1995-2013 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
diff --git a/src/share/native/java/util/zip/zlib-1.2.5/compress.c b/src/share/native/java/util/zip/zlib-1.2.8/compress.c
index 9d8713f94..cdc51e081 100644
--- a/src/share/native/java/util/zip/zlib-1.2.5/compress.c
+++ b/src/share/native/java/util/zip/zlib-1.2.8/compress.c
@@ -53,7 +53,7 @@ int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
z_stream stream;
int err;
- stream.next_in = (Bytef*)source;
+ stream.next_in = (z_const Bytef *)source;
stream.avail_in = (uInt)sourceLen;
#ifdef MAXSEG_64K
/* Check for source > 64K on 16-bit machine: */
diff --git a/src/share/native/java/util/zip/zlib-1.2.5/crc32.h b/src/share/native/java/util/zip/zlib-1.2.8/crc32.h
index 2383bdc84..94df2aaf2 100644
--- a/src/share/native/java/util/zip/zlib-1.2.5/crc32.h
+++ b/src/share/native/java/util/zip/zlib-1.2.8/crc32.h
@@ -26,7 +26,7 @@
* Generated automatically by crc32.c
*/
-local const unsigned long FAR crc_table[TBLS][256] =
+local const z_crc_t FAR crc_table[TBLS][256] =
{
{
0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL,
diff --git a/src/share/native/java/util/zip/zlib-1.2.5/deflate.c b/src/share/native/java/util/zip/zlib-1.2.8/deflate.c
index 1dce5b0d0..5cc66c5e5 100644
--- a/src/share/native/java/util/zip/zlib-1.2.5/deflate.c
+++ b/src/share/native/java/util/zip/zlib-1.2.8/deflate.c
@@ -23,7 +23,7 @@
*/
/* deflate.c -- compress data using the deflation algorithm
- * Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
+ * Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -61,7 +61,7 @@
* REFERENCES
*
* Deutsch, L.P.,"DEFLATE Compressed Data Format Specification".
- * Available in http://www.ietf.org/rfc/rfc1951.txt
+ * Available in http://tools.ietf.org/html/rfc1951
*
* A description of the Rabin and Karp algorithm is given in the book
* "Algorithms" by R. Sedgewick, Addison-Wesley, p252.
@@ -76,7 +76,7 @@
#include "deflate.h"
const char deflate_copyright[] =
- " deflate 1.2.5 Copyright 1995-2010 Jean-loup Gailly and Mark Adler ";
+ " deflate 1.2.8 Copyright 1995-2013 Jean-loup Gailly and Mark Adler ";
/*
If you use the zlib library in a product, an acknowledgment is welcome
in the documentation of your product. If for some reason you cannot
@@ -179,6 +179,9 @@ local const config configuration_table[10] = {
struct static_tree_desc_s {int dummy;}; /* for buggy compilers */
#endif
+/* rank Z_BLOCK between Z_NO_FLUSH and Z_PARTIAL_FLUSH */
+#define RANK(f) (((f) << 1) - ((f) > 4 ? 9 : 0))
+
/* ===========================================================================
* Update a hash value with the given input byte
* IN assertion: all calls to to UPDATE_HASH are made with consecutive
@@ -259,10 +262,19 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
strm->msg = Z_NULL;
if (strm->zalloc == (alloc_func)0) {
+#ifdef Z_SOLO
+ return Z_STREAM_ERROR;
+#else
strm->zalloc = zcalloc;
strm->opaque = (voidpf)0;
+#endif
}
- if (strm->zfree == (free_func)0) strm->zfree = zcfree;
+ if (strm->zfree == (free_func)0)
+#ifdef Z_SOLO
+ return Z_STREAM_ERROR;
+#else
+ strm->zfree = zcfree;
+#endif
#ifdef FASTEST
if (level != 0) level = 1;
@@ -317,7 +329,7 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
s->pending_buf == Z_NULL) {
s->status = FINISH_STATE;
- strm->msg = (char*)ERR_MSG(Z_MEM_ERROR);
+ strm->msg = ERR_MSG(Z_MEM_ERROR);
deflateEnd (strm);
return Z_MEM_ERROR;
}
@@ -338,43 +350,70 @@ int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
uInt dictLength;
{
deflate_state *s;
- uInt length = dictLength;
- uInt n;
- IPos hash_head = 0;
+ uInt str, n;
+ int wrap;
+ unsigned avail;
+ z_const unsigned char *next;
- if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL ||
- strm->state->wrap == 2 ||
- (strm->state->wrap == 1 && strm->state->status != INIT_STATE))
+ if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL)
return Z_STREAM_ERROR;
-
s = strm->state;
- if (s->wrap)
- strm->adler = adler32(strm->adler, dictionary, dictLength);
+ wrap = s->wrap;
+ if (wrap == 2 || (wrap == 1 && s->status != INIT_STATE) || s->lookahead)
+ return Z_STREAM_ERROR;
- if (length < MIN_MATCH) return Z_OK;
- if (length > s->w_size) {
- length = s->w_size;
- dictionary += dictLength - length; /* use the tail of the dictionary */
+ /* when using zlib wrappers, compute Adler-32 for provided dictionary */
+ if (wrap == 1)
+ strm->adler = adler32(strm->adler, dictionary, dictLength);
+ s->wrap = 0; /* avoid computing Adler-32 in read_buf */
+
+ /* if dictionary would fill window, just replace the history */
+ if (dictLength >= s->w_size) {
+ if (wrap == 0) { /* already empty otherwise */
+ CLEAR_HASH(s);
+ s->strstart = 0;
+ s->block_start = 0L;
+ s->insert = 0;
+ }
+ dictionary += dictLength - s->w_size; /* use the tail */
+ dictLength = s->w_size;
}
- zmemcpy(s->window, dictionary, length);
- s->strstart = length;
- s->block_start = (long)length;
- /* Insert all strings in the hash table (except for the last two bytes).
- * s->lookahead stays null, so s->ins_h will be recomputed at the next
- * call of fill_window.
- */
- s->ins_h = s->window[0];
- UPDATE_HASH(s, s->ins_h, s->window[1]);
- for (n = 0; n <= length - MIN_MATCH; n++) {
- INSERT_STRING(s, n, hash_head);
+ /* insert dictionary into window and hash */
+ avail = strm->avail_in;
+ next = strm->next_in;
+ strm->avail_in = dictLength;
+ strm->next_in = (z_const Bytef *)dictionary;
+ fill_window(s);
+ while (s->lookahead >= MIN_MATCH) {
+ str = s->strstart;
+ n = s->lookahead - (MIN_MATCH-1);
+ do {
+ UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]);
+#ifndef FASTEST
+ s->prev[str & s->w_mask] = s->head[s->ins_h];
+#endif
+ s->head[s->ins_h] = (Pos)str;
+ str++;
+ } while (--n);
+ s->strstart = str;
+ s->lookahead = MIN_MATCH-1;
+ fill_window(s);
}
- if (hash_head) hash_head = 0; /* to make compiler happy */
+ s->strstart += s->lookahead;
+ s->block_start = (long)s->strstart;
+ s->insert = s->lookahead;
+ s->lookahead = 0;
+ s->match_length = s->prev_length = MIN_MATCH-1;
+ s->match_available = 0;
+ strm->next_in = next;
+ strm->avail_in = avail;
+ s->wrap = wrap;
return Z_OK;
}
/* ========================================================================= */
-int ZEXPORT deflateReset (strm)
+int ZEXPORT deflateResetKeep (strm)
z_streamp strm;
{
deflate_state *s;
@@ -404,12 +443,23 @@ int ZEXPORT deflateReset (strm)
s->last_flush = Z_NO_FLUSH;
_tr_init(s);
- lm_init(s);
return Z_OK;
}
/* ========================================================================= */
+int ZEXPORT deflateReset (strm)
+ z_streamp strm;
+{
+ int ret;
+
+ ret = deflateResetKeep(strm);
+ if (ret == Z_OK)
+ lm_init(strm->state);
+ return ret;
+}
+
+/* ========================================================================= */
int ZEXPORT deflateSetHeader (strm, head)
z_streamp strm;
gz_headerp head;
@@ -421,14 +471,42 @@ int ZEXPORT deflateSetHeader (strm, head)
}
/* ========================================================================= */
+int ZEXPORT deflatePending (strm, pending, bits)
+ unsigned *pending;
+ int *bits;
+ z_streamp strm;
+{
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ if (pending != Z_NULL)
+ *pending = strm->state->pending;
+ if (bits != Z_NULL)
+ *bits = strm->state->bi_valid;
+ return Z_OK;
+}
+
+/* ========================================================================= */
int ZEXPORT deflatePrime (strm, bits, value)
z_streamp strm;
int bits;
int value;
{
+ deflate_state *s;
+ int put;
+
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- strm->state->bi_valid = bits;
- strm->state->bi_buf = (ush)(value & ((1 << bits) - 1));
+ s = strm->state;
+ if ((Bytef *)(s->d_buf) < s->pending_out + ((Buf_size + 7) >> 3))
+ return Z_BUF_ERROR;
+ do {
+ put = Buf_size - s->bi_valid;
+ if (put > bits)
+ put = bits;
+ s->bi_buf |= (ush)((value & ((1 << put) - 1)) << s->bi_valid);
+ s->bi_valid += put;
+ _tr_flush_bits(s);
+ value >>= put;
+ bits -= put;
+ } while (bits);
return Z_OK;
}
@@ -459,6 +537,8 @@ int ZEXPORT deflateParams(strm, level, strategy)
strm->total_in != 0) {
/* Flush the last buffer: */
err = deflate(strm, Z_BLOCK);
+ if (err == Z_BUF_ERROR && s->pending == 0)
+ err = Z_OK;
}
if (s->level != level) {
s->level = level;
@@ -586,19 +666,22 @@ local void putShortMSB (s, b)
local void flush_pending(strm)
z_streamp strm;
{
- unsigned len = strm->state->pending;
+ unsigned len;
+ deflate_state *s = strm->state;
+ _tr_flush_bits(s);
+ len = s->pending;
if (len > strm->avail_out) len = strm->avail_out;
if (len == 0) return;
- zmemcpy(strm->next_out, strm->state->pending_out, len);
+ zmemcpy(strm->next_out, s->pending_out, len);
strm->next_out += len;
- strm->state->pending_out += len;
+ s->pending_out += len;
strm->total_out += len;
strm->avail_out -= len;
- strm->state->pending -= len;
- if (strm->state->pending == 0) {
- strm->state->pending_out = strm->state->pending_buf;
+ s->pending -= len;
+ if (s->pending == 0) {
+ s->pending_out = s->pending_buf;
}
}
@@ -825,7 +908,7 @@ int ZEXPORT deflate (strm, flush)
* flushes. For repeated and useless calls with Z_FINISH, we keep
* returning Z_STREAM_END instead of Z_BUF_ERROR.
*/
- } else if (strm->avail_in == 0 && flush <= old_flush &&
+ } else if (strm->avail_in == 0 && RANK(flush) <= RANK(old_flush) &&
flush != Z_FINISH) {
ERR_RETURN(strm, Z_BUF_ERROR);
}
@@ -874,6 +957,7 @@ int ZEXPORT deflate (strm, flush)
if (s->lookahead == 0) {
s->strstart = 0;
s->block_start = 0L;
+ s->insert = 0;
}
}
}
@@ -969,12 +1053,12 @@ int ZEXPORT deflateCopy (dest, source)
ss = source->state;
- zmemcpy(dest, source, sizeof(z_stream));
+ zmemcpy((voidpf)dest, (voidpf)source, sizeof(z_stream));
ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state));
if (ds == Z_NULL) return Z_MEM_ERROR;
dest->state = (struct internal_state FAR *) ds;
- zmemcpy(ds, ss, sizeof(deflate_state));
+ zmemcpy((voidpf)ds, (voidpf)ss, sizeof(deflate_state));
ds->strm = dest;
ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte));
@@ -990,8 +1074,8 @@ int ZEXPORT deflateCopy (dest, source)
}
/* following zmemcpy do not work for 16-bit MSDOS */
zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte));
- zmemcpy(ds->prev, ss->prev, ds->w_size * sizeof(Pos));
- zmemcpy(ds->head, ss->head, ds->hash_size * sizeof(Pos));
+ zmemcpy((voidpf)ds->prev, (voidpf)ss->prev, ds->w_size * sizeof(Pos));
+ zmemcpy((voidpf)ds->head, (voidpf)ss->head, ds->hash_size * sizeof(Pos));
zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size);
ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf);
@@ -1025,15 +1109,15 @@ local int read_buf(strm, buf, size)
strm->avail_in -= len;
+ zmemcpy(buf, strm->next_in, len);
if (strm->state->wrap == 1) {
- strm->adler = adler32(strm->adler, strm->next_in, len);
+ strm->adler = adler32(strm->adler, buf, len);
}
#ifdef GZIP
else if (strm->state->wrap == 2) {
- strm->adler = crc32(strm->adler, strm->next_in, len);
+ strm->adler = crc32(strm->adler, buf, len);
}
#endif
- zmemcpy(buf, strm->next_in, len);
strm->next_in += len;
strm->total_in += len;
@@ -1060,6 +1144,7 @@ local void lm_init (s)
s->strstart = 0;
s->block_start = 0L;
s->lookahead = 0;
+ s->insert = 0;
s->match_length = s->prev_length = MIN_MATCH-1;
s->match_available = 0;
s->ins_h = 0;
@@ -1334,6 +1419,8 @@ local void fill_window(s)
unsigned more; /* Amount of free space at the end of the window. */
uInt wsize = s->w_size;
+ Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead");
+
do {
more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart);
@@ -1386,7 +1473,7 @@ local void fill_window(s)
#endif
more += wsize;
}
- if (s->strm->avail_in == 0) return;
+ if (s->strm->avail_in == 0) break;
/* If there was no sliding:
* strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
@@ -1405,12 +1492,24 @@ local void fill_window(s)
s->lookahead += n;
/* Initialize the hash value now that we have some input: */
- if (s->lookahead >= MIN_MATCH) {
- s->ins_h = s->window[s->strstart];
- UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]);
+ if (s->lookahead + s->insert >= MIN_MATCH) {
+ uInt str = s->strstart - s->insert;
+ s->ins_h = s->window[str];
+ UPDATE_HASH(s, s->ins_h, s->window[str + 1]);
#if MIN_MATCH != 3
Call UPDATE_HASH() MIN_MATCH-3 more times
#endif
+ while (s->insert) {
+ UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]);
+#ifndef FASTEST
+ s->prev[str & s->w_mask] = s->head[s->ins_h];
+#endif
+ s->head[s->ins_h] = (Pos)str;
+ str++;
+ s->insert--;
+ if (s->lookahead + s->insert < MIN_MATCH)
+ break;
+ }
}
/* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,
* but this is not important since only literal bytes will be emitted.
@@ -1451,6 +1550,9 @@ local void fill_window(s)
s->high_water += init;
}
}
+
+ Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,
+ "not enough room for search");
}
/* ===========================================================================
@@ -1530,8 +1632,14 @@ local block_state deflate_stored(s, flush)
FLUSH_BLOCK(s, 0);
}
}
- FLUSH_BLOCK(s, flush == Z_FINISH);
- return flush == Z_FINISH ? finish_done : block_done;
+ s->insert = 0;
+ if (flush == Z_FINISH) {
+ FLUSH_BLOCK(s, 1);
+ return finish_done;
+ }
+ if ((long)s->strstart > s->block_start)
+ FLUSH_BLOCK(s, 0);
+ return block_done;
}
/* ===========================================================================
@@ -1627,8 +1735,14 @@ local block_state deflate_fast(s, flush)
}
if (bflush) FLUSH_BLOCK(s, 0);
}
- FLUSH_BLOCK(s, flush == Z_FINISH);
- return flush == Z_FINISH ? finish_done : block_done;
+ s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1;
+ if (flush == Z_FINISH) {
+ FLUSH_BLOCK(s, 1);
+ return finish_done;
+ }
+ if (s->last_lit)
+ FLUSH_BLOCK(s, 0);
+ return block_done;
}
#ifndef FASTEST
@@ -1752,8 +1866,14 @@ local block_state deflate_slow(s, flush)
_tr_tally_lit(s, s->window[s->strstart-1], bflush);
s->match_available = 0;
}
- FLUSH_BLOCK(s, flush == Z_FINISH);
- return flush == Z_FINISH ? finish_done : block_done;
+ s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1;
+ if (flush == Z_FINISH) {
+ FLUSH_BLOCK(s, 1);
+ return finish_done;
+ }
+ if (s->last_lit)
+ FLUSH_BLOCK(s, 0);
+ return block_done;
}
#endif /* FASTEST */
@@ -1773,11 +1893,11 @@ local block_state deflate_rle(s, flush)
for (;;) {
/* Make sure that we always have enough lookahead, except
* at the end of the input file. We need MAX_MATCH bytes
- * for the longest encodable run.
+ * for the longest run, plus one for the unrolled loop.
*/
- if (s->lookahead < MAX_MATCH) {
+ if (s->lookahead <= MAX_MATCH) {
fill_window(s);
- if (s->lookahead < MAX_MATCH && flush == Z_NO_FLUSH) {
+ if (s->lookahead <= MAX_MATCH && flush == Z_NO_FLUSH) {
return need_more;
}
if (s->lookahead == 0) break; /* flush the current block */
@@ -1800,6 +1920,7 @@ local block_state deflate_rle(s, flush)
if (s->match_length > s->lookahead)
s->match_length = s->lookahead;
}
+ Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan");
}
/* Emit match if have run of MIN_MATCH or longer, else emit literal */
@@ -1820,8 +1941,14 @@ local block_state deflate_rle(s, flush)
}
if (bflush) FLUSH_BLOCK(s, 0);
}
- FLUSH_BLOCK(s, flush == Z_FINISH);
- return flush == Z_FINISH ? finish_done : block_done;
+ s->insert = 0;
+ if (flush == Z_FINISH) {
+ FLUSH_BLOCK(s, 1);
+ return finish_done;
+ }
+ if (s->last_lit)
+ FLUSH_BLOCK(s, 0);
+ return block_done;
}
/* ===========================================================================
@@ -1853,6 +1980,12 @@ local block_state deflate_huff(s, flush)
s->strstart++;
if (bflush) FLUSH_BLOCK(s, 0);
}
- FLUSH_BLOCK(s, flush == Z_FINISH);
- return flush == Z_FINISH ? finish_done : block_done;
+ s->insert = 0;
+ if (flush == Z_FINISH) {
+ FLUSH_BLOCK(s, 1);
+ return finish_done;
+ }
+ if (s->last_lit)
+ FLUSH_BLOCK(s, 0);
+ return block_done;
}
diff --git a/src/share/native/java/util/zip/zlib-1.2.5/deflate.h b/src/share/native/java/util/zip/zlib-1.2.8/deflate.h
index 652be480e..8be47fa01 100644
--- a/src/share/native/java/util/zip/zlib-1.2.5/deflate.h
+++ b/src/share/native/java/util/zip/zlib-1.2.8/deflate.h
@@ -23,7 +23,7 @@
*/
/* deflate.h -- internal compression state
- * Copyright (C) 1995-2010 Jean-loup Gailly
+ * Copyright (C) 1995-2012 Jean-loup Gailly
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -72,6 +72,9 @@
#define MAX_BITS 15
/* All codes must not exceed MAX_BITS bits */
+#define Buf_size 16
+/* size of bit buffer in bi_buf */
+
#define INIT_STATE 42
#define EXTRA_STATE 69
#define NAME_STATE 73
@@ -125,7 +128,7 @@ typedef struct internal_state {
int wrap; /* bit 0 true for zlib, bit 1 true for gzip */
gz_headerp gzhead; /* gzip header information to write */
uInt gzindex; /* where in extra, name, or comment */
- Byte method; /* STORED (for zip only) or DEFLATED */
+ Byte method; /* can only be DEFLATED */
int last_flush; /* value of flush param for previous deflate call */
/* used by deflate.c: */
@@ -212,7 +215,7 @@ typedef struct internal_state {
int nice_match; /* Stop searching when current match exceeds this */
/* used by trees.c: */
- /* Didn't use ct_data typedef below to supress compiler warning */
+ /* Didn't use ct_data typedef below to suppress compiler warning */
struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */
struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */
struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */
@@ -268,7 +271,7 @@ typedef struct internal_state {
ulg opt_len; /* bit length of current block with optimal trees */
ulg static_len; /* bit length of current block with static trees */
uInt matches; /* number of string matches in current block */
- int last_eob_len; /* bit length of EOB code for last block */
+ uInt insert; /* bytes at end of window left to insert */
#ifdef DEBUG
ulg compressed_len; /* total bit length of compressed file mod 2^32 */
@@ -318,6 +321,7 @@ void ZLIB_INTERNAL _tr_init OF((deflate_state *s));
int ZLIB_INTERNAL _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc));
void ZLIB_INTERNAL _tr_flush_block OF((deflate_state *s, charf *buf,
ulg stored_len, int last));
+void ZLIB_INTERNAL _tr_flush_bits OF((deflate_state *s));
void ZLIB_INTERNAL _tr_align OF((deflate_state *s));
void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
ulg stored_len, int last));
diff --git a/src/share/native/java/util/zip/zlib-1.2.5/gzclose.c b/src/share/native/java/util/zip/zlib-1.2.8/gzclose.c
index 5cce4b03d..5cce4b03d 100644
--- a/src/share/native/java/util/zip/zlib-1.2.5/gzclose.c
+++ b/src/share/native/java/util/zip/zlib-1.2.8/gzclose.c
diff --git a/src/share/native/java/util/zip/zlib-1.2.5/gzguts.h b/src/share/native/java/util/zip/zlib-1.2.8/gzguts.h
index d8fbf1e4c..5889f45c7 100644
--- a/src/share/native/java/util/zip/zlib-1.2.5/gzguts.h
+++ b/src/share/native/java/util/zip/zlib-1.2.8/gzguts.h
@@ -23,7 +23,7 @@
*/
/* gzguts.h -- zlib internal header definitions for gz* operations
- * Copyright (C) 2004, 2005, 2010 Mark Adler
+ * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -36,7 +36,7 @@
# endif
#endif
-#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33) && !defined(NO_VIZ)
+#ifdef HAVE_HIDDEN
# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
#else
# define ZLIB_INTERNAL
@@ -51,13 +51,80 @@
#endif
#include <fcntl.h>
+#ifdef _WIN32
+# include <stddef.h>
+#endif
+
+#if defined(__TURBOC__) || defined(_MSC_VER) || defined(_WIN32)
+# include <io.h>
+#endif
+
+#ifdef WINAPI_FAMILY
+# define open _open
+# define read _read
+# define write _write
+# define close _close
+#endif
+
#ifdef NO_DEFLATE /* for compatibility with old definition */
# define NO_GZCOMPRESS
#endif
+#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550)
+# ifndef HAVE_VSNPRINTF
+# define HAVE_VSNPRINTF
+# endif
+#endif
+
+#if defined(__CYGWIN__)
+# ifndef HAVE_VSNPRINTF
+# define HAVE_VSNPRINTF
+# endif
+#endif
+
+#if defined(MSDOS) && defined(__BORLANDC__) && (BORLANDC > 0x410)
+# ifndef HAVE_VSNPRINTF
+# define HAVE_VSNPRINTF
+# endif
+#endif
+
+#ifndef HAVE_VSNPRINTF
+# ifdef MSDOS
+/* vsnprintf may exist on some MS-DOS compilers (DJGPP?),
+ but for now we just assume it doesn't. */
+# define NO_vsnprintf
+# endif
+# ifdef __TURBOC__
+# define NO_vsnprintf
+# endif
+# ifdef WIN32
+/* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */
+# if !defined(vsnprintf) && !defined(NO_vsnprintf)
+# if !defined(_MSC_VER) || ( defined(_MSC_VER) && _MSC_VER < 1500 )
+# define vsnprintf _vsnprintf
+# endif
+# endif
+# endif
+# ifdef __SASC
+# define NO_vsnprintf
+# endif
+# ifdef VMS
+# define NO_vsnprintf
+# endif
+# ifdef __OS400__
+# define NO_vsnprintf
+# endif
+# ifdef __MVS__
+# define NO_vsnprintf
+# endif
+#endif
+
+/* unlike snprintf (which is required in C99, yet still not supported by
+ Microsoft more than a decade later!), _snprintf does not guarantee null
+ termination of the result -- however this is only used in gzlib.c where
+ the result is assured to fit in the space provided */
#ifdef _MSC_VER
-# include <io.h>
-# define vsnprintf _vsnprintf
+# define snprintf _snprintf
#endif
#ifndef local
@@ -76,7 +143,7 @@
# include <windows.h>
# define zstrerror() gz_strwinerror((DWORD)GetLastError())
#else
-# ifdef STDC
+# ifndef NO_STRERROR
# include <errno.h>
# define zstrerror() strerror(errno)
# else
@@ -92,7 +159,15 @@
ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
#endif
-/* default i/o buffer size -- double this for output when reading */
+/* default memLevel */
+#if MAX_MEM_LEVEL >= 8
+# define DEF_MEM_LEVEL 8
+#else
+# define DEF_MEM_LEVEL MAX_MEM_LEVEL
+#endif
+
+/* default i/o buffer size -- double this for output when reading (this and
+ twice this must be able to fit in an unsigned type) */
#define GZBUFSIZE 8192
/* gzip modes, also provide a little integrity check on the passed structure */
@@ -108,23 +183,25 @@
/* internal gzip file state data structure */
typedef struct {
+ /* exposed contents for gzgetc() macro */
+ struct gzFile_s x; /* "x" for exposed */
+ /* x.have: number of bytes available at x.next */
+ /* x.next: next output data to deliver or write */
+ /* x.pos: current position in uncompressed data */
/* used for both reading and writing */
int mode; /* see gzip modes above */
int fd; /* file descriptor */
char *path; /* path or fd for error messages */
- z_off64_t pos; /* current position in uncompressed data */
unsigned size; /* buffer size, zero if not allocated yet */
unsigned want; /* requested buffer size, default is GZBUFSIZE */
unsigned char *in; /* input buffer */
unsigned char *out; /* output buffer (double-sized when reading) */
- unsigned char *next; /* next output data to deliver or write */
+ int direct; /* 0 if processing gzip, 1 if transparent */
/* just for reading */
- unsigned have; /* amount of output data unused at next */
- int eof; /* true if end of input file reached */
- z_off64_t start; /* where the gzip data started, for rewinding */
- z_off64_t raw; /* where the raw data started, for seeking */
int how; /* 0: get header, 1: copy, 2: decompress */
- int direct; /* true if last read direct, false if gzip */
+ z_off64_t start; /* where the gzip data started, for rewinding */
+ int eof; /* true if end of input file reached */
+ int past; /* true if read requested past end */
/* just for writing */
int level; /* compression level */
int strategy; /* compression strategy */
diff --git a/src/share/native/java/util/zip/zlib-1.2.5/gzlib.c b/src/share/native/java/util/zip/zlib-1.2.8/gzlib.c
index 9a3db2efe..4dce9b96e 100644
--- a/src/share/native/java/util/zip/zlib-1.2.5/gzlib.c
+++ b/src/share/native/java/util/zip/zlib-1.2.8/gzlib.c
@@ -22,22 +22,26 @@
* questions.
*/
-/*
- * Copyright (C) 2004, 2010 Mark Adler
+/* gzlib.c -- zlib functions common to reading and writing gzip files
+ * Copyright (C) 2004, 2010, 2011, 2012, 2013 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
#include "gzguts.h"
+#if defined(_WIN32) && !defined(__BORLANDC__)
+# define LSEEK _lseeki64
+#else
#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
# define LSEEK lseek64
#else
# define LSEEK lseek
#endif
+#endif
/* Local functions */
local void gz_reset OF((gz_statep));
-local gzFile gz_open OF((const char *, int, const char *));
+local gzFile gz_open OF((const void *, int, const char *));
#if defined UNDER_CE
@@ -95,28 +99,40 @@ char ZLIB_INTERNAL *gz_strwinerror (error)
local void gz_reset(state)
gz_statep state;
{
+ state->x.have = 0; /* no output data available */
if (state->mode == GZ_READ) { /* for reading ... */
- state->have = 0; /* no output data available */
state->eof = 0; /* not at end of file */
+ state->past = 0; /* have not read past end yet */
state->how = LOOK; /* look for gzip header */
- state->direct = 1; /* default for empty file */
}
state->seek = 0; /* no seek request pending */
gz_error(state, Z_OK, NULL); /* clear error */
- state->pos = 0; /* no uncompressed data yet */
+ state->x.pos = 0; /* no uncompressed data yet */
state->strm.avail_in = 0; /* no input data yet */
}
/* Open a gzip file either by name or file descriptor. */
local gzFile gz_open(path, fd, mode)
- const char *path;
+ const void *path;
int fd;
const char *mode;
{
gz_statep state;
+ size_t len;
+ int oflag;
+#ifdef O_CLOEXEC
+ int cloexec = 0;
+#endif
+#ifdef O_EXCL
+ int exclusive = 0;
+#endif
+
+ /* check input */
+ if (path == NULL)
+ return NULL;
/* allocate gzFile structure to return */
- state = malloc(sizeof(gz_state));
+ state = (gz_statep)malloc(sizeof(gz_state));
if (state == NULL)
return NULL;
state->size = 0; /* no buffers allocated yet */
@@ -127,6 +143,7 @@ local gzFile gz_open(path, fd, mode)
state->mode = GZ_NONE;
state->level = Z_DEFAULT_COMPRESSION;
state->strategy = Z_DEFAULT_STRATEGY;
+ state->direct = 0;
while (*mode) {
if (*mode >= '0' && *mode <= '9')
state->level = *mode - '0';
@@ -148,6 +165,16 @@ local gzFile gz_open(path, fd, mode)
return NULL;
case 'b': /* ignore -- will request binary anyway */
break;
+#ifdef O_CLOEXEC
+ case 'e':
+ cloexec = 1;
+ break;
+#endif
+#ifdef O_EXCL
+ case 'x':
+ exclusive = 1;
+ break;
+#endif
case 'f':
state->strategy = Z_FILTERED;
break;
@@ -159,6 +186,10 @@ local gzFile gz_open(path, fd, mode)
break;
case 'F':
state->strategy = Z_FIXED;
+ break;
+ case 'T':
+ state->direct = 1;
+ break;
default: /* could consider as an error, but just ignore */
;
}
@@ -171,30 +202,71 @@ local gzFile gz_open(path, fd, mode)
return NULL;
}
+ /* can't force transparent read */
+ if (state->mode == GZ_READ) {
+ if (state->direct) {
+ free(state);
+ return NULL;
+ }
+ state->direct = 1; /* for empty file */
+ }
+
/* save the path name for error messages */
- state->path = malloc(strlen(path) + 1);
+#ifdef _WIN32
+ if (fd == -2) {
+ len = wcstombs(NULL, path, 0);
+ if (len == (size_t)-1)
+ len = 0;
+ }
+ else
+#endif
+ len = strlen((const char *)path);
+ state->path = (char *)malloc(len + 1);
if (state->path == NULL) {
free(state);
return NULL;
}
- strcpy(state->path, path);
+#ifdef _WIN32
+ if (fd == -2)
+ if (len)
+ wcstombs(state->path, path, len + 1);
+ else
+ *(state->path) = 0;
+ else
+#endif
+#if !defined(NO_snprintf) && !defined(NO_vsnprintf)
+ snprintf(state->path, len + 1, "%s", (const char *)path);
+#else
+ strcpy(state->path, path);
+#endif
- /* open the file with the appropriate mode (or just use fd) */
- state->fd = fd != -1 ? fd :
- open(path,
+ /* compute the flags for open() */
+ oflag =
#ifdef O_LARGEFILE
- O_LARGEFILE |
+ O_LARGEFILE |
#endif
#ifdef O_BINARY
- O_BINARY |
+ O_BINARY |
+#endif
+#ifdef O_CLOEXEC
+ (cloexec ? O_CLOEXEC : 0) |
+#endif
+ (state->mode == GZ_READ ?
+ O_RDONLY :
+ (O_WRONLY | O_CREAT |
+#ifdef O_EXCL
+ (exclusive ? O_EXCL : 0) |
+#endif
+ (state->mode == GZ_WRITE ?
+ O_TRUNC :
+ O_APPEND)));
+
+ /* open the file with the appropriate flags (or just use fd) */
+ state->fd = fd > -1 ? fd : (
+#ifdef _WIN32
+ fd == -2 ? _wopen(path, oflag, 0666) :
#endif
- (state->mode == GZ_READ ?
- O_RDONLY :
- (O_WRONLY | O_CREAT | (
- state->mode == GZ_WRITE ?
- O_TRUNC :
- O_APPEND))),
- 0666);
+ open((const char *)path, oflag, 0666));
if (state->fd == -1) {
free(state->path);
free(state);
@@ -240,15 +312,29 @@ gzFile ZEXPORT gzdopen(fd, mode)
char *path; /* identifier for error messages */
gzFile gz;
- if (fd == -1 || (path = malloc(7 + 3 * sizeof(int))) == NULL)
+ if (fd == -1 || (path = (char *)malloc(7 + 3 * sizeof(int))) == NULL)
return NULL;
+#if !defined(NO_snprintf) && !defined(NO_vsnprintf)
+ snprintf(path, 7 + 3 * sizeof(int), "<fd:%d>", fd); /* for debugging */
+#else
sprintf(path, "<fd:%d>", fd); /* for debugging */
+#endif
gz = gz_open(path, fd, mode);
free(path);
return gz;
}
/* -- see zlib.h -- */
+#ifdef _WIN32
+gzFile ZEXPORT gzopen_w(path, mode)
+ const wchar_t *path;
+ const char *mode;
+{
+ return gz_open(path, -2, mode);
+}
+#endif
+
+/* -- see zlib.h -- */
int ZEXPORT gzbuffer(file, size)
gzFile file;
unsigned size;
@@ -267,8 +353,8 @@ int ZEXPORT gzbuffer(file, size)
return -1;
/* check and set requested size */
- if (size == 0)
- return -1;
+ if (size < 2)
+ size = 2; /* need two bytes to check magic header */
state->want = size;
return 0;
}
@@ -285,7 +371,8 @@ int ZEXPORT gzrewind(file)
state = (gz_statep)file;
/* check that we're reading and that there's no error */
- if (state->mode != GZ_READ || state->err != Z_OK)
+ if (state->mode != GZ_READ ||
+ (state->err != Z_OK && state->err != Z_BUF_ERROR))
return -1;
/* back up and start over */
@@ -313,7 +400,7 @@ z_off64_t ZEXPORT gzseek64(file, offset, whence)
return -1;
/* check that there's no error */
- if (state->err != Z_OK)
+ if (state->err != Z_OK && state->err != Z_BUF_ERROR)
return -1;
/* can only seek from start or relative to current position */
@@ -322,31 +409,32 @@ z_off64_t ZEXPORT gzseek64(file, offset, whence)
/* normalize offset to a SEEK_CUR specification */
if (whence == SEEK_SET)
- offset -= state->pos;
+ offset -= state->x.pos;
else if (state->seek)
offset += state->skip;
state->seek = 0;
/* if within raw area while reading, just go there */
if (state->mode == GZ_READ && state->how == COPY &&
- state->pos + offset >= state->raw) {
- ret = LSEEK(state->fd, offset - state->have, SEEK_CUR);
+ state->x.pos + offset >= 0) {
+ ret = LSEEK(state->fd, offset - state->x.have, SEEK_CUR);
if (ret == -1)
return -1;
- state->have = 0;
+ state->x.have = 0;
state->eof = 0;
+ state->past = 0;
state->seek = 0;
gz_error(state, Z_OK, NULL);
state->strm.avail_in = 0;
- state->pos += offset;
- return state->pos;
+ state->x.pos += offset;
+ return state->x.pos;
}
/* calculate skip amount, rewinding if needed for back seek when reading */
if (offset < 0) {
if (state->mode != GZ_READ) /* writing -- can't go backwards */
return -1;
- offset += state->pos;
+ offset += state->x.pos;
if (offset < 0) /* before start of file! */
return -1;
if (gzrewind(file) == -1) /* rewind, then skip to offset */
@@ -355,11 +443,11 @@ z_off64_t ZEXPORT gzseek64(file, offset, whence)
/* if reading, skip what's in output buffer (one less gzgetc() check) */
if (state->mode == GZ_READ) {
- n = GT_OFF(state->have) || (z_off64_t)state->have > offset ?
- (unsigned)offset : state->have;
- state->have -= n;
- state->next += n;
- state->pos += n;
+ n = GT_OFF(state->x.have) || (z_off64_t)state->x.have > offset ?
+ (unsigned)offset : state->x.have;
+ state->x.have -= n;
+ state->x.next += n;
+ state->x.pos += n;
offset -= n;
}
@@ -368,7 +456,7 @@ z_off64_t ZEXPORT gzseek64(file, offset, whence)
state->seek = 1;
state->skip = offset;
}
- return state->pos + offset;
+ return state->x.pos + offset;
}
/* -- see zlib.h -- */
@@ -397,7 +485,7 @@ z_off64_t ZEXPORT gztell64(file)
return -1;
/* return position */
- return state->pos + (state->seek ? state->skip : 0);
+ return state->x.pos + (state->seek ? state->skip : 0);
}
/* -- see zlib.h -- */
@@ -457,8 +545,7 @@ int ZEXPORT gzeof(file)
return 0;
/* return end-of-file state */
- return state->mode == GZ_READ ?
- (state->eof && state->strm.avail_in == 0 && state->have == 0) : 0;
+ return state->mode == GZ_READ ? state->past : 0;
}
/* -- see zlib.h -- */
@@ -478,7 +565,8 @@ const char * ZEXPORT gzerror(file, errnum)
/* return error information */
if (errnum != NULL)
*errnum = state->err;
- return state->msg == NULL ? "" : state->msg;
+ return state->err == Z_MEM_ERROR ? "out of memory" :
+ (state->msg == NULL ? "" : state->msg);
}
/* -- see zlib.h -- */
@@ -495,8 +583,10 @@ void ZEXPORT gzclearerr(file)
return;
/* clear error and end-of-file */
- if (state->mode == GZ_READ)
+ if (state->mode == GZ_READ) {
state->eof = 0;
+ state->past = 0;
+ }
gz_error(state, Z_OK, NULL);
}
@@ -518,26 +608,33 @@ void ZLIB_INTERNAL gz_error(state, err, msg)
state->msg = NULL;
}
+ /* if fatal, set state->x.have to 0 so that the gzgetc() macro fails */
+ if (err != Z_OK && err != Z_BUF_ERROR)
+ state->x.have = 0;
+
/* set error code, and if no message, then done */
state->err = err;
if (msg == NULL)
return;
- /* for an out of memory error, save as static string */
- if (err == Z_MEM_ERROR) {
- state->msg = (char *)msg;
+ /* for an out of memory error, return literal string when requested */
+ if (err == Z_MEM_ERROR)
return;
- }
/* construct error message with path */
- if ((state->msg = malloc(strlen(state->path) + strlen(msg) + 3)) == NULL) {
+ if ((state->msg = (char *)malloc(strlen(state->path) + strlen(msg) + 3)) ==
+ NULL) {
state->err = Z_MEM_ERROR;
- state->msg = (char *)"out of memory";
return;
}
+#if !defined(NO_snprintf) && !defined(NO_vsnprintf)
+ snprintf(state->msg, strlen(state->path) + strlen(msg) + 3,
+ "%s%s%s", state->path, ": ", msg);
+#else
strcpy(state->msg, state->path);
strcat(state->msg, ": ");
strcat(state->msg, msg);
+#endif
return;
}
diff --git a/src/share/native/java/util/zip/zlib-1.2.5/gzread.c b/src/share/native/java/util/zip/zlib-1.2.8/gzread.c
index 15e85028c..cd87098b9 100644
--- a/src/share/native/java/util/zip/zlib-1.2.5/gzread.c
+++ b/src/share/native/java/util/zip/zlib-1.2.8/gzread.c
@@ -23,7 +23,7 @@
*/
/* gzread.c -- zlib functions for reading gzip files
- * Copyright (C) 2004, 2005, 2010 Mark Adler
+ * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -32,10 +32,9 @@
/* Local functions */
local int gz_load OF((gz_statep, unsigned char *, unsigned, unsigned *));
local int gz_avail OF((gz_statep));
-local int gz_next4 OF((gz_statep, unsigned long *));
-local int gz_head OF((gz_statep));
+local int gz_look OF((gz_statep));
local int gz_decomp OF((gz_statep));
-local int gz_make OF((gz_statep));
+local int gz_fetch OF((gz_statep));
local int gz_skip OF((gz_statep, z_off64_t));
/* Use read() to load a buffer -- return -1 on error, otherwise 0. Read from
@@ -70,73 +69,54 @@ local int gz_load(state, buf, len, have)
error, 0 otherwise. Note that the eof flag is set when the end of the input
file is reached, even though there may be unused data in the buffer. Once
that data has been used, no more attempts will be made to read the file.
- gz_avail() assumes that strm->avail_in == 0. */
+ If strm->avail_in != 0, then the current data is moved to the beginning of
+ the input buffer, and then the remainder of the buffer is loaded with the
+ available data from the input file. */
local int gz_avail(state)
gz_statep state;
{
+ unsigned got;
z_streamp strm = &(state->strm);
- if (state->err != Z_OK)
+ if (state->err != Z_OK && state->err != Z_BUF_ERROR)
return -1;
if (state->eof == 0) {
- if (gz_load(state, state->in, state->size,
- (unsigned *)&(strm->avail_in)) == -1)
+ if (strm->avail_in) { /* copy what's there to the start */
+ unsigned char *p = state->in;
+ unsigned const char *q = strm->next_in;
+ unsigned n = strm->avail_in;
+ do {
+ *p++ = *q++;
+ } while (--n);
+ }
+ if (gz_load(state, state->in + strm->avail_in,
+ state->size - strm->avail_in, &got) == -1)
return -1;
+ strm->avail_in += got;
strm->next_in = state->in;
}
return 0;
}
-/* Get next byte from input, or -1 if end or error. */
-#define NEXT() ((strm->avail_in == 0 && gz_avail(state) == -1) ? -1 : \
- (strm->avail_in == 0 ? -1 : \
- (strm->avail_in--, *(strm->next_in)++)))
-
-/* Get a four-byte little-endian integer and return 0 on success and the value
- in *ret. Otherwise -1 is returned and *ret is not modified. */
-local int gz_next4(state, ret)
- gz_statep state;
- unsigned long *ret;
-{
- int ch;
- unsigned long val;
- z_streamp strm = &(state->strm);
-
- val = NEXT();
- val += (unsigned)NEXT() << 8;
- val += (unsigned long)NEXT() << 16;
- ch = NEXT();
- if (ch == -1)
- return -1;
- val += (unsigned long)ch << 24;
- *ret = val;
- return 0;
-}
-
-/* Look for gzip header, set up for inflate or copy. state->have must be zero.
+/* Look for gzip header, set up for inflate or copy. state->x.have must be 0.
If this is the first time in, allocate required memory. state->how will be
left unchanged if there is no more input data available, will be set to COPY
if there is no gzip header and direct copying will be performed, or it will
- be set to GZIP for decompression, and the gzip header will be skipped so
- that the next available input data is the raw deflate stream. If direct
- copying, then leftover input data from the input buffer will be copied to
- the output buffer. In that case, all further file reads will be directly to
- either the output buffer or a user buffer. If decompressing, the inflate
- state and the check value will be initialized. gz_head() will return 0 on
- success or -1 on failure. Failures may include read errors or gzip header
- errors. */
-local int gz_head(state)
+ be set to GZIP for decompression. If direct copying, then leftover input
+ data from the input buffer will be copied to the output buffer. In that
+ case, all further file reads will be directly to either the output buffer or
+ a user buffer. If decompressing, the inflate state will be initialized.
+ gz_look() will return 0 on success or -1 on failure. */
+local int gz_look(state)
gz_statep state;
{
z_streamp strm = &(state->strm);
- int flags;
- unsigned len;
/* allocate read buffers and inflate memory */
if (state->size == 0) {
/* allocate buffers */
- state->in = malloc(state->want);
- state->out = malloc(state->want << 1);
+ state->in = (unsigned char *)malloc(state->want);
+ state->out = (unsigned char *)malloc(state->want << 1);
if (state->in == NULL || state->out == NULL) {
if (state->out != NULL)
free(state->out);
@@ -153,7 +133,7 @@ local int gz_head(state)
state->strm.opaque = Z_NULL;
state->strm.avail_in = 0;
state->strm.next_in = Z_NULL;
- if (inflateInit2(&(state->strm), -15) != Z_OK) { /* raw inflate */
+ if (inflateInit2(&(state->strm), 15 + 16) != Z_OK) { /* gunzip */
free(state->out);
free(state->in);
state->size = 0;
@@ -162,83 +142,45 @@ local int gz_head(state)
}
}
- /* get some data in the input buffer */
- if (strm->avail_in == 0) {
+ /* get at least the magic bytes in the input buffer */
+ if (strm->avail_in < 2) {
if (gz_avail(state) == -1)
return -1;
if (strm->avail_in == 0)
return 0;
}
- /* look for the gzip magic header bytes 31 and 139 */
- if (strm->next_in[0] == 31) {
- strm->avail_in--;
- strm->next_in++;
- if (strm->avail_in == 0 && gz_avail(state) == -1)
- return -1;
- if (strm->avail_in && strm->next_in[0] == 139) {
- /* we have a gzip header, woo hoo! */
- strm->avail_in--;
- strm->next_in++;
-
- /* skip rest of header */
- if (NEXT() != 8) { /* compression method */
- gz_error(state, Z_DATA_ERROR, "unknown compression method");
- return -1;
- }
- flags = NEXT();
- if (flags & 0xe0) { /* reserved flag bits */
- gz_error(state, Z_DATA_ERROR, "unknown header flags set");
- return -1;
- }
- NEXT(); /* modification time */
- NEXT();
- NEXT();
- NEXT();
- NEXT(); /* extra flags */
- NEXT(); /* operating system */
- if (flags & 4) { /* extra field */
- len = (unsigned)NEXT();
- len += (unsigned)NEXT() << 8;
- while (len--)
- if (NEXT() < 0)
- break;
- }
- if (flags & 8) /* file name */
- while (NEXT() > 0)
- ;
- if (flags & 16) /* comment */
- while (NEXT() > 0)
- ;
- if (flags & 2) { /* header crc */
- NEXT();
- NEXT();
- }
- /* an unexpected end of file is not checked for here -- it will be
- noticed on the first request for uncompressed data */
-
- /* set up for decompression */
- inflateReset(strm);
- strm->adler = crc32(0L, Z_NULL, 0);
- state->how = GZIP;
- state->direct = 0;
- return 0;
- }
- else {
- /* not a gzip file -- save first byte (31) and fall to raw i/o */
- state->out[0] = 31;
- state->have = 1;
- }
+ /* look for gzip magic bytes -- if there, do gzip decoding (note: there is
+ a logical dilemma here when considering the case of a partially written
+ gzip file, to wit, if a single 31 byte is written, then we cannot tell
+ whether this is a single-byte file, or just a partially written gzip
+ file -- for here we assume that if a gzip file is being written, then
+ the header will be written in a single operation, so that reading a
+ single byte is sufficient indication that it is not a gzip file) */
+ if (strm->avail_in > 1 &&
+ strm->next_in[0] == 31 && strm->next_in[1] == 139) {
+ inflateReset(strm);
+ state->how = GZIP;
+ state->direct = 0;
+ return 0;
+ }
+
+ /* no gzip header -- if we were decoding gzip before, then this is trailing
+ garbage. Ignore the trailing garbage and finish. */
+ if (state->direct == 0) {
+ strm->avail_in = 0;
+ state->eof = 1;
+ state->x.have = 0;
+ return 0;
}
- /* doing raw i/o, save start of raw data for seeking, copy any leftover
- input to output -- this assumes that the output buffer is larger than
- the input buffer, which also assures space for gzungetc() */
- state->raw = state->pos;
- state->next = state->out;
+ /* doing raw i/o, copy any leftover input to output -- this assumes that
+ the output buffer is larger than the input buffer, which also assures
+ space for gzungetc() */
+ state->x.next = state->out;
if (strm->avail_in) {
- memcpy(state->next + state->have, strm->next_in, strm->avail_in);
- state->have += strm->avail_in;
+ memcpy(state->x.next, strm->next_in, strm->avail_in);
+ state->x.have = strm->avail_in;
strm->avail_in = 0;
}
state->how = COPY;
@@ -247,19 +189,15 @@ local int gz_head(state)
}
/* Decompress from input to the provided next_out and avail_out in the state.
- If the end of the compressed data is reached, then verify the gzip trailer
- check value and length (modulo 2^32). state->have and state->next are set
- to point to the just decompressed data, and the crc is updated. If the
- trailer is verified, state->how is reset to LOOK to look for the next gzip
- stream or raw data, once state->have is depleted. Returns 0 on success, -1
- on failure. Failures may include invalid compressed data or a failed gzip
- trailer verification. */
+ On return, state->x.have and state->x.next point to the just decompressed
+ data. If the gzip stream completes, state->how is reset to LOOK to look for
+ the next gzip stream or raw data, once state->x.have is depleted. Returns 0
+ on success, -1 on failure. */
local int gz_decomp(state)
gz_statep state;
{
- int ret;
+ int ret = Z_OK;
unsigned had;
- unsigned long crc, len;
z_streamp strm = &(state->strm);
/* fill output buffer up to end of deflate stream */
@@ -269,15 +207,15 @@ local int gz_decomp(state)
if (strm->avail_in == 0 && gz_avail(state) == -1)
return -1;
if (strm->avail_in == 0) {
- gz_error(state, Z_DATA_ERROR, "unexpected end of file");
- return -1;
+ gz_error(state, Z_BUF_ERROR, "unexpected end of file");
+ break;
}
/* decompress and handle errors */
ret = inflate(strm, Z_NO_FLUSH);
if (ret == Z_STREAM_ERROR || ret == Z_NEED_DICT) {
gz_error(state, Z_STREAM_ERROR,
- "internal error: inflate stream corrupt");
+ "internal error: inflate stream corrupt");
return -1;
}
if (ret == Z_MEM_ERROR) {
@@ -286,67 +224,55 @@ local int gz_decomp(state)
}
if (ret == Z_DATA_ERROR) { /* deflate stream invalid */
gz_error(state, Z_DATA_ERROR,
- strm->msg == NULL ? "compressed data error" : strm->msg);
+ strm->msg == NULL ? "compressed data error" : strm->msg);
return -1;
}
} while (strm->avail_out && ret != Z_STREAM_END);
- /* update available output and crc check value */
- state->have = had - strm->avail_out;
- state->next = strm->next_out - state->have;
- strm->adler = crc32(strm->adler, state->next, state->have);
+ /* update available output */
+ state->x.have = had - strm->avail_out;
+ state->x.next = strm->next_out - state->x.have;
- /* check gzip trailer if at end of deflate stream */
- if (ret == Z_STREAM_END) {
- if (gz_next4(state, &crc) == -1 || gz_next4(state, &len) == -1) {
- gz_error(state, Z_DATA_ERROR, "unexpected end of file");
- return -1;
- }
- if (crc != strm->adler) {
- gz_error(state, Z_DATA_ERROR, "incorrect data check");
- return -1;
- }
- if (len != (strm->total_out & 0xffffffffL)) {
- gz_error(state, Z_DATA_ERROR, "incorrect length check");
- return -1;
- }
- state->how = LOOK; /* ready for next stream, once have is 0 (leave
- state->direct unchanged to remember how) */
- }
+ /* if the gzip stream completed successfully, look for another */
+ if (ret == Z_STREAM_END)
+ state->how = LOOK;
/* good decompression */
return 0;
}
-/* Make data and put in the output buffer. Assumes that state->have == 0.
+/* Fetch data and put it in the output buffer. Assumes state->x.have is 0.
Data is either copied from the input file or decompressed from the input
file depending on state->how. If state->how is LOOK, then a gzip header is
- looked for (and skipped if found) to determine wither to copy or decompress.
- Returns -1 on error, otherwise 0. gz_make() will leave state->have as COPY
- or GZIP unless the end of the input file has been reached and all data has
- been processed. */
-local int gz_make(state)
+ looked for to determine whether to copy or decompress. Returns -1 on error,
+ otherwise 0. gz_fetch() will leave state->how as COPY or GZIP unless the
+ end of the input file has been reached and all data has been processed. */
+local int gz_fetch(state)
gz_statep state;
{
z_streamp strm = &(state->strm);
- if (state->how == LOOK) { /* look for gzip header */
- if (gz_head(state) == -1)
- return -1;
- if (state->have) /* got some data from gz_head() */
+ do {
+ switch(state->how) {
+ case LOOK: /* -> LOOK, COPY (only if never GZIP), or GZIP */
+ if (gz_look(state) == -1)
+ return -1;
+ if (state->how == LOOK)
+ return 0;
+ break;
+ case COPY: /* -> COPY */
+ if (gz_load(state, state->out, state->size << 1, &(state->x.have))
+ == -1)
+ return -1;
+ state->x.next = state->out;
return 0;
- }
- if (state->how == COPY) { /* straight copy */
- if (gz_load(state, state->out, state->size << 1, &(state->have)) == -1)
- return -1;
- state->next = state->out;
- }
- else if (state->how == GZIP) { /* decompress */
- strm->avail_out = state->size << 1;
- strm->next_out = state->out;
- if (gz_decomp(state) == -1)
- return -1;
- }
+ case GZIP: /* -> GZIP or LOOK (if end of gzip stream) */
+ strm->avail_out = state->size << 1;
+ strm->next_out = state->out;
+ if (gz_decomp(state) == -1)
+ return -1;
+ }
+ } while (state->x.have == 0 && (!state->eof || strm->avail_in));
return 0;
}
@@ -360,12 +286,12 @@ local int gz_skip(state, len)
/* skip over len bytes or reach end-of-file, whichever comes first */
while (len)
/* skip over whatever is in output buffer */
- if (state->have) {
- n = GT_OFF(state->have) || (z_off64_t)state->have > len ?
- (unsigned)len : state->have;
- state->have -= n;
- state->next += n;
- state->pos += n;
+ if (state->x.have) {
+ n = GT_OFF(state->x.have) || (z_off64_t)state->x.have > len ?
+ (unsigned)len : state->x.have;
+ state->x.have -= n;
+ state->x.next += n;
+ state->x.pos += n;
len -= n;
}
@@ -376,7 +302,7 @@ local int gz_skip(state, len)
/* need more data to skip -- load up output buffer */
else {
/* get more output, looking for header if required */
- if (gz_make(state) == -1)
+ if (gz_fetch(state) == -1)
return -1;
}
return 0;
@@ -398,14 +324,15 @@ int ZEXPORT gzread(file, buf, len)
state = (gz_statep)file;
strm = &(state->strm);
- /* check that we're reading and that there's no error */
- if (state->mode != GZ_READ || state->err != Z_OK)
+ /* check that we're reading and that there's no (serious) error */
+ if (state->mode != GZ_READ ||
+ (state->err != Z_OK && state->err != Z_BUF_ERROR))
return -1;
/* since an int is returned, make sure len fits in one, otherwise return
with an error (this avoids the flaw in the interface) */
if ((int)len < 0) {
- gz_error(state, Z_BUF_ERROR, "requested length does not fit in int");
+ gz_error(state, Z_DATA_ERROR, "requested length does not fit in int");
return -1;
}
@@ -424,49 +351,51 @@ int ZEXPORT gzread(file, buf, len)
got = 0;
do {
/* first just try copying data from the output buffer */
- if (state->have) {
- n = state->have > len ? len : state->have;
- memcpy(buf, state->next, n);
- state->next += n;
- state->have -= n;
+ if (state->x.have) {
+ n = state->x.have > len ? len : state->x.have;
+ memcpy(buf, state->x.next, n);
+ state->x.next += n;
+ state->x.have -= n;
}
/* output buffer empty -- return if we're at the end of the input */
- else if (state->eof && strm->avail_in == 0)
+ else if (state->eof && strm->avail_in == 0) {
+ state->past = 1; /* tried to read past end */
break;
+ }
/* need output data -- for small len or new stream load up our output
buffer */
else if (state->how == LOOK || len < (state->size << 1)) {
/* get more output, looking for header if required */
- if (gz_make(state) == -1)
+ if (gz_fetch(state) == -1)
return -1;
- continue; /* no progress yet -- go back to memcpy() above */
+ continue; /* no progress yet -- go back to copy above */
/* the copy above assures that we will leave with space in the
output buffer, allowing at least one gzungetc() to succeed */
}
/* large len -- read directly into user buffer */
else if (state->how == COPY) { /* read directly */
- if (gz_load(state, buf, len, &n) == -1)
+ if (gz_load(state, (unsigned char *)buf, len, &n) == -1)
return -1;
}
/* large len -- decompress directly into user buffer */
else { /* state->how == GZIP */
strm->avail_out = len;
- strm->next_out = buf;
+ strm->next_out = (unsigned char *)buf;
if (gz_decomp(state) == -1)
return -1;
- n = state->have;
- state->have = 0;
+ n = state->x.have;
+ state->x.have = 0;
}
/* update progress */
len -= n;
buf = (char *)buf + n;
got += n;
- state->pos += n;
+ state->x.pos += n;
} while (len);
/* return number of bytes read into user buffer (will fit in int) */
@@ -474,6 +403,11 @@ int ZEXPORT gzread(file, buf, len)
}
/* -- see zlib.h -- */
+#ifdef Z_PREFIX_SET
+# undef z_gzgetc
+#else
+# undef gzgetc
+#endif
int ZEXPORT gzgetc(file)
gzFile file;
{
@@ -486,15 +420,16 @@ int ZEXPORT gzgetc(file)
return -1;
state = (gz_statep)file;
- /* check that we're reading and that there's no error */
- if (state->mode != GZ_READ || state->err != Z_OK)
+ /* check that we're reading and that there's no (serious) error */
+ if (state->mode != GZ_READ ||
+ (state->err != Z_OK && state->err != Z_BUF_ERROR))
return -1;
/* try output buffer (no need to check for skip request) */
- if (state->have) {
- state->have--;
- state->pos++;
- return *(state->next)++;
+ if (state->x.have) {
+ state->x.have--;
+ state->x.pos++;
+ return *(state->x.next)++;
}
/* nothing there -- try gzread() */
@@ -502,6 +437,12 @@ int ZEXPORT gzgetc(file)
return ret < 1 ? -1 : buf[0];
}
+int ZEXPORT gzgetc_(file)
+gzFile file;
+{
+ return gzgetc(file);
+}
+
/* -- see zlib.h -- */
int ZEXPORT gzungetc(c, file)
int c;
@@ -514,8 +455,9 @@ int ZEXPORT gzungetc(c, file)
return -1;
state = (gz_statep)file;
- /* check that we're reading and that there's no error */
- if (state->mode != GZ_READ || state->err != Z_OK)
+ /* check that we're reading and that there's no (serious) error */
+ if (state->mode != GZ_READ ||
+ (state->err != Z_OK && state->err != Z_BUF_ERROR))
return -1;
/* process a skip request */
@@ -530,32 +472,34 @@ int ZEXPORT gzungetc(c, file)
return -1;
/* if output buffer empty, put byte at end (allows more pushing) */
- if (state->have == 0) {
- state->have = 1;
- state->next = state->out + (state->size << 1) - 1;
- state->next[0] = c;
- state->pos--;
+ if (state->x.have == 0) {
+ state->x.have = 1;
+ state->x.next = state->out + (state->size << 1) - 1;
+ state->x.next[0] = c;
+ state->x.pos--;
+ state->past = 0;
return c;
}
/* if no room, give up (must have already done a gzungetc()) */
- if (state->have == (state->size << 1)) {
- gz_error(state, Z_BUF_ERROR, "out of room to push characters");
+ if (state->x.have == (state->size << 1)) {
+ gz_error(state, Z_DATA_ERROR, "out of room to push characters");
return -1;
}
/* slide output data if needed and insert byte before existing data */
- if (state->next == state->out) {
- unsigned char *src = state->out + state->have;
+ if (state->x.next == state->out) {
+ unsigned char *src = state->out + state->x.have;
unsigned char *dest = state->out + (state->size << 1);
while (src > state->out)
*--dest = *--src;
- state->next = dest;
+ state->x.next = dest;
}
- state->have++;
- state->next--;
- state->next[0] = c;
- state->pos--;
+ state->x.have++;
+ state->x.next--;
+ state->x.next[0] = c;
+ state->x.pos--;
+ state->past = 0;
return c;
}
@@ -575,8 +519,9 @@ char * ZEXPORT gzgets(file, buf, len)
return NULL;
state = (gz_statep)file;
- /* check that we're reading and that there's no error */
- if (state->mode != GZ_READ || state->err != Z_OK)
+ /* check that we're reading and that there's no (serious) error */
+ if (state->mode != GZ_READ ||
+ (state->err != Z_OK && state->err != Z_BUF_ERROR))
return NULL;
/* process a skip request */
@@ -593,32 +538,31 @@ char * ZEXPORT gzgets(file, buf, len)
left = (unsigned)len - 1;
if (left) do {
/* assure that something is in the output buffer */
- if (state->have == 0) {
- if (gz_make(state) == -1)
- return NULL; /* error */
- if (state->have == 0) { /* end of file */
- if (buf == str) /* got bupkus */
- return NULL;
- break; /* got something -- return it */
- }
+ if (state->x.have == 0 && gz_fetch(state) == -1)
+ return NULL; /* error */
+ if (state->x.have == 0) { /* end of file */
+ state->past = 1; /* read past end */
+ break; /* return what we have */
}
/* look for end-of-line in current output buffer */
- n = state->have > left ? left : state->have;
- eol = memchr(state->next, '\n', n);
+ n = state->x.have > left ? left : state->x.have;
+ eol = (unsigned char *)memchr(state->x.next, '\n', n);
if (eol != NULL)
- n = (unsigned)(eol - state->next) + 1;
+ n = (unsigned)(eol - state->x.next) + 1;
/* copy through end-of-line, or remainder if not found */
- memcpy(buf, state->next, n);
- state->have -= n;
- state->next += n;
- state->pos += n;
+ memcpy(buf, state->x.next, n);
+ state->x.have -= n;
+ state->x.next += n;
+ state->x.pos += n;
left -= n;
buf += n;
} while (left && eol == NULL);
- /* found end-of-line or out of space -- terminate string and return it */
+ /* return terminated string, or if nothing, end of file */
+ if (buf == str)
+ return NULL;
buf[0] = 0;
return str;
}
@@ -634,16 +578,12 @@ int ZEXPORT gzdirect(file)
return 0;
state = (gz_statep)file;
- /* check that we're reading */
- if (state->mode != GZ_READ)
- return 0;
-
/* if the state is not known, but we can find out, then do so (this is
mainly for right after a gzopen() or gzdopen()) */
- if (state->how == LOOK && state->have == 0)
- (void)gz_head(state);
+ if (state->mode == GZ_READ && state->how == LOOK && state->x.have == 0)
+ (void)gz_look(state);
- /* return 1 if reading direct, 0 if decompressing a gzip stream */
+ /* return 1 if transparent, 0 if processing a gzip stream */
return state->direct;
}
@@ -651,7 +591,7 @@ int ZEXPORT gzdirect(file)
int ZEXPORT gzclose_r(file)
gzFile file;
{
- int ret;
+ int ret, err;
gz_statep state;
/* get internal structure */
@@ -669,9 +609,10 @@ int ZEXPORT gzclose_r(file)
free(state->out);
free(state->in);
}
+ err = state->err == Z_BUF_ERROR ? Z_BUF_ERROR : Z_OK;
gz_error(state, Z_OK, NULL);
free(state->path);
ret = close(state->fd);
free(state);
- return ret ? Z_ERRNO : Z_OK;
+ return ret ? Z_ERRNO : err;
}
diff --git a/src/share/native/java/util/zip/zlib-1.2.5/gzwrite.c b/src/share/native/java/util/zip/zlib-1.2.8/gzwrite.c
index bff643e06..1955cf763 100644
--- a/src/share/native/java/util/zip/zlib-1.2.5/gzwrite.c
+++ b/src/share/native/java/util/zip/zlib-1.2.8/gzwrite.c
@@ -23,7 +23,7 @@
*/
/* gzwrite.c -- zlib functions for writing gzip files
- * Copyright (C) 2004, 2005, 2010 Mark Adler
+ * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -42,44 +42,55 @@ local int gz_init(state)
int ret;
z_streamp strm = &(state->strm);
- /* allocate input and output buffers */
- state->in = malloc(state->want);
- state->out = malloc(state->want);
- if (state->in == NULL || state->out == NULL) {
- if (state->out != NULL)
- free(state->out);
- if (state->in != NULL)
- free(state->in);
+ /* allocate input buffer */
+ state->in = (unsigned char *)malloc(state->want);
+ if (state->in == NULL) {
gz_error(state, Z_MEM_ERROR, "out of memory");
return -1;
}
- /* allocate deflate memory, set up for gzip compression */
- strm->zalloc = Z_NULL;
- strm->zfree = Z_NULL;
- strm->opaque = Z_NULL;
- ret = deflateInit2(strm, state->level, Z_DEFLATED,
- 15 + 16, 8, state->strategy);
- if (ret != Z_OK) {
- free(state->in);
- gz_error(state, Z_MEM_ERROR, "out of memory");
- return -1;
+ /* only need output buffer and deflate state if compressing */
+ if (!state->direct) {
+ /* allocate output buffer */
+ state->out = (unsigned char *)malloc(state->want);
+ if (state->out == NULL) {
+ free(state->in);
+ gz_error(state, Z_MEM_ERROR, "out of memory");
+ return -1;
+ }
+
+ /* allocate deflate memory, set up for gzip compression */
+ strm->zalloc = Z_NULL;
+ strm->zfree = Z_NULL;
+ strm->opaque = Z_NULL;
+ ret = deflateInit2(strm, state->level, Z_DEFLATED,
+ MAX_WBITS + 16, DEF_MEM_LEVEL, state->strategy);
+ if (ret != Z_OK) {
+ free(state->out);
+ free(state->in);
+ gz_error(state, Z_MEM_ERROR, "out of memory");
+ return -1;
+ }
}
/* mark state as initialized */
state->size = state->want;
- /* initialize write buffer */
- strm->avail_out = state->size;
- strm->next_out = state->out;
- state->next = strm->next_out;
+ /* initialize write buffer if compressing */
+ if (!state->direct) {
+ strm->avail_out = state->size;
+ strm->next_out = state->out;
+ state->x.next = strm->next_out;
+ }
return 0;
}
/* Compress whatever is at avail_in and next_in and write to the output file.
Return -1 if there is an error writing to the output file, otherwise 0.
flush is assumed to be a valid deflate() flush value. If flush is Z_FINISH,
- then the deflate() state is reset to start a new gzip stream. */
+ then the deflate() state is reset to start a new gzip stream. If gz->direct
+ is true, then simply write to the output file without compressing, and
+ ignore flush. */
local int gz_comp(state, flush)
gz_statep state;
int flush;
@@ -92,6 +103,17 @@ local int gz_comp(state, flush)
if (state->size == 0 && gz_init(state) == -1)
return -1;
+ /* write directly if requested */
+ if (state->direct) {
+ got = write(state->fd, strm->next_in, strm->avail_in);
+ if (got < 0 || (unsigned)got != strm->avail_in) {
+ gz_error(state, Z_ERRNO, zstrerror());
+ return -1;
+ }
+ strm->avail_in = 0;
+ return 0;
+ }
+
/* run deflate() on provided input until it produces no more output */
ret = Z_OK;
do {
@@ -99,8 +121,8 @@ local int gz_comp(state, flush)
doing Z_FINISH then don't write until we get to Z_STREAM_END */
if (strm->avail_out == 0 || (flush != Z_NO_FLUSH &&
(flush != Z_FINISH || ret == Z_STREAM_END))) {
- have = (unsigned)(strm->next_out - state->next);
- if (have && ((got = write(state->fd, state->next, have)) < 0 ||
+ have = (unsigned)(strm->next_out - state->x.next);
+ if (have && ((got = write(state->fd, state->x.next, have)) < 0 ||
(unsigned)got != have)) {
gz_error(state, Z_ERRNO, zstrerror());
return -1;
@@ -109,7 +131,7 @@ local int gz_comp(state, flush)
strm->avail_out = state->size;
strm->next_out = state->out;
}
- state->next = strm->next_out;
+ state->x.next = strm->next_out;
}
/* compress */
@@ -155,7 +177,7 @@ local int gz_zero(state, len)
}
strm->avail_in = n;
strm->next_in = state->in;
- state->pos += n;
+ state->x.pos += n;
if (gz_comp(state, Z_NO_FLUSH) == -1)
return -1;
len -= n;
@@ -170,7 +192,6 @@ int ZEXPORT gzwrite(file, buf, len)
unsigned len;
{
unsigned put = len;
- unsigned n;
gz_statep state;
z_streamp strm;
@@ -187,7 +208,7 @@ int ZEXPORT gzwrite(file, buf, len)
/* since an int is returned, make sure len fits in one, otherwise return
with an error (this avoids the flaw in the interface) */
if ((int)len < 0) {
- gz_error(state, Z_BUF_ERROR, "requested length does not fit in int");
+ gz_error(state, Z_DATA_ERROR, "requested length does not fit in int");
return 0;
}
@@ -210,16 +231,19 @@ int ZEXPORT gzwrite(file, buf, len)
if (len < state->size) {
/* copy to input buffer, compress when full */
do {
+ unsigned have, copy;
+
if (strm->avail_in == 0)
strm->next_in = state->in;
- n = state->size - strm->avail_in;
- if (n > len)
- n = len;
- memcpy(strm->next_in + strm->avail_in, buf, n);
- strm->avail_in += n;
- state->pos += n;
- buf = (char *)buf + n;
- len -= n;
+ have = (unsigned)((strm->next_in + strm->avail_in) - state->in);
+ copy = state->size - have;
+ if (copy > len)
+ copy = len;
+ memcpy(state->in + have, buf, copy);
+ strm->avail_in += copy;
+ state->x.pos += copy;
+ buf = (const char *)buf + copy;
+ len -= copy;
if (len && gz_comp(state, Z_NO_FLUSH) == -1)
return 0;
} while (len);
@@ -231,8 +255,8 @@ int ZEXPORT gzwrite(file, buf, len)
/* directly compress user buffer to file */
strm->avail_in = len;
- strm->next_in = (voidp)buf;
- state->pos += len;
+ strm->next_in = (z_const Bytef *)buf;
+ state->x.pos += len;
if (gz_comp(state, Z_NO_FLUSH) == -1)
return 0;
}
@@ -246,6 +270,7 @@ int ZEXPORT gzputc(file, c)
gzFile file;
int c;
{
+ unsigned have;
unsigned char buf[1];
gz_statep state;
z_streamp strm;
@@ -269,19 +294,23 @@ int ZEXPORT gzputc(file, c)
/* try writing to input buffer for speed (state->size == 0 if buffer not
initialized) */
- if (strm->avail_in < state->size) {
+ if (state->size) {
if (strm->avail_in == 0)
strm->next_in = state->in;
- strm->next_in[strm->avail_in++] = c;
- state->pos++;
- return c;
+ have = (unsigned)((strm->next_in + strm->avail_in) - state->in);
+ if (have < state->size) {
+ state->in[have] = c;
+ strm->avail_in++;
+ state->x.pos++;
+ return c & 0xff;
+ }
}
/* no room in buffer or not initialized, use gz_write() */
buf[0] = c;
if (gzwrite(file, buf, 1) != 1)
return -1;
- return c;
+ return c & 0xff;
}
/* -- see zlib.h -- */
@@ -298,16 +327,15 @@ int ZEXPORT gzputs(file, str)
return ret == 0 && len != 0 ? -1 : ret;
}
-#ifdef STDC
+#if defined(STDC) || defined(Z_HAVE_STDARG_H)
#include <stdarg.h>
/* -- see zlib.h -- */
-int ZEXPORTVA gzprintf (gzFile file, const char *format, ...)
+int ZEXPORTVA gzvprintf(gzFile file, const char *format, va_list va)
{
int size, len;
gz_statep state;
z_streamp strm;
- va_list va;
/* get internal structure */
if (file == NULL)
@@ -337,25 +365,20 @@ int ZEXPORTVA gzprintf (gzFile file, const char *format, ...)
/* do the printf() into the input buffer, put length in len */
size = (int)(state->size);
state->in[size - 1] = 0;
- va_start(va, format);
#ifdef NO_vsnprintf
# ifdef HAS_vsprintf_void
- (void)vsprintf(state->in, format, va);
- va_end(va);
+ (void)vsprintf((char *)(state->in), format, va);
for (len = 0; len < size; len++)
if (state->in[len] == 0) break;
# else
- len = vsprintf(state->in, format, va);
- va_end(va);
+ len = vsprintf((char *)(state->in), format, va);
# endif
#else
# ifdef HAS_vsnprintf_void
- (void)vsnprintf(state->in, size, format, va);
- va_end(va);
- len = strlen(state->in);
+ (void)vsnprintf((char *)(state->in), size, format, va);
+ len = strlen((char *)(state->in));
# else
len = vsnprintf((char *)(state->in), size, format, va);
- va_end(va);
# endif
#endif
@@ -366,11 +389,22 @@ int ZEXPORTVA gzprintf (gzFile file, const char *format, ...)
/* update buffer and position, defer compression until needed */
strm->avail_in = (unsigned)len;
strm->next_in = state->in;
- state->pos += len;
+ state->x.pos += len;
return len;
}
-#else /* !STDC */
+int ZEXPORTVA gzprintf(gzFile file, const char *format, ...)
+{
+ va_list va;
+ int ret;
+
+ va_start(va, format);
+ ret = gzvprintf(file, format, va);
+ va_end(va);
+ return ret;
+}
+
+#else /* !STDC && !Z_HAVE_STDARG_H */
/* -- see zlib.h -- */
int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
@@ -390,6 +424,10 @@ int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
state = (gz_statep)file;
strm = &(state->strm);
+ /* check that can really pass pointer in ints */
+ if (sizeof(int) != sizeof(void *))
+ return 0;
+
/* check that we're writing and that there's no error */
if (state->mode != GZ_WRITE || state->err != Z_OK)
return 0;
@@ -414,22 +452,23 @@ int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
state->in[size - 1] = 0;
#ifdef NO_snprintf
# ifdef HAS_sprintf_void
- sprintf(state->in, format, a1, a2, a3, a4, a5, a6, a7, a8,
+ sprintf((char *)(state->in), format, a1, a2, a3, a4, a5, a6, a7, a8,
a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
for (len = 0; len < size; len++)
if (state->in[len] == 0) break;
# else
- len = sprintf(state->in, format, a1, a2, a3, a4, a5, a6, a7, a8,
- a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
+ len = sprintf((char *)(state->in), format, a1, a2, a3, a4, a5, a6, a7, a8,
+ a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
# endif
#else
# ifdef HAS_snprintf_void
- snprintf(state->in, size, format, a1, a2, a3, a4, a5, a6, a7, a8,
+ snprintf((char *)(state->in), size, format, a1, a2, a3, a4, a5, a6, a7, a8,
a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
- len = strlen(state->in);
+ len = strlen((char *)(state->in));
# else
- len = snprintf(state->in, size, format, a1, a2, a3, a4, a5, a6, a7, a8,
- a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
+ len = snprintf((char *)(state->in), size, format, a1, a2, a3, a4, a5, a6,
+ a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18,
+ a19, a20);
# endif
#endif
@@ -440,7 +479,7 @@ int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
/* update buffer and position, defer compression until needed */
strm->avail_in = (unsigned)len;
strm->next_in = state->in;
- state->pos += len;
+ state->x.pos += len;
return len;
}
@@ -524,7 +563,7 @@ int ZEXPORT gzsetparams(file, level, strategy)
int ZEXPORT gzclose_w(file)
gzFile file;
{
- int ret = 0;
+ int ret = Z_OK;
gz_statep state;
/* get internal structure */
@@ -539,17 +578,24 @@ int ZEXPORT gzclose_w(file)
/* check for seek request */
if (state->seek) {
state->seek = 0;
- ret += gz_zero(state, state->skip);
+ if (gz_zero(state, state->skip) == -1)
+ ret = state->err;
}
/* flush, free memory, and close file */
- ret += gz_comp(state, Z_FINISH);
- (void)deflateEnd(&(state->strm));
- free(state->out);
- free(state->in);
+ if (gz_comp(state, Z_FINISH) == -1)
+ ret = state->err;
+ if (state->size) {
+ if (!state->direct) {
+ (void)deflateEnd(&(state->strm));
+ free(state->out);
+ }
+ free(state->in);
+ }
gz_error(state, Z_OK, NULL);
free(state->path);
- ret += close(state->fd);
+ if (close(state->fd) == -1)
+ ret = Z_ERRNO;
free(state);
- return ret ? Z_ERRNO : Z_OK;
+ return ret;
}
diff --git a/src/share/native/java/util/zip/zlib-1.2.5/infback.c b/src/share/native/java/util/zip/zlib-1.2.8/infback.c
index 783274e4c..7001b4bfe 100644
--- a/src/share/native/java/util/zip/zlib-1.2.5/infback.c
+++ b/src/share/native/java/util/zip/zlib-1.2.8/infback.c
@@ -23,7 +23,7 @@
*/
/* infback.c -- inflate using a call-back interface
- * Copyright (C) 1995-2009 Mark Adler
+ * Copyright (C) 1995-2011 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -66,10 +66,19 @@ int stream_size;
return Z_STREAM_ERROR;
strm->msg = Z_NULL; /* in case we return an error */
if (strm->zalloc == (alloc_func)0) {
+#ifdef Z_SOLO
+ return Z_STREAM_ERROR;
+#else
strm->zalloc = zcalloc;
strm->opaque = (voidpf)0;
+#endif
}
- if (strm->zfree == (free_func)0) strm->zfree = zcfree;
+ if (strm->zfree == (free_func)0)
+#ifdef Z_SOLO
+ return Z_STREAM_ERROR;
+#else
+ strm->zfree = zcfree;
+#endif
state = (struct inflate_state FAR *)ZALLOC(strm, 1,
sizeof(struct inflate_state));
if (state == Z_NULL) return Z_MEM_ERROR;
@@ -270,7 +279,7 @@ out_func out;
void FAR *out_desc;
{
struct inflate_state FAR *state;
- unsigned char FAR *next; /* next input */
+ z_const unsigned char FAR *next; /* next input */
unsigned char FAR *put; /* next output */
unsigned have, left; /* available input and output */
unsigned long hold; /* bit buffer */
@@ -418,7 +427,6 @@ void FAR *out_desc;
PULLBYTE();
}
if (here.val < 16) {
- NEEDBITS(here.bits);
DROPBITS(here.bits);
state->lens[state->have++] = here.val;
}
diff --git a/src/share/native/java/util/zip/zlib-1.2.5/inffast.c b/src/share/native/java/util/zip/zlib-1.2.8/inffast.c
index e6a05723b..4b9cddd70 100644
--- a/src/share/native/java/util/zip/zlib-1.2.5/inffast.c
+++ b/src/share/native/java/util/zip/zlib-1.2.8/inffast.c
@@ -23,7 +23,7 @@
*/
/* inffast.c -- fast decoding
- * Copyright (C) 1995-2008, 2010 Mark Adler
+ * Copyright (C) 1995-2008, 2010, 2013 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -93,8 +93,8 @@ z_streamp strm;
unsigned start; /* inflate()'s starting value for strm->avail_out */
{
struct inflate_state FAR *state;
- unsigned char FAR *in; /* local strm->next_in */
- unsigned char FAR *last; /* while in < last, enough input available */
+ z_const unsigned char FAR *in; /* local strm->next_in */
+ z_const unsigned char FAR *last; /* have enough input while in < last */
unsigned char FAR *out; /* local strm->next_out */
unsigned char FAR *beg; /* inflate()'s initial strm->next_out */
unsigned char FAR *end; /* while out < end, enough space available */
diff --git a/src/share/native/java/util/zip/zlib-1.2.5/inffast.h b/src/share/native/java/util/zip/zlib-1.2.8/inffast.h
index b8da8bb75..b8da8bb75 100644
--- a/src/share/native/java/util/zip/zlib-1.2.5/inffast.h
+++ b/src/share/native/java/util/zip/zlib-1.2.8/inffast.h
diff --git a/src/share/native/java/util/zip/zlib-1.2.5/inffixed.h b/src/share/native/java/util/zip/zlib-1.2.8/inffixed.h
index f44fee251..f0a4ef1c4 100644
--- a/src/share/native/java/util/zip/zlib-1.2.5/inffixed.h
+++ b/src/share/native/java/util/zip/zlib-1.2.8/inffixed.h
@@ -26,9 +26,9 @@
* Generated automatically by makefixed().
*/
- /* WARNING: this file should *not* be used by applications. It
- is part of the implementation of the compression library and
- is subject to change. Applications should only use zlib.h.
+ /* WARNING: this file should *not* be used by applications.
+ It is part of the implementation of this library and is
+ subject to change. Applications should only use zlib.h.
*/
static const code lenfix[512] = {
diff --git a/src/share/native/java/util/zip/zlib-1.2.5/inflate.c b/src/share/native/java/util/zip/zlib-1.2.8/inflate.c
index 6e172217b..b159c1543 100644
--- a/src/share/native/java/util/zip/zlib-1.2.5/inflate.c
+++ b/src/share/native/java/util/zip/zlib-1.2.8/inflate.c
@@ -23,7 +23,7 @@
*/
/* inflate.c -- zlib decompression
- * Copyright (C) 1995-2010 Mark Adler
+ * Copyright (C) 1995-2012 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -117,14 +117,15 @@
/* function prototypes */
local void fixedtables OF((struct inflate_state FAR *state));
-local int updatewindow OF((z_streamp strm, unsigned out));
+local int updatewindow OF((z_streamp strm, const unsigned char FAR *end,
+ unsigned copy));
#ifdef BUILDFIXED
void makefixed OF((void));
#endif
-local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf,
+local unsigned syncsearch OF((unsigned FAR *have, const unsigned char FAR *buf,
unsigned len));
-int ZEXPORT inflateReset(strm)
+int ZEXPORT inflateResetKeep(strm)
z_streamp strm;
{
struct inflate_state FAR *state;
@@ -133,15 +134,13 @@ z_streamp strm;
state = (struct inflate_state FAR *)strm->state;
strm->total_in = strm->total_out = state->total = 0;
strm->msg = Z_NULL;
- strm->adler = 1; /* to support ill-conceived Java test suite */
+ if (state->wrap) /* to support ill-conceived Java test suite */
+ strm->adler = state->wrap & 1;
state->mode = HEAD;
state->last = 0;
state->havedict = 0;
state->dmax = 32768U;
state->head = Z_NULL;
- state->wsize = 0;
- state->whave = 0;
- state->wnext = 0;
state->hold = 0;
state->bits = 0;
state->lencode = state->distcode = state->next = state->codes;
@@ -151,6 +150,19 @@ z_streamp strm;
return Z_OK;
}
+int ZEXPORT inflateReset(strm)
+z_streamp strm;
+{
+ struct inflate_state FAR *state;
+
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+ state->wsize = 0;
+ state->whave = 0;
+ state->wnext = 0;
+ return inflateResetKeep(strm);
+}
+
int ZEXPORT inflateReset2(strm, windowBits)
z_streamp strm;
int windowBits;
@@ -204,10 +216,19 @@ int stream_size;
if (strm == Z_NULL) return Z_STREAM_ERROR;
strm->msg = Z_NULL; /* in case we return an error */
if (strm->zalloc == (alloc_func)0) {
+#ifdef Z_SOLO
+ return Z_STREAM_ERROR;
+#else
strm->zalloc = zcalloc;
strm->opaque = (voidpf)0;
+#endif
}
- if (strm->zfree == (free_func)0) strm->zfree = zcfree;
+ if (strm->zfree == (free_func)0)
+#ifdef Z_SOLO
+ return Z_STREAM_ERROR;
+#else
+ strm->zfree = zcfree;
+#endif
state = (struct inflate_state FAR *)
ZALLOC(strm, 1, sizeof(struct inflate_state));
if (state == Z_NULL) return Z_MEM_ERROR;
@@ -345,8 +366,8 @@ void makefixed()
low = 0;
for (;;) {
if ((low % 7) == 0) printf("\n ");
- printf("{%u,%u,%d}", state.lencode[low].op, state.lencode[low].bits,
- state.lencode[low].val);
+ printf("{%u,%u,%d}", (low & 127) == 99 ? 64 : state.lencode[low].op,
+ state.lencode[low].bits, state.lencode[low].val);
if (++low == size) break;
putchar(',');
}
@@ -379,12 +400,13 @@ void makefixed()
output will fall in the output data, making match copies simpler and faster.
The advantage may be dependent on the size of the processor's data caches.
*/
-local int updatewindow(strm, out)
+local int updatewindow(strm, end, copy)
z_streamp strm;
-unsigned out;
+const Bytef *end;
+unsigned copy;
{
struct inflate_state FAR *state;
- unsigned copy, dist;
+ unsigned dist;
state = (struct inflate_state FAR *)strm->state;
@@ -404,19 +426,18 @@ unsigned out;
}
/* copy state->wsize or less output bytes into the circular window */
- copy = out - strm->avail_out;
if (copy >= state->wsize) {
- zmemcpy(state->window, strm->next_out - state->wsize, state->wsize);
+ zmemcpy(state->window, end - state->wsize, state->wsize);
state->wnext = 0;
state->whave = state->wsize;
}
else {
dist = state->wsize - state->wnext;
if (dist > copy) dist = copy;
- zmemcpy(state->window + state->wnext, strm->next_out - copy, dist);
+ zmemcpy(state->window + state->wnext, end - copy, dist);
copy -= dist;
if (copy) {
- zmemcpy(state->window, strm->next_out - copy, copy);
+ zmemcpy(state->window, end - copy, copy);
state->wnext = copy;
state->whave = state->wsize;
}
@@ -523,11 +544,6 @@ unsigned out;
bits -= bits & 7; \
} while (0)
-/* Reverse the bytes in a 32-bit value */
-#define REVERSE(q) \
- ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \
- (((q) & 0xff00) << 8) + (((q) & 0xff) << 24))
-
/*
inflate() uses a state machine to process as much input data and generate as
much output data as possible before returning. The state machine is
@@ -615,7 +631,7 @@ z_streamp strm;
int flush;
{
struct inflate_state FAR *state;
- unsigned char FAR *next; /* next input */
+ z_const unsigned char FAR *next; /* next input */
unsigned char FAR *put; /* next output */
unsigned have, left; /* available input and output */
unsigned long hold; /* bit buffer */
@@ -821,7 +837,7 @@ int flush;
#endif
case DICTID:
NEEDBITS(32);
- strm->adler = state->check = REVERSE(hold);
+ strm->adler = state->check = ZSWAP32(hold);
INITBITS();
state->mode = DICT;
case DICT:
@@ -929,7 +945,7 @@ int flush;
while (state->have < 19)
state->lens[order[state->have++]] = 0;
state->next = state->codes;
- state->lencode = (code const FAR *)(state->next);
+ state->lencode = (const code FAR *)(state->next);
state->lenbits = 7;
ret = inflate_table(CODES, state->lens, 19, &(state->next),
&(state->lenbits), state->work);
@@ -949,7 +965,6 @@ int flush;
PULLBYTE();
}
if (here.val < 16) {
- NEEDBITS(here.bits);
DROPBITS(here.bits);
state->lens[state->have++] = here.val;
}
@@ -1004,7 +1019,7 @@ int flush;
values here (9 and 6) without reading the comments in inftrees.h
concerning the ENOUGH constants, which depend on those values */
state->next = state->codes;
- state->lencode = (code const FAR *)(state->next);
+ state->lencode = (const code FAR *)(state->next);
state->lenbits = 9;
ret = inflate_table(LENS, state->lens, state->nlen, &(state->next),
&(state->lenbits), state->work);
@@ -1013,7 +1028,7 @@ int flush;
state->mode = BAD;
break;
}
- state->distcode = (code const FAR *)(state->next);
+ state->distcode = (const code FAR *)(state->next);
state->distbits = 6;
ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist,
&(state->next), &(state->distbits), state->work);
@@ -1194,7 +1209,7 @@ int flush;
#ifdef GUNZIP
state->flags ? hold :
#endif
- REVERSE(hold)) != state->check) {
+ ZSWAP32(hold)) != state->check) {
strm->msg = (char *)"incorrect data check";
state->mode = BAD;
break;
@@ -1238,8 +1253,9 @@ int flush;
*/
inf_leave:
RESTORE();
- if (state->wsize || (state->mode < CHECK && out != strm->avail_out))
- if (updatewindow(strm, out)) {
+ if (state->wsize || (out != strm->avail_out && state->mode < BAD &&
+ (state->mode < CHECK || flush != Z_FINISH)))
+ if (updatewindow(strm, strm->next_out, out - strm->avail_out)) {
state->mode = MEM;
return Z_MEM_ERROR;
}
@@ -1273,13 +1289,37 @@ z_streamp strm;
return Z_OK;
}
+int ZEXPORT inflateGetDictionary(strm, dictionary, dictLength)
+z_streamp strm;
+Bytef *dictionary;
+uInt *dictLength;
+{
+ struct inflate_state FAR *state;
+
+ /* check state */
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+
+ /* copy dictionary */
+ if (state->whave && dictionary != Z_NULL) {
+ zmemcpy(dictionary, state->window + state->wnext,
+ state->whave - state->wnext);
+ zmemcpy(dictionary + state->whave - state->wnext,
+ state->window, state->wnext);
+ }
+ if (dictLength != Z_NULL)
+ *dictLength = state->whave;
+ return Z_OK;
+}
+
int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength)
z_streamp strm;
const Bytef *dictionary;
uInt dictLength;
{
struct inflate_state FAR *state;
- unsigned long id;
+ unsigned long dictid;
+ int ret;
/* check state */
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
@@ -1287,29 +1327,21 @@ uInt dictLength;
if (state->wrap != 0 && state->mode != DICT)
return Z_STREAM_ERROR;
- /* check for correct dictionary id */
+ /* check for correct dictionary identifier */
if (state->mode == DICT) {
- id = adler32(0L, Z_NULL, 0);
- id = adler32(id, dictionary, dictLength);
- if (id != state->check)
+ dictid = adler32(0L, Z_NULL, 0);
+ dictid = adler32(dictid, dictionary, dictLength);
+ if (dictid != state->check)
return Z_DATA_ERROR;
}
- /* copy dictionary to window */
- if (updatewindow(strm, strm->avail_out)) {
+ /* copy dictionary to window using updatewindow(), which will amend the
+ existing dictionary if appropriate */
+ ret = updatewindow(strm, dictionary + dictLength, dictLength);
+ if (ret) {
state->mode = MEM;
return Z_MEM_ERROR;
}
- if (dictLength > state->wsize) {
- zmemcpy(state->window, dictionary + dictLength - state->wsize,
- state->wsize);
- state->whave = state->wsize;
- }
- else {
- zmemcpy(state->window + state->wsize - dictLength, dictionary,
- dictLength);
- state->whave = dictLength;
- }
state->havedict = 1;
Tracev((stderr, "inflate: dictionary set\n"));
return Z_OK;
@@ -1345,7 +1377,7 @@ gz_headerp head;
*/
local unsigned syncsearch(have, buf, len)
unsigned FAR *have;
-unsigned char FAR *buf;
+const unsigned char FAR *buf;
unsigned len;
{
unsigned got;
@@ -1457,8 +1489,8 @@ z_streamp source;
}
/* copy state */
- zmemcpy(dest, source, sizeof(z_stream));
- zmemcpy(copy, state, sizeof(struct inflate_state));
+ zmemcpy((voidpf)dest, (voidpf)source, sizeof(z_stream));
+ zmemcpy((voidpf)copy, (voidpf)state, sizeof(struct inflate_state));
if (state->lencode >= state->codes &&
state->lencode <= state->codes + ENOUGH - 1) {
copy->lencode = copy->codes + (state->lencode - state->codes);
diff --git a/src/share/native/java/util/zip/zlib-1.2.5/inflate.h b/src/share/native/java/util/zip/zlib-1.2.8/inflate.h
index 090cb8a79..090cb8a79 100644
--- a/src/share/native/java/util/zip/zlib-1.2.5/inflate.h
+++ b/src/share/native/java/util/zip/zlib-1.2.8/inflate.h
diff --git a/src/share/native/java/util/zip/zlib-1.2.5/inftrees.c b/src/share/native/java/util/zip/zlib-1.2.8/inftrees.c
index 9842631cc..c4b0bf2dd 100644
--- a/src/share/native/java/util/zip/zlib-1.2.5/inftrees.c
+++ b/src/share/native/java/util/zip/zlib-1.2.8/inftrees.c
@@ -23,7 +23,7 @@
*/
/* inftrees.c -- generate Huffman trees for efficient decoding
- * Copyright (C) 1995-2010 Mark Adler
+ * Copyright (C) 1995-2013 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -33,7 +33,7 @@
#define MAXBITS 15
const char inflate_copyright[] =
- " inflate 1.2.5 Copyright 1995-2010 Mark Adler ";
+ " inflate 1.2.8 Copyright 1995-2013 Mark Adler ";
/*
If you use the zlib library in a product, an acknowledgment is welcome
in the documentation of your product. If for some reason you cannot
@@ -86,7 +86,7 @@ unsigned short FAR *work;
35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
static const unsigned short lext[31] = { /* Length codes 257..285 extra */
16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
- 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 73, 195};
+ 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78};
static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
@@ -232,8 +232,8 @@ unsigned short FAR *work;
mask = used - 1; /* mask for comparing low */
/* check available table space */
- if ((type == LENS && used >= ENOUGH_LENS) ||
- (type == DISTS && used >= ENOUGH_DISTS))
+ if ((type == LENS && used > ENOUGH_LENS) ||
+ (type == DISTS && used > ENOUGH_DISTS))
return 1;
/* process all codes and make table entries */
@@ -301,8 +301,8 @@ unsigned short FAR *work;
/* check for enough space */
used += 1U << curr;
- if ((type == LENS && used >= ENOUGH_LENS) ||
- (type == DISTS && used >= ENOUGH_DISTS))
+ if ((type == LENS && used > ENOUGH_LENS) ||
+ (type == DISTS && used > ENOUGH_DISTS))
return 1;
/* point entry in root table to sub-table */
@@ -313,38 +313,14 @@ unsigned short FAR *work;
}
}
- /*
- Fill in rest of table for incomplete codes. This loop is similar to the
- loop above in incrementing huff for table indices. It is assumed that
- len is equal to curr + drop, so there is no loop needed to increment
- through high index bits. When the current sub-table is filled, the loop
- drops back to the root table to fill in any remaining entries there.
- */
- here.op = (unsigned char)64; /* invalid code marker */
- here.bits = (unsigned char)(len - drop);
- here.val = (unsigned short)0;
- while (huff != 0) {
- /* when done with sub-table, drop back to root table */
- if (drop != 0 && (huff & mask) != low) {
- drop = 0;
- len = root;
- next = *table;
- here.bits = (unsigned char)len;
- }
-
- /* put invalid code marker in table */
- next[huff >> drop] = here;
-
- /* backwards increment the len-bit code huff */
- incr = 1U << (len - 1);
- while (huff & incr)
- incr >>= 1;
- if (incr != 0) {
- huff &= incr - 1;
- huff += incr;
- }
- else
- huff = 0;
+ /* fill in remaining table entry if code is incomplete (guaranteed to have
+ at most one remaining entry, since if the code is incomplete, the
+ maximum code length that was allowed to get this far is one bit) */
+ if (huff != 0) {
+ here.op = (unsigned char)64; /* invalid code marker */
+ here.bits = (unsigned char)(len - drop);
+ here.val = (unsigned short)0;
+ next[huff] = here;
}
/* set return parameters */
diff --git a/src/share/native/java/util/zip/zlib-1.2.5/inftrees.h b/src/share/native/java/util/zip/zlib-1.2.8/inftrees.h
index 77326a7f0..77326a7f0 100644
--- a/src/share/native/java/util/zip/zlib-1.2.5/inftrees.h
+++ b/src/share/native/java/util/zip/zlib-1.2.8/inftrees.h
diff --git a/src/share/native/java/util/zip/zlib-1.2.5/patches/ChangeLog_java b/src/share/native/java/util/zip/zlib-1.2.8/patches/ChangeLog_java
index 6f013dbb2..6f013dbb2 100644
--- a/src/share/native/java/util/zip/zlib-1.2.5/patches/ChangeLog_java
+++ b/src/share/native/java/util/zip/zlib-1.2.8/patches/ChangeLog_java
diff --git a/src/share/native/java/util/zip/zlib-1.2.5/trees.c b/src/share/native/java/util/zip/zlib-1.2.8/trees.c
index 04da4d709..e4ecffea0 100644
--- a/src/share/native/java/util/zip/zlib-1.2.5/trees.c
+++ b/src/share/native/java/util/zip/zlib-1.2.8/trees.c
@@ -23,7 +23,7 @@
*/
/* trees.c -- output deflated data using Huffman coding
- * Copyright (C) 1995-2010 Jean-loup Gailly
+ * Copyright (C) 1995-2012 Jean-loup Gailly
* detect_data_type() function provided freely by Cosmin Truta, 2006
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -98,11 +98,6 @@ local const uch bl_order[BL_CODES]
* probability, to avoid transmitting the lengths for unused bit length codes.
*/
-#define Buf_size (8 * 2*sizeof(char))
-/* Number of bits used within bi_buf. (bi_buf might be implemented on
- * more than 16 bits on some systems.)
- */
-
/* ===========================================================================
* Local data. These are initialized only once.
*/
@@ -175,8 +170,8 @@ local void send_tree OF((deflate_state *s, ct_data *tree, int max_code));
local int build_bl_tree OF((deflate_state *s));
local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes,
int blcodes));
-local void compress_block OF((deflate_state *s, ct_data *ltree,
- ct_data *dtree));
+local void compress_block OF((deflate_state *s, const ct_data *ltree,
+ const ct_data *dtree));
local int detect_data_type OF((deflate_state *s));
local unsigned bi_reverse OF((unsigned value, int length));
local void bi_windup OF((deflate_state *s));
@@ -423,7 +418,6 @@ void ZLIB_INTERNAL _tr_init(s)
s->bi_buf = 0;
s->bi_valid = 0;
- s->last_eob_len = 8; /* enough lookahead for inflate */
#ifdef DEBUG
s->compressed_len = 0L;
s->bits_sent = 0L;
@@ -907,15 +901,17 @@ void ZLIB_INTERNAL _tr_stored_block(s, buf, stored_len, last)
}
/* ===========================================================================
+ * Flush the bits in the bit buffer to pending output (leaves at most 7 bits)
+ */
+void ZLIB_INTERNAL _tr_flush_bits(s)
+ deflate_state *s;
+{
+ bi_flush(s);
+}
+
+/* ===========================================================================
* Send one empty static block to give enough lookahead for inflate.
* This takes 10 bits, of which 7 may remain in the bit buffer.
- * The current inflate code requires 9 bits of lookahead. If the
- * last two codes for the previous block (real code plus EOB) were coded
- * on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode
- * the last real code. In this case we send two empty static blocks instead
- * of one. (There are no problems if the previous block is stored or fixed.)
- * To simplify the code, we assume the worst case of last real code encoded
- * on one bit only.
*/
void ZLIB_INTERNAL _tr_align(s)
deflate_state *s;
@@ -926,20 +922,6 @@ void ZLIB_INTERNAL _tr_align(s)
s->compressed_len += 10L; /* 3 for block type, 7 for EOB */
#endif
bi_flush(s);
- /* Of the 10 bits for the empty block, we have already sent
- * (10 - bi_valid) bits. The lookahead for the last real code (before
- * the EOB of the previous block) was thus at least one plus the length
- * of the EOB plus what we have just sent of the empty static block.
- */
- if (1 + s->last_eob_len + 10 - s->bi_valid < 9) {
- send_bits(s, STATIC_TREES<<1, 3);
- send_code(s, END_BLOCK, static_ltree);
-#ifdef DEBUG
- s->compressed_len += 10L;
-#endif
- bi_flush(s);
- }
- s->last_eob_len = 7;
}
/* ===========================================================================
@@ -1014,7 +996,8 @@ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last)
} else if (s->strategy == Z_FIXED || static_lenb == opt_lenb) {
#endif
send_bits(s, (STATIC_TREES<<1)+last, 3);
- compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree);
+ compress_block(s, (const ct_data *)static_ltree,
+ (const ct_data *)static_dtree);
#ifdef DEBUG
s->compressed_len += 3 + s->static_len;
#endif
@@ -1022,7 +1005,8 @@ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last)
send_bits(s, (DYN_TREES<<1)+last, 3);
send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1,
max_blindex+1);
- compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree);
+ compress_block(s, (const ct_data *)s->dyn_ltree,
+ (const ct_data *)s->dyn_dtree);
#ifdef DEBUG
s->compressed_len += 3 + s->opt_len;
#endif
@@ -1099,8 +1083,8 @@ int ZLIB_INTERNAL _tr_tally (s, dist, lc)
*/
local void compress_block(s, ltree, dtree)
deflate_state *s;
- ct_data *ltree; /* literal tree */
- ct_data *dtree; /* distance tree */
+ const ct_data *ltree; /* literal tree */
+ const ct_data *dtree; /* distance tree */
{
unsigned dist; /* distance of matched string */
int lc; /* match length or unmatched char (if dist == 0) */
@@ -1142,7 +1126,6 @@ local void compress_block(s, ltree, dtree)
} while (lx < s->last_lit);
send_code(s, END_BLOCK, ltree);
- s->last_eob_len = ltree[END_BLOCK].Len;
}
/* ===========================================================================
@@ -1250,7 +1233,6 @@ local void copy_block(s, buf, len, header)
int header; /* true if block header must be written */
{
bi_windup(s); /* align on byte boundary */
- s->last_eob_len = 8; /* enough lookahead for inflate */
if (header) {
put_short(s, (ush)len);
diff --git a/src/share/native/java/util/zip/zlib-1.2.5/trees.h b/src/share/native/java/util/zip/zlib-1.2.8/trees.h
index 5cbff5cb0..5cbff5cb0 100644
--- a/src/share/native/java/util/zip/zlib-1.2.5/trees.h
+++ b/src/share/native/java/util/zip/zlib-1.2.8/trees.h
diff --git a/src/share/native/java/util/zip/zlib-1.2.5/uncompr.c b/src/share/native/java/util/zip/zlib-1.2.8/uncompr.c
index e71d018f8..1bcf06fee 100644
--- a/src/share/native/java/util/zip/zlib-1.2.5/uncompr.c
+++ b/src/share/native/java/util/zip/zlib-1.2.8/uncompr.c
@@ -54,7 +54,7 @@ int ZEXPORT uncompress (dest, destLen, source, sourceLen)
z_stream stream;
int err;
- stream.next_in = (Bytef*)source;
+ stream.next_in = (z_const Bytef *)source;
stream.avail_in = (uInt)sourceLen;
/* Check for source > 64K on 16-bit machine: */
if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
@@ -76,7 +76,7 @@ int ZEXPORT uncompress (dest, destLen, source, sourceLen)
return Z_DATA_ERROR;
return err;
}
- *destLen = (uLong)stream.total_out;
+ *destLen = stream.total_out;
err = inflateEnd(&stream);
return err;
diff --git a/src/share/native/java/util/zip/zlib-1.2.5/zadler32.c b/src/share/native/java/util/zip/zlib-1.2.8/zadler32.c
index c4465e1d6..a31083152 100644
--- a/src/share/native/java/util/zip/zlib-1.2.5/zadler32.c
+++ b/src/share/native/java/util/zip/zlib-1.2.8/zadler32.c
@@ -23,7 +23,7 @@
*/
/* adler32.c -- compute the Adler-32 checksum of a data stream
- * Copyright (C) 1995-2007 Mark Adler
+ * Copyright (C) 1995-2011 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -33,9 +33,9 @@
#define local static
-local uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2);
+local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2));
-#define BASE 65521UL /* largest prime smaller than 65536 */
+#define BASE 65521 /* largest prime smaller than 65536 */
#define NMAX 5552
/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
@@ -45,39 +45,44 @@ local uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2);
#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4);
#define DO16(buf) DO8(buf,0); DO8(buf,8);
-/* use NO_DIVIDE if your processor does not do division in hardware */
+/* use NO_DIVIDE if your processor does not do division in hardware --
+ try it both ways to see which is faster */
#ifdef NO_DIVIDE
-# define MOD(a) \
+/* note that this assumes BASE is 65521, where 65536 % 65521 == 15
+ (thank you to John Reiser for pointing this out) */
+# define CHOP(a) \
+ do { \
+ unsigned long tmp = a >> 16; \
+ a &= 0xffffUL; \
+ a += (tmp << 4) - tmp; \
+ } while (0)
+# define MOD28(a) \
do { \
- if (a >= (BASE << 16)) a -= (BASE << 16); \
- if (a >= (BASE << 15)) a -= (BASE << 15); \
- if (a >= (BASE << 14)) a -= (BASE << 14); \
- if (a >= (BASE << 13)) a -= (BASE << 13); \
- if (a >= (BASE << 12)) a -= (BASE << 12); \
- if (a >= (BASE << 11)) a -= (BASE << 11); \
- if (a >= (BASE << 10)) a -= (BASE << 10); \
- if (a >= (BASE << 9)) a -= (BASE << 9); \
- if (a >= (BASE << 8)) a -= (BASE << 8); \
- if (a >= (BASE << 7)) a -= (BASE << 7); \
- if (a >= (BASE << 6)) a -= (BASE << 6); \
- if (a >= (BASE << 5)) a -= (BASE << 5); \
- if (a >= (BASE << 4)) a -= (BASE << 4); \
- if (a >= (BASE << 3)) a -= (BASE << 3); \
- if (a >= (BASE << 2)) a -= (BASE << 2); \
- if (a >= (BASE << 1)) a -= (BASE << 1); \
+ CHOP(a); \
if (a >= BASE) a -= BASE; \
} while (0)
-# define MOD4(a) \
+# define MOD(a) \
do { \
- if (a >= (BASE << 4)) a -= (BASE << 4); \
- if (a >= (BASE << 3)) a -= (BASE << 3); \
- if (a >= (BASE << 2)) a -= (BASE << 2); \
- if (a >= (BASE << 1)) a -= (BASE << 1); \
+ CHOP(a); \
+ MOD28(a); \
+ } while (0)
+# define MOD63(a) \
+ do { /* this assumes a is not negative */ \
+ z_off64_t tmp = a >> 32; \
+ a &= 0xffffffffL; \
+ a += (tmp << 8) - (tmp << 5) + tmp; \
+ tmp = a >> 16; \
+ a &= 0xffffL; \
+ a += (tmp << 4) - tmp; \
+ tmp = a >> 16; \
+ a &= 0xffffL; \
+ a += (tmp << 4) - tmp; \
if (a >= BASE) a -= BASE; \
} while (0)
#else
# define MOD(a) a %= BASE
-# define MOD4(a) a %= BASE
+# define MOD28(a) a %= BASE
+# define MOD63(a) a %= BASE
#endif
/* ========================================================================= */
@@ -116,7 +121,7 @@ uLong ZEXPORT adler32(adler, buf, len)
}
if (adler >= BASE)
adler -= BASE;
- MOD4(sum2); /* only added so many BASE's */
+ MOD28(sum2); /* only added so many BASE's */
return adler | (sum2 << 16);
}
@@ -161,8 +166,13 @@ local uLong adler32_combine_(adler1, adler2, len2)
unsigned long sum2;
unsigned rem;
+ /* for negative len, return invalid adler32 as a clue for debugging */
+ if (len2 < 0)
+ return 0xffffffffUL;
+
/* the derivation of this formula is left as an exercise for the reader */
- rem = (unsigned)(len2 % BASE);
+ MOD63(len2); /* assumes len2 >= 0 */
+ rem = (unsigned)len2;
sum1 = adler1 & 0xffff;
sum2 = rem * sum1;
MOD(sum2);
diff --git a/src/share/native/java/util/zip/zlib-1.2.5/zconf.h b/src/share/native/java/util/zip/zlib-1.2.8/zconf.h
index 78f162cfd..c7edbed7d 100644
--- a/src/share/native/java/util/zip/zlib-1.2.5/zconf.h
+++ b/src/share/native/java/util/zip/zlib-1.2.8/zconf.h
@@ -23,7 +23,7 @@
*/
/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-2010 Jean-loup Gailly.
+ * Copyright (C) 1995-2013 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -42,11 +42,13 @@
* this permanently in zconf.h using "./configure --zprefix".
*/
#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
+# define Z_PREFIX_SET
/* all linked symbols */
# define _dist_code z__dist_code
# define _length_code z__length_code
# define _tr_align z__tr_align
+# define _tr_flush_bits z__tr_flush_bits
# define _tr_flush_block z__tr_flush_block
# define _tr_init z__tr_init
# define _tr_stored_block z__tr_stored_block
@@ -54,9 +56,11 @@
# define adler32 z_adler32
# define adler32_combine z_adler32_combine
# define adler32_combine64 z_adler32_combine64
-# define compress z_compress
-# define compress2 z_compress2
-# define compressBound z_compressBound
+# ifndef Z_SOLO
+# define compress z_compress
+# define compress2 z_compress2
+# define compressBound z_compressBound
+# endif
# define crc32 z_crc32
# define crc32_combine z_crc32_combine
# define crc32_combine64 z_crc32_combine64
@@ -67,44 +71,53 @@
# define deflateInit2_ z_deflateInit2_
# define deflateInit_ z_deflateInit_
# define deflateParams z_deflateParams
+# define deflatePending z_deflatePending
# define deflatePrime z_deflatePrime
# define deflateReset z_deflateReset
+# define deflateResetKeep z_deflateResetKeep
# define deflateSetDictionary z_deflateSetDictionary
# define deflateSetHeader z_deflateSetHeader
# define deflateTune z_deflateTune
# define deflate_copyright z_deflate_copyright
# define get_crc_table z_get_crc_table
-# define gz_error z_gz_error
-# define gz_intmax z_gz_intmax
-# define gz_strwinerror z_gz_strwinerror
-# define gzbuffer z_gzbuffer
-# define gzclearerr z_gzclearerr
-# define gzclose z_gzclose
-# define gzclose_r z_gzclose_r
-# define gzclose_w z_gzclose_w
-# define gzdirect z_gzdirect
-# define gzdopen z_gzdopen
-# define gzeof z_gzeof
-# define gzerror z_gzerror
-# define gzflush z_gzflush
-# define gzgetc z_gzgetc
-# define gzgets z_gzgets
-# define gzoffset z_gzoffset
-# define gzoffset64 z_gzoffset64
-# define gzopen z_gzopen
-# define gzopen64 z_gzopen64
-# define gzprintf z_gzprintf
-# define gzputc z_gzputc
-# define gzputs z_gzputs
-# define gzread z_gzread
-# define gzrewind z_gzrewind
-# define gzseek z_gzseek
-# define gzseek64 z_gzseek64
-# define gzsetparams z_gzsetparams
-# define gztell z_gztell
-# define gztell64 z_gztell64
-# define gzungetc z_gzungetc
-# define gzwrite z_gzwrite
+# ifndef Z_SOLO
+# define gz_error z_gz_error
+# define gz_intmax z_gz_intmax
+# define gz_strwinerror z_gz_strwinerror
+# define gzbuffer z_gzbuffer
+# define gzclearerr z_gzclearerr
+# define gzclose z_gzclose
+# define gzclose_r z_gzclose_r
+# define gzclose_w z_gzclose_w
+# define gzdirect z_gzdirect
+# define gzdopen z_gzdopen
+# define gzeof z_gzeof
+# define gzerror z_gzerror
+# define gzflush z_gzflush
+# define gzgetc z_gzgetc
+# define gzgetc_ z_gzgetc_
+# define gzgets z_gzgets
+# define gzoffset z_gzoffset
+# define gzoffset64 z_gzoffset64
+# define gzopen z_gzopen
+# define gzopen64 z_gzopen64
+# ifdef _WIN32
+# define gzopen_w z_gzopen_w
+# endif
+# define gzprintf z_gzprintf
+# define gzvprintf z_gzvprintf
+# define gzputc z_gzputc
+# define gzputs z_gzputs
+# define gzread z_gzread
+# define gzrewind z_gzrewind
+# define gzseek z_gzseek
+# define gzseek64 z_gzseek64
+# define gzsetparams z_gzsetparams
+# define gztell z_gztell
+# define gztell64 z_gztell64
+# define gzungetc z_gzungetc
+# define gzwrite z_gzwrite
+# endif
# define inflate z_inflate
# define inflateBack z_inflateBack
# define inflateBackEnd z_inflateBackEnd
@@ -119,16 +132,22 @@
# define inflateReset z_inflateReset
# define inflateReset2 z_inflateReset2
# define inflateSetDictionary z_inflateSetDictionary
+# define inflateGetDictionary z_inflateGetDictionary
# define inflateSync z_inflateSync
# define inflateSyncPoint z_inflateSyncPoint
# define inflateUndermine z_inflateUndermine
+# define inflateResetKeep z_inflateResetKeep
# define inflate_copyright z_inflate_copyright
# define inflate_fast z_inflate_fast
# define inflate_table z_inflate_table
-# define uncompress z_uncompress
+# ifndef Z_SOLO
+# define uncompress z_uncompress
+# endif
# define zError z_zError
-# define zcalloc z_zcalloc
-# define zcfree z_zcfree
+# ifndef Z_SOLO
+# define zcalloc z_zcalloc
+# define zcfree z_zcfree
+# endif
# define zlibCompileFlags z_zlibCompileFlags
# define zlibVersion z_zlibVersion
@@ -138,7 +157,9 @@
# define alloc_func z_alloc_func
# define charf z_charf
# define free_func z_free_func
-# define gzFile z_gzFile
+# ifndef Z_SOLO
+# define gzFile z_gzFile
+# endif
# define gz_header z_gz_header
# define gz_headerp z_gz_headerp
# define in_func z_in_func
@@ -224,6 +245,12 @@
# endif
#endif
+#if defined(ZLIB_CONST) && !defined(z_const)
+# define z_const const
+#else
+# define z_const
+#endif
+
/* Some Mac compilers merge all .h files incorrectly: */
#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
# define NO_DUMMY_DECL
@@ -270,6 +297,14 @@
# endif
#endif
+#ifndef Z_ARG /* function prototypes for stdarg */
+# if defined(STDC) || defined(Z_HAVE_STDARG_H)
+# define Z_ARG(args) args
+# else
+# define Z_ARG(args) ()
+# endif
+#endif
+
/* The following definitions for FAR are needed only for MSDOS mixed
* model programming (small or medium model with some far allocations).
* This was tested only with MSC; for other MSDOS compilers you may have
@@ -360,6 +395,7 @@
typedef unsigned char Byte; /* 8 bits */
#endif
typedef unsigned int uInt; /* 16 bits or more */
+
#ifdef _LP64
typedef unsigned int uLong; /* 32 bits or more */
#else
@@ -387,12 +423,47 @@ typedef uLong FAR uLongf;
typedef Byte *voidp;
#endif
+#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
+# include <limits.h>
+# if (UINT_MAX == 0xffffffffUL)
+# define Z_U4 unsigned
+# elif (ULONG_MAX == 0xffffffffUL)
+# define Z_U4 unsigned long
+# elif (USHRT_MAX == 0xffffffffUL)
+# define Z_U4 unsigned short
+# endif
+#endif
+
+#ifdef Z_U4
+ typedef Z_U4 z_crc_t;
+#else
+ typedef unsigned long z_crc_t;
+#endif
+
#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
# define Z_HAVE_UNISTD_H
#endif
+#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
+# define Z_HAVE_STDARG_H
+#endif
+
#ifdef STDC
-# include <sys/types.h> /* for off_t */
+# ifndef Z_SOLO
+# include <sys/types.h> /* for off_t */
+# endif
+#endif
+
+#if defined(STDC) || defined(Z_HAVE_STDARG_H)
+# ifndef Z_SOLO
+# include <stdarg.h> /* for va_list */
+# endif
+#endif
+
+#ifdef _WIN32
+# ifndef Z_SOLO
+# include <stddef.h> /* for wchar_t */
+# endif
#endif
/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
@@ -401,21 +472,38 @@ typedef uLong FAR uLongf;
* both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
* equivalently requesting no 64-bit operations
*/
-#if -_LARGEFILE64_SOURCE - -1 == 1
+#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
# undef _LARGEFILE64_SOURCE
#endif
-#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
-# include <unistd.h> /* for SEEK_* and off_t */
-# ifdef VMS
-# include <unixio.h> /* for off_t */
-# endif
-# ifndef z_off_t
-# define z_off_t off_t
+#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
+# define Z_HAVE_UNISTD_H
+#endif
+#ifndef Z_SOLO
+# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
+# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
+# ifdef VMS
+# include <unixio.h> /* for off_t */
+# endif
+# ifndef z_off_t
+# define z_off_t off_t
+# endif
# endif
#endif
-#ifndef SEEK_SET
+#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
+# define Z_LFS64
+#endif
+
+#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
+# define Z_LARGE64
+#endif
+
+#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
+# define Z_WANT64
+#endif
+
+#if !defined(SEEK_SET) && !defined(Z_SOLO)
# define SEEK_SET 0 /* Seek from beginning of file. */
# define SEEK_CUR 1 /* Seek from current position. */
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
@@ -425,18 +513,14 @@ typedef uLong FAR uLongf;
# define z_off_t long
#endif
-#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
+#if !defined(_WIN32) && defined(Z_LARGE64)
# define z_off64_t off64_t
#else
-# define z_off64_t z_off_t
-#endif
-
-#if defined(__OS400__)
-# define NO_vsnprintf
-#endif
-
-#if defined(__MVS__)
-# define NO_vsnprintf
+# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
+# define z_off64_t __int64
+# else
+# define z_off64_t z_off_t
+# endif
#endif
/* MVS linker does not support external names larger than 8 bytes */
diff --git a/src/share/native/java/util/zip/zlib-1.2.5/zcrc32.c b/src/share/native/java/util/zip/zlib-1.2.8/zcrc32.c
index 0eb5b64f1..0fe90df97 100644
--- a/src/share/native/java/util/zip/zlib-1.2.5/zcrc32.c
+++ b/src/share/native/java/util/zip/zlib-1.2.8/zcrc32.c
@@ -23,7 +23,7 @@
*/
/* crc32.c -- compute the CRC-32 of a data stream
- * Copyright (C) 1995-2006, 2010 Mark Adler
+ * Copyright (C) 1995-2006, 2010, 2011, 2012 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*
* Thanks to Rodney Brown <rbrown64@csc.com.au> for his contribution of faster
@@ -41,6 +41,8 @@
of the crc tables. Therefore, if you #define DYNAMIC_CRC_TABLE, you should
first call get_crc_table() to initialize the tables before allowing more than
one thread to use crc32().
+
+ DYNAMIC_CRC_TABLE and MAKECRCH can be #defined to write out crc32.h.
*/
#ifdef MAKECRCH
@@ -54,31 +56,11 @@
#define local static
-/* Find a four-byte integer type for crc32_little() and crc32_big(). */
-#ifndef NOBYFOUR
-# ifdef STDC /* need ANSI C limits.h to determine sizes */
-# include <limits.h>
-# define BYFOUR
-# if (UINT_MAX == 0xffffffffUL)
- typedef unsigned int u4;
-# else
-# if (ULONG_MAX == 0xffffffffUL)
- typedef unsigned long u4;
-# else
-# if (USHRT_MAX == 0xffffffffUL)
- typedef unsigned short u4;
-# else
-# undef BYFOUR /* can't find a four-byte integer type! */
-# endif
-# endif
-# endif
-# endif /* STDC */
-#endif /* !NOBYFOUR */
-
/* Definitions for doing the crc four data bytes at a time. */
+#if !defined(NOBYFOUR) && defined(Z_U4)
+# define BYFOUR
+#endif
#ifdef BYFOUR
-# define REV(w) ((((w)>>24)&0xff)+(((w)>>8)&0xff00)+ \
- (((w)&0xff00)<<8)+(((w)&0xff)<<24))
local unsigned long crc32_little OF((unsigned long,
const unsigned char FAR *, unsigned));
local unsigned long crc32_big OF((unsigned long,
@@ -92,16 +74,16 @@
local unsigned long gf2_matrix_times OF((unsigned long *mat,
unsigned long vec));
local void gf2_matrix_square OF((unsigned long *square, unsigned long *mat));
-local uLong crc32_combine_(uLong crc1, uLong crc2, z_off64_t len2);
+local uLong crc32_combine_ OF((uLong crc1, uLong crc2, z_off64_t len2));
#ifdef DYNAMIC_CRC_TABLE
local volatile int crc_table_empty = 1;
-local unsigned long FAR crc_table[TBLS][256];
+local z_crc_t FAR crc_table[TBLS][256];
local void make_crc_table OF((void));
#ifdef MAKECRCH
- local void write_table OF((FILE *, const unsigned long FAR *));
+ local void write_table OF((FILE *, const z_crc_t FAR *));
#endif /* MAKECRCH */
/*
Generate tables for a byte-wise 32-bit CRC calculation on the polynomial:
@@ -131,9 +113,9 @@ local void make_crc_table OF((void));
*/
local void make_crc_table()
{
- unsigned long c;
+ z_crc_t c;
int n, k;
- unsigned long poly; /* polynomial exclusive-or pattern */
+ z_crc_t poly; /* polynomial exclusive-or pattern */
/* terms of polynomial defining this crc (except x^32): */
static volatile int first = 1; /* flag to limit concurrent making */
static const unsigned char p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26};
@@ -145,13 +127,13 @@ local void make_crc_table()
first = 0;
/* make exclusive-or pattern from polynomial (0xedb88320UL) */
- poly = 0UL;
- for (n = 0; n < sizeof(p)/sizeof(unsigned char); n++)
- poly |= 1UL << (31 - p[n]);
+ poly = 0;
+ for (n = 0; n < (int)(sizeof(p)/sizeof(unsigned char)); n++)
+ poly |= (z_crc_t)1 << (31 - p[n]);
/* generate a crc for every 8-bit value */
for (n = 0; n < 256; n++) {
- c = (unsigned long)n;
+ c = (z_crc_t)n;
for (k = 0; k < 8; k++)
c = c & 1 ? poly ^ (c >> 1) : c >> 1;
crc_table[0][n] = c;
@@ -162,11 +144,11 @@ local void make_crc_table()
and then the byte reversal of those as well as the first table */
for (n = 0; n < 256; n++) {
c = crc_table[0][n];
- crc_table[4][n] = REV(c);
+ crc_table[4][n] = ZSWAP32(c);
for (k = 1; k < 4; k++) {
c = crc_table[0][c & 0xff] ^ (c >> 8);
crc_table[k][n] = c;
- crc_table[k + 4][n] = REV(c);
+ crc_table[k + 4][n] = ZSWAP32(c);
}
}
#endif /* BYFOUR */
@@ -188,7 +170,7 @@ local void make_crc_table()
if (out == NULL) return;
fprintf(out, "/* crc32.h -- tables for rapid CRC calculation\n");
fprintf(out, " * Generated automatically by crc32.c\n */\n\n");
- fprintf(out, "local const unsigned long FAR ");
+ fprintf(out, "local const z_crc_t FAR ");
fprintf(out, "crc_table[TBLS][256] =\n{\n {\n");
write_table(out, crc_table[0]);
# ifdef BYFOUR
@@ -208,12 +190,13 @@ local void make_crc_table()
#ifdef MAKECRCH
local void write_table(out, table)
FILE *out;
- const unsigned long FAR *table;
+ const z_crc_t FAR *table;
{
int n;
for (n = 0; n < 256; n++)
- fprintf(out, "%s0x%08lxUL%s", n % 5 ? "" : " ", table[n],
+ fprintf(out, "%s0x%08lxUL%s", n % 5 ? "" : " ",
+ (unsigned long)(table[n]),
n == 255 ? "\n" : (n % 5 == 4 ? ",\n" : ", "));
}
#endif /* MAKECRCH */
@@ -228,13 +211,13 @@ local void write_table(out, table)
/* =========================================================================
* This function can be used by asm versions of crc32()
*/
-const unsigned long FAR * ZEXPORT get_crc_table()
+const z_crc_t FAR * ZEXPORT get_crc_table()
{
#ifdef DYNAMIC_CRC_TABLE
if (crc_table_empty)
make_crc_table();
#endif /* DYNAMIC_CRC_TABLE */
- return (const unsigned long FAR *)crc_table;
+ return (const z_crc_t FAR *)crc_table;
}
/* ========================================================================= */
@@ -256,7 +239,7 @@ uLong ZEXPORT crc32(crc, buf, len)
#ifdef BYFOUR
if (sizeof(void *) == sizeof(ptrdiff_t)) {
- u4 endian;
+ z_crc_t endian;
endian = 1;
if (*((unsigned char *)(&endian)))
@@ -290,17 +273,17 @@ local unsigned long crc32_little(crc, buf, len)
const unsigned char FAR *buf;
unsigned len;
{
- register u4 c;
- register const u4 FAR *buf4;
+ register z_crc_t c;
+ register const z_crc_t FAR *buf4;
- c = (u4)crc;
+ c = (z_crc_t)crc;
c = ~c;
while (len && ((ptrdiff_t)buf & 3)) {
c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);
len--;
}
- buf4 = (const u4 FAR *)(const void FAR *)buf;
+ buf4 = (const z_crc_t FAR *)(const void FAR *)buf;
while (len >= 32) {
DOLIT32;
len -= 32;
@@ -330,17 +313,17 @@ local unsigned long crc32_big(crc, buf, len)
const unsigned char FAR *buf;
unsigned len;
{
- register u4 c;
- register const u4 FAR *buf4;
+ register z_crc_t c;
+ register const z_crc_t FAR *buf4;
- c = REV((u4)crc);
+ c = ZSWAP32((z_crc_t)crc);
c = ~c;
while (len && ((ptrdiff_t)buf & 3)) {
c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
len--;
}
- buf4 = (const u4 FAR *)(const void FAR *)buf;
+ buf4 = (const z_crc_t FAR *)(const void FAR *)buf;
buf4--;
while (len >= 32) {
DOBIG32;
@@ -357,7 +340,7 @@ local unsigned long crc32_big(crc, buf, len)
c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
} while (--len);
c = ~c;
- return (unsigned long)(REV(c));
+ return (unsigned long)(ZSWAP32(c));
}
#endif /* BYFOUR */
diff --git a/src/share/native/java/util/zip/zlib-1.2.5/zlib.h b/src/share/native/java/util/zip/zlib-1.2.8/zlib.h
index b3617e58b..8779cadf2 100644
--- a/src/share/native/java/util/zip/zlib-1.2.5/zlib.h
+++ b/src/share/native/java/util/zip/zlib-1.2.8/zlib.h
@@ -23,9 +23,9 @@
*/
/* zlib.h -- interface of the 'zlib' general purpose compression library
- version 1.2.5, April 19th, 2010
+ version 1.2.8, April 28th, 2013
- Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
+ Copyright (C) 1995-2013 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
@@ -48,8 +48,8 @@
The data format used by the zlib library is described by RFCs (Request for
- Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt
- (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
+ Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950
+ (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format).
*/
#ifndef ZLIB_H
@@ -61,11 +61,11 @@
extern "C" {
#endif
-#define ZLIB_VERSION "1.2.5"
-#define ZLIB_VERNUM 0x1250
+#define ZLIB_VERSION "1.2.8"
+#define ZLIB_VERNUM 0x1280
#define ZLIB_VER_MAJOR 1
#define ZLIB_VER_MINOR 2
-#define ZLIB_VER_REVISION 5
+#define ZLIB_VER_REVISION 8
#define ZLIB_VER_SUBREVISION 0
/*
@@ -107,15 +107,15 @@ typedef void (*free_func) OF((voidpf opaque, voidpf address));
struct internal_state;
typedef struct z_stream_s {
- Bytef *next_in; /* next input byte */
+ z_const Bytef *next_in; /* next input byte */
uInt avail_in; /* number of bytes available at next_in */
- uLong total_in; /* total nb of input bytes read so far */
+ uLong total_in; /* total number of input bytes read so far */
Bytef *next_out; /* next output byte should be put there */
uInt avail_out; /* remaining free space at next_out */
- uLong total_out; /* total nb of bytes output so far */
+ uLong total_out; /* total number of bytes output so far */
- char *msg; /* last error message, NULL if no error */
+ z_const char *msg; /* last error message, NULL if no error */
struct internal_state FAR *state; /* not visible by applications */
alloc_func zalloc; /* used to allocate the internal state */
@@ -351,8 +351,9 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
Z_FINISH can be used immediately after deflateInit if all the compression
is to be done in a single step. In this case, avail_out must be at least the
- value returned by deflateBound (see below). If deflate does not return
- Z_STREAM_END, then it must be called again as described above.
+ value returned by deflateBound (see below). Then deflate is guaranteed to
+ return Z_STREAM_END. If not enough output space is provided, deflate will
+ not return Z_STREAM_END, and it must be called again as described above.
deflate() sets strm->adler to the adler32 checksum of all input read
so far (that is, total_in bytes).
@@ -475,23 +476,29 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
error. However if all decompression is to be performed in a single step (a
single call of inflate), the parameter flush should be set to Z_FINISH. In
this case all pending input is processed and all pending output is flushed;
- avail_out must be large enough to hold all the uncompressed data. (The size
- of the uncompressed data may have been saved by the compressor for this
- purpose.) The next operation on this stream must be inflateEnd to deallocate
- the decompression state. The use of Z_FINISH is never required, but can be
- used to inform inflate that a faster approach may be used for the single
- inflate() call.
+ avail_out must be large enough to hold all of the uncompressed data for the
+ operation to complete. (The size of the uncompressed data may have been
+ saved by the compressor for this purpose.) The use of Z_FINISH is not
+ required to perform an inflation in one step. However it may be used to
+ inform inflate that a faster approach can be used for the single inflate()
+ call. Z_FINISH also informs inflate to not maintain a sliding window if the
+ stream completes, which reduces inflate's memory footprint. If the stream
+ does not complete, either because not all of the stream is provided or not
+ enough output space is provided, then a sliding window will be allocated and
+ inflate() can be called again to continue the operation as if Z_NO_FLUSH had
+ been used.
In this implementation, inflate() always flushes as much output as
possible to the output buffer, and always uses the faster approach on the
- first call. So the only effect of the flush parameter in this implementation
- is on the return value of inflate(), as noted below, or when it returns early
- because Z_BLOCK or Z_TREES is used.
+ first call. So the effects of the flush parameter in this implementation are
+ on the return value of inflate() as noted below, when inflate() returns early
+ when Z_BLOCK or Z_TREES is used, and when inflate() avoids the allocation of
+ memory for a sliding window when Z_FINISH is used.
If a preset dictionary is needed after this call (see inflateSetDictionary
- below), inflate sets strm->adler to the adler32 checksum of the dictionary
+ below), inflate sets strm->adler to the Adler-32 checksum of the dictionary
chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
- strm->adler to the adler32 checksum of all output produced so far (that is,
+ strm->adler to the Adler-32 checksum of all output produced so far (that is,
total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
below. At the end of the stream, inflate() checks that its computed adler32
checksum is equal to that saved by the compressor and returns Z_STREAM_END
@@ -502,7 +509,9 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
initializing with inflateInit2(). Any information contained in the gzip
header is not retained, so applications that need that information should
instead use raw inflate, see inflateInit2() below, or inflateBack() and
- perform their own processing of the gzip header and trailer.
+ perform their own processing of the gzip header and trailer. When processing
+ gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output
+ producted so far. The CRC-32 is checked against the gzip trailer.
inflate() returns Z_OK if some progress has been made (more input processed
or more output produced), Z_STREAM_END if the end of the compressed data has
@@ -604,10 +613,15 @@ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
uInt dictLength));
/*
Initializes the compression dictionary from the given byte sequence
- without producing any compressed output. This function must be called
- immediately after deflateInit, deflateInit2 or deflateReset, before any call
- of deflate. The compressor and decompressor must use exactly the same
- dictionary (see inflateSetDictionary).
+ without producing any compressed output. When using the zlib format, this
+ function must be called immediately after deflateInit, deflateInit2 or
+ deflateReset, and before any call of deflate. When doing raw deflate, this
+ function must be called either before any call of deflate, or immediately
+ after the completion of a deflate block, i.e. after all input has been
+ consumed and all output has been delivered when using any of the flush
+ options Z_BLOCK, Z_PARTIAL_FLUSH, Z_SYNC_FLUSH, or Z_FULL_FLUSH. The
+ compressor and decompressor must use exactly the same dictionary (see
+ inflateSetDictionary).
The dictionary should consist of strings (byte sequences) that are likely
to be encountered later in the data to be compressed, with the most commonly
@@ -634,8 +648,8 @@ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is
inconsistent (for example if deflate has already been called for this stream
- or if the compression method is bsort). deflateSetDictionary does not
- perform any compression: this will be done by deflate().
+ or if not at a block boundary for raw deflate). deflateSetDictionary does
+ not perform any compression: this will be done by deflate().
*/
ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
@@ -712,8 +726,28 @@ ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
deflation of sourceLen bytes. It must be called after deflateInit() or
deflateInit2(), and after deflateSetHeader(), if used. This would be used
to allocate an output buffer for deflation in a single pass, and so would be
- called before deflate().
-*/
+ called before deflate(). If that first deflate() call is provided the
+ sourceLen input bytes, an output buffer allocated to the size returned by
+ deflateBound(), and the flush value Z_FINISH, then deflate() is guaranteed
+ to return Z_STREAM_END. Note that it is possible for the compressed size to
+ be larger than the value returned by deflateBound() if flush options other
+ than Z_FINISH or Z_NO_FLUSH are used.
+*/
+
+ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm,
+ unsigned *pending,
+ int *bits));
+/*
+ deflatePending() returns the number of bytes and bits of output that have
+ been generated, but not yet provided in the available output. The bytes not
+ provided would be due to the available output space having being consumed.
+ The number of bits of output not provided are between 0 and 7, where they
+ await more bits to join them in order to fill out a full byte. If pending
+ or bits are Z_NULL, then those values are not set.
+
+ deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+ */
ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
int bits,
@@ -727,8 +761,9 @@ ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
than or equal to 16, and that many of the least significant bits of value
will be inserted in the output.
- deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
- stream state was inconsistent.
+ deflatePrime returns Z_OK if success, Z_BUF_ERROR if there was not enough
+ room in the internal buffer to insert the bits, or Z_STREAM_ERROR if the
+ source stream state was inconsistent.
*/
ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
@@ -814,10 +849,11 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
if that call returned Z_NEED_DICT. The dictionary chosen by the compressor
can be determined from the adler32 value returned by that call of inflate.
The compressor and decompressor must use exactly the same dictionary (see
- deflateSetDictionary). For raw inflate, this function can be called
- immediately after inflateInit2() or inflateReset() and before any call of
- inflate() to set the dictionary. The application must insure that the
- dictionary that was used for compression is provided.
+ deflateSetDictionary). For raw inflate, this function can be called at any
+ time to set the dictionary. If the provided dictionary is smaller than the
+ window and there is already data in the window, then the provided dictionary
+ will amend what's there. The application must insure that the dictionary
+ that was used for compression is provided.
inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is
@@ -827,19 +863,38 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
inflate().
*/
+ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm,
+ Bytef *dictionary,
+ uInt *dictLength));
+/*
+ Returns the sliding dictionary being maintained by inflate. dictLength is
+ set to the number of bytes in the dictionary, and that many bytes are copied
+ to dictionary. dictionary must have enough space, where 32768 bytes is
+ always enough. If inflateGetDictionary() is called with dictionary equal to
+ Z_NULL, then only the dictionary length is returned, and nothing is copied.
+ Similary, if dictLength is Z_NULL, then it is not set.
+
+ inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the
+ stream state is inconsistent.
+*/
+
ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
/*
- Skips invalid compressed data until a full flush point (see above the
- description of deflate with Z_FULL_FLUSH) can be found, or until all
+ Skips invalid compressed data until a possible full flush point (see above
+ for the description of deflate with Z_FULL_FLUSH) can be found, or until all
available input is skipped. No output is provided.
- inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR
- if no more input was provided, Z_DATA_ERROR if no flush point has been
- found, or Z_STREAM_ERROR if the stream structure was inconsistent. In the
- success case, the application may save the current current value of total_in
- which indicates where valid compressed data was found. In the error case,
- the application may repeatedly call inflateSync, providing more input each
- time, until success or end of the input data.
+ inflateSync searches for a 00 00 FF FF pattern in the compressed data.
+ All full flush points have this pattern, but not all occurrences of this
+ pattern are full flush points.
+
+ inflateSync returns Z_OK if a possible full flush point has been found,
+ Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point
+ has been found, or Z_STREAM_ERROR if the stream structure was inconsistent.
+ In the success case, the application may save the current current value of
+ total_in which indicates where valid compressed data was found. In the
+ error case, the application may repeatedly call inflateSync, providing more
+ input each time, until success or end of the input data.
*/
ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
@@ -986,12 +1041,13 @@ ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
See inflateBack() for the usage of these routines.
inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
- the paramaters are invalid, Z_MEM_ERROR if the internal state could not be
+ the parameters are invalid, Z_MEM_ERROR if the internal state could not be
allocated, or Z_VERSION_ERROR if the version of the library does not match
the version of the header file.
*/
-typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *));
+typedef unsigned (*in_func) OF((void FAR *,
+ z_const unsigned char FAR * FAR *));
typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
@@ -999,11 +1055,12 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
out_func out, void FAR *out_desc));
/*
inflateBack() does a raw inflate with a single call using a call-back
- interface for input and output. This is more efficient than inflate() for
- file i/o applications in that it avoids copying between the output and the
- sliding window by simply making the window itself the output buffer. This
- function trusts the application to not change the output buffer passed by
- the output function, at least until inflateBack() returns.
+ interface for input and output. This is potentially more efficient than
+ inflate() for file i/o applications, in that it avoids copying between the
+ output and the sliding window by simply making the window itself the output
+ buffer. inflate() can be faster on modern CPUs when used with large
+ buffers. inflateBack() trusts the application to not change the output
+ buffer passed by the output function, at least until inflateBack() returns.
inflateBackInit() must be called first to allocate the internal state
and to initialize the state with the user-provided window buffer.
@@ -1112,6 +1169,7 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
27-31: 0 (reserved)
*/
+#ifndef Z_SOLO
/* utility functions */
@@ -1173,10 +1231,11 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
enough memory, Z_BUF_ERROR if there was not enough room in the output
- buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.
+ buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete. In
+ the case where there is not enough room, uncompress() will fill the output
+ buffer with the uncompressed data up to that point.
*/
-
/* gzip file access functions */
/*
@@ -1186,7 +1245,7 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
wrapper, documented in RFC 1952, wrapped around a deflate stream.
*/
-typedef voidp gzFile; /* opaque gzip file descriptor */
+typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */
/*
ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
@@ -1196,13 +1255,28 @@ ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman-only
compression as in "wb1h", 'R' for run-length encoding as in "wb1R", or 'F'
for fixed code compression as in "wb9F". (See the description of
- deflateInit2 for more information about the strategy parameter.) Also "a"
- can be used instead of "w" to request that the gzip stream that will be
- written be appended to the file. "+" will result in an error, since reading
- and writing to the same gzip file is not supported.
+ deflateInit2 for more information about the strategy parameter.) 'T' will
+ request transparent writing or appending with no compression and not using
+ the gzip format.
+
+ "a" can be used instead of "w" to request that the gzip stream that will
+ be written be appended to the file. "+" will result in an error, since
+ reading and writing to the same gzip file is not supported. The addition of
+ "x" when writing will create the file exclusively, which fails if the file
+ already exists. On systems that support it, the addition of "e" when
+ reading or writing will set the flag to close the file on an execve() call.
+
+ These functions, as well as gzip, will read and decode a sequence of gzip
+ streams in a file. The append function of gzopen() can be used to create
+ such a file. (Also see gzflush() for another way to do this.) When
+ appending, gzopen does not test whether the file begins with a gzip stream,
+ nor does it look for the end of the gzip streams to begin appending. gzopen
+ will simply append a gzip stream to the existing file.
gzopen can be used to read a file which is not in gzip format; in this
- case gzread will directly read from the file without decompression.
+ case gzread will directly read from the file without decompression. When
+ reading, this will be detected automatically by looking for the magic two-
+ byte gzip header.
gzopen returns NULL if the file could not be opened, if there was
insufficient memory to allocate the gzFile state, or if an invalid mode was
@@ -1221,7 +1295,11 @@ ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor
fd. If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd,
mode);. The duplicated descriptor should be saved to avoid a leak, since
- gzdopen does not close fd if it fails.
+ gzdopen does not close fd if it fails. If you are using fileno() to get the
+ file descriptor from a FILE *, then you will have to use dup() to avoid
+ double-close()ing the file descriptor. Both gzclose() and fclose() will
+ close the associated file descriptor, so they need to have different file
+ descriptors.
gzdopen returns NULL if there was insufficient memory to allocate the
gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not
@@ -1259,14 +1337,26 @@ ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
/*
Reads the given number of uncompressed bytes from the compressed file. If
- the input file was not in gzip format, gzread copies the given number of
- bytes into the buffer.
+ the input file is not in gzip format, gzread copies the given number of
+ bytes into the buffer directly from the file.
After reaching the end of a gzip stream in the input, gzread will continue
- to read, looking for another gzip stream, or failing that, reading the rest
- of the input file directly without decompression. The entire input file
- will be read if gzread is called until it returns less than the requested
- len.
+ to read, looking for another gzip stream. Any number of gzip streams may be
+ concatenated in the input file, and will all be decompressed by gzread().
+ If something other than a gzip stream is encountered after a gzip stream,
+ that remaining trailing garbage is ignored (and no error is returned).
+
+ gzread can be used to read a gzip file that is being concurrently written.
+ Upon reaching the end of the input, gzread will return with the available
+ data. If the error code returned by gzerror is Z_OK or Z_BUF_ERROR, then
+ gzclearerr can be used to clear the end of file indicator in order to permit
+ gzread to be tried again. Z_OK indicates that a gzip stream was completed
+ on the last gzread. Z_BUF_ERROR indicates that the input file ended in the
+ middle of a gzip stream. Note that gzread does not return -1 in the event
+ of an incomplete gzip stream. This error is deferred until gzclose(), which
+ will return Z_BUF_ERROR if the last gzread ended in the middle of a gzip
+ stream. Alternatively, gzerror can be used before gzclose to detect this
+ case.
gzread returns the number of uncompressed bytes actually read, less than
len for end of file, or -1 for error.
@@ -1280,7 +1370,7 @@ ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
error.
*/
-ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...));
+ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...));
/*
Converts, formats, and writes the arguments to the compressed file under
control of the format string, as in fprintf. gzprintf returns the number of
@@ -1325,7 +1415,10 @@ ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
/*
Reads one byte from the compressed file. gzgetc returns this byte or -1
- in case of end of file or error.
+ in case of end of file or error. This is implemented as a macro for speed.
+ As such, it does not do all of the checking the other functions do. I.e.
+ it does not check to see if file is NULL, nor whether the structure file
+ points to has been clobbered or not.
*/
ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
@@ -1421,9 +1514,7 @@ ZEXTERN int ZEXPORT gzeof OF((gzFile file));
ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
/*
Returns true (1) if file is being copied directly while reading, or false
- (0) if file is a gzip stream being decompressed. This state can change from
- false to true while reading the input file if the end of a gzip stream is
- reached, but is followed by data that is not another gzip stream.
+ (0) if file is a gzip stream being decompressed.
If the input file is empty, gzdirect() will return true, since the input
does not contain a gzip stream.
@@ -1432,6 +1523,13 @@ ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
cause buffers to be allocated to allow reading the file to determine if it
is a gzip file. Therefore if gzbuffer() is used, it should be called before
gzdirect().
+
+ When writing, gzdirect() returns true (1) if transparent writing was
+ requested ("wT" for the gzopen() mode), or false (0) otherwise. (Note:
+ gzdirect() is not needed when writing. Transparent writing must be
+ explicitly requested, so the application already knows the answer. When
+ linking statically, using gzdirect() will include all of the zlib code for
+ gzip file reading and decompression, which may not be desired.)
*/
ZEXTERN int ZEXPORT gzclose OF((gzFile file));
@@ -1443,7 +1541,8 @@ ZEXTERN int ZEXPORT gzclose OF((gzFile file));
must not be called more than once on the same allocation.
gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a
- file operation error, or Z_OK on success.
+ file operation error, Z_MEM_ERROR if out of memory, Z_BUF_ERROR if the
+ last read ended in the middle of a gzip stream, or Z_OK on success.
*/
ZEXTERN int ZEXPORT gzclose_r OF((gzFile file));
@@ -1481,6 +1580,7 @@ ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
file that is being written concurrently.
*/
+#endif /* !Z_SOLO */
/* checksum functions */
@@ -1516,16 +1616,17 @@ ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
Combine two Adler-32 checksums into one. For two sequences of bytes, seq1
and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of
- seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.
+ seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. Note
+ that the z_off_t type (like off_t) is a signed integer. If len2 is
+ negative, the result has no meaning or utility.
*/
ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
/*
Update a running CRC-32 with the bytes buf[0..len-1] and return the
updated CRC-32. If buf is Z_NULL, this function returns the required
- initial value for the for the crc. Pre- and post-conditioning (one's
- complement) is performed within this function so it shouldn't be done by the
- application.
+ initial value for the crc. Pre- and post-conditioning (one's complement) is
+ performed within this function so it shouldn't be done by the application.
Usage example:
@@ -1568,17 +1669,42 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
const char *version,
int stream_size));
#define deflateInit(strm, level) \
- deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream))
+ deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
#define inflateInit(strm) \
- inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream))
+ inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
- (strategy), ZLIB_VERSION, sizeof(z_stream))
+ (strategy), ZLIB_VERSION, (int)sizeof(z_stream))
#define inflateInit2(strm, windowBits) \
- inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
+ inflateInit2_((strm), (windowBits), ZLIB_VERSION, \
+ (int)sizeof(z_stream))
#define inflateBackInit(strm, windowBits, window) \
inflateBackInit_((strm), (windowBits), (window), \
- ZLIB_VERSION, sizeof(z_stream))
+ ZLIB_VERSION, (int)sizeof(z_stream))
+
+#ifndef Z_SOLO
+
+/* gzgetc() macro and its supporting function and exposed data structure. Note
+ * that the real internal state is much larger than the exposed structure.
+ * This abbreviated structure exposes just enough for the gzgetc() macro. The
+ * user should not mess with these exposed elements, since their names or
+ * behavior could change in the future, perhaps even capriciously. They can
+ * only be used by the gzgetc() macro. You have been warned.
+ */
+struct gzFile_s {
+ unsigned have;
+ unsigned char *next;
+ z_off64_t pos;
+};
+ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
+#ifdef Z_PREFIX_SET
+# undef z_gzgetc
+# define z_gzgetc(g) \
+ ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g))
+#else
+# define gzgetc(g) \
+ ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g))
+#endif
/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or
* change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if
@@ -1586,7 +1712,7 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
* functions are changed to 64 bits) -- in case these are set on systems
* without large file support, _LFS64_LARGEFILE must also be true
*/
-#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
+#ifdef Z_LARGE64
ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
@@ -1595,14 +1721,23 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
#endif
-#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0
-# define gzopen gzopen64
-# define gzseek gzseek64
-# define gztell gztell64
-# define gzoffset gzoffset64
-# define adler32_combine adler32_combine64
-# define crc32_combine crc32_combine64
-# ifdef _LARGEFILE64_SOURCE
+#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64)
+# ifdef Z_PREFIX_SET
+# define z_gzopen z_gzopen64
+# define z_gzseek z_gzseek64
+# define z_gztell z_gztell64
+# define z_gzoffset z_gzoffset64
+# define z_adler32_combine z_adler32_combine64
+# define z_crc32_combine z_crc32_combine64
+# else
+# define gzopen gzopen64
+# define gzseek gzseek64
+# define gztell gztell64
+# define gzoffset gzoffset64
+# define adler32_combine adler32_combine64
+# define crc32_combine crc32_combine64
+# endif
+# ifndef Z_LARGE64
ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));
ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile));
@@ -1619,6 +1754,13 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
#endif
+#else /* Z_SOLO */
+
+ ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
+ ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
+
+#endif /* !Z_SOLO */
+
/* hack for buggy compilers */
#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
struct internal_state {int dummy;};
@@ -1627,8 +1769,21 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
/* undocumented functions */
ZEXTERN const char * ZEXPORT zError OF((int));
ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp));
-ZEXTERN const unsigned long FAR * ZEXPORT get_crc_table OF((void));
+ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void));
ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int));
+ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp));
+ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp));
+#if defined(_WIN32) && !defined(Z_SOLO)
+ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path,
+ const char *mode));
+#endif
+#if defined(STDC) || defined(Z_HAVE_STDARG_H)
+# ifndef Z_SOLO
+ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file,
+ const char *format,
+ va_list va));
+# endif
+#endif
#ifdef __cplusplus
}
diff --git a/src/share/native/java/util/zip/zlib-1.2.5/zutil.c b/src/share/native/java/util/zip/zlib-1.2.8/zutil.c
index 041aa9731..e54347610 100644
--- a/src/share/native/java/util/zip/zlib-1.2.5/zutil.c
+++ b/src/share/native/java/util/zip/zlib-1.2.8/zutil.c
@@ -23,19 +23,22 @@
*/
/* zutil.c -- target dependent utility functions for the compression library
- * Copyright (C) 1995-2005, 2010 Jean-loup Gailly.
+ * Copyright (C) 1995-2005, 2010, 2011, 2012 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
/* @(#) $Id$ */
#include "zutil.h"
+#ifndef Z_SOLO
+# include "gzguts.h"
+#endif
#ifndef NO_DUMMY_DECL
struct internal_state {int dummy;}; /* for buggy compilers */
#endif
-const char * const z_errmsg[10] = {
+z_const char * const z_errmsg[10] = {
"need dictionary", /* Z_NEED_DICT 2 */
"stream end", /* Z_STREAM_END 1 */
"", /* Z_OK 0 */
@@ -109,27 +112,27 @@ uLong ZEXPORT zlibCompileFlags()
#ifdef FASTEST
flags += 1L << 21;
#endif
-#ifdef STDC
+#if defined(STDC) || defined(Z_HAVE_STDARG_H)
# ifdef NO_vsnprintf
- flags += 1L << 25;
+ flags += 1L << 25;
# ifdef HAS_vsprintf_void
- flags += 1L << 26;
+ flags += 1L << 26;
# endif
# else
# ifdef HAS_vsnprintf_void
- flags += 1L << 26;
+ flags += 1L << 26;
# endif
# endif
#else
- flags += 1L << 24;
+ flags += 1L << 24;
# ifdef NO_snprintf
- flags += 1L << 25;
+ flags += 1L << 25;
# ifdef HAS_sprintf_void
- flags += 1L << 26;
+ flags += 1L << 26;
# endif
# else
# ifdef HAS_snprintf_void
- flags += 1L << 26;
+ flags += 1L << 26;
# endif
# endif
#endif
@@ -205,6 +208,7 @@ void ZLIB_INTERNAL zmemzero(dest, len)
}
#endif
+#ifndef Z_SOLO
#ifdef SYS16BIT
@@ -340,3 +344,5 @@ void ZLIB_INTERNAL zcfree (opaque, ptr)
}
#endif /* MY_ZCALLOC */
+
+#endif /* !Z_SOLO */
diff --git a/src/share/native/java/util/zip/zlib-1.2.5/zutil.h b/src/share/native/java/util/zip/zlib-1.2.8/zutil.h
index 1c4e8d38f..b82b14d4a 100644
--- a/src/share/native/java/util/zip/zlib-1.2.5/zutil.h
+++ b/src/share/native/java/util/zip/zlib-1.2.8/zutil.h
@@ -23,7 +23,7 @@
*/
/* zutil.h -- internal interface and configuration of the compression library
- * Copyright (C) 1995-2010 Jean-loup Gailly.
+ * Copyright (C) 1995-2013 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -37,7 +37,7 @@
#ifndef ZUTIL_H
#define ZUTIL_H
-#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33) && !defined(NO_VIZ)
+#ifdef HAVE_HIDDEN
# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
#else
# define ZLIB_INTERNAL
@@ -45,7 +45,7 @@
#include "zlib.h"
-#ifdef STDC
+#if defined(STDC) && !defined(Z_SOLO)
# if !(defined(_WIN32_WCE) && defined(_MSC_VER))
# include <stddef.h>
# endif
@@ -53,6 +53,10 @@
# include <stdlib.h>
#endif
+#ifdef Z_SOLO
+ typedef long ptrdiff_t; /* guess -- will be caught if guess is wrong */
+#endif
+
#ifndef local
# define local static
#endif
@@ -64,13 +68,13 @@ typedef unsigned short ush;
typedef ush FAR ushf;
typedef unsigned long ulg;
-extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
+extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
/* (size given to avoid silly warnings with Visual C++) */
#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
#define ERR_RETURN(strm,err) \
- return (strm->msg = (char*)ERR_MSG(err), (err))
+ return (strm->msg = ERR_MSG(err), (err))
/* To be used only when the state is known to be valid */
/* common constants */
@@ -102,16 +106,18 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32))
# define OS_CODE 0x00
-# if defined(__TURBOC__) || defined(__BORLANDC__)
-# if (__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
- /* Allow compilation with ANSI keywords only enabled */
- void _Cdecl farfree( void *block );
- void *_Cdecl farmalloc( unsigned long nbytes );
-# else
-# include <alloc.h>
+# ifndef Z_SOLO
+# if defined(__TURBOC__) || defined(__BORLANDC__)
+# if (__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
+ /* Allow compilation with ANSI keywords only enabled */
+ void _Cdecl farfree( void *block );
+ void *_Cdecl farmalloc( unsigned long nbytes );
+# else
+# include <alloc.h>
+# endif
+# else /* MSC or DJGPP */
+# include <malloc.h>
# endif
-# else /* MSC or DJGPP */
-# include <malloc.h>
# endif
#endif
@@ -131,18 +137,20 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
#ifdef OS2
# define OS_CODE 0x06
-# ifdef M_I86
+# if defined(M_I86) && !defined(Z_SOLO)
# include <malloc.h>
# endif
#endif
#if defined(MACOS) || defined(TARGET_OS_MAC)
# define OS_CODE 0x07
-# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
-# include <unix.h> /* for fdopen */
-# else
-# ifndef fdopen
-# define fdopen(fd,mode) NULL /* No fdopen() */
+# ifndef Z_SOLO
+# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
+# include <unix.h> /* for fdopen */
+# else
+# ifndef fdopen
+# define fdopen(fd,mode) NULL /* No fdopen() */
+# endif
# endif
# endif
#endif
@@ -177,14 +185,15 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# endif
#endif
-#if defined(__BORLANDC__)
+#if defined(__BORLANDC__) && !defined(MSDOS)
#pragma warn -8004
#pragma warn -8008
#pragma warn -8066
#endif
/* provide prototypes for these when building zlib without LFS */
-#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0
+#if !defined(_WIN32) && \
+ (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
#endif
@@ -201,42 +210,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
/* functions */
-#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550)
-# ifndef HAVE_VSNPRINTF
-# define HAVE_VSNPRINTF
-# endif
-#endif
-#if defined(__CYGWIN__)
-# ifndef HAVE_VSNPRINTF
-# define HAVE_VSNPRINTF
-# endif
-#endif
-#ifndef HAVE_VSNPRINTF
-# ifdef MSDOS
- /* vsnprintf may exist on some MS-DOS compilers (DJGPP?),
- but for now we just assume it doesn't. */
-# define NO_vsnprintf
-# endif
-# ifdef __TURBOC__
-# define NO_vsnprintf
-# endif
-# ifdef WIN32
- /* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */
-# if !defined(vsnprintf) && !defined(NO_vsnprintf)
-# if !defined(_MSC_VER) || ( defined(_MSC_VER) && _MSC_VER < 1500 )
-# define vsnprintf _vsnprintf
-# endif
-# endif
-# endif
-# ifdef __SASC
-# define NO_vsnprintf
-# endif
-#endif
-#ifdef VMS
-# define NO_vsnprintf
-#endif
-
-#if defined(pyr)
+#if defined(pyr) || defined(Z_SOLO)
# define NO_MEMCPY
#endif
#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__)
@@ -285,14 +259,19 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# define Tracecv(c,x)
#endif
-
-voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items,
- unsigned size));
-void ZLIB_INTERNAL zcfree OF((voidpf opaque, voidpf ptr));
+#ifndef Z_SOLO
+ voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items,
+ unsigned size));
+ void ZLIB_INTERNAL zcfree OF((voidpf opaque, voidpf ptr));
+#endif
#define ZALLOC(strm, items, size) \
(*((strm)->zalloc))((strm)->opaque, (items), (size))
#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
+/* Reverse the bytes in a 32-bit value */
+#define ZSWAP32(q) ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \
+ (((q) & 0xff00) << 8) + (((q) & 0xff) << 24))
+
#endif /* ZUTIL_H */
diff --git a/src/share/native/sun/awt/giflib/dgif_lib.c b/src/share/native/sun/awt/giflib/dgif_lib.c
index 1a9e2cce1..d6d2a3ce4 100644
--- a/src/share/native/sun/awt/giflib/dgif_lib.c
+++ b/src/share/native/sun/awt/giflib/dgif_lib.c
@@ -195,6 +195,11 @@ DGifOpen(void *userData,
GifFileType *GifFile;
GifFilePrivateType *Private;
+ if (!readFunc) {
+ _GifError = D_GIF_ERR_READ_FAILED;
+ return NULL;
+ }
+
GifFile = (GifFileType *)malloc(sizeof(GifFileType));
if (GifFile == NULL) {
_GifError = D_GIF_ERR_NOT_ENOUGH_MEM;
diff --git a/src/share/native/sun/java2d/opengl/OGLBlitLoops.c b/src/share/native/sun/java2d/opengl/OGLBlitLoops.c
index 828298672..fa9a2fe34 100644
--- a/src/share/native/sun/java2d/opengl/OGLBlitLoops.c
+++ b/src/share/native/sun/java2d/opengl/OGLBlitLoops.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,10 @@
#include "OGLSurfaceData.h"
#include "GraphicsPrimitiveMgr.h"
+#include <stdlib.h> // malloc
+#include <string.h> // memcpy
+#include "IntArgbPre.h"
+
extern OGLPixelFormat PixelFormats[];
/**
@@ -335,6 +339,9 @@ OGLBlitToSurfaceViaTexture(OGLContext *oglc, SurfaceDataRasInfo *srcInfo,
0, 0, sw, sh,
pf->format, pf->type,
srcInfo->rasBase);
+
+ j2d_glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
+ j2d_glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
}
// the texture image is "right side up", so we align the
@@ -697,6 +704,50 @@ OGLBlitLoops_Blit(JNIEnv *env,
}
/**
+ * This method makes vertical flip of the provided area of Surface and convert
+ * pixel's data from argbPre to argb format if requested.
+ */
+void flip(void *pDst, juint w, juint h, jint scanStride, jboolean convert) {
+ const size_t clippedStride = 4 * w;
+ void *tempRow = (h > 1 && !convert) ? malloc(clippedStride) : NULL;
+ juint i = 0;
+ juint step = 0;
+ // vertical flip and convert argbpre to argb if necessary
+ for (; i < h / 2; ++i) {
+ juint *r1 = PtrAddBytes(pDst, (i * scanStride));
+ juint *r2 = PtrAddBytes(pDst, (h - i - 1) * scanStride);
+ if (tempRow) {
+ // fast path
+ memcpy(tempRow, r1, clippedStride);
+ memcpy(r1, r2, clippedStride);
+ memcpy(r2, tempRow, clippedStride);
+ } else {
+ // slow path
+ for (step = 0; step < w; ++step) {
+ juint tmp = r1[step];
+ if (convert) {
+ LoadIntArgbPreTo1IntArgb(r2, 0, step, r1[step]);
+ LoadIntArgbPreTo1IntArgb(&tmp, 0, 0, r2[step]);
+ } else {
+ r1[step] = r2[step];
+ r2[step] = tmp;
+ }
+ }
+ }
+ }
+ // convert the middle line if necessary
+ if (convert && h % 2) {
+ juint *r1 = PtrAddBytes(pDst, (i * scanStride));
+ for (step = 0; step < w; ++step) {
+ LoadIntArgbPreTo1IntArgb(r1, 0, step, r1[step]);
+ }
+ }
+ if (tempRow) {
+ free(tempRow);
+ }
+}
+
+/**
* Specialized blit method for copying a native OpenGL "Surface" (pbuffer,
* window, etc.) to a system memory ("Sw") surface.
*/
@@ -758,7 +809,9 @@ OGLBlitLoops_SurfaceToSwBlit(JNIEnv *env, OGLContext *oglc,
width = srcInfo.bounds.x2 - srcInfo.bounds.x1;
height = srcInfo.bounds.y2 - srcInfo.bounds.y1;
- j2d_glPixelStorei(GL_PACK_SKIP_PIXELS, dstx);
+ pDst = PtrAddBytes(pDst, dstx * dstInfo.pixelStride);
+ pDst = PtrAddBytes(pDst, dsty * dstInfo.scanStride);
+
j2d_glPixelStorei(GL_PACK_ROW_LENGTH,
dstInfo.scanStride / dstInfo.pixelStride);
j2d_glPixelStorei(GL_PACK_ALIGNMENT, pf.alignment);
@@ -779,27 +832,20 @@ OGLBlitLoops_SurfaceToSwBlit(JNIEnv *env, OGLContext *oglc,
// this accounts for lower-left origin of the source region
srcx = srcOps->xOffset + srcx;
- srcy = srcOps->yOffset + srcOps->height - (srcy + 1);
-
- // we must read one scanline at a time because there is no way
- // to read starting at the top-left corner of the source region
- while (height > 0) {
- j2d_glPixelStorei(GL_PACK_SKIP_ROWS, dsty);
- j2d_glReadPixels(srcx, srcy, width, 1,
- pf.format, pf.type, pDst);
- srcy--;
- dsty++;
- height--;
- }
-
+ srcy = srcOps->yOffset + srcOps->height - srcy - height;
+
+ // Note that glReadPixels() is extremely slow!
+ // So we call it only once and flip the image using memcpy.
+ j2d_glReadPixels(srcx, srcy, width, height,
+ pf.format, pf.type, pDst);
+ // It was checked above that width and height are positive.
+ flip(pDst, (juint) width, (juint) height, dstInfo.scanStride,
+ !pf.isPremult && !srcOps->isOpaque);
#ifdef MACOSX
if (srcOps->isOpaque) {
j2d_glPixelTransferf(GL_ALPHA_BIAS, 0.0);
}
#endif
-
- j2d_glPixelStorei(GL_PACK_SKIP_PIXELS, 0);
- j2d_glPixelStorei(GL_PACK_SKIP_ROWS, 0);
j2d_glPixelStorei(GL_PACK_ROW_LENGTH, 0);
j2d_glPixelStorei(GL_PACK_ALIGNMENT, 4);
}
diff --git a/src/share/native/sun/security/smartcardio/pcsc.c b/src/share/native/sun/security/smartcardio/pcsc.c
index 29f0c64e1..b83723476 100644
--- a/src/share/native/sun/security/smartcardio/pcsc.c
+++ b/src/share/native/sun/security/smartcardio/pcsc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -64,17 +64,32 @@
#define J2PCSC_EXCEPTION_NAME "sun/security/smartcardio/PCSCException"
+void throwOutOfMemoryError(JNIEnv *env, const char *msg) {
+ jclass cls = (*env)->FindClass(env, "java/lang/OutOfMemoryError");
+
+ if (cls != NULL) /* Otherwise an exception has already been thrown */
+ (*env)->ThrowNew(env, cls, msg);
+
+}
+
void throwPCSCException(JNIEnv* env, LONG code) {
jclass pcscClass;
jmethodID constructor;
jthrowable pcscException;
pcscClass = (*env)->FindClass(env, J2PCSC_EXCEPTION_NAME);
- assert(pcscClass != NULL);
+ if (pcscClass == NULL) {
+ return;
+ }
constructor = (*env)->GetMethodID(env, pcscClass, "<init>", "(I)V");
- assert(constructor != NULL);
- pcscException = (jthrowable) (*env)->NewObject(env, pcscClass, constructor, (jint)code);
- (*env)->Throw(env, pcscException);
+ if (constructor == NULL) {
+ return;
+ }
+ pcscException = (jthrowable) (*env)->NewObject(env, pcscClass,
+ constructor, (jint)code);
+ if (pcscException != NULL) {
+ (*env)->Throw(env, pcscException);
+ }
}
jboolean handleRV(JNIEnv* env, LONG code) {
@@ -93,7 +108,7 @@ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) {
JNIEXPORT jlong JNICALL Java_sun_security_smartcardio_PCSC_SCardEstablishContext
(JNIEnv *env, jclass thisClass, jint dwScope)
{
- SCARDCONTEXT context;
+ SCARDCONTEXT context = 0;
LONG rv;
dprintf("-establishContext\n");
rv = CALL_SCardEstablishContext(dwScope, NULL, NULL, &context);
@@ -110,7 +125,7 @@ JNIEXPORT jlong JNICALL Java_sun_security_smartcardio_PCSC_SCardEstablishContext
jobjectArray pcsc_multi2jstring(JNIEnv *env, char *spec) {
jobjectArray result;
jclass stringClass;
- char *cp, **tab;
+ char *cp, **tab = NULL;
jstring js;
int cnt = 0;
@@ -121,6 +136,10 @@ jobjectArray pcsc_multi2jstring(JNIEnv *env, char *spec) {
}
tab = (char **)malloc(cnt * sizeof(char *));
+ if (tab == NULL) {
+ throwOutOfMemoryError(env, NULL);
+ return NULL;
+ }
cnt = 0;
cp = spec;
@@ -130,12 +149,26 @@ jobjectArray pcsc_multi2jstring(JNIEnv *env, char *spec) {
}
stringClass = (*env)->FindClass(env, "java/lang/String");
- assert(stringClass != NULL);
+ if (stringClass == NULL) {
+ free(tab);
+ return NULL;
+ }
result = (*env)->NewObjectArray(env, cnt, stringClass, NULL);
- while (cnt-- > 0) {
- js = (*env)->NewStringUTF(env, tab[cnt]);
- (*env)->SetObjectArrayElement(env, result, cnt, js);
+ if (result != NULL) {
+ while (cnt-- > 0) {
+ js = (*env)->NewStringUTF(env, tab[cnt]);
+ if ((*env)->ExceptionCheck(env)) {
+ free(tab);
+ return NULL;
+ }
+ (*env)->SetObjectArrayElement(env, result, cnt, js);
+ if ((*env)->ExceptionCheck(env)) {
+ free(tab);
+ return NULL;
+ }
+ (*env)->DeleteLocalRef(env, js);
+ }
}
free(tab);
return result;
@@ -146,8 +179,8 @@ JNIEXPORT jobjectArray JNICALL Java_sun_security_smartcardio_PCSC_SCardListReade
{
SCARDCONTEXT context = (SCARDCONTEXT)jContext;
LONG rv;
- LPTSTR mszReaders;
- DWORD size;
+ LPTSTR mszReaders = NULL;
+ DWORD size = 0;
jobjectArray result;
dprintf1("-context: %x\n", context);
@@ -157,13 +190,20 @@ JNIEXPORT jobjectArray JNICALL Java_sun_security_smartcardio_PCSC_SCardListReade
}
dprintf1("-size: %d\n", size);
- mszReaders = malloc(size);
- rv = CALL_SCardListReaders(context, NULL, mszReaders, &size);
- if (handleRV(env, rv)) {
- free(mszReaders);
- return NULL;
+ if (size) {
+ mszReaders = malloc(size);
+ if (mszReaders == NULL) {
+ throwOutOfMemoryError(env, NULL);
+ return NULL;
+ }
+
+ rv = CALL_SCardListReaders(context, NULL, mszReaders, &size);
+ if (handleRV(env, rv)) {
+ free(mszReaders);
+ return NULL;
+ }
+ dprintf1("-String: %s\n", mszReaders);
}
- dprintf1("-String: %s\n", mszReaders);
result = pcsc_multi2jstring(env, mszReaders);
free(mszReaders);
@@ -177,10 +217,13 @@ JNIEXPORT jlong JNICALL Java_sun_security_smartcardio_PCSC_SCardConnect
SCARDCONTEXT context = (SCARDCONTEXT)jContext;
LONG rv;
LPCTSTR readerName;
- SCARDHANDLE card;
- DWORD proto;
+ SCARDHANDLE card = 0;
+ DWORD proto = 0;
readerName = (*env)->GetStringUTFChars(env, jReaderName, NULL);
+ if (readerName == NULL) {
+ return 0;
+ }
rv = CALL_SCardConnect(context, readerName, jShareMode, jPreferredProtocols, &card, &proto);
(*env)->ReleaseStringUTFChars(env, jReaderName, readerName);
dprintf1("-cardhandle: %x\n", card);
@@ -210,6 +253,9 @@ JNIEXPORT jbyteArray JNICALL Java_sun_security_smartcardio_PCSC_SCardTransmit
sendPci.cbPciLength = sizeof(SCARD_IO_REQUEST);
sbuf = (unsigned char *) ((*env)->GetByteArrayElements(env, jBuf, NULL));
+ if (sbuf == NULL) {
+ return NULL;
+ }
rv = CALL_SCardTransmit(card, &sendPci, sbuf + ofs, len, NULL, rbuf, &rlen);
(*env)->ReleaseByteArrayElements(env, jBuf, (jbyte *)sbuf, JNI_ABORT);
@@ -218,7 +264,12 @@ JNIEXPORT jbyteArray JNICALL Java_sun_security_smartcardio_PCSC_SCardTransmit
}
jOut = (*env)->NewByteArray(env, rlen);
- (*env)->SetByteArrayRegion(env, jOut, 0, rlen, (jbyte *)rbuf);
+ if (jOut != NULL) {
+ (*env)->SetByteArrayRegion(env, jOut, 0, rlen, (jbyte *)rbuf);
+ if ((*env)->ExceptionCheck(env)) {
+ return NULL;
+ }
+ }
return jOut;
}
@@ -231,10 +282,10 @@ JNIEXPORT jbyteArray JNICALL Java_sun_security_smartcardio_PCSC_SCardStatus
DWORD readerLen = READERNAME_BUFFER_SIZE;
unsigned char atr[ATR_BUFFER_SIZE];
DWORD atrLen = ATR_BUFFER_SIZE;
- DWORD state;
- DWORD protocol;
+ DWORD state = 0;
+ DWORD protocol = 0;
jbyteArray jArray;
- jbyte tmp;
+ jbyte status[2];
rv = CALL_SCardStatus(card, readerName, &readerLen, &state, &protocol, atr, &atrLen);
if (handleRV(env, rv)) {
@@ -245,13 +296,19 @@ JNIEXPORT jbyteArray JNICALL Java_sun_security_smartcardio_PCSC_SCardStatus
dprintf1("-protocol: %d\n", protocol);
jArray = (*env)->NewByteArray(env, atrLen);
+ if (jArray == NULL) {
+ return NULL;
+ }
(*env)->SetByteArrayRegion(env, jArray, 0, atrLen, (jbyte *)atr);
-
- tmp = (jbyte)state;
- (*env)->SetByteArrayRegion(env, jStatus, 0, 1, &tmp);
- tmp = (jbyte)protocol;
- (*env)->SetByteArrayRegion(env, jStatus, 1, 1, &tmp);
-
+ if ((*env)->ExceptionCheck(env)) {
+ return NULL;
+ }
+ status[0] = (jbyte) state;
+ status[1] = (jbyte) protocol;
+ (*env)->SetByteArrayRegion(env, jStatus, 0, 2, status);
+ if ((*env)->ExceptionCheck(env)) {
+ return NULL;
+ }
return jArray;
}
@@ -274,36 +331,78 @@ JNIEXPORT jintArray JNICALL Java_sun_security_smartcardio_PCSC_SCardGetStatusCha
SCARDCONTEXT context = (SCARDCONTEXT)jContext;
LONG rv;
int readers = (*env)->GetArrayLength(env, jReaderNames);
- SCARD_READERSTATE *readerState = malloc(readers * sizeof(SCARD_READERSTATE));
+ SCARD_READERSTATE *readerState;
int i;
- jintArray jEventState;
- int *currentState = (*env)->GetIntArrayElements(env, jCurrentState, NULL);
+ jintArray jEventState = NULL;
+ int *currentState = NULL;
+ const char *readerName;
+
+ readerState = calloc(readers, sizeof(SCARD_READERSTATE));
+ if (readerState == NULL && readers > 0) {
+ throwOutOfMemoryError(env, NULL);
+ return NULL;
+ }
+
+ currentState = (*env)->GetIntArrayElements(env, jCurrentState, NULL);
+ if (currentState == NULL) {
+ free(readerState);
+ return NULL;
+ }
+
+ for (i = 0; i < readers; i++) {
+ readerState[i].szReader = NULL;
+ }
for (i = 0; i < readers; i++) {
jobject jReaderName = (*env)->GetObjectArrayElement(env, jReaderNames, i);
- readerState[i].szReader = (*env)->GetStringUTFChars(env, jReaderName, NULL);
+ if ((*env)->ExceptionCheck(env)) {
+ goto cleanup;
+ }
+ readerName = (*env)->GetStringUTFChars(env, jReaderName, NULL);
+ if (readerName == NULL) {
+ goto cleanup;
+ }
+ readerState[i].szReader = strdup(readerName);
+ (*env)->ReleaseStringUTFChars(env, jReaderName, readerName);
+ if (readerState[i].szReader == NULL) {
+ throwOutOfMemoryError(env, NULL);
+ goto cleanup;
+ }
readerState[i].pvUserData = NULL;
readerState[i].dwCurrentState = currentState[i];
readerState[i].dwEventState = SCARD_STATE_UNAWARE;
readerState[i].cbAtr = 0;
+ (*env)->DeleteLocalRef(env, jReaderName);
}
- (*env)->ReleaseIntArrayElements(env, jCurrentState, currentState, JNI_ABORT);
- rv = CALL_SCardGetStatusChange(context, (DWORD)jTimeout, readerState, readers);
+ if (readers > 0) {
+ rv = CALL_SCardGetStatusChange(context, (DWORD)jTimeout, readerState, readers);
+ if (handleRV(env, rv)) {
+ goto cleanup;
+ }
+ }
jEventState = (*env)->NewIntArray(env, readers);
+ if (jEventState == NULL) {
+ goto cleanup;
+ }
for (i = 0; i < readers; i++) {
jint eventStateTmp;
- jobject jReaderName = (*env)->GetObjectArrayElement(env, jReaderNames, i);
dprintf3("-reader status %s: 0x%X, 0x%X\n", readerState[i].szReader,
readerState[i].dwCurrentState, readerState[i].dwEventState);
- (*env)->ReleaseStringUTFChars(env, jReaderName, readerState[i].szReader);
eventStateTmp = (jint)readerState[i].dwEventState;
(*env)->SetIntArrayRegion(env, jEventState, i, 1, &eventStateTmp);
+ if ((*env)->ExceptionCheck(env)) {
+ jEventState = NULL;
+ goto cleanup;
+ }
+ }
+cleanup:
+ (*env)->ReleaseIntArrayElements(env, jCurrentState, currentState, JNI_ABORT);
+ for (i = 0; i < readers; i++) {
+ free((char *)readerState[i].szReader);
}
free(readerState);
-
- handleRV(env, rv);
return jEventState;
}
@@ -336,13 +435,18 @@ JNIEXPORT jbyteArray JNICALL Java_sun_security_smartcardio_PCSC_SCardControl
{
SCARDHANDLE card = (SCARDHANDLE)jCard;
LONG rv;
- jbyte* sendBuffer = (*env)->GetByteArrayElements(env, jSendBuffer, NULL);
+ jbyte* sendBuffer;
jint sendBufferLength = (*env)->GetArrayLength(env, jSendBuffer);
jbyte receiveBuffer[MAX_STACK_BUFFER_SIZE];
jint receiveBufferLength = MAX_STACK_BUFFER_SIZE;
ULONG returnedLength = 0;
jbyteArray jReceiveBuffer;
+ sendBuffer = (*env)->GetByteArrayElements(env, jSendBuffer, NULL);
+ if (sendBuffer == NULL) {
+ return NULL;
+ }
+
#ifdef J2PCSC_DEBUG
{
int k;
@@ -375,7 +479,12 @@ JNIEXPORT jbyteArray JNICALL Java_sun_security_smartcardio_PCSC_SCardControl
#endif
jReceiveBuffer = (*env)->NewByteArray(env, returnedLength);
+ if (jReceiveBuffer == NULL) {
+ return NULL;
+ }
(*env)->SetByteArrayRegion(env, jReceiveBuffer, 0, returnedLength, receiveBuffer);
-
+ if ((*env)->ExceptionCheck(env)) {
+ return NULL;
+ }
return jReceiveBuffer;
}
diff --git a/src/solaris/classes/sun/awt/X11/XErrorHandlerUtil.java b/src/solaris/classes/sun/awt/X11/XErrorHandlerUtil.java
index 4bdf0ecb0..037b7329e 100644
--- a/src/solaris/classes/sun/awt/X11/XErrorHandlerUtil.java
+++ b/src/solaris/classes/sun/awt/X11/XErrorHandlerUtil.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -97,6 +97,7 @@ public final class XErrorHandlerUtil {
* @param handler the synthetic error handler to set
*/
public static void WITH_XERROR_HANDLER(XErrorHandler handler) {
+ XSync();
saved_error = null;
current_error_handler = handler;
}
@@ -105,15 +106,9 @@ public final class XErrorHandlerUtil {
* Unsets a current synthetic error handler. Must be called with the acquired AWT lock.
*/
public static void RESTORE_XERROR_HANDLER() {
- RESTORE_XERROR_HANDLER(true);
- }
-
- private static void RESTORE_XERROR_HANDLER(boolean doXSync) {
- if (doXSync) {
- // Wait until all requests are processed by the X server
- // and only then uninstall the error handler.
- XSync();
- }
+ // Wait until all requests are processed by the X server
+ // and only then uninstall the error handler.
+ XSync();
current_error_handler = null;
}
diff --git a/src/solaris/classes/sun/awt/X11/XFramePeer.java b/src/solaris/classes/sun/awt/X11/XFramePeer.java
index 224d9e3a8..b8fbcb340 100644
--- a/src/solaris/classes/sun/awt/X11/XFramePeer.java
+++ b/src/solaris/classes/sun/awt/X11/XFramePeer.java
@@ -284,6 +284,11 @@ class XFramePeer extends XDecoratedPeer implements FramePeer {
if (stateLog.isLoggable(PlatformLogger.Level.FINER)) {
stateLog.finer("DeIconifying " + this);
}
+
+ XNETProtocol net_protocol = XWM.getWM().getNETProtocol();
+ if (net_protocol != null) {
+ net_protocol.setActiveWindow(this);
+ }
xSetVisible(true);
}
}
diff --git a/src/solaris/classes/sun/awt/X11/XNETProtocol.java b/src/solaris/classes/sun/awt/X11/XNETProtocol.java
index dfd372eda..5bab58eeb 100644
--- a/src/solaris/classes/sun/awt/X11/XNETProtocol.java
+++ b/src/solaris/classes/sun/awt/X11/XNETProtocol.java
@@ -213,7 +213,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt
* If window is showing then it uses ClientMessage, otherwise adjusts NET_WM_STATE list
* @param window Window which NET_WM_STATE property is being modified
* @param state State atom to be set/reset
- * @param reset Indicates operation, 'set' if false, 'reset' if true
+ * @param set Indicates operation, 'set' if false, 'reset' if true
*/
private void setStateHelper(XWindowPeer window, XAtom state, boolean set) {
if (log.isLoggable(PlatformLogger.Level.FINER)) {
@@ -249,6 +249,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt
XAtom XA_UTF8_STRING = XAtom.get("UTF8_STRING"); /* like STRING but encoding is UTF-8 */
XAtom XA_NET_SUPPORTING_WM_CHECK = XAtom.get("_NET_SUPPORTING_WM_CHECK");
XAtom XA_NET_SUPPORTED = XAtom.get("_NET_SUPPORTED"); /* list of protocols (property of root) */
+ XAtom XA_NET_ACTIVE_WINDOW = XAtom.get("_NET_ACTIVE_WINDOW");
XAtom XA_NET_WM_NAME = XAtom.get("_NET_WM_NAME"); /* window property */
XAtom XA_NET_WM_STATE = XAtom.get("_NET_WM_STATE");/* both window property and request */
@@ -325,6 +326,32 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt
return res;
}
+ public void setActiveWindow(XWindow window) {
+ if (!active() || !checkProtocol(XA_NET_SUPPORTED, XA_NET_ACTIVE_WINDOW)) {
+ return;
+ }
+
+ XClientMessageEvent msg = new XClientMessageEvent();
+ msg.zero();
+ msg.set_type(XConstants.ClientMessage);
+ msg.set_message_type(XA_NET_ACTIVE_WINDOW.getAtom());
+ msg.set_display(XToolkit.getDisplay());
+ msg.set_window(window.getWindow());
+ msg.set_format(32);
+ msg.set_data(0, 1);
+ msg.set_data(1, XToolkit.getCurrentServerTime());
+ msg.set_data(2, 0);
+
+ XToolkit.awtLock();
+ try {
+ XlibWrapper.XSendEvent(XToolkit.getDisplay(), XToolkit.getDefaultRootWindow(), false,
+ XConstants.SubstructureRedirectMask | XConstants.SubstructureNotifyMask, msg.getPData());
+ } finally {
+ XToolkit.awtUnlock();
+ msg.dispose();
+ }
+ }
+
boolean isWMName(String name) {
if (!active()) {
return false;
diff --git a/src/solaris/doc/sun/man/man1/java.1 b/src/solaris/doc/sun/man/man1/java.1
index f32570f38..bc8f1f105 100644
--- a/src/solaris/doc/sun/man/man1/java.1
+++ b/src/solaris/doc/sun/man/man1/java.1
@@ -1,2001 +1,3461 @@
'\" t
-.\" Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
-.\"
-.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-.\"
-.\" This code is free software; you can redistribute it and/or modify it
-.\" under the terms of the GNU General Public License version 2 only, as
-.\" published by the Free Software Foundation.
-.\"
-.\" 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.
-.\"
-.\" Arch: generic
-.\" Software: JDK 8
-.\" Date: 21 November 2013
-.\" SectDesc: Basic Tools
-.\" Title: java.1
+.\" Copyright (c) 1994, 2014, Oracle and/or its affiliates. All rights reserved.
+.\"
+.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+.\"
+.\" This code is free software; you can redistribute it and/or modify it
+.\" under the terms of the GNU General Public License version 2 only, as
+.\" published by the Free Software Foundation.
+.\"
+.\" 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.
+.\"
+.\" Title: java
+.\" Language: English
+.\" Date: 08 August 2014
+.\" SectDesc: Basic Tools
+.\" Software: JDK 8
+.\" Arch: generic
+.\" Part Number: E38207-03
.\"
.if n .pl 99999
-.TH java 1 "21 November 2013" "JDK 8" "Basic Tools"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-
-.SH NAME
+.TH "java" "1" "08 August 2014" "JDK 8" "Basic Tools"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
java \- Launches a Java application\&.
-.SH SYNOPSIS
-.sp
-.nf
-
+.SH "SYNOPSIS"
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
\fBjava\fR [\fIoptions\fR] \fIclassname\fR [\fIargs\fR]
-.fi
-.nf
-
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
\fBjava\fR [\fIoptions\fR] \fB\-jar\fR \fIfilename\fR [\fIargs\fR]
-.fi
-.sp
-.TP
+.fi
+.if n \{\
+.RE
+.\}
+.PP
\fIoptions\fR
-Command-line options separated by spaces\&. See Options\&.
-.TP
+.RS 4
+Command\-line options separated by spaces\&. See Options\&.
+.RE
+.PP
\fIclassname\fR
+.RS 4
The name of the class to be launched\&.
-.TP
+.RE
+.PP
\fIfilename\fR
-The name of the Java Archive (JAR) file to be called\&. Used only with the \f3-jar\fR option\&.
-.TP
+.RS 4
+The name of the Java Archive (JAR) file to be called\&. Used only with the
+\fB\-jar\fR
+option\&.
+.RE
+.PP
\fIargs\fR
-The arguments passed to the \f3main()\fR method separated by spaces\&.
-.SH DESCRIPTION
-The \f3java\fR command starts a Java application\&. It does this by starting the Java Runtime Environment (JRE), loading the specified class, and calling that class\&'s \f3main()\fR method\&. The method must be declared \fIpublic\fR and \fIstatic\fR, it must not return any value, and it must accept a \f3String\fR array as a parameter\&. The method declaration has the following form:
-.sp
-.nf
-\f3public static void main(String[] args)\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-The \f3java\fR command can be used to launch a JavaFX application by loading a class that either has a \f3main()\fR method or that extends \f3javafx\&.application\&.Application\fR\&. In the latter case, the launcher constructs an instance of the \f3Application\fR class, calls its \f3init()\fR method, and then calls the \f3start(javafx\&.stage\&.Stage)\fR method\&.
-.PP
-By default, the first argument that is not an option of the \f3java\fR command is the fully qualified name of the class to be called\&. If the \f3-jar\fR option is specified, its argument is the name of the JAR file containing class and resource files for the application\&. The startup class must be indicated by the \f3Main-Class\fR manifest header in its source code\&.
+.RS 4
+The arguments passed to the
+\fBmain()\fR
+method separated by spaces\&.
+.RE
+.SH "DESCRIPTION"
+.PP
+The
+\fBjava\fR
+command starts a Java application\&. It does this by starting the Java Runtime Environment (JRE), loading the specified class, and calling that class\*(Aqs
+\fBmain()\fR
+method\&. The method must be declared
+\fIpublic\fR
+and
+\fIstatic\fR, it must not return any value, and it must accept a
+\fBString\fR
+array as a parameter\&. The method declaration has the following form:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBpublic static void main(String[] args)\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+The
+\fBjava\fR
+command can be used to launch a JavaFX application by loading a class that either has a
+\fBmain()\fR
+method or that extends
+\fBjavafx\&.application\&.Application\fR\&. In the latter case, the launcher constructs an instance of the
+\fBApplication\fR
+class, calls its
+\fBinit()\fR
+method, and then calls the
+\fBstart(javafx\&.stage\&.Stage)\fR
+method\&.
+.PP
+By default, the first argument that is not an option of the
+\fBjava\fR
+command is the fully qualified name of the class to be called\&. If the
+\fB\-jar\fR
+option is specified, its argument is the name of the JAR file containing class and resource files for the application\&. The startup class must be indicated by the
+\fBMain\-Class\fR
+manifest header in its source code\&.
.PP
The JRE searches for the startup class (and other classes used by the application) in three sets of locations: the bootstrap class path, the installed extensions, and the user\(cqs class path\&.
.PP
-Arguments after the class file name or the JAR file name are passed to the \f3main()\fR method\&.
-.SH OPTIONS
-The \f3java\fR command supports a wide range of options that can be divided into the following categories:
-.TP 0.2i
-\(bu
+Arguments after the class file name or the JAR file name are passed to the
+\fBmain()\fR
+method\&.
+.SH "OPTIONS"
+.PP
+The
+\fBjava\fR
+command supports a wide range of options that can be divided into the following categories:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
Standard Options
-.TP 0.2i
-\(bu
-Non-Standard Options
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Non\-Standard Options
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
Advanced Runtime Options
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
Advanced JIT Compiler Options
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
Advanced Serviceability Options
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
Advanced Garbage Collection Options
+.RE
.PP
Standard options are guaranteed to be supported by all implementations of the Java Virtual Machine (JVM)\&. They are used for common actions, such as checking the version of the JRE, setting the class path, enabling verbose output, and so on\&.
.PP
-Non-standard options are general purpose options that are specific to the Java HotSpot Virtual Machine, so they are not guaranteed to be supported by all JVM implementations, and are subject to change\&. These options start with \f3-X\fR\&.
+Non\-standard options are general purpose options that are specific to the Java HotSpot Virtual Machine, so they are not guaranteed to be supported by all JVM implementations, and are subject to change\&. These options start with
+\fB\-X\fR\&.
.PP
-Advanced options are not recommended for casual use\&. These are developer options used for tuning specific areas of the Java HotSpot Virtual Machine operation that often have specific system requirements and may require privileged access to system configuration parameters\&. They are also not guaranteed to be supported by all JVM implementations, and are subject to change\&. Advanced options start with \f3-XX\fR\&.
+Advanced options are not recommended for casual use\&. These are developer options used for tuning specific areas of the Java HotSpot Virtual Machine operation that often have specific system requirements and may require privileged access to system configuration parameters\&. They are also not guaranteed to be supported by all JVM implementations, and are subject to change\&. Advanced options start with
+\fB\-XX\fR\&.
.PP
To keep track of the options that were deprecated or removed in the latest release, there is a section named Deprecated and Removed Options at the end of the document\&.
.PP
-Boolean options are used to either enable a feature that is disabled by default or disable a feature that is enabled by default\&. Such options do not require a parameter\&. Boolean \f3-XX\fR options are enabled using the plus sign (\f3-XX:+\fR\fIOptionName\fR) and disabled using the minus sign (\f3-XX:-\fR\fIOptionName\fR)\&.
+Boolean options are used to either enable a feature that is disabled by default or disable a feature that is enabled by default\&. Such options do not require a parameter\&. Boolean
+\fB\-XX\fR
+options are enabled using the plus sign (\fB\-XX:+\fR\fIOptionName\fR) and disabled using the minus sign (\fB\-XX:\-\fR\fIOptionName\fR)\&.
+.PP
+For options that require an argument, the argument may be separated from the option name by a space, a colon (:), or an equal sign (=), or the argument may directly follow the option (the exact syntax differs for each option)\&. If you are expected to specify the size in bytes, you can use no suffix, or use the suffix
+\fBk\fR
+or
+\fBK\fR
+for kilobytes (KB),
+\fBm\fR
+or
+\fBM\fR
+for megabytes (MB),
+\fBg\fR
+or
+\fBG\fR
+for gigabytes (GB)\&. For example, to set the size to 8 GB, you can specify either
+\fB8g\fR,
+\fB8192m\fR,
+\fB8388608k\fR, or
+\fB8589934592\fR
+as the argument\&. If you are expected to specify the percentage, use a number from 0 to 1 (for example, specify
+\fB0\&.25\fR
+for 25%)\&.
+.SS "Standard Options"
.PP
-For options that require an argument, the argument may be separated from the option name by a space, a colon (:), or an equal sign (=), or the argument may directly follow the option (the exact syntax differs for each option)\&. If you are expected to specify the size in bytes, you can use no suffix, or use the suffix \f3k\fR or \f3K\fR for kilobytes (KB), \f3m\fR or \f3M\fR for megabytes (MB), \f3g\fR or \f3G\fR for gigabytes (GB)\&. For example, to set the size to 8 GB, you can specify either \f38g\fR, \f38192m\fR, \f38388608k\fR, or \f38589934592\fR as the argument\&. If you are expected to specify the percentage, use a number from 0 to 1 (for example, specify \f30\&.25\fR for 25%)\&.
-.SS STANDARD\ OPTIONS
These are the most commonly used options that are supported by all implementations of the JVM\&.
-.TP
--agentlib:\fIlibname\fR[=\fIoptions\fR]
-.br
-Loads the specified native agent library\&. After the library name, a comma-separated list of options specific to the library can be used\&.
-
-If the option \f3-agentlib:foo\fR is specified, then the JVM attempts to load the library named \f3libfoo\&.so\fR in the location specified by the \f3LD_LIBRARY_PATH\fR system variable (on OS X this variable is \f3DYLD_LIBRARY_PATH\fR)\&.
-
+.PP
+\-agentlib:\fIlibname\fR[=\fIoptions\fR]
+.RS 4
+Loads the specified native agent library\&. After the library name, a comma\-separated list of options specific to the library can be used\&.
+.sp
+If the option
+\fB\-agentlib:foo\fR
+is specified, then the JVM attempts to load the library named
+\fBlibfoo\&.so\fR
+in the location specified by the
+\fBLD_LIBRARY_PATH\fR
+system variable (on OS X this variable is
+\fBDYLD_LIBRARY_PATH\fR)\&.
+.sp
The following example shows how to load the heap profiling tool (HPROF) library and get sample CPU information every 20 ms, with a stack depth of 3:
-.sp
-.nf
-\f3\-agentlib:hprof=cpu=samples,interval=20,depth=3\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-agentlib:hprof=cpu=samples,interval=20,depth=3\fR
+
+.fi
+.if n \{\
+.RE
+.\}
The following example shows how to load the Java Debug Wire Protocol (JDWP) library and listen for the socket connection on port 8000, suspending the JVM before the main class loads:
-.sp
-.nf
-\f3\-agentlib:jdwp=transport=dt_socket,server=y,address=8000\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-agentlib:jdwp=transport=dt_socket,server=y,address=8000\fR
+
+.fi
+.if n \{\
+.RE
+.\}
For more information about the native agent libraries, refer to the following:
-.RS
-.TP 0.2i
-\(bu
-The \f3java\&.lang\&.instrument\fR package description at http://docs\&.oracle\&.com/javase/8/docs/api/java/lang/instrument/package-summary\&.html
-.TP 0.2i
-\(bu
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+The
+\fBjava\&.lang\&.instrument\fR
+package description at http://docs\&.oracle\&.com/javase/8/docs/api/java/lang/instrument/package\-summary\&.html
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
Agent Command Line Options in the JVM Tools Interface guide at http://docs\&.oracle\&.com/javase/8/docs/platform/jvmti/jvmti\&.html#starting
-.RE
-
-.TP
--agentpath:\fIpathname\fR[=\fIoptions\fR]
-.br
-Loads the native agent library specified by the absolute path name\&. This option is equivalent to \f3-agentlib\fR but uses the full path and file name of the library\&.
-.TP
--client
-.br
-Selects the Java HotSpot Client VM\&. The 64-bit version of the Java SE Development Kit (JDK) currently ignores this option and instead uses the Server JVM\&.
+.RE
+.RE
+.PP
+\-agentpath:\fIpathname\fR[=\fIoptions\fR]
+.RS 4
+Loads the native agent library specified by the absolute path name\&. This option is equivalent to
+\fB\-agentlib\fR
+but uses the full path and file name of the library\&.
+.RE
+.PP
+\-client
+.RS 4
+Selects the Java HotSpot Client VM\&. The 64\-bit version of the Java SE Development Kit (JDK) currently ignores this option and instead uses the Server JVM\&.
+.sp
+For default JVM selection, see Server\-Class Machine Detection at
-For default JVM selection, see Server-Class Machine Detection at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/server-class\&.html
-.TP
--D\fIproperty\fR=\fIvalue\fR
-.br
-Sets a system property value\&. The \fIproperty\fR variable is a string with no spaces that represents the name of the property\&. The \fIvalue\fR variable is a string that represents the value of the property\&. If \fIvalue\fR is a string with spaces, then enclose it in quotation marks (for example \f3-Dfoo="foo bar"\fR)\&.
-.TP
--d32
-.br
-Runs the application in a 32-bit environment\&. If a 32-bit environment is not installed or is not supported, then an error will be reported\&. By default, the application is run in a 32-bit environment unless a 64-bit system is used\&.
-.TP
--d64
+http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/server\-class\&.html
+.RE
+.PP
+\-D\fIproperty\fR=\fIvalue\fR
+.RS 4
+Sets a system property value\&. The
+\fIproperty\fR
+variable is a string with no spaces that represents the name of the property\&. The
+\fIvalue\fR
+variable is a string that represents the value of the property\&. If
+\fIvalue\fR
+is a string with spaces, then enclose it in quotation marks (for example
+\fB\-Dfoo="foo bar"\fR)\&.
+.RE
+.PP
+\-d32
+.RS 4
+Runs the application in a 32\-bit environment\&. If a 32\-bit environment is not installed or is not supported, then an error will be reported\&. By default, the application is run in a 32\-bit environment unless a 64\-bit system is used\&.
+.RE
+.PP
+\-d64
+.RS 4
+Runs the application in a 64\-bit environment\&. If a 64\-bit environment is not installed or is not supported, then an error will be reported\&. By default, the application is run in a 32\-bit environment unless a 64\-bit system is used\&.
+.sp
+Currently only the Java HotSpot Server VM supports 64\-bit operation, and the
+\fB\-server\fR
+option is implicit with the use of
+\fB\-d64\fR\&. The
+\fB\-client\fR
+option is ignored with the use of
+\fB\-d64\fR\&. This is subject to change in a future release\&.
+.RE
+.PP
+\-disableassertions[:[\fIpackagename\fR]\&.\&.\&.|:\fIclassname\fR]
.br
-Runs the application in a 64-bit environment\&. If a 64-bit environment is not installed or is not supported, then an error will be reported\&. By default, the application is run in a 32-bit environment unless a 64-bit system is used\&.
-
-Currently only the Java HotSpot Server VM supports 64-bit operation, and the \f3-server\fR option is implicit with the use of \f3-d64\fR\&. The \f3-client\fR option is ignored with the use of \f3-d64\fR\&. This is subject to change in a future release\&.
-.TP
+\-da[:[\fIpackagename\fR]\&.\&.\&.|:\fIclassname\fR]
+.RS 4
+Disables assertions\&. By default, assertions are disabled in all packages and classes\&.
+.sp
+With no arguments,
+\fB\-disableassertions\fR
+(\fB\-da\fR) disables assertions in all packages and classes\&. With the
+\fIpackagename\fR
+argument ending in
+\fB\&.\&.\&.\fR, the switch disables assertions in the specified package and any subpackages\&. If the argument is simply
+\fB\&.\&.\&.\fR, then the switch disables assertions in the unnamed package in the current working directory\&. With the
+\fIclassname\fR
+argument, the switch disables assertions in the specified class\&.
+.sp
+The
+\fB\-disableassertions\fR
+(\fB\-da\fR) option applies to all class loaders and to system classes (which do not have a class loader)\&. There is one exception to this rule: if the option is provided with no arguments, then it does not apply to system classes\&. This makes it easy to disable assertions in all classes except for system classes\&. The
+\fB\-disablesystemassertions\fR
+option enables you to disable assertions in all system classes\&.
+.sp
+To explicitly enable assertions in specific packages or classes, use the
+\fB\-enableassertions\fR
+(\fB\-ea\fR) option\&. Both options can be used at the same time\&. For example, to run the
+\fBMyClass\fR
+application with assertions enabled in package
+\fBcom\&.wombat\&.fruitbat\fR
+(and any subpackages) but disabled in class
+\fBcom\&.wombat\&.fruitbat\&.Brickbat\fR, use the following command:
+.sp
+.if n \{\
+.RS 4
+.\}
.nf
--disableassertions[:[\fIpackagename\fR]\&.\&.\&.|:\fIclassname\fR], -da[:[\fIpackagename\fR]\&.\&.\&.|:\fIclassname\fR]
-.br
+\fBjava \-ea:com\&.wombat\&.fruitbat\&.\&.\&. \-da:com\&.wombat\&.fruitbat\&.Brickbat MyClass\fR
+
.fi
-Disables assertions\&. By default, assertions are disabled in all packages and classes\&.
-
-With no arguments, \f3-disableassertions\fR (\f3-da\fR) disables assertions in all packages and classes\&. With the \fIpackagename\fR argument ending in \f3\&.\&.\&.\fR, the switch disables assertions in the specified package and any subpackages\&. If the argument is simply \f3\&.\&.\&.\fR, then the switch disables assertions in the unnamed package in the current working directory\&. With the \fIclassname\fR argument\f3\fR, the switch disables assertions in the specified class\&.
-
-The \f3-disableassertions\fR (\f3-da\fR) option applies to all class loaders and to system classes (which do not have a class loader)\&. There is one exception to this rule: if the option is provided with no arguments, then it does not apply to system classes\&. This makes it easy to disable assertions in all classes except for system classes\&. The \f3-disablesystemassertions\fR option enables you to disable assertions in all system classes\&.
-
-To explicitly enable assertions in specific packages or classes, use the \f3-enableassertions\fR (\f3-ea\fR) option\&. Both options can be used at the same time\&. For example, to run the \f3MyClass\fR application with assertions enabled in package \f3com\&.wombat\&.fruitbat\fR (and any subpackages) but disabled in class \f3com\&.wombat\&.fruitbat\&.Brickbat\fR, use the following command:
-.sp
-.nf
-\f3java \-ea:com\&.wombat\&.fruitbat\&.\&.\&. \-da:com\&.wombat\&.fruitbat\&.Brickbat MyClass\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--disablesystemassertions, -dsa
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-disablesystemassertions
.br
+\-dsa
+.RS 4
Disables assertions in all system classes\&.
-.TP
-.nf
--enableassertions[:[\fIpackagename\fR]\&.\&.\&.|:\fIclassname\fR], -ea[:[\fIpackagename\fR]\&.\&.\&.|:\fIclassname\fR]
+.RE
+.PP
+\-enableassertions[:[\fIpackagename\fR]\&.\&.\&.|:\fIclassname\fR]
.br
-.fi
+\-ea[:[\fIpackagename\fR]\&.\&.\&.|:\fIclassname\fR]
+.RS 4
Enables assertions\&. By default, assertions are disabled in all packages and classes\&.
-
-With no arguments, \f3-enableassertions\fR (\f3-ea\fR) enables assertions in all packages and classes\&. With the \fIpackagename\fR argument ending in \f3\&.\&.\&.\fR, the switch enables assertions in the specified package and any subpackages\&. If the argument is simply \f3\&.\&.\&.\fR, then the switch enables assertions in the unnamed package in the current working directory\&. With the \fIclassname\fR argument\f3\fR, the switch enables assertions in the specified class\&.
-
-The \f3-enableassertions\fR (\f3-ea\fR) option applies to all class loaders and to system classes (which do not have a class loader)\&. There is one exception to this rule: if the option is provided with no arguments, then it does not apply to system classes\&. This makes it easy to enable assertions in all classes except for system classes\&. The \f3-enablesystemassertions\fR option provides a separate switch to enable assertions in all system classes\&.
-
-To explicitly disable assertions in specific packages or classes, use the \f3-disableassertions\fR (\f3-da\fR) option\&. If a single command contains multiple instances of these switches, then they are processed in order before loading any classes\&. For example, to run the \f3MyClass\fR application with assertions enabled only in package \f3com\&.wombat\&.fruitbat\fR (and any subpackages) but disabled in class \f3com\&.wombat\&.fruitbat\&.Brickbat\fR, use the following command:
-.sp
-.nf
-\f3java \-ea:com\&.wombat\&.fruitbat\&.\&.\&. \-da:com\&.wombat\&.fruitbat\&.Brickbat MyClass\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--enablesystemassertions, -esa
+.sp
+With no arguments,
+\fB\-enableassertions\fR
+(\fB\-ea\fR) enables assertions in all packages and classes\&. With the
+\fIpackagename\fR
+argument ending in
+\fB\&.\&.\&.\fR, the switch enables assertions in the specified package and any subpackages\&. If the argument is simply
+\fB\&.\&.\&.\fR, then the switch enables assertions in the unnamed package in the current working directory\&. With the
+\fIclassname\fR
+argument, the switch enables assertions in the specified class\&.
+.sp
+The
+\fB\-enableassertions\fR
+(\fB\-ea\fR) option applies to all class loaders and to system classes (which do not have a class loader)\&. There is one exception to this rule: if the option is provided with no arguments, then it does not apply to system classes\&. This makes it easy to enable assertions in all classes except for system classes\&. The
+\fB\-enablesystemassertions\fR
+option provides a separate switch to enable assertions in all system classes\&.
+.sp
+To explicitly disable assertions in specific packages or classes, use the
+\fB\-disableassertions\fR
+(\fB\-da\fR) option\&. If a single command contains multiple instances of these switches, then they are processed in order before loading any classes\&. For example, to run the
+\fBMyClass\fR
+application with assertions enabled only in package
+\fBcom\&.wombat\&.fruitbat\fR
+(and any subpackages) but disabled in class
+\fBcom\&.wombat\&.fruitbat\&.Brickbat\fR, use the following command:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjava \-ea:com\&.wombat\&.fruitbat\&.\&.\&. \-da:com\&.wombat\&.fruitbat\&.Brickbat MyClass\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-enablesystemassertions
.br
+\-esa
+.RS 4
Enables assertions in all system classes\&.
-.TP
--help, -?
-.br
-Displays usage information for the \f3java\fR command without actually running the JVM\&.
-.TP
--jar \fIfilename\fR
+.RE
+.PP
+\-help
.br
-Executes a program encapsulated in a JAR file\&. The \fIfilename\fR argument is the name of a JAR file with a manifest that contains a line in the form \f3Main-Class:\fR\fIclassname\fR that defines the class with the \f3public static void main(String[] args)\fR method that serves as your application\&'s starting point\&.
-
-When you use the \f3-jar\fR option, the specified JAR file is the source of all user classes, and other class path settings are ignored\&.
-
+\-?
+.RS 4
+Displays usage information for the
+\fBjava\fR
+command without actually running the JVM\&.
+.RE
+.PP
+\-jar \fIfilename\fR
+.RS 4
+Executes a program encapsulated in a JAR file\&. The
+\fIfilename\fR
+argument is the name of a JAR file with a manifest that contains a line in the form
+\fBMain\-Class:\fR\fIclassname\fR
+that defines the class with the
+\fBpublic static void main(String[] args)\fR
+method that serves as your application\*(Aqs starting point\&.
+.sp
+When you use the
+\fB\-jar\fR
+option, the specified JAR file is the source of all user classes, and other class path settings are ignored\&.
+.sp
For more information about JAR files, see the following resources:
-.RS
-.TP 0.2i
-\(bu
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
jar(1)
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
The Java Archive (JAR) Files guide at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/jar/index\&.html
-.TP 0.2i
-\(bu
-Lesson: Packaging Programs in JAR Files at http://docs\&.oracle\&.com/javase/tutorial/deployment/jar/index\&.html
-.RE
-
-.TP
--javaagent:\fIjarpath\fR[=\fIoptions\fR]
-.br
-Loads the specified Java programming language agent\&. For more information about instrumenting Java applications, see the \f3java\&.lang\&.instrument\fR package description in the Java API documentation at http://docs\&.oracle\&.com/javase/8/docs/api/java/lang/instrument/package-summary\&.html
-.TP
--jre-restrict-search
-.br
-Includes user-private JREs in the version search\&.
-.TP
--no-jre-restrict-search
-.br
-Excludes user-private JREs from the version search\&.
-.TP
--server
-.br
-Selects the Java HotSpot Server VM\&. The 64-bit version of the JDK supports only the Server VM, so in that case the option is implicit\&.
-
-For default JVM selection, see Server-Class Machine Detection at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/server-class\&.html
-.TP
--showversion
-.br
-Displays version information and continues execution of the application\&. This option is equivalent to the \f3-version\fR option except that the latter instructs the JVM to exit after displaying version information\&.
-.TP
--splash:\fIimgname\fR
-.br
-Shows the splash screen with the image specified by \fIimgname\fR\&. For example, to show the \f3splash\&.gif\fR file from the \f3images\fR directory when starting your application, use the following option:
-.sp
-.nf
-\f3\-splash:images/splash\&.gif\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Lesson: Packaging Programs in JAR Files at
+
+http://docs\&.oracle\&.com/javase/tutorial/deployment/jar/index\&.html
+.RE
+.RE
+.PP
+\-javaagent:\fIjarpath\fR[=\fIoptions\fR]
+.RS 4
+Loads the specified Java programming language agent\&. For more information about instrumenting Java applications, see the
+\fBjava\&.lang\&.instrument\fR
+package description in the Java API documentation at http://docs\&.oracle\&.com/javase/8/docs/api/java/lang/instrument/package\-summary\&.html
+.RE
+.PP
+\-jre\-restrict\-search
+.RS 4
+Includes user\-private JREs in the version search\&.
+.RE
+.PP
+\-no\-jre\-restrict\-search
+.RS 4
+Excludes user\-private JREs from the version search\&.
+.RE
+.PP
+\-server
+.RS 4
+Selects the Java HotSpot Server VM\&. The 64\-bit version of the JDK supports only the Server VM, so in that case the option is implicit\&.
+.sp
+For default JVM selection, see Server\-Class Machine Detection at
-.TP
--verbose:class
-.br
+http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/server\-class\&.html
+.RE
+.PP
+\-showversion
+.RS 4
+Displays version information and continues execution of the application\&. This option is equivalent to the
+\fB\-version\fR
+option except that the latter instructs the JVM to exit after displaying version information\&.
+.RE
+.PP
+\-splash:\fIimgname\fR
+.RS 4
+Shows the splash screen with the image specified by
+\fIimgname\fR\&. For example, to show the
+\fBsplash\&.gif\fR
+file from the
+\fBimages\fR
+directory when starting your application, use the following option:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-splash:images/splash\&.gif\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-verbose:class
+.RS 4
Displays information about each loaded class\&.
-.TP
--verbose:gc
-.br
+.RE
+.PP
+\-verbose:gc
+.RS 4
Displays information about each garbage collection (GC) event\&.
-.TP
--verbose:jni
-.br
+.RE
+.PP
+\-verbose:jni
+.RS 4
Displays information about the use of native methods and other Java Native Interface (JNI) activity\&.
-.TP
--version
-.br
-Displays version information and then exits\&. This option is equivalent to the \f3-showversion\fR option except that the latter does not instruct the JVM to exit after displaying version information\&.
-.TP
--version:\fIrelease\fR
-.br
-Specifies the release version to be used for running the application\&. If the version of the \f3java\fR command called does not meet this specification and an appropriate implementation is found on the system, then the appropriate implementation will be used\&.
-
-The \fIrelease\fR argument specifies either the exact version string, or a list of version strings and ranges separated by spaces\&. A \fIversion string\fR is the developer designation of the version number in the following form: \f31\&.\fR\fIx\fR\f3\&.0_\fR\fIu\fR (where \fIx\fR is the major version number, and \fIu\fR is the update version number)\&. A \fIversion range\fR is made up of a version string followed by a plus sign (\f3+\fR) to designate this version or later, or a part of a version string followed by an asterisk (\f3*\fR) to designate any version string with a matching prefix\&. Version strings and ranges can be combined using a space for a logical \fIOR\fR combination, or an ampersand (\f3&\fR) for a logical \fIAND\fR combination of two version strings/ranges\&. For example, if running the class or JAR file requires either JRE 6u13 (1\&.6\&.0_13), or any JRE 6 starting from 6u10 (1\&.6\&.0_10), specify the following:
-.sp
-.nf
-\f3\-version:"1\&.6\&.0_13 1\&.6* & 1\&.6\&.0_10+"\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-Quotation marks are necessary only if there are spaces in the \fIrelease\fR parameter\&.
-
+.RE
+.PP
+\-version
+.RS 4
+Displays version information and then exits\&. This option is equivalent to the
+\fB\-showversion\fR
+option except that the latter does not instruct the JVM to exit after displaying version information\&.
+.RE
+.PP
+\-version:\fIrelease\fR
+.RS 4
+Specifies the release version to be used for running the application\&. If the version of the
+\fBjava\fR
+command called does not meet this specification and an appropriate implementation is found on the system, then the appropriate implementation will be used\&.
+.sp
+The
+\fIrelease\fR
+argument specifies either the exact version string, or a list of version strings and ranges separated by spaces\&. A
+\fIversion string\fR
+is the developer designation of the version number in the following form:
+\fB1\&.\fR\fIx\fR\fB\&.0_\fR\fIu\fR
+(where
+\fIx\fR
+is the major version number, and
+\fIu\fR
+is the update version number)\&. A
+\fIversion range\fR
+is made up of a version string followed by a plus sign (\fB+\fR) to designate this version or later, or a part of a version string followed by an asterisk (\fB*\fR) to designate any version string with a matching prefix\&. Version strings and ranges can be combined using a space for a logical
+\fIOR\fR
+combination, or an ampersand (\fB&\fR) for a logical
+\fIAND\fR
+combination of two version strings/ranges\&. For example, if running the class or JAR file requires either JRE 6u13 (1\&.6\&.0_13), or any JRE 6 starting from 6u10 (1\&.6\&.0_10), specify the following:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-version:"1\&.6\&.0_13 1\&.6* & 1\&.6\&.0_10+"\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Quotation marks are necessary only if there are spaces in the
+\fIrelease\fR
+parameter\&.
+.sp
For JAR files, the preference is to specify version requirements in the JAR file manifest rather than on the command line\&.
-.SS NON-STANDARD\ OPTIONS
+.RE
+.SS "Non\-Standard Options"
+.PP
These options are general purpose options that are specific to the Java HotSpot Virtual Machine\&.
-.TP
--X
-.br
-Displays help for all available \f3-X\fR options\&.
-.TP
--Xbatch
-.br
-Disables background compilation\&. By default, the JVM compiles the method as a background task, running the method in interpreter mode until the background compilation is finished\&. The \f3-Xbatch\fR flag disables background compilation so that compilation of all methods proceeds as a foreground task until completed\&.
-
-This option is equivalent to \f3-XX:-BackgroundCompilation\fR\&.
-.TP
--Xbootclasspath:\fIpath\fR
-.br
+.PP
+\-X
+.RS 4
+Displays help for all available
+\fB\-X\fR
+options\&.
+.RE
+.PP
+\-Xbatch
+.RS 4
+Disables background compilation\&. By default, the JVM compiles the method as a background task, running the method in interpreter mode until the background compilation is finished\&. The
+\fB\-Xbatch\fR
+flag disables background compilation so that compilation of all methods proceeds as a foreground task until completed\&.
+.sp
+This option is equivalent to
+\fB\-XX:\-BackgroundCompilation\fR\&.
+.RE
+.PP
+\-Xbootclasspath:\fIpath\fR
+.RS 4
Specifies a list of directories, JAR files, and ZIP archives separated by colons (:) to search for boot class files\&. These are used in place of the boot class files included in the JDK\&.
-
-\fI\fRDo not deploy applications that use this option to override a class in \f3rt\&.jar\fR, because this violates the JRE binary code license\&.
-.TP
--Xbootclasspath/a:\fIpath\fR
-.br
+.sp
+Do not deploy applications that use this option to override a class in
+\fBrt\&.jar\fR, because this violates the JRE binary code license\&.
+.RE
+.PP
+\-Xbootclasspath/a:\fIpath\fR
+.RS 4
Specifies a list of directories, JAR files, and ZIP archives separated by colons (:) to append to the end of the default bootstrap class path\&.
-
-Do not deploy applications that use this option to override a class in \f3rt\&.jar\fR, because this violates the JRE binary code license\&.
-.TP
--Xbootclasspath/p:\fIpath\fR
-.br
+.sp
+Do not deploy applications that use this option to override a class in
+\fBrt\&.jar\fR, because this violates the JRE binary code license\&.
+.RE
+.PP
+\-Xbootclasspath/p:\fIpath\fR
+.RS 4
Specifies a list of directories, JAR files, and ZIP archives separated by colons (:) to prepend to the front of the default bootstrap class path\&.
-
-Do not deploy applications that use this option to override a class in \f3rt\&.jar\fR, because this violates the JRE binary code license\&.
-.TP
--Xboundthreads
-.br
-Binds user-level threads to kernel threads\&.
-.TP
--Xcheck:jni
-.br
+.sp
+Do not deploy applications that use this option to override a class in
+\fBrt\&.jar\fR, because this violates the JRE binary code license\&.
+.RE
+.PP
+\-Xcheck:jni
+.RS 4
Performs additional checks for Java Native Interface (JNI) functions\&. Specifically, it validates the parameters passed to the JNI function and the runtime environment data before processing the JNI request\&. Any invalid data encountered indicates a problem in the native code, and the JVM will terminate with an irrecoverable error in such cases\&. Expect a performance degradation when this option is used\&.
-.TP
--Xcomp
-.br
-Forces compilation of methods on first invocation\&. By default, the Client VM (\f3-client\fR) performs 1,000 interpreted method invocations and the Server VM (\f3-server\fR) performs 10,000 interpreted method invocations to gather information for efficient compilation\&. Specifying the \f3-Xcomp\fR option disables interpreted method invocations to increase compilation performance at the expense of efficiency\&.
-
-You can also change the number of interpreted method invocations before compilation using the \f3-XX:CompileThreshold\fR option\&.
-.TP
--Xdebug
-.br
+.RE
+.PP
+\-Xcomp
+.RS 4
+Forces compilation of methods on first invocation\&. By default, the Client VM (\fB\-client\fR) performs 1,000 interpreted method invocations and the Server VM (\fB\-server\fR) performs 10,000 interpreted method invocations to gather information for efficient compilation\&. Specifying the
+\fB\-Xcomp\fR
+option disables interpreted method invocations to increase compilation performance at the expense of efficiency\&.
+.sp
+You can also change the number of interpreted method invocations before compilation using the
+\fB\-XX:CompileThreshold\fR
+option\&.
+.RE
+.PP
+\-Xdebug
+.RS 4
Does nothing\&. Provided for backward compatibility\&.
-.TP
--Xdiag
-.br
+.RE
+.PP
+\-Xdiag
+.RS 4
Shows additional diagnostic messages\&.
-.TP
--Xfuture
-.br
-Enables strict class-file format checks that enforce close conformance to the class-file format specification\&. Developers are encouraged to use this flag when developing new code because the stricter checks will become the default in future releases\&.
-.TP
--Xint
-.br
-Runs the application in interpreted-only mode\&. Compilation to native code is disabled, and all bytecode is executed by the interpreter\&. The performance benefits offered by the just in time (JIT) compiler are not present in this mode\&.
-.TP
--Xinternalversion
-.br
-Displays more detailed JVM version information than the \f3-version\fR option, and then exits\&.
-.TP
--Xloggc:\fIfilename\fR
-.br
-Sets the file to which verbose GC events information should be redirected for logging\&. The information written to this file is similar to the output of \f3-verbose:gc\fR with the time elapsed since the first GC event preceding each logged event\&. The \f3-Xloggc\fR option overrides \f3-verbose:gc\fR if both are given with the same \f3java\fR command\&.
-
+.RE
+.PP
+\-Xfuture
+.RS 4
+Enables strict class\-file format checks that enforce close conformance to the class\-file format specification\&. Developers are encouraged to use this flag when developing new code because the stricter checks will become the default in future releases\&.
+.RE
+.PP
+\-Xint
+.RS 4
+Runs the application in interpreted\-only mode\&. Compilation to native code is disabled, and all bytecode is executed by the interpreter\&. The performance benefits offered by the just in time (JIT) compiler are not present in this mode\&.
+.RE
+.PP
+\-Xinternalversion
+.RS 4
+Displays more detailed JVM version information than the
+\fB\-version\fR
+option, and then exits\&.
+.RE
+.PP
+\-Xloggc:\fIfilename\fR
+.RS 4
+Sets the file to which verbose GC events information should be redirected for logging\&. The information written to this file is similar to the output of
+\fB\-verbose:gc\fR
+with the time elapsed since the first GC event preceding each logged event\&. The
+\fB\-Xloggc\fR
+option overrides
+\fB\-verbose:gc\fR
+if both are given with the same
+\fBjava\fR
+command\&.
+.sp
Example:
-.sp
-.nf
-\f3\-Xloggc:garbage\-collection\&.log\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--Xmaxjitcodesize=\fIsize\fR
-.br
-Specifies the maximum code cache size (in bytes) for JIT-compiled code\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. By default, the value is set to 48 MB:
-.sp
-.nf
-\f3\-Xmaxjitcodesize=48m\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-This option is equivalent to \f3-XX:ReservedCodeCacheSize\fR\&.
-.TP
--Xmixed
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-Xloggc:garbage\-collection\&.log\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-Xmaxjitcodesize=\fIsize\fR
+.RS 4
+Specifies the maximum code cache size (in bytes) for JIT\-compiled code\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. By default, the value is set to 48 MB:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-Xmaxjitcodesize=48m\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+This option is equivalent to
+\fB\-XX:ReservedCodeCacheSize\fR\&.
+.RE
+.PP
+\-Xmixed
+.RS 4
Executes all bytecode by the interpreter except for hot methods, which are compiled to native code\&.
-.TP
--Xmn\fIsize\fR
-.br
-Sets the initial and maximum size (in bytes) of the heap for the young generation (nursery)\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&.
-
+.RE
+.PP
+\-Xmn\fIsize\fR
+.RS 4
+Sets the initial and maximum size (in bytes) of the heap for the young generation (nursery)\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&.
+.sp
The young generation region of the heap is used for new objects\&. GC is performed in this region more often than in other regions\&. If the size for the young generation is too small, then a lot of minor garbage collections will be performed\&. If the size is too large, then only full garbage collections will be performed, which can take a long time to complete\&. Oracle recommends that you keep the size for the young generation between a half and a quarter of the overall heap size\&.
-
+.sp
The following examples show how to set the initial and maximum size of young generation to 256 MB using various units:
-.sp
-.nf
-\f3\-Xmn256m\fP
-.fi
-.nf
-\f3\-Xmn262144k\fP
-.fi
-.nf
-\f3\-Xmn268435456\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-Instead of the \f3-Xmn\fR option to set both the initial and maximum size of the heap for the young generation, you can use \f3-XX:NewSize\fR to set the initial size and \f3-XX:MaxNewSize\fR to set the maximum size\&.
-.TP
--Xms\fIsize\fR
-.br
-Sets the initial size (in bytes) of the heap\&. This value must be a multiple of 1024 and greater than 1 MB\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&.
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-Xmn256m\fR
+\fB\-Xmn262144k\fR
+\fB\-Xmn268435456\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Instead of the
+\fB\-Xmn\fR
+option to set both the initial and maximum size of the heap for the young generation, you can use
+\fB\-XX:NewSize\fR
+to set the initial size and
+\fB\-XX:MaxNewSize\fR
+to set the maximum size\&.
+.RE
+.PP
+\-Xms\fIsize\fR
+.RS 4
+Sets the initial size (in bytes) of the heap\&. This value must be a multiple of 1024 and greater than 1 MB\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&.
+.sp
The following examples show how to set the size of allocated memory to 6 MB using various units:
-.sp
-.nf
-\f3\-Xms6291456\fP
-.fi
-.nf
-\f3\-Xms6144k\fP
-.fi
-.nf
-\f3\-Xms6m\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-If you do not set this option, then the initial size will be set as the sum of the sizes allocated for the old generation and the young generation\&. The initial size of the heap for the young generation can be set using the \f3-Xmn\fR option or the \f3-XX:NewSize\fR option\&.
-.TP
--Xmx\fIsize\fR
-.br
-Specifies the maximum size (in bytes) of the memory allocation pool in bytes\&. This value must be a multiple of 1024 and greater than 2 MB\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. The default value is chosen at runtime based on system configuration\&. For server deployments, \f3-Xms\fR and \f3-Xmx\fR are often set to the same value\&. For more information, see Garbage Collector Ergonomics at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/gc-ergonomics\&.html
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-Xms6291456\fR
+\fB\-Xms6144k\fR
+\fB\-Xms6m\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+If you do not set this option, then the initial size will be set as the sum of the sizes allocated for the old generation and the young generation\&. The initial size of the heap for the young generation can be set using the
+\fB\-Xmn\fR
+option or the
+\fB\-XX:NewSize\fR
+option\&.
+.RE
+.PP
+\-Xmx\fIsize\fR
+.RS 4
+Specifies the maximum size (in bytes) of the memory allocation pool in bytes\&. This value must be a multiple of 1024 and greater than 2 MB\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. The default value is chosen at runtime based on system configuration\&. For server deployments,
+\fB\-Xms\fR
+and
+\fB\-Xmx\fR
+are often set to the same value\&. For more information, see Garbage Collector Ergonomics at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/gc\-ergonomics\&.html
+.sp
The following examples show how to set the maximum allowed size of allocated memory to 80 MB using various units:
-.sp
-.nf
-\f3\-Xmx83886080\fP
-.fi
-.nf
-\f3\-Xmx81920k\fP
-.fi
-.nf
-\f3\-Xmx80m\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-The \f3-Xmx\fR option is equivalent to \f3-XX:MaxHeapSize\fR\&.
-.TP
--Xnoclassgc
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-Xmx83886080\fR
+\fB\-Xmx81920k\fR
+\fB\-Xmx80m\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The
+\fB\-Xmx\fR
+option is equivalent to
+\fB\-XX:MaxHeapSize\fR\&.
+.RE
+.PP
+\-Xnoclassgc
+.RS 4
Disables garbage collection (GC) of classes\&. This can save some GC time, which shortens interruptions during the application run\&.
-
-When you specify \f3-Xnoclassgc\fR at startup, the class objects in the application will be left untouched during GC and will always be considered live\&. This can result in more memory being permanently occupied which, if not used carefully, will throw an out of memory exception\&.
-.TP
--Xprof
-.br
+.sp
+When you specify
+\fB\-Xnoclassgc\fR
+at startup, the class objects in the application will be left untouched during GC and will always be considered live\&. This can result in more memory being permanently occupied which, if not used carefully, will throw an out of memory exception\&.
+.RE
+.PP
+\-Xprof
+.RS 4
Profiles the running program and sends profiling data to standard output\&. This option is provided as a utility that is useful in program development and is not intended to be used in production systems\&.
-.TP
--Xrs
-.br
+.RE
+.PP
+\-Xrs
+.RS 4
Reduces the use of operating system signals by the JVM\&.
-
+.sp
Shutdown hooks enable orderly shutdown of a Java application by running user cleanup code (such as closing database connections) at shutdown, even if the JVM terminates abruptly\&.
-
-The JVM catches signals to implement shutdown hooks for unexpected termination\&. The JVM uses \f3SIGHUP\fR, \f3SIGINT\fR, and \f3SIGTERM\fR to initiate the running of shutdown hooks\&.
-
-The JVM uses a similar mechanism to implement the feature of dumping thread stacks for debugging purposes\&. The JVM uses \f3SIGQUIT\fR to perform thread dumps\&.
-
-Applications embedding the JVM frequently need to trap signals such as \f3SIGINT\fR or \f3SIGTERM\fR, which can lead to interference with the JVM signal handlers\&. The \f3-Xrs\fR option is available to address this issue\&. When \f3-Xrs\fR is used, the signal masks for \f3SIGINT\fR, \f3SIGTERM\fR, \f3SIGHUP\fR, and \f3SIGQUIT\fR are not changed by the JVM, and signal handlers for these signals are not installed\&.
-
-There are two consequences of specifying \f3-Xrs\fR:
-.RS
-.TP 0.2i
-\(bu
-\f3SIGQUIT\fR thread dumps are not available\&.
-.TP 0.2i
-\(bu
-User code is responsible for causing shutdown hooks to run, for example, by calling \f3System\&.exit()\fR when the JVM is to be terminated\&.
-.RE
-
-.TP
--Xshare:\fImode\fR
-.br
-Sets the class data sharing mode\&. Possible \fImode\fR arguments for this option include the following:
-.RS
-.TP
+.sp
+The JVM catches signals to implement shutdown hooks for unexpected termination\&. The JVM uses
+\fBSIGHUP\fR,
+\fBSIGINT\fR, and
+\fBSIGTERM\fR
+to initiate the running of shutdown hooks\&.
+.sp
+The JVM uses a similar mechanism to implement the feature of dumping thread stacks for debugging purposes\&. The JVM uses
+\fBSIGQUIT\fR
+to perform thread dumps\&.
+.sp
+Applications embedding the JVM frequently need to trap signals such as
+\fBSIGINT\fR
+or
+\fBSIGTERM\fR, which can lead to interference with the JVM signal handlers\&. The
+\fB\-Xrs\fR
+option is available to address this issue\&. When
+\fB\-Xrs\fR
+is used, the signal masks for
+\fBSIGINT\fR,
+\fBSIGTERM\fR,
+\fBSIGHUP\fR, and
+\fBSIGQUIT\fR
+are not changed by the JVM, and signal handlers for these signals are not installed\&.
+.sp
+There are two consequences of specifying
+\fB\-Xrs\fR:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fBSIGQUIT\fR
+thread dumps are not available\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+User code is responsible for causing shutdown hooks to run, for example, by calling
+\fBSystem\&.exit()\fR
+when the JVM is to be terminated\&.
+.RE
+.RE
+.PP
+\-Xshare:\fImode\fR
+.RS 4
+Sets the class data sharing mode\&. Possible
+\fImode\fR
+arguments for this option include the following:
+.PP
auto
-Use shared class data if possible\&. This is the default value for Java HotSpot 32-Bit Client VM\&.
-.TP
+.RS 4
+Use shared class data if possible\&. This is the default value for Java HotSpot 32\-Bit Client VM\&.
+.RE
+.PP
on
+.RS 4
Require the use of class data sharing\&. Print an error message and exit if class data sharing cannot be used\&.
-.TP
+.RE
+.PP
off
-Do not use shared class data\&. This is the default value for Java HotSpot 32-Bit Server VM, Java HotSpot 64-Bit Client VM, and Java HotSpot 64-Bit Server VM\&.
-.TP
+.RS 4
+Do not use shared class data\&. This is the default value for Java HotSpot 32\-Bit Server VM, Java HotSpot 64\-Bit Client VM, and Java HotSpot 64\-Bit Server VM\&.
+.RE
+.PP
dump
+.RS 4
Manually generate the class data sharing archive\&.
-.RE
-
-.TP
--XshowSettings:\fIcategory\fR
-.br
-Shows settings and continues\&. Possible \fIcategory\fR arguments for this option include the following:
-.RS
-.TP
+.RE
+.RE
+.PP
+\-XshowSettings:\fIcategory\fR
+.RS 4
+Shows settings and continues\&. Possible
+\fIcategory\fR
+arguments for this option include the following:
+.PP
all
+.RS 4
Shows all categories of settings\&. This is the default value\&.
-.TP
+.RE
+.PP
locale
+.RS 4
Shows settings related to locale\&.
-.TP
+.RE
+.PP
properties
+.RS 4
Shows settings related to system properties\&.
-.TP
+.RE
+.PP
vm
+.RS 4
Shows the settings of the JVM\&.
-.RE
-
-.TP
--Xss\fIsize\fR
-.br
-Sets the thread stack size (in bytes)\&. Append the letter \f3k\fR or \f3K\fR to indicate KB, \f3m\fR or \f3M\fR to indicate MB, \f3g\fR or \f3G\fR to indicate GB\&. The default value depends on the platform:
-.RS
-.TP 0.2i
-\(bu
-Linux/ARM (32-bit): 320 KB
-.TP 0.2i
-\(bu
-Linux/i386 (32-bit): 320 KB
-.TP 0.2i
-\(bu
-Linux/x64 (64-bit): 1024 KB
-.TP 0.2i
-\(bu
-OS X (64-bit): 1024 KB
-.TP 0.2i
-\(bu
-Oracle Solaris/i386 (32-bit): 320 KB
-.TP 0.2i
-\(bu
-Oracle Solaris/x64 (64-bit): 1024 KB
-.TP 0.2i
-\(bu
+.RE
+.RE
+.PP
+\-Xss\fIsize\fR
+.RS 4
+Sets the thread stack size (in bytes)\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate KB,
+\fBm\fR
+or
+\fBM\fR
+to indicate MB,
+\fBg\fR
+or
+\fBG\fR
+to indicate GB\&. The default value depends on the platform:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Linux/ARM (32\-bit): 320 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Linux/i386 (32\-bit): 320 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Linux/x64 (64\-bit): 1024 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+OS X (64\-bit): 1024 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Oracle Solaris/i386 (32\-bit): 320 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Oracle Solaris/x64 (64\-bit): 1024 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
Windows: depends on virtual memory
.RE
-.RS
+.sp
The following examples set the thread stack size to 1024 KB in different units:
-.sp
-.nf
-\f3\-Xss1m\fP
-.fi
-.nf
-\f3\-Xss1024k\fP
-.fi
-.nf
-\f3\-Xss1048576\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-This option is equivalent to \f3-XX:ThreadStackSize\fR\&.
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-Xss1m\fR
+\fB\-Xss1024k\fR
+\fB\-Xss1048576\fR
+
+.fi
+.if n \{\
.RE
-.TP
--Xusealtsigs
-.br
-Use alternative signals instead of \f3SIGUSR1\fR and \f3SIGUSR2\fR for JVM internal signals\&. This option is equivalent to \f3-XX:+UseAltSigs\fR\&.
-.TP
--Xverify:\fImode\fR
-.br
-Sets the mode of the bytecode verifier\&. Bytecode verification helps to troubleshoot some problems, but it also adds overhead to the running application\&. Possible \fImode\fR arguments for this option include the following:
-.RS
-.TP
+.\}
+This option is equivalent to
+\fB\-XX:ThreadStackSize\fR\&.
+.RE
+.PP
+\-Xusealtsigs
+.RS 4
+Use alternative signals instead of
+\fBSIGUSR1\fR
+and
+\fBSIGUSR2\fR
+for JVM internal signals\&. This option is equivalent to
+\fB\-XX:+UseAltSigs\fR\&.
+.RE
+.PP
+\-Xverify:\fImode\fR
+.RS 4
+Sets the mode of the bytecode verifier\&. Bytecode verification helps to troubleshoot some problems, but it also adds overhead to the running application\&. Possible
+\fImode\fR
+arguments for this option include the following:
+.PP
none
+.RS 4
Do not verify the bytecode\&. This reduces startup time and also reduces the protection provided by Java\&.
-.TP
+.RE
+.PP
remote
-Verify only those classes that are loaded remotely over the network\&. This is the default behavior if you do not specify the \f3-Xverify\fR option\&.
-.TP
+.RS 4
+Verify only those classes that are loaded remotely over the network\&. This is the default behavior if you do not specify the
+\fB\-Xverify\fR
+option\&.
+.RE
+.PP
all
+.RS 4
Verify all classes\&.
-.RE
-
-.SS ADVANCED\ RUNTIME\ OPTIONS
+.RE
+.RE
+.SS "Advanced Runtime Options"
+.PP
These options control the runtime behavior of the Java HotSpot VM\&.
-.TP
--XX:+DisableAttachMechanism
-.br
-Enables the option that disables the mechanism that lets tools attach to the JVM\&. By default, this option is disabled, meaning that the attach mechanism is enabled and you can use tools such as \f3jcmd\fR, \f3jstack\fR, \f3jmap\fR, and \f3jinfo\fR\&.
-.TP
--XX:ErrorFile=\fIfilename\fR
-.br
-Specifies the path and file name to which error data is written when an irrecoverable error occurs\&. By default, this file is created in the current working directory and named \f3hs_err_pid\fR\fIpid\fR\f3\&.log\fR where \fIpid\fR is the identifier of the process that caused the error\&. The following example shows how to set the default log file (note that the identifier of the process is specified as \f3%p\fR):
-.sp
-.nf
-\f3\-XX:ErrorFile=\&./hs_err_pid%p\&.log\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-The following example shows how to set the error log to \f3/var/log/java/java_error\&.log\fR:
-.sp
-.nf
-\f3\-XX:ErrorFile=/var/log/java/java_error\&.log\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-If the file cannot be created in the specified directory (due to insufficient space, permission problem, or another issue), then the file is created in the temporary directory for the operating system\&. The temporary directory is \f3/tmp\fR\&.
-.TP
--XX:LargePageSizeInBytes=\fIsize\fR
-.br
-Sets the maximum size (in bytes) for large pages used for Java heap\&. The \fIsize\fR argument must be a power of 2 (2, 4, 8, 16, \&.\&.\&.)\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. By default, the size is set to 0, meaning that the JVM chooses the size for large pages automatically\&.
-
+.PP
+\-XX:+DisableAttachMechanism
+.RS 4
+Enables the option that disables the mechanism that lets tools attach to the JVM\&. By default, this option is disabled, meaning that the attach mechanism is enabled and you can use tools such as
+\fBjcmd\fR,
+\fBjstack\fR,
+\fBjmap\fR, and
+\fBjinfo\fR\&.
+.RE
+.PP
+\-XX:ErrorFile=\fIfilename\fR
+.RS 4
+Specifies the path and file name to which error data is written when an irrecoverable error occurs\&. By default, this file is created in the current working directory and named
+\fBhs_err_pid\fR\fIpid\fR\fB\&.log\fR
+where
+\fIpid\fR
+is the identifier of the process that caused the error\&. The following example shows how to set the default log file (note that the identifier of the process is specified as
+\fB%p\fR):
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:ErrorFile=\&./hs_err_pid%p\&.log\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The following example shows how to set the error log to
+\fB/var/log/java/java_error\&.log\fR:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:ErrorFile=/var/log/java/java_error\&.log\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+If the file cannot be created in the specified directory (due to insufficient space, permission problem, or another issue), then the file is created in the temporary directory for the operating system\&. The temporary directory is
+\fB/tmp\fR\&.
+.RE
+.PP
+\-XX:+FailOverToOldVerifier
+.RS 4
+Enables automatic failover to the old verifier when the new type checker fails\&. By default, this option is disabled and it is ignored (that is, treated as disabled) for classes with a recent bytecode version\&. You can enable it for classes with older versions of the bytecode\&.
+.RE
+.PP
+\-XX:LargePageSizeInBytes=\fIsize\fR
+.RS 4
+Sets the maximum size (in bytes) for large pages used for Java heap\&. The
+\fIsize\fR
+argument must be a power of 2 (2, 4, 8, 16, \&.\&.\&.)\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. By default, the size is set to 0, meaning that the JVM chooses the size for large pages automatically\&.
+.sp
The following example illustrates how to set the large page size to 4 megabytes (MB):
-.sp
-.nf
-\f3\-XX:LargePageSizeInBytes=4m\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:MaxDirectMemorySize=\fIsize\fR
-.br
-Sets the maximum total size (in bytes) of the New I/O (the \f3java\&.nio\fR package) direct-buffer allocations\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. By default, the size is set to 0, meaning that the JVM chooses the size for NIO direct-buffer allocations automatically\&.
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:LargePageSizeInBytes=4m\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:MaxDirectMemorySize=\fIsize\fR
+.RS 4
+Sets the maximum total size (in bytes) of the New I/O (the
+\fBjava\&.nio\fR
+package) direct\-buffer allocations\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. By default, the size is set to 0, meaning that the JVM chooses the size for NIO direct\-buffer allocations automatically\&.
+.sp
The following examples illustrate how to set the NIO size to 1024 KB in different units:
-.sp
-.nf
-\f3\-XX:MaxDirectMemorySize=1m\fP
-.fi
-.nf
-\f3\-XX:MaxDirectMemorySize=1024k\fP
-.fi
-.nf
-\f3\-XX:MaxDirectMemorySize=1048576\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:NativeMemoryTracking=\fImode\fR
-.br
-Specifies the mode for tracking JVM native memory usage\&. Possible \fImode\fR arguments for this option include the following:
-.RS
-.TP
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:MaxDirectMemorySize=1m\fR
+\fB\-XX:MaxDirectMemorySize=1024k\fR
+\fB\-XX:MaxDirectMemorySize=1048576\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:NativeMemoryTracking=\fImode\fR
+.RS 4
+Specifies the mode for tracking JVM native memory usage\&. Possible
+\fImode\fR
+arguments for this option include the following:
+.PP
off
-Do not track JVM native memory usage\&. This is the default behavior if you do not specify the \f3-XX:NativeMemoryTracking\fR option\&.
-.TP
+.RS 4
+Do not track JVM native memory usage\&. This is the default behavior if you do not specify the
+\fB\-XX:NativeMemoryTracking\fR
+option\&.
+.RE
+.PP
summary
+.RS 4
Only track memory usage by JVM subsystems, such as Java heap, class, code, and thread\&.
-.TP
+.RE
+.PP
detail
-In addition to tracking memory usage by JVM subsystems, track memory usage by individual \f3CallSite\fR, individual virtual memory region and its committed regions\&.
-.RE
-
-.TP
--XX:OnError=\fIstring\fR
-.br
-Sets a custom command or a series of semicolon-separated commands to run when an irrecoverable error occurs\&. If the string contains spaces, then it must be enclosed in quotation marks\&.
-
-\fI\fRThe following example shows how the \f3-XX:OnError\fR option can be used to run the \f3gcore\fR command to create the core image, and the debugger is started to attach to the process in case of an irrecoverable error (the \f3%p\fR designates the current process):
-.sp
-.nf
-\f3\-XX:OnError="gcore %p;dbx \- %p"\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:OnOutOfMemoryError=\fIstring\fR
-.br
-Sets a custom command or a series of semicolon-separated commands to run when an \f3OutOfMemoryError\fR exception is first thrown\&. If the string contains spaces, then it must be enclosed in quotation marks\&. For an example of a command string, see the description of the \f3-XX:OnError\fR option\&.
-.TP
--XX:+PrintCommandLineFlags
-.br
+.RS 4
+In addition to tracking memory usage by JVM subsystems, track memory usage by individual
+\fBCallSite\fR, individual virtual memory region and its committed regions\&.
+.RE
+.RE
+.PP
+\-XX:OnError=\fIstring\fR
+.RS 4
+Sets a custom command or a series of semicolon\-separated commands to run when an irrecoverable error occurs\&. If the string contains spaces, then it must be enclosed in quotation marks\&.
+.sp
+The following example shows how the
+\fB\-XX:OnError\fR
+option can be used to run the
+\fBgcore\fR
+command to create the core image, and the debugger is started to attach to the process in case of an irrecoverable error (the
+\fB%p\fR
+designates the current process):
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:OnError="gcore %p;dbx \- %p"\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:OnOutOfMemoryError=\fIstring\fR
+.RS 4
+Sets a custom command or a series of semicolon\-separated commands to run when an
+\fBOutOfMemoryError\fR
+exception is first thrown\&. If the string contains spaces, then it must be enclosed in quotation marks\&. For an example of a command string, see the description of the
+\fB\-XX:OnError\fR
+option\&.
+.RE
+.PP
+\-XX:+PrintCommandLineFlags
+.RS 4
Enables printing of ergonomically selected JVM flags that appeared on the command line\&. It can be useful to know the ergonomic values set by the JVM, such as the heap space size and the selected garbage collector\&. By default, this option is disabled and flags are not printed\&.
-.TP
--XX:+PrintNMTStatistics
-.br
-Enables printing of collected native memory tracking data at JVM exit when native memory tracking is enabled (see \f3-XX:NativeMemoryTracking\fR)\&. By default, this option is disabled and native memory tracking data is not printed\&.
-.TP
--XX:+ShowMessageBoxOnError
-.br
+.RE
+.PP
+\-XX:+PrintNMTStatistics
+.RS 4
+Enables printing of collected native memory tracking data at JVM exit when native memory tracking is enabled (see
+\fB\-XX:NativeMemoryTracking\fR)\&. By default, this option is disabled and native memory tracking data is not printed\&.
+.RE
+.PP
+\-XX:+RelaxAccessControlCheck
+.RS 4
+Decreases the amount of access control checks in the verifier\&. By default, this option is disabled, and it is ignored (that is, treated as disabled) for classes with a recent bytecode version\&. You can enable it for classes with older versions of the bytecode\&.
+.RE
+.PP
+\-XX:+ShowMessageBoxOnError
+.RS 4
Enables displaying of a dialog box when the JVM experiences an irrecoverable error\&. This prevents the JVM from exiting and keeps the process active so that you can attach a debugger to it to investigate the cause of the error\&. By default, this option is disabled\&.
-.TP
--XX:ThreadStackSize=\fIsize\fR
-.br
-Sets the thread stack size (in bytes)\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. The default value depends on the platform:
-.RS
-.TP 0.2i
-\(bu
-Linux/ARM (32-bit): 320 KB
-.TP 0.2i
-\(bu
-Linux/i386 (32-bit): 320 KB
-.TP 0.2i
-\(bu
-Linux/x64 (64-bit): 1024 KB
-.TP 0.2i
-\(bu
-OS X (64-bit): 1024 KB
-.TP 0.2i
-\(bu
-Oracle Solaris/i386 (32-bit): 320 KB
-.TP 0.2i
-\(bu
-Oracle Solaris/x64 (64-bit): 1024 KB
-.TP 0.2i
-\(bu
+.RE
+.PP
+\-XX:ThreadStackSize=\fIsize\fR
+.RS 4
+Sets the thread stack size (in bytes)\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. The default value depends on the platform:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Linux/ARM (32\-bit): 320 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Linux/i386 (32\-bit): 320 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Linux/x64 (64\-bit): 1024 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+OS X (64\-bit): 1024 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Oracle Solaris/i386 (32\-bit): 320 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Oracle Solaris/x64 (64\-bit): 1024 KB
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
Windows: depends on virtual memory
.RE
-.RS
+.sp
The following examples show how to set the thread stack size to 1024 KB in different units:
-.sp
-.nf
-\f3\-XX:ThreadStackSize=1m\fP
-.fi
-.nf
-\f3\-XX:ThreadStackSize=1024k\fP
-.fi
-.nf
-\f3\-XX:ThreadStackSize=1048576\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-This option is equivalent to \f3-Xss\fR\&.
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:ThreadStackSize=1m\fR
+\fB\-XX:ThreadStackSize=1024k\fR
+\fB\-XX:ThreadStackSize=1048576\fR
+
+.fi
+.if n \{\
.RE
-.TP
--XX:+TraceClassLoading
-.br
+.\}
+This option is equivalent to
+\fB\-Xss\fR\&.
+.RE
+.PP
+\-XX:+TraceClassLoading
+.RS 4
Enables tracing of classes as they are loaded\&. By default, this option is disabled and classes are not traced\&.
-.TP
--XX:+TraceClassLoadingPreorder
-.br
+.RE
+.PP
+\-XX:+TraceClassLoadingPreorder
+.RS 4
Enables tracing of all loaded classes in the order in which they are referenced\&. By default, this option is disabled and classes are not traced\&.
-.TP
--XX:+TraceClassResolution
-.br
+.RE
+.PP
+\-XX:+TraceClassResolution
+.RS 4
Enables tracing of constant pool resolutions\&. By default, this option is disabled and constant pool resolutions are not traced\&.
-.TP
--XX:+TraceClassUnloading
-.br
+.RE
+.PP
+\-XX:+TraceClassUnloading
+.RS 4
Enables tracing of classes as they are unloaded\&. By default, this option is disabled and classes are not traced\&.
-.TP
--XX:+TraceLoaderConstraints
-.br
-Enables tracing of the loader constraints recording\&. By default, this option is disabled and loader constraints recoding is not traced\&.
-.TP
--XX:+UseAltSigs
-.br
-Enables the use of alternative signals instead of \f3SIGUSR1\fR and \f3SIGUSR2\fR for JVM internal signals\&. By default, this option is disabled and alternative signals are not used\&. This option is equivalent to \f3-Xusealtsigs\fR\&.
-.TP
--XX:+UseBiasedLocking
-.br
-Enables the use of biased locking\&. Some applications with significant amounts of uncontended synchronization may attain significant speedups with this flag enabled, whereas applications with certain patterns of locking may see slowdowns\&. For more information about the biased locking technique, see the example in Java Tuning White Paper at http://www\&.oracle\&.com/technetwork/java/tuning-139912\&.html#section4\&.2\&.5
-
-By default, this option is disabled and biased locking is not used\&.
-.TP
--XX:+UseCompressedOops
-.br
-Enables the use of compressed pointers\&. When this option is enabled, object references are represented as 32-bit offsets instead of 64-bit pointers, which typically increases performance when running the application with Java heap sizes less than 32 GB\&. This option works only for 64-bit JVMs\&.
-
-By default, this option is disabled and compressed pointers are not used\&.
-.TP
--XX:+UseLargePages
-.br
-Enables the use of large page memory\&. This option is enabled by default\&. To disable the use of large page memory, specify \f3-XX:-UseLargePages\fR\&.
-
-For more information, see Java Support for Large Memory Pages at http://www\&.oracle\&.com/technetwork/java/javase/tech/largememory-jsp-137182\&.html
-.TP
--XX:+UseMembar
-.br
-Enables issuing of membars on thread state transitions\&. This option is disabled by default on all platforms except Power PC and ARM servers, where it is enabled\&. To disable issuing of membars on thread state transitions for Power PC and ARM, specify \f3-XX:-UseMembar\fR\&.
-.TP
--XX:+UsePerfData
-.br
-Enables the \f3perfdata\fR feature\&. This option is enabled by default to allow JVM monitoring and performance testing\&. Disabling it suppresses the creation of the \f3hsperfdata_userid\fR directories\&. To disable the \f3perfdata\fR feature, specify \f3-XX:-UsePerfData\fR\&.
-.TP
--XX:+AllowUserSignalHandlers
-.br
+.RE
+.PP
+\-XX:+TraceLoaderConstraints
+.RS 4
+Enables tracing of the loader constraints recording\&. By default, this option is disabled and loader constraints recording is not traced\&.
+.RE
+.PP
+\-XX:+UseAltSigs
+.RS 4
+Enables the use of alternative signals instead of
+\fBSIGUSR1\fR
+and
+\fBSIGUSR2\fR
+for JVM internal signals\&. By default, this option is disabled and alternative signals are not used\&. This option is equivalent to
+\fB\-Xusealtsigs\fR\&.
+.RE
+.PP
+\-XX:\-UseBiasedLocking
+.RS 4
+Disables the use of biased locking\&. Some applications with significant amounts of uncontended synchronization may attain significant speedups with this flag enabled, whereas applications with certain patterns of locking may see slowdowns\&. For more information about the biased locking technique, see the example in Java Tuning White Paper at http://www\&.oracle\&.com/technetwork/java/tuning\-139912\&.html#section4\&.2\&.5
+.sp
+By default, this option is enabled\&.
+.RE
+.PP
+\-XX:\-UseCompressedOops
+.RS 4
+Disables the use of compressed pointers\&. By default, this option is enabled, and compressed pointers are used when Java heap sizes are less than 32 GB\&. When this option is enabled, object references are represented as 32\-bit offsets instead of 64\-bit pointers, which typically increases performance when running the application with Java heap sizes less than 32 GB\&. This option works only for 64\-bit JVMs\&.
+.RE
+.PP
+\-XX:\-UseLargePages
+.RS 4
+Disables the use of large page memory\&. This option is enabled by default\&.
+.sp
+For more information, see Java Support for Large Memory Pages at http://www\&.oracle\&.com/technetwork/java/javase/tech/largememory\-jsp\-137182\&.html
+.RE
+.PP
+\-XX:+UseMembar
+.RS 4
+Enables issuing of membars on thread state transitions\&. This option is disabled by default on all platforms except ARM servers, where it is enabled\&. (It is recommended that you do not disable this option on ARM servers\&.)
+.RE
+.PP
+\-XX:+UsePerfData
+.RS 4
+Enables the
+\fBperfdata\fR
+feature\&. This option is enabled by default to allow JVM monitoring and performance testing\&. Disabling it suppresses the creation of the
+\fBhsperfdata_userid\fR
+directories\&. To disable the
+\fBperfdata\fR
+feature, specify
+\fB\-XX:\-UsePerfData\fR\&.
+.RE
+.PP
+\-XX:+AllowUserSignalHandlers
+.RS 4
Enables installation of signal handlers by the application\&. By default, this option is disabled and the application is not allowed to install signal handlers\&.
-.SS ADVANCED\ JIT\ COMPILER\ OPTIONS
-These options control the dynamic just-in-time (JIT) compilation performed by the Java HotSpot VM\&.
-.TP
--XX:+AggressiveOpts
-.br
+.RE
+.SS "Advanced JIT Compiler Options"
+.PP
+These options control the dynamic just\-in\-time (JIT) compilation performed by the Java HotSpot VM\&.
+.PP
+\-XX:+AggressiveOpts
+.RS 4
Enables the use of aggressive performance optimization features, which are expected to become default in upcoming releases\&. By default, this option is disabled and experimental performance features are not used\&.
-.TP
--XX:AllocateInstancePrefetchLines=\fIlines\fR
-.br
+.RE
+.PP
+\-XX:AllocateInstancePrefetchLines=\fIlines\fR
+.RS 4
Sets the number of lines to prefetch ahead of the instance allocation pointer\&. By default, the number of lines to prefetch is set to 1:
-.sp
-.nf
-\f3\-XX:AllocateInstancePrefetchLines=1\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:AllocatePrefetchInstr=\fIinstruction\fR
-.br
-Sets the prefetch instruction to prefetch ahead of the allocation pointer\&. Possible values are from 0 to 3\&. The actual instructions behind the values depend on the platform\&. By default, the prefetch instruction is set to 0:
-.sp
-.nf
-\f3\-XX:AllocatePrefetchInstr=0\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:AllocatePrefetchStepSize=\fIsize\fR
-.br
-Sets the step size (in bytes) for sequential prefetch instructions\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. By default, the step size is set to 16 bytes:
-.sp
-.nf
-\f3\-XX:AllocatePrefetchStepSize=16\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:+BackgroundCompilation
-.br
-Enables background compilation\&. This option is enabled by default\&. To disable background compilation, specify \f3-XX:-BackgroundCompilation\fR (this is equivalent to specifying \f3-Xbatch\fR)\&.
-.TP
--XX:CICompilerCount=\fIthreads\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:AllocateInstancePrefetchLines=1\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Only the Java HotSpot Server VM supports this option\&.
+.RE
+.PP
+\-XX:AllocatePrefetchDistance=\fIsize\fR
+.RS 4
+Sets the size (in bytes) of the prefetch distance for object allocation\&. Memory about to be written with the value of new objects is prefetched up to this distance starting from the address of the last allocated object\&. Each Java thread has its own allocation point\&.
+.sp
+Negative values denote that prefetch distance is chosen based on the platform\&. Positive values are bytes to prefetch\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. The default value is set to \-1\&.
+.sp
+The following example shows how to set the prefetch distance to 1024 bytes:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:AllocatePrefetchDistance=1024\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Only the Java HotSpot Server VM supports this option\&.
+.RE
+.PP
+\-XX:AllocatePrefetchInstr=\fIinstruction\fR
+.RS 4
+Sets the prefetch instruction to prefetch ahead of the allocation pointer\&. Only the Java HotSpot Server VM supports this option\&. Possible values are from 0 to 3\&. The actual instructions behind the values depend on the platform\&. By default, the prefetch instruction is set to 0:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:AllocatePrefetchInstr=0\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Only the Java HotSpot Server VM supports this option\&.
+.RE
+.PP
+\-XX:AllocatePrefetchLines=\fIlines\fR
+.RS 4
+Sets the number of cache lines to load after the last object allocation by using the prefetch instructions generated in compiled code\&. The default value is 1 if the last allocated object was an instance, and 3 if it was an array\&.
+.sp
+The following example shows how to set the number of loaded cache lines to 5:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:AllocatePrefetchLines=5\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Only the Java HotSpot Server VM supports this option\&.
+.RE
+.PP
+\-XX:AllocatePrefetchStepSize=\fIsize\fR
+.RS 4
+Sets the step size (in bytes) for sequential prefetch instructions\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. By default, the step size is set to 16 bytes:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:AllocatePrefetchStepSize=16\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Only the Java HotSpot Server VM supports this option\&.
+.RE
+.PP
+\-XX:AllocatePrefetchStyle=\fIstyle\fR
+.RS 4
+Sets the generated code style for prefetch instructions\&. The
+\fIstyle\fR
+argument is an integer from 0 to 3:
+.PP
+0
+.RS 4
+Do not generate prefetch instructions\&.
+.RE
+.PP
+1
+.RS 4
+Execute prefetch instructions after each allocation\&. This is the default parameter\&.
+.RE
+.PP
+2
+.RS 4
+Use the thread\-local allocation block (TLAB) watermark pointer to determine when prefetch instructions are executed\&.
+.RE
+.PP
+3
+.RS 4
+Use BIS instruction on SPARC for allocation prefetch\&.
+.RE
+.sp
+Only the Java HotSpot Server VM supports this option\&.
+.RE
+.PP
+\-XX:+BackgroundCompilation
+.RS 4
+Enables background compilation\&. This option is enabled by default\&. To disable background compilation, specify
+\fB\-XX:\-BackgroundCompilation\fR
+(this is equivalent to specifying
+\fB\-Xbatch\fR)\&.
+.RE
+.PP
+\-XX:CICompilerCount=\fIthreads\fR
+.RS 4
Sets the number of compiler threads to use for compilation\&. By default, the number of threads is set to 2 for the server JVM, to 1 for the client JVM, and it scales to the number of cores if tiered compilation is used\&. The following example shows how to set the number of threads to 2:
-.sp
-.nf
-\f3\-XX:CICompilerCount=2\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:CodeCacheMinimumFreeSpace=\fIsize\fR
-.br
-Sets the minimum free space (in bytes) required for compilation\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. When less than the minimum free space remains, compiling stops\&. By default, this option is set to 500 KB\&. The following example shows how to set the minimum free space to 1024 MB:
-.sp
-.nf
-\f3\-XX:CodeCacheMinimumFreeSpace=1024m\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:CompileCommand=\fIcommand\fR,\fImethod\fR[,\fIoption\fR]
-.br
-Specifies a command to perform on a method\&. For example, to exclude the \f3indexOf()\fR method of the \f3String\fR class from being compiled, use the following:
-.sp
-.nf
-\f3\-XX:CompileCommand=exclude,java/lang/String\&.indexOf\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-Note that the full class name is specified, including all packages and subpackages separated by a slash (\f3/\fR)\&. For easier cut and paste operations, it is also possible to use the method name format produced by the \f3-XX:+PrintCompilation\fR and \f3-XX:+LogCompilation\fR options:
-.sp
-.nf
-\f3\-XX:CompileCommand=exclude,java\&.lang\&.String::indexOf\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-If the method is specified without the signature, the command will be applied to all methods with the specified name\&. However, you can also specify the signature of the method in the class file format\&. In this case, you should enclose the arguments in quotation marks, because otherwise the shell treats the semicolon as command end\&. For example, if you want to exclude only the \f3indexOf(String)\fR method of the \f3String\fR class from being compiled, use the following:
-.sp
-.nf
-\f3\-XX:CompileCommand="exclude,java/lang/String\&.indexOf,(Ljava/lang/String;)I"\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-You can also use the asterisk (*) as a wildcard for class and method names\&. For example, to exclude all \f3indexOf()\fR methods in all classes from being compiled, use the following:
-.sp
-.nf
-\f3\-XX:CompileCommand=exclude,*\&.indexOf\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-The commas and periods are aliases for spaces, making it easier to pass compiler commands through a shell\&. You can pass arguments to \f3-XX:CompileCommand\fR using spaces as separators by enclosing the argument in quotation marks:
-.sp
-.nf
-\f3\-XX:CompileCommand="exclude java/lang/String indexOf"\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-Note that after parsing the commands passed on the command line using the \f3-XX:CompileCommand\fR options, the JIT compiler then reads commands from the \f3\&.hotspot_compiler\fR file\&. You can add commands to this file or specify a different file using the \f3-XX:CompileCommandFile\fR option\&.
-
-To add several commands, either specify the \f3-XX:CompileCommand\fR option multiple times, or separate each argument with the newline separator (\f3\en\fR)\&. The following commands are available:
-.RS
-.TP
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CICompilerCount=2\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:CodeCacheMinimumFreeSpace=\fIsize\fR
+.RS 4
+Sets the minimum free space (in bytes) required for compilation\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. When less than the minimum free space remains, compiling stops\&. By default, this option is set to 500 KB\&. The following example shows how to set the minimum free space to 1024 MB:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CodeCacheMinimumFreeSpace=1024m\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:CompileCommand=\fIcommand\fR,\fImethod\fR[,\fIoption\fR]
+.RS 4
+Specifies a command to perform on a method\&. For example, to exclude the
+\fBindexOf()\fR
+method of the
+\fBString\fR
+class from being compiled, use the following:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CompileCommand=exclude,java/lang/String\&.indexOf\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Note that the full class name is specified, including all packages and subpackages separated by a slash (\fB/\fR)\&. For easier cut and paste operations, it is also possible to use the method name format produced by the
+\fB\-XX:+PrintCompilation\fR
+and
+\fB\-XX:+LogCompilation\fR
+options:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CompileCommand=exclude,java\&.lang\&.String::indexOf\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+If the method is specified without the signature, the command will be applied to all methods with the specified name\&. However, you can also specify the signature of the method in the class file format\&. In this case, you should enclose the arguments in quotation marks, because otherwise the shell treats the semicolon as command end\&. For example, if you want to exclude only the
+\fBindexOf(String)\fR
+method of the
+\fBString\fR
+class from being compiled, use the following:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CompileCommand="exclude,java/lang/String\&.indexOf,(Ljava/lang/String;)I"\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+You can also use the asterisk (*) as a wildcard for class and method names\&. For example, to exclude all
+\fBindexOf()\fR
+methods in all classes from being compiled, use the following:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CompileCommand=exclude,*\&.indexOf\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The commas and periods are aliases for spaces, making it easier to pass compiler commands through a shell\&. You can pass arguments to
+\fB\-XX:CompileCommand\fR
+using spaces as separators by enclosing the argument in quotation marks:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CompileCommand="exclude java/lang/String indexOf"\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Note that after parsing the commands passed on the command line using the
+\fB\-XX:CompileCommand\fR
+options, the JIT compiler then reads commands from the
+\fB\&.hotspot_compiler\fR
+file\&. You can add commands to this file or specify a different file using the
+\fB\-XX:CompileCommandFile\fR
+option\&.
+.sp
+To add several commands, either specify the
+\fB\-XX:CompileCommand\fR
+option multiple times, or separate each argument with the newline separator (\fB\en\fR)\&. The following commands are available:
+.PP
break
+.RS 4
Set a breakpoint when debugging the JVM to stop at the beginning of compilation of the specified method\&.
-.TP
+.RE
+.PP
compileonly
-Exclude all methods from compilation except for the specified method\&. As an alternative, you can use the \f3-XX:CompileOnly\fR option, which allows to specify several methods\&.
-.TP
+.RS 4
+Exclude all methods from compilation except for the specified method\&. As an alternative, you can use the
+\fB\-XX:CompileOnly\fR
+option, which allows to specify several methods\&.
+.RE
+.PP
dontinline
+.RS 4
Prevent inlining of the specified method\&.
-.TP
+.RE
+.PP
exclude
+.RS 4
Exclude the specified method from compilation\&.
-.TP
+.RE
+.PP
help
-Print a help message for the \f3-XX:CompileCommand\fR option\&.
-.TP
+.RS 4
+Print a help message for the
+\fB\-XX:CompileCommand\fR
+option\&.
+.RE
+.PP
inline
+.RS 4
Attempt to inline the specified method\&.
-.TP
+.RE
+.PP
log
-Exclude compilation logging (with the \f3-XX:+LogCompilation\fR option) for all methods except for the specified method\&. By default, logging is performed for all compiled methods\&.
-.TP
+.RS 4
+Exclude compilation logging (with the
+\fB\-XX:+LogCompilation\fR
+option) for all methods except for the specified method\&. By default, logging is performed for all compiled methods\&.
+.RE
+.PP
option
-This command can be used to pass a JIT compilation option to the specified method in place of the last argument (\fIoption\fR)\&. The compilation option is set at the end, after the method name\&. For example, to enable the \f3BlockLayoutByFrequency\fR option for the \f3append()\fR method of the \f3StringBuffer\fR class, use the following:
-.sp
-.nf
-\f3\-XX:CompileCommand=option,java/lang/StringBuffer\&.append,BlockLayoutByFrequency\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.RS 4
+This command can be used to pass a JIT compilation option to the specified method in place of the last argument (\fIoption\fR)\&. The compilation option is set at the end, after the method name\&. For example, to enable the
+\fBBlockLayoutByFrequency\fR
+option for the
+\fBappend()\fR
+method of the
+\fBStringBuffer\fR
+class, use the following:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CompileCommand=option,java/lang/StringBuffer\&.append,BlockLayoutByFrequency\fR
+
+.fi
+.if n \{\
+.RE
+.\}
You can specify multiple compilation options, separated by commas or spaces\&.
-.TP
+.RE
+.PP
print
+.RS 4
Print generated assembler code after compilation of the specified method\&.
-.TP
+.RE
+.PP
quiet
-Do not print the compile commands\&. By default, the commands that you specify with the -\f3XX:CompileCommand\fR option are printed; for example, if you exclude from compilation the \f3indexOf()\fR method of the \f3String\fR class, then the following will be printed to standard output:
-.sp
-.nf
-\f3CompilerOracle: exclude java/lang/String\&.indexOf\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-You can suppress this by specifying the \f3-XX:CompileCommand=quiet\fR option before other \f3-XX:CompileCommand\fR options\&.
-.RE
-
-.TP
--XX:CompileCommandFile=\fIfilename\fR
-.br
-Sets the file from which JIT compiler commands are read\&. By default, the \f3\&.hotspot_compiler\fR file is used to store commands performed by the JIT compiler\&.
-
-Each line in the command file represents a command, a class name, and a method name for which the command is used\&. For example, this line prints assembly code for the \f3toString()\fR method of the \f3String\fR class:
-.sp
-.nf
-\f3print java/lang/String toString\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-For more information about specifying the commands for the JIT compiler to perform on methods, see the \f3-XX:CompileCommand\fR option\&.
-.TP
--XX:CompileOnly=\fImethods\fR
-.br
-Sets the list of methods (separated by commas) to which compilation should be restricted\&. Only the specified methods will be compiled\&. Specify each method with the full class name (including the packages and subpackages)\&. For example, to compile only the \f3length()\fR method of the \f3String\fR class and the \f3size()\fR method of the \f3List\fR class, use the following:
-.sp
-.nf
-\f3\-XX:CompileOnly=java/lang/String\&.length,java/util/List\&.size\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-Note that the full class name is specified, including all packages and subpackages separated by a slash (\f3/\fR)\&. For easier cut and paste operations, it is also possible to use the method name format produced by the \f3-XX:+PrintCompilation\fR and \f3-XX:+LogCompilation\fR options:
-.sp
-.nf
-\f3\-XX:CompileOnly=java\&.lang\&.String::length,java\&.util\&.List::size\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.RS 4
+Do not print the compile commands\&. By default, the commands that you specify with the \-\fBXX:CompileCommand\fR
+option are printed; for example, if you exclude from compilation the
+\fBindexOf()\fR
+method of the
+\fBString\fR
+class, then the following will be printed to standard output:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBCompilerOracle: exclude java/lang/String\&.indexOf\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+You can suppress this by specifying the
+\fB\-XX:CompileCommand=quiet\fR
+option before other
+\fB\-XX:CompileCommand\fR
+options\&.
+.RE
+.RE
+.PP
+\-XX:CompileCommandFile=\fIfilename\fR
+.RS 4
+Sets the file from which JIT compiler commands are read\&. By default, the
+\fB\&.hotspot_compiler\fR
+file is used to store commands performed by the JIT compiler\&.
+.sp
+Each line in the command file represents a command, a class name, and a method name for which the command is used\&. For example, this line prints assembly code for the
+\fBtoString()\fR
+method of the
+\fBString\fR
+class:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBprint java/lang/String toString\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+For more information about specifying the commands for the JIT compiler to perform on methods, see the
+\fB\-XX:CompileCommand\fR
+option\&.
+.RE
+.PP
+\-XX:CompileOnly=\fImethods\fR
+.RS 4
+Sets the list of methods (separated by commas) to which compilation should be restricted\&. Only the specified methods will be compiled\&. Specify each method with the full class name (including the packages and subpackages)\&. For example, to compile only the
+\fBlength()\fR
+method of the
+\fBString\fR
+class and the
+\fBsize()\fR
+method of the
+\fBList\fR
+class, use the following:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CompileOnly=java/lang/String\&.length,java/util/List\&.size\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Note that the full class name is specified, including all packages and subpackages separated by a slash (\fB/\fR)\&. For easier cut and paste operations, it is also possible to use the method name format produced by the
+\fB\-XX:+PrintCompilation\fR
+and
+\fB\-XX:+LogCompilation\fR
+options:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CompileOnly=java\&.lang\&.String::length,java\&.util\&.List::size\fR
+
+.fi
+.if n \{\
+.RE
+.\}
Although wildcards are not supported, you can specify only the class or package name to compile all methods in that class or package, as well as specify just the method to compile methods with this name in any class:
-.sp
-.nf
-\f3\-XX:CompileOnly=java/lang/String\fP
-.fi
-.nf
-\f3\-XX:CompileOnly=java/lang\fP
-.fi
-.nf
-\f3\-XX:CompileOnly=\&.length\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:CompileThreshold=\fIinvocations\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CompileOnly=java/lang/String\fR
+\fB\-XX:CompileOnly=java/lang\fR
+\fB\-XX:CompileOnly=\&.length\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:CompileThreshold=\fIinvocations\fR
+.RS 4
Sets the number of interpreted method invocations before compilation\&. By default, in the server JVM, the JIT compiler performs 10,000 interpreted method invocations to gather information for efficient compilation\&. For the client JVM, the default setting is 1,500 invocations\&. The following example shows how to set the number of interpreted method invocations to 5,000:
-.sp
-.nf
-\f3\-XX:CompileThreshold=5000\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-You can completely disable interpretation of Java methods before compilation by specifying the \f3-Xcomp\fR option\&.
-.TP
--XX:+DoEscapeAnalysis
-.br
-Enables the use of escape analysis\&. This option is enabled by default\&. To disable the use of escape analysis, specify \f3-XX:-DoEscapeAnalysis\fR\&.
-.TP
--XX:+FailOverToOldVerifier
-.br
-Enables automatic failover to the old verifier when the new type checker fails\&. By default, this option is disabled and it is ignored (that is, treated as disabled) for classes with a recent bytecode version\&. You can enable it for classes with older versions of the bytecode\&.
-.TP
--XX:InitialCodeCacheSize=\fIsize\fR
-.br
-Sets the initial code cache size (in bytes)\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. The default value is set to 500 KB\&. The following example shows how to set the initial code cache size to 32 KB:
-.sp
-.nf
-\f3\-XX:InitialCodeCacheSize=32k\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:+Inline
-.br
-Enables method inlining\&. This option is enabled by default to increase performance\&. To disable method inlining, specify \f3-XX:-Inline\fR\&.
-.TP
--XX:InlineSmallCode=\fIsize\fR
-.br
-Sets the maximum code size (in bytes) for compiled methods that should be inlined\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. Only compiled methods with the size smaller than the specified size will be inlined\&. By default, the maximum code size is set to 1000 bytes:
-.sp
-.nf
-\f3\-XX:InlineSmallCode=1000\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:+LogCompilation
-.br
-Enables logging of compilation activity to a file named \f3hotspot\&.log\fR in the current working directory\&. You can specify a different log file path and name using the \f3-XX:LogFile\fR option\&.
-
-By default, this option is disabled and compilation activity is not logged\&. The \f3-XX:+LogCompilation\fR option has to be used together with the \f3-XX:UnlockDiagnosticVMOptions\fR option that unlocks diagnostic JVM options\&.
-
-You can enable verbose diagnostic output with a message printed to the console every time a method is compiled by using the \f3-XX:+PrintCompilation\fR option\&.
-.TP
--XX:MaxInlineSize=\fIsize\fR
-.br
-Sets the maximum bytecode size (in bytes) of a method to be inlined\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. By default, the maximum bytecode size is set to 35 bytes:
-.sp
-.nf
-\f3\-XX:MaxInlineSize=35\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:MaxNodeLimit=\fInodes\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CompileThreshold=5000\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+You can completely disable interpretation of Java methods before compilation by specifying the
+\fB\-Xcomp\fR
+option\&.
+.RE
+.PP
+\-XX:+DoEscapeAnalysis
+.RS 4
+Enables the use of escape analysis\&. This option is enabled by default\&. To disable the use of escape analysis, specify
+\fB\-XX:\-DoEscapeAnalysis\fR\&. Only the Java HotSpot Server VM supports this option\&.
+.RE
+.PP
+\-XX:InitialCodeCacheSize=\fIsize\fR
+.RS 4
+Sets the initial code cache size (in bytes)\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. The default value is set to 500 KB\&. The following example shows how to set the initial code cache size to 32 KB:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:InitialCodeCacheSize=32k\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:+Inline
+.RS 4
+Enables method inlining\&. This option is enabled by default to increase performance\&. To disable method inlining, specify
+\fB\-XX:\-Inline\fR\&.
+.RE
+.PP
+\-XX:InlineSmallCode=\fIsize\fR
+.RS 4
+Sets the maximum code size (in bytes) for compiled methods that should be inlined\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. Only compiled methods with the size smaller than the specified size will be inlined\&. By default, the maximum code size is set to 1000 bytes:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:InlineSmallCode=1000\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:+LogCompilation
+.RS 4
+Enables logging of compilation activity to a file named
+\fBhotspot\&.log\fR
+in the current working directory\&. You can specify a different log file path and name using the
+\fB\-XX:LogFile\fR
+option\&.
+.sp
+By default, this option is disabled and compilation activity is not logged\&. The
+\fB\-XX:+LogCompilation\fR
+option has to be used together with the
+\fB\-XX:UnlockDiagnosticVMOptions\fR
+option that unlocks diagnostic JVM options\&.
+.sp
+You can enable verbose diagnostic output with a message printed to the console every time a method is compiled by using the
+\fB\-XX:+PrintCompilation\fR
+option\&.
+.RE
+.PP
+\-XX:MaxInlineSize=\fIsize\fR
+.RS 4
+Sets the maximum bytecode size (in bytes) of a method to be inlined\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. By default, the maximum bytecode size is set to 35 bytes:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:MaxInlineSize=35\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:MaxNodeLimit=\fInodes\fR
+.RS 4
Sets the maximum number of nodes to be used during single method compilation\&. By default, the maximum number of nodes is set to 65,000:
-.sp
-.nf
-\f3\-XX:MaxNodeLimit=65000\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:MaxTrivialSize=\fIsize\fR
-.br
-Sets the maximum bytecode size (in bytes) of a trivial method to be inlined\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. By default, the maximum bytecode size of a trivial method is set to 6 bytes:
-.sp
-.nf
-\f3\-XX:MaxTrivialSize=6\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:+OptimizeStringConcat
-.br
-Enables the optimization of \f3String\fR concatenation operations\&. This option is enabled by default\&. To disable the optimization of \f3String\fR concatenation operations, specify \f3-XX:-OptimizeStringConcat\fR\&.
-.TP
--XX:+PrintAssembly
-.br
-Enables printing of assembly code for bytecoded and native methods by using the external \f3disassembler\&.so\fR library\&. This enables you to see the generated code, which may help you to diagnose performance issues\&.
-
-By default, this option is disabled and assembly code is not printed\&. The \f3-XX:+PrintAssembly\fR option has to be used together with the \f3-XX:UnlockDiagnosticVMOptions\fR option that unlocks diagnostic JVM options\&.
-.TP
--XX:+PrintCompilation
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:MaxNodeLimit=65000\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:MaxTrivialSize=\fIsize\fR
+.RS 4
+Sets the maximum bytecode size (in bytes) of a trivial method to be inlined\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. By default, the maximum bytecode size of a trivial method is set to 6 bytes:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:MaxTrivialSize=6\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:+OptimizeStringConcat
+.RS 4
+Enables the optimization of
+\fBString\fR
+concatenation operations\&. This option is enabled by default\&. To disable the optimization of
+\fBString\fR
+concatenation operations, specify
+\fB\-XX:\-OptimizeStringConcat\fR\&. Only the Java HotSpot Server VM supports this option\&.
+.RE
+.PP
+\-XX:+PrintAssembly
+.RS 4
+Enables printing of assembly code for bytecoded and native methods by using the external
+\fBdisassembler\&.so\fR
+library\&. This enables you to see the generated code, which may help you to diagnose performance issues\&.
+.sp
+By default, this option is disabled and assembly code is not printed\&. The
+\fB\-XX:+PrintAssembly\fR
+option has to be used together with the
+\fB\-XX:UnlockDiagnosticVMOptions\fR
+option that unlocks diagnostic JVM options\&.
+.RE
+.PP
+\-XX:+PrintCompilation
+.RS 4
Enables verbose diagnostic output from the JVM by printing a message to the console every time a method is compiled\&. This enables you to see which methods actually get compiled\&. By default, this option is disabled and diagnostic output is not printed\&.
-
-You can also log compilation activity to a file by using the \f3-XX:+LogCompilation\fR option\&.
-.TP
--XX:+PrintInlining
-.br
+.sp
+You can also log compilation activity to a file by using the
+\fB\-XX:+LogCompilation\fR
+option\&.
+.RE
+.PP
+\-XX:+PrintInlining
+.RS 4
Enables printing of inlining decisions\&. This enables you to see which methods are getting inlined\&.
-
-By default, this option is disabled and inlining information is not printed\&. The \f3-XX:+PrintInlining\fR option has to be used together with the \f3-XX:+UnlockDiagnosticVMOptions\fR option that unlocks diagnostic JVM options\&.
-.TP
--XX:+RelaxAccessControlCheck
-.br
-Decreases the amount of access control checks in the verifier\&. By default, this option is disabled, and it is ignored (that is, treated as disabled) for classes with a recent bytecode version\&. You can enable it for classes with older versions of the bytecode\&.
-.TP
--XX:ReservedCodeCacheSize=\fIsize\fR
-.br
-Sets the maximum code cache size (in bytes) for JIT-compiled code\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. This option is equivalent to \f3-Xmaxjitcodesize\fR\&.
-.TP
--XX:+TieredCompilation
-.br
-Enables the use of tiered compilation\&. By default, this option is disabled and tiered compilation is not used\&.
-.TP
--XX:+UseCodeCacheFlushing
-.br
-Enables flushing of the code cache before shutting down the compiler\&. This option is enabled by default\&. To disable flushing of the code cache before shutting down the compiler, specify \f3-XX:-UseCodeCacheFlushing\fR\&.
-.TP
--XX:+UseCondCardMark
-.br
-Enables checking of whether the card is already marked before updating the card table\&. This option is disabled by default and should only be used on machines with multiple sockets, where it will increase performance of Java applications that rely heavily on concurrent operations\&.
-.TP
--XX:+UseSuperWord
-.br
-Enables the transformation of scalar operations into superword operations\&. This option is enabled by default\&. To disable the transformation of scalar operations into superword operations, specify \f3-XX:-UseSuperWord\fR\&.
-.SS ADVANCED\ SERVICEABILITY\ OPTIONS
+.sp
+By default, this option is disabled and inlining information is not printed\&. The
+\fB\-XX:+PrintInlining\fR
+option has to be used together with the
+\fB\-XX:+UnlockDiagnosticVMOptions\fR
+option that unlocks diagnostic JVM options\&.
+.RE
+.PP
+\-XX:ReservedCodeCacheSize=\fIsize\fR
+.RS 4
+Sets the maximum code cache size (in bytes) for JIT\-compiled code\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. This option is equivalent to
+\fB\-Xmaxjitcodesize\fR\&.
+.RE
+.PP
+\-XX:+TieredCompilation
+.RS 4
+Enables the use of tiered compilation\&. By default, this option is enabled\&. Only the Java HotSpot Server VM supports this option\&.
+.RE
+.PP
+\-XX:+UseAES
+.RS 4
+Enables hardware\-based AES intrinsics for Intel, AMD, and SPARC hardware\&. Intel Westmere (2010 and newer), AMD Bulldozer (2011 and newer), and SPARC (T4 and newer) are the supported hardware\&. UseAES is used in conjunction with UseAESIntrinsics\&.
+.RE
+.PP
+\-XX:+UseAESIntrinsics
+.RS 4
+UseAES and UseAESIntrinsics flags are enabled by default and are supported only for Java HotSpot Server VM 32\-bit and 64\-bit\&. To disable hardware\-based AES intrinsics, specify
+\fB\-XX:\-UseAES \-XX:\-UseAESIntrinsics\fR\&. For example, to enable hardware AES, use the following flags:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:+UseAES \-XX:+UseAESIntrinsics\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+To support UseAES and UseAESIntrinsics flags for 32\-bit and 64\-bit use
+\fB\-server\fR
+option to choose Java HotSpot Server VM\&. These flags are not supported on Client VM\&.
+.RE
+.PP
+\-XX:+UseCodeCacheFlushing
+.RS 4
+Enables flushing of the code cache before shutting down the compiler\&. This option is enabled by default\&. To disable flushing of the code cache before shutting down the compiler, specify
+\fB\-XX:\-UseCodeCacheFlushing\fR\&.
+.RE
+.PP
+\-XX:+UseCondCardMark
+.RS 4
+Enables checking of whether the card is already marked before updating the card table\&. This option is disabled by default and should only be used on machines with multiple sockets, where it will increase performance of Java applications that rely heavily on concurrent operations\&. Only the Java HotSpot Server VM supports this option\&.
+.RE
+.PP
+\-XX:+UseSuperWord
+.RS 4
+Enables the transformation of scalar operations into superword operations\&. This option is enabled by default\&. To disable the transformation of scalar operations into superword operations, specify
+\fB\-XX:\-UseSuperWord\fR\&. Only the Java HotSpot Server VM supports this option\&.
+.RE
+.SS "Experimental JIT Compiler Options"
+.PP
+The options related to the Restricted Transactional Memory (RTM) locking feature in this section are experimental and are not officially supported in Java SE 8u20; you must enable the
+\fB\-XX:+UnlockExperimentalVMOptions\fR
+option to use them\&. These options are only available for the Java HotSpot Server VM on x86 CPUs that support Transactional Synchronization Extensions (TSX)\&.
+.PP
+\-XX:RTMAbortRatio=\fIabort_ratio\fR
+.RS 4
+The RTM abort ratio is specified as a percentage (%) of all executed RTM transactions\&. If a number of aborted transactions becomes greater than this ratio, then the compiled code will be deoptimized\&. This ratio is used when the
+\fB\-XX:+UseRTMDeopt\fR
+option is enabled\&. The default value of this option is 50\&. This means that the compiled code will be deoptimized if 50% of all transactions are aborted\&.
+.RE
+.PP
+\-XX:RTMRetryCount=\fInumber_of_retries\fR
+.RS 4
+RTM locking code will be retried, when it is aborted or busy, the number of times specified by this option before falling back to the normal locking mechanism\&. The default value for this option is 5\&. The
+\fB\-XX:UseRTMLocking\fR
+option must be enabled\&.
+.RE
+.PP
+\-XX:+UseRTMDeopt
+.RS 4
+Auto\-tunes RTM locking depending on the abort ratio\&. This ratio is specified by
+\fB\-XX:RTMAbortRatio\fR
+option\&. If the number of aborted transactions exceeds the abort ratio, then the method containing the lock will be deoptimized and recompiled with all locks as normal locks\&. This option is disabled by default\&. The
+\fB\-XX:UseRTMLocking\fR
+option must be enabled\&.
+.RE
+.PP
+\-XX:+UseRTMLocking
+.RS 4
+Generate Restricted Transactional Memory (RTM) locking code for all inflated locks, with the normal locking mechanism as the fallback handler\&. This option is disabled by default\&.
+.sp
+RTM is part of Intel\*(Aqs Transactional Synchronization Extensions (TSX), which is an x86 instruction set extension and facilitates the creation of multithreaded applications\&. RTM introduces the new instructions
+\fBXBEGIN\fR,
+\fBXABORT\fR,
+\fBXEND\fR, and
+\fBXTEST\fR\&. The
+\fBXBEGIN\fR
+and
+\fBXEND\fR
+instructions enclose a set of instructions to run as a transaction\&. If no conflict is found when running the transaction, the memory and register modifications are committed together at the
+\fBXEND\fR
+instruction\&. The
+\fBXABORT\fR
+instruction can be used to explicitly abort a transaction and the
+\fBXEND\fR
+instruction to check if a set of instructions are being run in a transaction\&.
+.sp
+A lock on a transaction is inflated when another thread tries to access the same transaction, thereby blocking the thread that did not originally request access to the transaction\&. RTM requires that a fallback set of operations be specified in case a transaction aborts or fails\&. An RTM lock is a lock that has been delegated to the TSX\*(Aqs system\&.
+.sp
+RTM improves performance for highly contended locks with low conflict in a critical region (which is code that must not be accessed by more than one thread concurrently)\&. RTM also improves the performance of coarse\-grain locking, which typically does not perform well in multithreaded applications\&. (Coarse\-grain locking is the strategy of holding locks for long periods to minimize the overhead of taking and releasing locks, while fine\-grained locking is the strategy of trying to achieve maximum parallelism by locking only when necessary and unlocking as soon as possible\&.) Also, for lightly contended locks that are used by different threads, RTM can reduce false cache line sharing, also known as cache line ping\-pong\&. This occurs when multiple threads from different processors are accessing different resources, but the resources share the same cache line\&. As a result, the processors repeatedly invalidate the cache lines of other processors, which forces them to read from main memory instead of their cache\&.
+.RE
+.SS "Advanced Serviceability Options"
+.PP
These options provide the ability to gather system information and perform extensive debugging\&.
-.TP
--XX:+ExtendedDTraceProbes
-.br
-Enables additional \f3dtrace\fR tool probes that impact the performance\&. By default, this option is disabled and \f3dtrace\fR performs only standard probes\&.
-.TP
--XX:+HeapDumpOnOutOfMemory
-.br
-Enables the dumping of the Java heap to a file in the current directory by using the heap profiler (HPROF) when a \f3java\&.lang\&.OutOfMemoryError\fR exception is thrown\&. You can explicitly set the heap dump file path and name using the \f3-XX:HeapDumpPath\fR option\&. By default, this option is disabled and the heap is not dumped when an \f3OutOfMemoryError\fR exception is thrown\&.
-.TP
--XX:HeapDumpPath=\fIpath\fR
-.br
-Sets the path and file name for writing the heap dump provided by the heap profiler (HPROF) when the \f3-XX:+HeapDumpOnOutOfMemoryError\fR option is set\&. By default, the file is created in the current working directory, and it is named \f3java_pid\fR\fIpid\fR\f3\&.hprof\fR where \fIpid\fR is the identifier of the process that caused the error\&. The following example shows how to set the default file explicitly (\f3%p\fR represents the current process identificator):
-.sp
-.nf
-\f3\-XX:HeapDumpPath=\&./java_pid%p\&.hprof\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-\fI\fRThe following example shows how to set the heap dump file to \f3/var/log/java/java_heapdump\&.hprof\fR:
-.sp
-.nf
-\f3\-XX:HeapDumpPath=/var/log/java/java_heapdump\&.hprof\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:LogFile=\fIpath\fR
-.br
-Sets the path and file name where log data is written\&. By default, the file is created in the current working directory, and it is named \f3hotspot\&.log\fR\&.
-
-\fI\fRThe following example shows how to set the log file to \f3/var/log/java/hotspot\&.log\fR:
-.sp
-.nf
-\f3\-XX:LogFile=/var/log/java/hotspot\&.log\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:+PrintClassHistogram
-.br
-\fI\fREnables printing of a class instance histogram after a \f3Control+C\fR event (\f3SIGTERM\fR)\&. By default, this option is disabled\&.
-
-Setting this option is equivalent to running the \f3jmap -histo\fR command, or the \f3jcmd\fR\fIpid\fR\f3GC\&.class_histogram\fR command, where \fIpid\fR is the current Java process identifier\&.
-.TP
--XX:+PrintConcurrentLocks
-
-
-Enables printing of j\f3ava\&.util\&.concurrent\fR locks after a \f3Control+C\fR event (\f3SIGTERM\fR)\&. By default, this option is disabled\&.
-
-Setting this option is equivalent to running the \f3jstack -l\fR command or the \f3jcmd\fR\fIpid\fR\f3Thread\&.print -l\fR command, where \fIpid\fR is the current Java process identifier\&.
-.TP
--XX:+UnlockDiagnosticVMOptions
-.br
+.PP
+\-XX:+ExtendedDTraceProbes
+.RS 4
+Enables additional
+\fBdtrace\fR
+tool probes that impact the performance\&. By default, this option is disabled and
+\fBdtrace\fR
+performs only standard probes\&.
+.RE
+.PP
+\-XX:+HeapDumpOnOutOfMemory
+.RS 4
+Enables the dumping of the Java heap to a file in the current directory by using the heap profiler (HPROF) when a
+\fBjava\&.lang\&.OutOfMemoryError\fR
+exception is thrown\&. You can explicitly set the heap dump file path and name using the
+\fB\-XX:HeapDumpPath\fR
+option\&. By default, this option is disabled and the heap is not dumped when an
+\fBOutOfMemoryError\fR
+exception is thrown\&.
+.RE
+.PP
+\-XX:HeapDumpPath=\fIpath\fR
+.RS 4
+Sets the path and file name for writing the heap dump provided by the heap profiler (HPROF) when the
+\fB\-XX:+HeapDumpOnOutOfMemoryError\fR
+option is set\&. By default, the file is created in the current working directory, and it is named
+\fBjava_pid\fR\fIpid\fR\fB\&.hprof\fR
+where
+\fIpid\fR
+is the identifier of the process that caused the error\&. The following example shows how to set the default file explicitly (\fB%p\fR
+represents the current process identificator):
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:HeapDumpPath=\&./java_pid%p\&.hprof\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The following example shows how to set the heap dump file to
+\fB/var/log/java/java_heapdump\&.hprof\fR:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:HeapDumpPath=/var/log/java/java_heapdump\&.hprof\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:LogFile=\fIpath\fR
+.RS 4
+Sets the path and file name where log data is written\&. By default, the file is created in the current working directory, and it is named
+\fBhotspot\&.log\fR\&.
+.sp
+The following example shows how to set the log file to
+\fB/var/log/java/hotspot\&.log\fR:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:LogFile=/var/log/java/hotspot\&.log\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:+PrintClassHistogram
+.RS 4
+Enables printing of a class instance histogram after a
+\fBControl+C\fR
+event (\fBSIGTERM\fR)\&. By default, this option is disabled\&.
+.sp
+Setting this option is equivalent to running the
+\fBjmap \-histo\fR
+command, or the
+\fBjcmd \fR\fIpid\fR\fB GC\&.class_histogram\fR
+command, where
+\fIpid\fR
+is the current Java process identifier\&.
+.RE
+.PP
+\-XX:+PrintConcurrentLocks
+.RS 4
+Enables printing of j locks after a event\&. By default, this option is disabled\&.
+.sp
+Enables printing of j\fBava\&.util\&.concurrent\fR
+locks after a
+\fBControl+C\fR
+event (\fBSIGTERM\fR)\&. By default, this option is disabled\&.
+.sp
+Setting this option is equivalent to running the
+\fBjstack \-l\fR
+command or the
+\fBjcmd \fR\fIpid\fR\fB Thread\&.print \-l\fR
+command, where
+\fIpid\fR
+is the current Java process identifier\&.
+.RE
+.PP
+\-XX:+UnlockDiagnosticVMOptions
+.RS 4
Unlocks the options intended for diagnosing the JVM\&. By default, this option is disabled and diagnostic options are not available\&.
-.SS ADVANCED\ GARBAGE\ COLLECTION\ OPTIONS
+.RE
+.SS "Advanced Garbage Collection Options"
+.PP
These options control how garbage collection (GC) is performed by the Java HotSpot VM\&.
-.TP
--XX:+AggressiveHeap
-.br
-Enables Java heap optimization\&. This sets various parameters to be optimal for long-running jobs with intensive memory allocation, based on the configuration of the computer (RAM and CPU)\&. By default, the option is disabled and the heap is not optimized\&.
-.TP
--XX:AllocatePrefetchDistance=\fIsize\fR
-.br
-Sets the size (in bytes) of the prefetch distance for object allocation\&. Memory about to be written with the value of new objects is prefetched up to this distance starting from the address of the last allocated object\&. Each Java thread has its own allocation point\&.
-
-Negative values denote that prefetch distance is chosen based on the platform\&. Positive values are bytes to prefetch\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. The default value is set to -1\&.
-
-The following example shows how to set the prefetch distance to 1024 bytes:
-.sp
-.nf
-\f3\-XX:AllocatePrefetchDistance=1024\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:AllocatePrefetchLines=\fIlines\fR
-.br
-Sets the number of cache lines to load after the last object allocation by using the prefetch instructions generated in compiled code\&. The default value is 1 if the last allocated object was an instance, and 3 if it was an array\&.
-
-The following example shows how to set the number of loaded cache lines to 5:
-.sp
-.nf
-\f3\-XX:AllocatePrefetchLines=5\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:AllocatePrefetchStyle=\fIstyle\fR
-.br
-Sets the generated code style for prefetch instructions\&. The \fIstyle\fR argument is an integer from 0 to 3:
-.RS
-.TP
-0
-Do not generate prefetch instructions\&.
-.TP
-1
-Execute prefetch instructions after each allocation\&. This is the default parameter\&.
-.TP
-2
-Use the thread-local allocation block (TLAB) watermark pointer to determine when prefetch instructions are executed\&.
-.TP
-3
-Use BIS instruction on SPARC for allocation prefetch\&.
-.RE
-
-.TP
--XX:+AlwaysPreTouch
-.br
-Enables touching of every page on the Java heap during JVM initialization\&. This gets all pages into the memory before entering the \f3main()\fR method\&. The option can be used in testing to simulate a long-running system with all virtual memory mapped to physical memory\&. By default, this option is disabled and all pages are committed as JVM heap space fills\&.
-.TP
--XX:+CMSClassUnloadingEnabled
-.br
-Enables class unloading when using the concurrent mark-sweep (CMS) garbage collector\&. This option is enabled by default\&. To disable class unloading for the CMS garbage collector, specify \f3-XX:-CMSClassUnloadingEnabled\fR\&.
-.TP
--XX:CMSExpAvgFactor=\fIpercent\fR
-.br
+.PP
+\-XX:+AggressiveHeap
+.RS 4
+Enables Java heap optimization\&. This sets various parameters to be optimal for long\-running jobs with intensive memory allocation, based on the configuration of the computer (RAM and CPU)\&. By default, the option is disabled and the heap is not optimized\&.
+.RE
+.PP
+\-XX:+AlwaysPreTouch
+.RS 4
+Enables touching of every page on the Java heap during JVM initialization\&. This gets all pages into the memory before entering the
+\fBmain()\fR
+method\&. The option can be used in testing to simulate a long\-running system with all virtual memory mapped to physical memory\&. By default, this option is disabled and all pages are committed as JVM heap space fills\&.
+.RE
+.PP
+\-XX:+CMSClassUnloadingEnabled
+.RS 4
+Enables class unloading when using the concurrent mark\-sweep (CMS) garbage collector\&. This option is enabled by default\&. To disable class unloading for the CMS garbage collector, specify
+\fB\-XX:\-CMSClassUnloadingEnabled\fR\&.
+.RE
+.PP
+\-XX:CMSExpAvgFactor=\fIpercent\fR
+.RS 4
Sets the percentage of time (0 to 100) used to weight the current sample when computing exponential averages for the concurrent collection statistics\&. By default, the exponential averages factor is set to 25%\&. The following example shows how to set the factor to 15%:
-.sp
-.nf
-\f3\-XX:CMSExpAvgFactor=15\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:CMSInitiatingOccupancyFraction=\fIpercent\fR
-.br
-Sets the percentage of the old generation occupancy (0 to 100) at which to start a CMS collection cycle\&. The default value is set to -1\&. Any negative value (including the default) implies that \f3-XX:CMSTriggerRatio\fR is used to define the value of the initiating occupancy fraction\&.
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CMSExpAvgFactor=15\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:CMSInitiatingOccupancyFraction=\fIpercent\fR
+.RS 4
+Sets the percentage of the old generation occupancy (0 to 100) at which to start a CMS collection cycle\&. The default value is set to \-1\&. Any negative value (including the default) implies that
+\fB\-XX:CMSTriggerRatio\fR
+is used to define the value of the initiating occupancy fraction\&.
+.sp
The following example shows how to set the occupancy fraction to 20%:
-.sp
-.nf
-\f3\-XX:CMSInitiatingOccupancyFraction=20\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:+CMSScavengeBeforeRemark
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CMSInitiatingOccupancyFraction=20\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:+CMSScavengeBeforeRemark
+.RS 4
Enables scavenging attempts before the CMS remark step\&. By default, this option is disabled\&.
-.TP
--XX:CMSTriggerRatio=\fIpercent\fR
-.br
-Sets the percentage (0 to 100) of the value specified by \f3-XX:MinHeapFreeRatio\fR that is allocated before a CMS collection cycle commences\&. The default value is set to 80%\&.
-
+.RE
+.PP
+\-XX:CMSTriggerRatio=\fIpercent\fR
+.RS 4
+Sets the percentage (0 to 100) of the value specified by
+\fB\-XX:MinHeapFreeRatio\fR
+that is allocated before a CMS collection cycle commences\&. The default value is set to 80%\&.
+.sp
The following example shows how to set the occupancy fraction to 75%:
-.sp
-.nf
-\f3\-XX:CMSTriggerRatio=75\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:ConcGCThreads=\fIthreads\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:CMSTriggerRatio=75\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:ConcGCThreads=\fIthreads\fR
+.RS 4
Sets the number of threads used for concurrent GC\&. The default value depends on the number of CPUs available to the JVM\&.
-
+.sp
For example, to set the number of threads for concurrent GC to 2, specify the following option:
-.sp
-.nf
-\f3\-XX:ConcGCThreads=2\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:+DisableExplicitGC
-.br
-Enables the option that disables processing of calls to \f3System\&.gc()\fR\&. This option is disabled by default, meaning that calls to \f3System\&.gc()\fR are processed\&. If processing of calls to \f3System\&.gc()\fR is disabled, the JVM still performs GC when necessary\&.
-.TP
--XX:+ExplicitGCInvokesConcurrent
-.br
-Enables invoking of concurrent GC by using the \f3System\&.gc()\fR request\&. This option is disabled by default and can be enabled only together with the \f3-XX:+UseConcMarkSweepGC\fR option\&.
-.TP
--XX:+ExplicitGCInvokesConcurrentAndUnloadsClasses
-.br
-Enables invoking of concurrent GC by using the \f3System\&.gc()\fR request and unloading of classes during the concurrent GC cycle\&. This option is disabled by default and can be enabled only together with the \f3-XX:+UseConcMarkSweepGC\fR option\&.
-.TP
--XX:G1HeapRegionSize=\fIsize\fR
-.br
-Sets the size of the regions into which the Java heap is subdivided when using the garbage-first (G1) collector\&. The value can be between 1 MB and 32 MB\&. The default region size is determined ergonomically based on the heap size\&.
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:ConcGCThreads=2\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:+DisableExplicitGC
+.RS 4
+Enables the option that disables processing of calls to
+\fBSystem\&.gc()\fR\&. This option is disabled by default, meaning that calls to
+\fBSystem\&.gc()\fR
+are processed\&. If processing of calls to
+\fBSystem\&.gc()\fR
+is disabled, the JVM still performs GC when necessary\&.
+.RE
+.PP
+\-XX:+ExplicitGCInvokesConcurrent
+.RS 4
+Enables invoking of concurrent GC by using the
+\fBSystem\&.gc()\fR
+request\&. This option is disabled by default and can be enabled only together with the
+\fB\-XX:+UseConcMarkSweepGC\fR
+option\&.
+.RE
+.PP
+\-XX:+ExplicitGCInvokesConcurrentAndUnloadsClasses
+.RS 4
+Enables invoking of concurrent GC by using the
+\fBSystem\&.gc()\fR
+request and unloading of classes during the concurrent GC cycle\&. This option is disabled by default and can be enabled only together with the
+\fB\-XX:+UseConcMarkSweepGC\fR
+option\&.
+.RE
+.PP
+\-XX:G1HeapRegionSize=\fIsize\fR
+.RS 4
+Sets the size of the regions into which the Java heap is subdivided when using the garbage\-first (G1) collector\&. The value can be between 1 MB and 32 MB\&. The default region size is determined ergonomically based on the heap size\&.
+.sp
The following example shows how to set the size of the subdivisions to 16 MB:
-.sp
-.nf
-\f3\-XX:G1HeapRegionSize=16m\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:+G1PrintHeapRegions
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:G1HeapRegionSize=16m\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:+G1PrintHeapRegions
+.RS 4
Enables the printing of information about which regions are allocated and which are reclaimed by the G1 collector\&. By default, this option is disabled\&.
-.TP
--XX:G1ReservePercent=\fIpercent\fR
-.br
+.RE
+.PP
+\-XX:G1ReservePercent=\fIpercent\fR
+.RS 4
Sets the percentage of the heap (0 to 50) that is reserved as a false ceiling to reduce the possibility of promotion failure for the G1 collector\&. By default, this option is set to 10%\&.
-
+.sp
The following example shows how to set the reserved heap to 20%:
-.sp
-.nf
-\f3\-XX:G1ReservePercent=20\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:InitialHeapSize=\fIsize\fR
-.br
-Sets the initial size (in bytes) of the memory allocation pool\&. This value must be either 0, or a multiple of 1024 and greater than 1 MB\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. The default value is chosen at runtime based on system configuration\&. For more information, see Garbage Collector Ergonomics at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/gc-ergonomics\&.html
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:G1ReservePercent=20\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:InitialHeapSize=\fIsize\fR
+.RS 4
+Sets the initial size (in bytes) of the memory allocation pool\&. This value must be either 0, or a multiple of 1024 and greater than 1 MB\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. The default value is chosen at runtime based on system configuration\&. For more information, see Garbage Collector Ergonomics at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/gc\-ergonomics\&.html
+.sp
The following examples show how to set the size of allocated memory to 6 MB using various units:
-.sp
-.nf
-\f3\-XX:InitialHeapSize=6291456\fP
-.fi
-.nf
-\f3\-XX:InitialHeapSize=6144k\fP
-.fi
-.nf
-\f3\-XX:InitialHeapSize=6m\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-If you set this option to 0, then the initial size will be set as the sum of the sizes allocated for the old generation and the young generation\&. The size of the heap for the young generation can be set using the \f3-XX:NewSize\fR option\&.
-.TP
--XX:InitialSurvivorRatio=\fIratio\fR
-.br
-Sets the initial survivor space ratio used by the throughput garbage collector (which is enabled by the \f3-XX:+UseParallelGC\fR and/or -\f3XX:+UseParallelOldGC\fR options)\&. Adaptive sizing is enabled by default with the throughput garbage collector by using the \f3-XX:+UseParallelGC\fR and \f3-XX:+UseParallelOldGC\fR options, and survivor space is resized according to the application behavior, starting with the initial value\&. If adaptive sizing is disabled (using the \f3-XX:-UseAdaptiveSizePolicy\fR option), then the \f3-XX:SurvivorRatio\fR option should be used to set the size of the survivor space for the entire execution of the application\&.
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:InitialHeapSize=6291456\fR
+\fB\-XX:InitialHeapSize=6144k\fR
+\fB\-XX:InitialHeapSize=6m\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+If you set this option to 0, then the initial size will be set as the sum of the sizes allocated for the old generation and the young generation\&. The size of the heap for the young generation can be set using the
+\fB\-XX:NewSize\fR
+option\&.
+.RE
+.PP
+\-XX:InitialSurvivorRatio=\fIratio\fR
+.RS 4
+Sets the initial survivor space ratio used by the throughput garbage collector (which is enabled by the
+\fB\-XX:+UseParallelGC\fR
+and/or \-\fBXX:+UseParallelOldGC\fR
+options)\&. Adaptive sizing is enabled by default with the throughput garbage collector by using the
+\fB\-XX:+UseParallelGC\fR
+and
+\fB\-XX:+UseParallelOldGC\fR
+options, and survivor space is resized according to the application behavior, starting with the initial value\&. If adaptive sizing is disabled (using the
+\fB\-XX:\-UseAdaptiveSizePolicy\fR
+option), then the
+\fB\-XX:SurvivorRatio\fR
+option should be used to set the size of the survivor space for the entire execution of the application\&.
+.sp
The following formula can be used to calculate the initial size of survivor space (S) based on the size of the young generation (Y), and the initial survivor space ratio (R):
-.sp
-.nf
-\f3S=Y/(R+2)\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBS=Y/(R+2)\fR
+
+.fi
+.if n \{\
+.RE
+.\}
The 2 in the equation denotes two survivor spaces\&. The larger the value specified as the initial survivor space ratio, the smaller the initial survivor space size\&.
-
+.sp
By default, the initial survivor space ratio is set to 8\&. If the default value for the young generation space size is used (2 MB), the initial size of the survivor space will be 0\&.2 MB\&.
-
+.sp
The following example shows how to set the initial survivor space ratio to 4:
-.sp
-.nf
-\f3\-XX:InitialSurvivorRatio=4\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:InitiatingHeapOccupancyPercent=\fIpercent\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:InitialSurvivorRatio=4\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:InitiatingHeapOccupancyPercent=\fIpercent\fR
+.RS 4
Sets the percentage of the heap occupancy (0 to 100) at which to start a concurrent GC cycle\&. It is used by garbage collectors that trigger a concurrent GC cycle based on the occupancy of the entire heap, not just one of the generations (for example, the G1 garbage collector)\&.
-
+.sp
By default, the initiating value is set to 45%\&. A value of 0 implies nonstop GC cycles\&. The following example shows how to set the initiating heap occupancy to 75%:
-.sp
-.nf
-\f3\-XX:InitiatingHeapOccupancyPercent=75\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:MaxGCPauseMillis=\fItime\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:InitiatingHeapOccupancyPercent=75\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:MaxGCPauseMillis=\fItime\fR
+.RS 4
Sets a target for the maximum GC pause time (in milliseconds)\&. This is a soft goal, and the JVM will make its best effort to achieve it\&. By default, there is no maximum pause time value\&.
-
+.sp
The following example shows how to set the maximum target pause time to 500 ms:
-.sp
-.nf
-\f3\-XX:MaxGCPauseMillis=500\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:MaxHeapSize=\fIsize\fR
-.br
-Sets the maximum size (in byes) of the memory allocation pool\&. This value must be a multiple of 1024 and greater than 2 MB\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. The default value is chosen at runtime based on system configuration\&. For server deployments, \f3-XX:InitialHeapSize\fR and \f3-XX:MaxHeapSize\fR are often set to the same value\&. For more information, see Garbage Collector Ergonomics at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/gc-ergonomics\&.html
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:MaxGCPauseMillis=500\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:MaxHeapSize=\fIsize\fR
+.RS 4
+Sets the maximum size (in byes) of the memory allocation pool\&. This value must be a multiple of 1024 and greater than 2 MB\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. The default value is chosen at runtime based on system configuration\&. For server deployments,
+\fB\-XX:InitialHeapSize\fR
+and
+\fB\-XX:MaxHeapSize\fR
+are often set to the same value\&. For more information, see Garbage Collector Ergonomics at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/vm/gc\-ergonomics\&.html
+.sp
The following examples show how to set the maximum allowed size of allocated memory to 80 MB using various units:
-.sp
-.nf
-\f3\-XX:MaxHeapSize=83886080\fP
-.fi
-.nf
-\f3\-XX:MaxHeapSize=81920k\fP
-.fi
-.nf
-\f3\-XX:MaxHeapSize=80m\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:MaxHeapSize=83886080\fR
+\fB\-XX:MaxHeapSize=81920k\fR
+\fB\-XX:MaxHeapSize=80m\fR
+
+.fi
+.if n \{\
+.RE
+.\}
On Oracle Solaris 7 and Oracle Solaris 8 SPARC platforms, the upper limit for this value is approximately 4,000 MB minus overhead amounts\&. On Oracle Solaris 2\&.6 and x86 platforms, the upper limit is approximately 2,000 MB minus overhead amounts\&. On Linux platforms, the upper limit is approximately 2,000 MB minus overhead amounts\&.
-
-The \f3-XX:MaxHeapSize\fR option is equivalent to \f3-Xmx\fR\&.
-.TP
--XX:MaxHeapFreeRatio=\fIpercent\fR
-.br
+.sp
+The
+\fB\-XX:MaxHeapSize\fR
+option is equivalent to
+\fB\-Xmx\fR\&.
+.RE
+.PP
+\-XX:MaxHeapFreeRatio=\fIpercent\fR
+.RS 4
Sets the maximum allowed percentage of free heap space (0 to 100) after a GC event\&. If free heap space expands above this value, then the heap will be shrunk\&. By default, this value is set to 70%\&.
-
+.sp
The following example shows how to set the maximum free heap ratio to 75%:
-.sp
-.nf
-\f3\-XX:MaxHeapFreeRatio=75\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:MaxMetaspaceSize=\fIsize\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:MaxHeapFreeRatio=75\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:MaxMetaspaceSize=\fIsize\fR
+.RS 4
Sets the maximum amount of native memory that can be allocated for class metadata\&. By default, the size is not limited\&. The amount of metadata for an application depends on the application itself, other running applications, and the amount of memory available on the system\&.
-
+.sp
The following example shows how to set the maximum class metadata size to 256 MB:
-.sp
-.nf
-\f3\-XX:MaxMetaspaceSize=256m\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:MaxNewSize=\fIsize\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:MaxMetaspaceSize=256m\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:MaxNewSize=\fIsize\fR
+.RS 4
Sets the maximum size (in bytes) of the heap for the young generation (nursery)\&. The default value is set ergonomically\&.
-.TP
--XX:MaxTenuringThreshold=\fIthreshold\fR
-.br
+.RE
+.PP
+\-XX:MaxTenuringThreshold=\fIthreshold\fR
+.RS 4
Sets the maximum tenuring threshold for use in adaptive GC sizing\&. The largest value is 15\&. The default value is 15 for the parallel (throughput) collector, and 6 for the CMS collector\&.
-
+.sp
The following example shows how to set the maximum tenuring threshold to 10:
-.sp
-.nf
-\f3\-XX:MaxTenuringThreshold=10\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:MetaspaceSize=\fIsize\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:MaxTenuringThreshold=10\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:MetaspaceSize=\fIsize\fR
+.RS 4
Sets the size of the allocated class metadata space that will trigger a garbage collection the first time it is exceeded\&. This threshold for a garbage collection is increased or decreased depending on the amount of metadata used\&. The default size depends on the platform\&.
-.TP
--XX:MinHeapFreeRatio=\fIpercent\fR
-.br
+.RE
+.PP
+\-XX:MinHeapFreeRatio=\fIpercent\fR
+.RS 4
Sets the minimum allowed percentage of free heap space (0 to 100) after a GC event\&. If free heap space falls below this value, then the heap will be expanded\&. By default, this value is set to 40%\&.
-
+.sp
The following example shows how to set the minimum free heap ratio to 25%:
-.sp
-.nf
-\f3\-XX:MinHeapFreeRatio=25\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:NewRatio=\fIratio\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:MinHeapFreeRatio=25\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:NewRatio=\fIratio\fR
+.RS 4
Sets the ratio between young and old generation sizes\&. By default, this option is set to 2\&. The following example shows how to set the young/old ratio to 1:
-.sp
-.nf
-\f3\-XX:NewRatio=1\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:NewSize=\fIsize\fR
-.br
-Sets the initial size (in bytes) of the heap for the young generation (nursery)\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&.
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:NewRatio=1\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:NewSize=\fIsize\fR
+.RS 4
+Sets the initial size (in bytes) of the heap for the young generation (nursery)\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&.
+.sp
The young generation region of the heap is used for new objects\&. GC is performed in this region more often than in other regions\&. If the size for the young generation is too low, then a large number of minor GCs will be performed\&. If the size is too high, then only full GCs will be performed, which can take a long time to complete\&. Oracle recommends that you keep the size for the young generation between a half and a quarter of the overall heap size\&.
-
+.sp
The following examples show how to set the initial size of young generation to 256 MB using various units:
-.sp
-.nf
-\f3\-XX:NewSize=256m\fP
-.fi
-.nf
-\f3\-XX:NewSize=262144k\fP
-.fi
-.nf
-\f3\-XX:NewSize=268435456\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-The \f3-XX:NewSize\fR option is equivalent to \f3-Xmn\fR\&.
-.TP
--XX:ParallelGCThreads=\fIthreads\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:NewSize=256m\fR
+\fB\-XX:NewSize=262144k\fR
+\fB\-XX:NewSize=268435456\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The
+\fB\-XX:NewSize\fR
+option is equivalent to
+\fB\-Xmn\fR\&.
+.RE
+.PP
+\-XX:ParallelGCThreads=\fIthreads\fR
+.RS 4
Sets the number of threads used for parallel garbage collection in the young and old generations\&. The default value depends on the number of CPUs available to the JVM\&.
-
+.sp
For example, to set the number of threads for parallel GC to 2, specify the following option:
-.sp
-.nf
-\f3\-XX:ParallelGCThreads=2\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:+ParallelRefProcEnabled
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:ParallelGCThreads=2\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:+ParallelRefProcEnabled
+.RS 4
Enables parallel reference processing\&. By default, this option is disabled\&.
-.TP
--XX:+PrintAdaptiveSizePolicy
-.br
+.RE
+.PP
+\-XX:+PrintAdaptiveSizePolicy
+.RS 4
Enables printing of information about adaptive generation sizing\&. By default, this option is disabled\&.
-.TP
--XX:+PrintGC
-.br
+.RE
+.PP
+\-XX:+PrintGC
+.RS 4
Enables printing of messages at every GC\&. By default, this option is disabled\&.
-.TP
--XX:+PrintGCApplicationConcurrentTime
-.br
+.RE
+.PP
+\-XX:+PrintGCApplicationConcurrentTime
+.RS 4
Enables printing of how much time elapsed since the last pause (for example, a GC pause)\&. By default, this option is disabled\&.
-.TP
--XX:+PrintGCApplicationStoppedTime
-.br
+.RE
+.PP
+\-XX:+PrintGCApplicationStoppedTime
+.RS 4
Enables printing of how much time the pause (for example, a GC pause) lasted\&. By default, this option is disabled\&.
-.TP
--XX+PrintGCDateStamp
-.br
+.RE
+.PP
+\-XX:+PrintGCDateStamps
+.RS 4
Enables printing of a date stamp at every GC\&. By default, this option is disabled\&.
-.TP
--XX:+PrintGCDetails
-.br
+.RE
+.PP
+\-XX:+PrintGCDetails
+.RS 4
Enables printing of detailed messages at every GC\&. By default, this option is disabled\&.
-.TP
--XX:+PrintGCTaskTimeStamps
-.br
+.RE
+.PP
+\-XX:+PrintGCTaskTimeStamps
+.RS 4
Enables printing of time stamps for every individual GC worker thread task\&. By default, this option is disabled\&.
-.TP
--XX:+PrintGCTimeStamp
-.br
+.RE
+.PP
+\-XX:+PrintGCTimeStamps
+.RS 4
Enables printing of time stamps at every GC\&. By default, this option is disabled\&.
-.TP
--XX:+PrintTenuringDistribution
-.br
+.RE
+.PP
+\-XX:+PrintStringDeduplicationStatistics
+.RS 4
+Prints detailed deduplication statistics\&. By default, this option is disabled\&. See the
+\fB\-XX:+UseStringDeduplication\fR
+option\&.
+.RE
+.PP
+\-XX:+PrintTenuringDistribution
+.RS 4
Enables printing of tenuring age information\&. The following is an example of the output:
-.sp
-.nf
-\f3Desired survivor size 48286924 bytes, new threshold 10 (max 10)\fP
-.fi
-.nf
-\f3\- age 1: 28992024 bytes, 28992024 total\fP
-.fi
-.nf
-\f3\- age 2: 1366864 bytes, 30358888 total\fP
-.fi
-.nf
-\f3\- age 3: 1425912 bytes, 31784800 total\fP
-.fi
-.nf
-\f3\&.\&.\&.\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBDesired survivor size 48286924 bytes, new threshold 10 (max 10)\fR
+\fB\- age 1: 28992024 bytes, 28992024 total\fR
+\fB\- age 2: 1366864 bytes, 30358888 total\fR
+\fB\- age 3: 1425912 bytes, 31784800 total\fR
+\fB\&.\&.\&.\fR
+
+.fi
+.if n \{\
+.RE
+.\}
Age 1 objects are the youngest survivors (they were created after the previous scavenge, survived the latest scavenge, and moved from eden to survivor space)\&. Age 2 objects have survived two scavenges (during the second scavenge they were copied from one survivor space to the next)\&. And so on\&.
-
+.sp
In the preceding example, 28 992 024 bytes survived one scavenge and were copied from eden to survivor space, 1 366 864 bytes are occupied by age 2 objects, etc\&. The third value in each row is the cumulative size of objects of age n or less\&.
-
+.sp
By default, this option is disabled\&.
-.TP
--XX:+ScavengeBeforeFullGC
-.br
-Enables GC of the young generation before each full GC\&. This option is enabled by default\&. Oracle recommends that you \fIdo not\fR disable it, because scavenging the young generation before a full GC can reduce the number of objects reachable from the old generation space into the young generation space\&. To disable GC of the young generation before each full GC, specify \f3-XX:-ScavengeBeforeFullGC\fR\&.
-.TP
--XX:SoftRefLRUPolicyMSPerMB=\fItime\fR
-.br
-Sets the amount of time (in milliseconds) a softly reachable object is kept active on the heap after the last time it was referenced\&. The default value is one second of lifetime per free megabyte in the heap\&. The \f3-XX:SoftRefLRUPolicyMSPerMB\fR option accepts integer values representing milliseconds per one megabyte of the current heap size (for Java HotSpot Client VM) or the maximum possible heap size (for Java HotSpot Server VM)\&. This difference means that the Client VM tends to flush soft references rather than grow the heap, whereas the Server VM tends to grow the heap rather than flush soft references\&. In the latter case, the value of the \f3-Xmx\fR option has a significant effect on how quickly soft references are garbage collected\&.
-
+.RE
+.PP
+\-XX:+ScavengeBeforeFullGC
+.RS 4
+Enables GC of the young generation before each full GC\&. This option is enabled by default\&. Oracle recommends that you
+\fIdo not\fR
+disable it, because scavenging the young generation before a full GC can reduce the number of objects reachable from the old generation space into the young generation space\&. To disable GC of the young generation before each full GC, specify
+\fB\-XX:\-ScavengeBeforeFullGC\fR\&.
+.RE
+.PP
+\-XX:SoftRefLRUPolicyMSPerMB=\fItime\fR
+.RS 4
+Sets the amount of time (in milliseconds) a softly reachable object is kept active on the heap after the last time it was referenced\&. The default value is one second of lifetime per free megabyte in the heap\&. The
+\fB\-XX:SoftRefLRUPolicyMSPerMB\fR
+option accepts integer values representing milliseconds per one megabyte of the current heap size (for Java HotSpot Client VM) or the maximum possible heap size (for Java HotSpot Server VM)\&. This difference means that the Client VM tends to flush soft references rather than grow the heap, whereas the Server VM tends to grow the heap rather than flush soft references\&. In the latter case, the value of the
+\fB\-Xmx\fR
+option has a significant effect on how quickly soft references are garbage collected\&.
+.sp
The following example shows how to set the value to 2\&.5 seconds:
-.sp
-.nf
-\f3\-XX:SoftRefLRUPolicyMSPerMB=2500\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:SurvivorRatio=\fIratio\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:SoftRefLRUPolicyMSPerMB=2500\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:StringDeduplicationAgeThreshold=\fIthreshold\fR
+.RS 4
+\fBString\fR
+objects reaching the specified age are considered candidates for deduplication\&. An object\*(Aqs age is a measure of how many times it has survived garbage collection\&. This is sometimes referred to as tenuring; see the
+\fB\-XX:+PrintTenuringDistribution\fR
+option\&. Note that
+\fBString\fR
+objects that are promoted to an old heap region before this age has been reached are always considered candidates for deduplication\&. The default value for this option is
+\fB3\fR\&. See the
+\fB\-XX:+UseStringDeduplication\fR
+option\&.
+.RE
+.PP
+\-XX:SurvivorRatio=\fIratio\fR
+.RS 4
Sets the ratio between eden space size and survivor space size\&. By default, this option is set to 8\&. The following example shows how to set the eden/survivor space ratio to 4:
-.sp
-.nf
-\f3\-XX:SurvivorRatio=4\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:TargetSurvivorRatio=\fIpercent\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:SurvivorRatio=4\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:TargetSurvivorRatio=\fIpercent\fR
+.RS 4
Sets the desired percentage of survivor space (0 to 100) used after young garbage collection\&. By default, this option is set to 50%\&.
-
+.sp
The following example shows how to set the target survivor space ratio to 30%:
-.sp
-.nf
-\f3\-XX:TargetSurvivorRatio=30\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:TLABSize=\fIsize\fR
-.br
-Sets the initial size (in bytes) of a thread-local allocation buffer (TLAB)\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes, \f3m\fR or \f3M\fR to indicate megabytes, \f3g\fR or \f3G\fR to indicate gigabytes\&. If this option is set to 0, then the JVM chooses the initial size automatically\&.
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:TargetSurvivorRatio=30\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:TLABSize=\fIsize\fR
+.RS 4
+Sets the initial size (in bytes) of a thread\-local allocation buffer (TLAB)\&. Append the letter
+\fBk\fR
+or
+\fBK\fR
+to indicate kilobytes,
+\fBm\fR
+or
+\fBM\fR
+to indicate megabytes,
+\fBg\fR
+or
+\fBG\fR
+to indicate gigabytes\&. If this option is set to 0, then the JVM chooses the initial size automatically\&.
+.sp
The following example shows how to set the initial TLAB size to 512 KB:
-.sp
-.nf
-\f3\-XX:TLABSize=512k\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--XX:+UseAdaptiveSizePolicy
-.br
-Enables the use of adaptive generation sizing\&. This option is enabled by default\&. To disable adaptive generation sizing, specify \f3-XX:-UseAdaptiveSizePolicy\fR and set the size of the memory allocation pool explicitly (see the \f3-XX:SurvivorRatio\fR option)\&.
-.TP
--XX:+UseCMSInitiatingOccupancyOnly
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-XX:TLABSize=512k\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-XX:+UseAdaptiveSizePolicy
+.RS 4
+Enables the use of adaptive generation sizing\&. This option is enabled by default\&. To disable adaptive generation sizing, specify
+\fB\-XX:\-UseAdaptiveSizePolicy\fR
+and set the size of the memory allocation pool explicitly (see the
+\fB\-XX:SurvivorRatio\fR
+option)\&.
+.RE
+.PP
+\-XX:+UseCMSInitiatingOccupancyOnly
+.RS 4
Enables the use of the occupancy value as the only criterion for initiating the CMS collector\&. By default, this option is disabled and other criteria may be used\&.
-.TP
--XX:+UseConcMarkSweepGC
-.br
-Enables the use of the CMS garbage collector for the old generation\&. Oracle recommends that you use the CMS garbage collector when application latency requirements cannot be met by the throughput (\f3-XX:+UseParallelGC\fR) garbage collector\&. The G1 garbage collector (\f3-XX:+UseG1GC\fR) is another alternative\&.
-
-By default, this option is disabled and the collector is chosen automatically based on the configuration of the machine and type of the JVM\&. When this option is enabled, the \f3-XX:+UseParNewGC\fR option is automatically set and you should not disable it, because the following combination of options has been deprecated in JDK 8: \f3-XX:+UseConcMarkSweepGC -XX:-UseParNewGC\fR\&.
-.TP
--XX:+UseG1GC
-.br
-Enables the use of the G1 garbage collector\&. It is a server-style garbage collector, targeted for multiprocessor machines with a large amount of RAM\&. It meets GC pause time goals with high probability, while maintaining good throughput\&. The G1 collector is recommended for applications requiring large heaps (sizes of around 6 GB or larger) with limited GC latency requirements (stable and predictable pause time below 0\&.5 seconds)\&.
-
+.RE
+.PP
+\-XX:+UseConcMarkSweepGC
+.RS 4
+Enables the use of the CMS garbage collector for the old generation\&. Oracle recommends that you use the CMS garbage collector when application latency requirements cannot be met by the throughput (\fB\-XX:+UseParallelGC\fR) garbage collector\&. The G1 garbage collector (\fB\-XX:+UseG1GC\fR) is another alternative\&.
+.sp
+By default, this option is disabled and the collector is chosen automatically based on the configuration of the machine and type of the JVM\&. When this option is enabled, the
+\fB\-XX:+UseParNewGC\fR
+option is automatically set and you should not disable it, because the following combination of options has been deprecated in JDK 8:
+\fB\-XX:+UseConcMarkSweepGC \-XX:\-UseParNewGC\fR\&.
+.RE
+.PP
+\-XX:+UseG1GC
+.RS 4
+Enables the use of the garbage\-first (G1) garbage collector\&. It is a server\-style garbage collector, targeted for multiprocessor machines with a large amount of RAM\&. It meets GC pause time goals with high probability, while maintaining good throughput\&. The G1 collector is recommended for applications requiring large heaps (sizes of around 6 GB or larger) with limited GC latency requirements (stable and predictable pause time below 0\&.5 seconds)\&.
+.sp
By default, this option is disabled and the collector is chosen automatically based on the configuration of the machine and type of the JVM\&.
-.TP
--XX:+UseGCOverheadLimit
-.br
-Enables the use of a policy that limits the proportion of time spent by the JVM on GC before an \f3OutOfMemoryError\fR exception is thrown\&. This option is enabled, by default and the parallel GC will throw an \f3OutOfMemoryError\fR if more than 98% of the total time is spent on garbage collection and less than 2% of the heap is recovered\&. When the heap is small, this feature can be used to prevent applications from running for long periods of time with little or no progress\&. To disable this option, specify \f3-XX:-UseGCOverheadLimit\fR\&.
-.TP
--XX:+UseNUMA
-.br
-Enables performance optimization of an application on a machine with nonuniform memory architecture (NUMA) by increasing the application\&'s use of lower latency memory\&. By default, this option is disabled and no optimization for NUMA is made\&. The option is only available when the parallel garbage collector is used (\f3-XX:+UseParallelGC\fR)\&.
-.TP
--XX:+UseParallelGC
-.br
+.RE
+.PP
+\-XX:+UseGCOverheadLimit
+.RS 4
+Enables the use of a policy that limits the proportion of time spent by the JVM on GC before an
+\fBOutOfMemoryError\fR
+exception is thrown\&. This option is enabled, by default and the parallel GC will throw an
+\fBOutOfMemoryError\fR
+if more than 98% of the total time is spent on garbage collection and less than 2% of the heap is recovered\&. When the heap is small, this feature can be used to prevent applications from running for long periods of time with little or no progress\&. To disable this option, specify
+\fB\-XX:\-UseGCOverheadLimit\fR\&.
+.RE
+.PP
+\-XX:+UseNUMA
+.RS 4
+Enables performance optimization of an application on a machine with nonuniform memory architecture (NUMA) by increasing the application\*(Aqs use of lower latency memory\&. By default, this option is disabled and no optimization for NUMA is made\&. The option is only available when the parallel garbage collector is used (\fB\-XX:+UseParallelGC\fR)\&.
+.RE
+.PP
+\-XX:+UseParallelGC
+.RS 4
Enables the use of the parallel scavenge garbage collector (also known as the throughput collector) to improve the performance of your application by leveraging multiple processors\&.
-
-By default, this option is disabled and the collector is chosen automatically based on the configuration of the machine and type of the JVM\&. If it is enabled, then the \f3-XX:+UseParallelOldGC\fR option is automatically enabled, unless you explicitly disable it\&.
-.TP
--XX:+UseParallelOldGC
-.br
-Enables the use of the parallel garbage collector for full GCs\&. By default, this option is disabled\&. Enabling it automatically enables the \f3-XX:+UseParallelGC\fR option\&.
-.TP
--XX:+UseParNewGC
-.br
-Enables the use of parallel threads for collection in the young generation\&. By default, this option is disabled\&. It is automatically enabled when you set the \f3-XX:+UseConcMarkSweepGC\fR option\&. Using the \f3-XX:+UseParNewGC\fR option without the \f3-XX:+UseConcMarkSweepGC\fR option was deprecated in JDK 8\&.
-.TP
--XX:+UseSerialGC
-.br
+.sp
+By default, this option is disabled and the collector is chosen automatically based on the configuration of the machine and type of the JVM\&. If it is enabled, then the
+\fB\-XX:+UseParallelOldGC\fR
+option is automatically enabled, unless you explicitly disable it\&.
+.RE
+.PP
+\-XX:+UseParallelOldGC
+.RS 4
+Enables the use of the parallel garbage collector for full GCs\&. By default, this option is disabled\&. Enabling it automatically enables the
+\fB\-XX:+UseParallelGC\fR
+option\&.
+.RE
+.PP
+\-XX:+UseParNewGC
+.RS 4
+Enables the use of parallel threads for collection in the young generation\&. By default, this option is disabled\&. It is automatically enabled when you set the
+\fB\-XX:+UseConcMarkSweepGC\fR
+option\&. Using the
+\fB\-XX:+UseParNewGC\fR
+option without the
+\fB\-XX:+UseConcMarkSweepGC\fR
+option was deprecated in JDK 8\&.
+.RE
+.PP
+\-XX:+UseSerialGC
+.RS 4
Enables the use of the serial garbage collector\&. This is generally the best choice for small and simple applications that do not require any special functionality from garbage collection\&. By default, this option is disabled and the collector is chosen automatically based on the configuration of the machine and type of the JVM\&.
-.TP
--XX:+UseTLAB
-.br
-Enables the use of thread-local allocation blocks (TLABs) in the young generation space\&. This option is enabled by default\&. To disable the use of TLABs, specify \f3-XX:-UseTLAB\fR\&.
-.SS DEPRECATED\ AND\ REMOVED\ OPTIONS
+.RE
+.PP
+\-XX:+UseStringDeduplication
+.RS 4
+Enables string deduplication\&. By default, this option is disabled\&. To use this option, you must enable the garbage\-first (G1) garbage collector\&. See the
+\fB\-XX:+UseG1GC\fR
+option\&.
+.sp
+\fIString deduplication\fR
+reduces the memory footprint of
+\fBString\fR
+objects on the Java heap by taking advantage of the fact that many
+\fBString\fR
+objects are identical\&. Instead of each
+\fBString\fR
+object pointing to its own character array, identical
+\fBString\fR
+objects can point to and share the same character array\&.
+.RE
+.PP
+\-XX:+UseTLAB
+.RS 4
+Enables the use of thread\-local allocation blocks (TLABs) in the young generation space\&. This option is enabled by default\&. To disable the use of TLABs, specify
+\fB\-XX:\-UseTLAB\fR\&.
+.RE
+.SS "Deprecated and Removed Options"
+.PP
These options were included in the previous release, but have since been considered unnecessary\&.
-.TP
--Xincgc
-.br
+.PP
+\-Xincgc
+.RS 4
Enables incremental garbage collection\&. This option was deprecated in JDK 8 with no replacement\&.
-.TP
--Xrun\fIlibname\fR
-.br
-Loads the specified debugging/profiling library\&. This option was superseded by the \f3-agentlib\fR option\&.
-.TP
--XX:CMSIncrementalDutyCycle=\fIpercent\fR
-.br
-Sets the percentage of time (0 to 100) between minor collections that the concurrent collector is allowed to run\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the \f3-XX:+CMSIncrementalMode\fR option\&.
-.TP
--XX:CMSIncrementalDutyCycleMin=\fIpercent\fR
-.br
-Sets the percentage of time (0 to 100) between minor collections that is the lower bound for the duty cycle when \f3-XX:+CMSIncrementalPacing\fR is enabled\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the \f3-XX:+CMSIncrementalMode\fR option\&.
-.TP
--XX:+CMSIncrementalMode
-.br
-Enables the incremental mode for the CMS collector\&. This option was deprecated in JDK 8 with no replacement, along with other options that start with \f3CMSIncremental\fR\&.
-.TP
--XX:CMSIncrementalOffset=\fIpercent\fR
-.br
-Sets the percentage of time (0 to 100) by which the incremental mode duty cycle is shifted to the right within the period between minor collections\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the \f3-XX:+CMSIncrementalMode\fR option\&.
-.TP
--XX:+CMSIncrementalPacing
-.br
-Enables automatic adjustment of the incremental mode duty cycle based on statistics collected while the JVM is running\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the \f3-XX:+CMSIncrementalMode\fR option\&.
-.TP
--XX:CMSIncrementalSafetyFactor=\fIpercent\fR
-.br
-Sets the percentage of time (0 to 100) used to add conservatism when computing the duty cycle\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the \f3-XX:+CMSIncrementalMode\fR option\&.
-.TP
--XX:CMSInitiatingPermOccupancyFraction=\fIpercent\fR
-.br
+.RE
+.PP
+\-Xrun\fIlibname\fR
+.RS 4
+Loads the specified debugging/profiling library\&. This option was superseded by the
+\fB\-agentlib\fR
+option\&.
+.RE
+.PP
+\-XX:CMSIncrementalDutyCycle=\fIpercent\fR
+.RS 4
+Sets the percentage of time (0 to 100) between minor collections that the concurrent collector is allowed to run\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the
+\fB\-XX:+CMSIncrementalMode\fR
+option\&.
+.RE
+.PP
+\-XX:CMSIncrementalDutyCycleMin=\fIpercent\fR
+.RS 4
+Sets the percentage of time (0 to 100) between minor collections that is the lower bound for the duty cycle when
+\fB\-XX:+CMSIncrementalPacing\fR
+is enabled\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the
+\fB\-XX:+CMSIncrementalMode\fR
+option\&.
+.RE
+.PP
+\-XX:+CMSIncrementalMode
+.RS 4
+Enables the incremental mode for the CMS collector\&. This option was deprecated in JDK 8 with no replacement, along with other options that start with
+\fBCMSIncremental\fR\&.
+.RE
+.PP
+\-XX:CMSIncrementalOffset=\fIpercent\fR
+.RS 4
+Sets the percentage of time (0 to 100) by which the incremental mode duty cycle is shifted to the right within the period between minor collections\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the
+\fB\-XX:+CMSIncrementalMode\fR
+option\&.
+.RE
+.PP
+\-XX:+CMSIncrementalPacing
+.RS 4
+Enables automatic adjustment of the incremental mode duty cycle based on statistics collected while the JVM is running\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the
+\fB\-XX:+CMSIncrementalMode\fR
+option\&.
+.RE
+.PP
+\-XX:CMSIncrementalSafetyFactor=\fIpercent\fR
+.RS 4
+Sets the percentage of time (0 to 100) used to add conservatism when computing the duty cycle\&. This option was deprecated in JDK 8 with no replacement, following the deprecation of the
+\fB\-XX:+CMSIncrementalMode\fR
+option\&.
+.RE
+.PP
+\-XX:CMSInitiatingPermOccupancyFraction=\fIpercent\fR
+.RS 4
Sets the percentage of the permanent generation occupancy (0 to 100) at which to start a GC\&. This option was deprecated in JDK 8 with no replacement\&.
-.TP
--XX:MaxPermSize=\fIsize\fR
-.br
-Sets the maximum permanent generation space size (in bytes)\&. This option was deprecated in JDK 8, and superseded by the \f3-XX:MaxMetaspaceSize\fR option\&.
-.TP
--XX:PermSize=\fIsize\fR
-.br
-Sets the space (in bytes) allocated to the permanent generation that triggers a garbage collection if it is exceeded\&. This option was deprecated un JDK 8, and superseded by the \f3-XX:MetaspaceSize\fR option\&.
-.TP
--XX:+UseSplitVerifier
-.br
+.RE
+.PP
+\-XX:MaxPermSize=\fIsize\fR
+.RS 4
+Sets the maximum permanent generation space size (in bytes)\&. This option was deprecated in JDK 8, and superseded by the
+\fB\-XX:MaxMetaspaceSize\fR
+option\&.
+.RE
+.PP
+\-XX:PermSize=\fIsize\fR
+.RS 4
+Sets the space (in bytes) allocated to the permanent generation that triggers a garbage collection if it is exceeded\&. This option was deprecated un JDK 8, and superseded by the
+\fB\-XX:MetaspaceSize\fR
+option\&.
+.RE
+.PP
+\-XX:+UseSplitVerifier
+.RS 4
Enables splitting of the verification process\&. By default, this option was enabled in the previous releases, and verification was split into two phases: type referencing (performed by the compiler) and type checking (performed by the JVM runtime)\&. This option was deprecated in JDK 8, and verification is now split by default without a way to disable it\&.
-.TP
--XX:+UseStringCache
-.br
+.RE
+.PP
+\-XX:+UseStringCache
+.RS 4
Enables caching of commonly allocated strings\&. This option was removed from JDK 8 with no replacement\&.
-.SH PERFORMANCE\ TUNING\ EXAMPLES
+.RE
+.SH "PERFORMANCE TUNING EXAMPLES"
+.PP
The following examples show how to use experimental tuning flags to either optimize throughput or to provide lower response time\&.
.PP
-\f3Example 1 Tuning for Higher Throughput\fR
-.sp
-.nf
-\f3java \-d64 \-server \-XX:+AggressiveOpts \-XX:+UseLargePages \-Xmn10g \-Xms26g \-Xmx26g\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-\f3Example 2 Tuning for Lower Response Time\fR
-.sp
-.nf
-\f3java \-d64 \-XX:+UseG1GC \-Xms26g Xmx26g \-XX:MaxGCPauseMillis=500 \-XX:+PrintGCTimeStamp\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-.SH EXIT\ STATUS
-The following exit values are typically returned by the launcher when the launcher is called with the wrong arguments, serious errors, or exceptions thrown by the JVM\&. However, a Java application may choose to return any value by using the API call \f3System\&.exit(exitValue)\fR\&. The values are:
-.TP 0.2i
-\(bu
-\f30\fR: Successful completion
-.TP 0.2i
-\(bu
-\f3>0\fR: An error occurred
-.SH SEE\ ALSO
-.TP 0.2i
-\(bu
+\fBExample 1\fR
+.br
+Tuning for Higher Throughput
+.RS 4
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjava \-d64 \-server \-XX:+AggressiveOpts \-XX:+UseLargePages \-Xmn10g \-Xms26g \-Xmx26g\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBExample 2\fR
+.br
+Tuning for Lower Response Time
+.RS 4
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjava \-d64 \-XX:+UseG1GC \-Xms26g Xmx26g \-XX:MaxGCPauseMillis=500 \-XX:+PrintGCTimeStamp\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.SH "EXIT STATUS"
+.PP
+The following exit values are typically returned by the launcher when the launcher is called with the wrong arguments, serious errors, or exceptions thrown by the JVM\&. However, a Java application may choose to return any value by using the API call
+\fBSystem\&.exit(exitValue)\fR\&. The values are:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fB0\fR: Successful completion
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fB>0\fR: An error occurred
+.RE
+.SH "SEE ALSO"
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
javac(1)
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
jdb(1)
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
javah(1)
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
jar(1)
-.RE
-.br
-'pl 8.5i
-'bp
+.RE
+.br
+'pl 8.5i
+'bp
diff --git a/src/solaris/doc/sun/man/man1/javac.1 b/src/solaris/doc/sun/man/man1/javac.1
index 3cbc97614..a3d55e275 100644
--- a/src/solaris/doc/sun/man/man1/javac.1
+++ b/src/solaris/doc/sun/man/man1/javac.1
@@ -1,1364 +1,2116 @@
'\" t
-.\" Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
-.\"
-.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-.\"
-.\" This code is free software; you can redistribute it and/or modify it
-.\" under the terms of the GNU General Public License version 2 only, as
-.\" published by the Free Software Foundation.
-.\"
-.\" 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.
-.\"
-.\" Arch: generic
-.\" Software: JDK 8
-.\" Date: 21 November 2013
-.\" SectDesc: Basic Tools
-.\" Title: javac.1
+.\" Copyright (c) 1994, 2014, Oracle and/or its affiliates. All rights reserved.
+.\"
+.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+.\"
+.\" This code is free software; you can redistribute it and/or modify it
+.\" under the terms of the GNU General Public License version 2 only, as
+.\" published by the Free Software Foundation.
+.\"
+.\" 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.
+.\"
+.\" Title: javac
+.\" Language: English
+.\" Date: 8 August 2014
+.\" SectDesc: Basic Tools
+.\" Software: JDK 8
+.\" Arch: generic
+.\" Part Number: E38207-03
.\"
.if n .pl 99999
-.TH javac 1 "21 November 2013" "JDK 8" "Basic Tools"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-
-.SH NAME
+.TH "javac" "1" "8 August 2014" "JDK 8" "Basic Tools"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
javac \- Reads Java class and interface definitions and compiles them into bytecode and class files\&.
-.SH SYNOPSIS
-.sp
-.nf
-
+.SH "SYNOPSIS"
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
\fBjavac\fR [ \fIoptions\fR ] [ \fIsourcefiles\fR ] [ \fIclasses\fR] [ \fI@argfiles\fR ]
-.fi
-.sp
+.fi
+.if n \{\
+.RE
+.\}
+.PP
Arguments can be in any order:
-.TP
+.PP
\fIoptions\fR
-Command-line options\&. See Options\&.
-.TP
+.RS 4
+Command\-line options\&. See Options\&.
+.RE
+.PP
\fIsourcefiles\fR
-One or more source files to be compiled (such as \f3MyClass\&.java\fR)\&.
-.TP
+.RS 4
+One or more source files to be compiled (such as
+\fBMyClass\&.java\fR)\&.
+.RE
+.PP
\fIclasses\fR
-One or more classes to be processed for annotations (such as \f3MyPackage\&.MyClass\fR)\&.
-.TP
+.RS 4
+One or more classes to be processed for annotations (such as
+\fBMyPackage\&.MyClass\fR)\&.
+.RE
+.PP
\fI@argfiles\fR
-One or more files that list options and source files\&. The \f3-J\fR options are not allowed in these files\&. See Command-Line Argument Files\&.
-.SH DESCRIPTION
-The \f3javac\fR command reads class and interface definitions, written in the Java programming language, and compiles them into bytecode class files\&. The \f3javac\fR command can also process annotations in Java source files and classes\&.
+.RS 4
+One or more files that list options and source files\&. The
+\fB\-J\fR
+options are not allowed in these files\&. See Command\-Line Argument Files\&.
+.RE
+.SH "DESCRIPTION"
+.PP
+The
+\fBjavac\fR
+command reads class and interface definitions, written in the Java programming language, and compiles them into bytecode class files\&. The
+\fBjavac\fR
+command can also process annotations in Java source files and classes\&.
.PP
-There are two ways to pass source code file names to \f3javac\fR\&.
-.TP 0.2i
-\(bu
+There are two ways to pass source code file names to
+\fBjavac\fR\&.
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
For a small number of source files, list the file names on the command line\&.
-.TP 0.2i
-\(bu
-For a large number of source files, list the file names in a file that is separated by blanks or line breaks\&. Use the list file name preceded by an at sign (@) with the \f3javac\fR command\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+For a large number of source files, list the file names in a file that is separated by blanks or line breaks\&. Use the list file name preceded by an at sign (@) with the
+\fBjavac\fR
+command\&.
+.RE
.PP
-Source code file names must have \&.java suffixes, class file names must have \&.class suffixes, and both source and class files must have root names that identify the class\&. For example, a class called \f3MyClass\fR would be written in a source file called \f3MyClass\&.java\fR and compiled into a bytecode class file called \f3MyClass\&.class\fR\&.
+Source code file names must have \&.java suffixes, class file names must have \&.class suffixes, and both source and class files must have root names that identify the class\&. For example, a class called
+\fBMyClass\fR
+would be written in a source file called
+\fBMyClass\&.java\fR
+and compiled into a bytecode class file called
+\fBMyClass\&.class\fR\&.
.PP
-Inner class definitions produce additional class files\&. These class files have names that combine the inner and outer class names, such as \f3MyClass$MyInnerClass\&.class\fR\&.
+Inner class definitions produce additional class files\&. These class files have names that combine the inner and outer class names, such as
+\fBMyClass$MyInnerClass\&.class\fR\&.
.PP
-Arrange source files in a directory tree that reflects their package tree\&. For example, if all of your source files are in \f3/workspace\fR, then put the source code for \f3com\&.mysoft\&.mypack\&.MyClass\fR in \f3/workspace/com/mysoft/mypack/MyClass\&.java\fR\&.
+Arrange source files in a directory tree that reflects their package tree\&. For example, if all of your source files are in
+\fB/workspace\fR, then put the source code for
+\fBcom\&.mysoft\&.mypack\&.MyClass\fR
+in
+\fB/workspace/com/mysoft/mypack/MyClass\&.java\fR\&.
.PP
-By default, the compiler puts each class file in the same directory as its source file\&. You can specify a separate destination directory with the \f3-d\fR option\&.
-.SH OPTIONS
-The compiler has a set of standard options that are supported on the current development environment\&. An additional set of nonstandard options are specific to the current virtual machine and compiler implementations and are subject to change in the future\&. Nonstandard options begin with the \f3-X\fR option\&.
-.TP 0.2i
-\(bu
-See also Cross-Compilation Options
-.TP 0.2i
-\(bu
+By default, the compiler puts each class file in the same directory as its source file\&. You can specify a separate destination directory with the
+\fB\-d\fR
+option\&.
+.SH "OPTIONS"
+.PP
+The compiler has a set of standard options that are supported on the current development environment\&. An additional set of nonstandard options are specific to the current virtual machine and compiler implementations and are subject to change in the future\&. Nonstandard options begin with the
+\fB\-X\fR
+option\&.
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+See also Cross\-Compilation Options
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
See also Nonstandard Options
-.SS STANDARD\ OPTIONS
-.TP
--A\fIkey\fR[\fI=value\fR]
-.br
-Specifies options to pass to annotation processors\&. These options are not interpreted by \f3javac\fR directly, but are made available for use by individual processors\&. The \f3key\fR value should be one or more identifiers separated by a dot (\&.)\&.
-.TP
--cp \fIpath\fR or -classpath \fIpath\fR
-.br
-Specifies where to find user class files, and (optionally) annotation processors and source files\&. This class path overrides the user class path in the \f3CLASSPATH\fR environment variable\&. If neither \f3CLASSPATH\fR, \f3-cp\fR nor \f3-classpath\fR is specified, then the user \fIclass path\fR is the current directory\&. See Setting the Class Path\&.
-
-If the \f3-sourcepath\fR option is not specified, then the user class path is also searched for source files\&.
-
-If the \f3-processorpath\fR option is not specified, then the class path is also searched for annotation processors\&.
-.TP
--Djava\&.ext\&.dirs=\fIdirectories\fR
-.br
+.RE
+.SS "Standard Options"
+.PP
+\-A\fIkey\fR[\fI=value\fR]
+.RS 4
+Specifies options to pass to annotation processors\&. These options are not interpreted by
+\fBjavac\fR
+directly, but are made available for use by individual processors\&. The
+\fBkey\fR
+value should be one or more identifiers separated by a dot (\&.)\&.
+.RE
+.PP
+\-cp \fIpath\fR or \-classpath \fIpath\fR
+.RS 4
+Specifies where to find user class files, and (optionally) annotation processors and source files\&. This class path overrides the user class path in the
+\fBCLASSPATH\fR
+environment variable\&. If neither
+\fBCLASSPATH\fR,
+\fB\-cp\fR
+nor
+\fB\-classpath\fR
+is specified, then the user
+\fIclass path\fR
+is the current directory\&. See Setting the Class Path \&.
+.sp
+If the
+\fB\-sourcepath\fR
+option is not specified, then the user class path is also searched for source files\&.
+.sp
+If the
+\fB\-processorpath\fR
+option is not specified, then the class path is also searched for annotation processors\&.
+.RE
+.PP
+\-Djava\&.ext\&.dirs=\fIdirectories\fR
+.RS 4
Overrides the location of installed extensions\&.
-.TP
--Djava\&.endorsed\&.dirs=\fIdirectories\fR
-.br
+.RE
+.PP
+\-Djava\&.endorsed\&.dirs=\fIdirectories\fR
+.RS 4
Overrides the location of the endorsed standards path\&.
-.TP
--d \fIdirectory\fR
-.br
-Sets the destination directory for class files\&. The directory must already exist because \f3javac\fR does not create it\&. If a class is part of a package, then \f3javac\fR puts the class file in a subdirectory that reflects the package name and creates directories as needed\&.
-
-If you specify \f3-d\fR\f3/home/myclasses\fR and the class is called \f3com\&.mypackage\&.MyClass\fR, then the class file is \f3/home/myclasses/com/mypackage/MyClass\&.class\fR\&.
-
-If the \fI-d\fR option is not specified, then \f3javac\fR puts each class file in the same directory as the source file from which it was generated\&.
-
-\fINote:\fR The directory specified by the \fI-d\fR option is not automatically added to your user class path\&.
-.TP
--deprecation
-.br
-Shows a description of each use or override of a deprecated member or class\&. Without the \f3-deprecation\fR option, \f3javac\fR shows a summary of the source files that use or override deprecated members or classes\&. The \f3-deprecation\fR option is shorthand for \f3-Xlint:deprecation\fR\&.
-.TP
--encoding \fIencoding\fR
-.br
-Sets the source file encoding name, such as EUC-JP and UTF-8\&. If the \f3-encoding\fR option is not specified, then the platform default converter is used\&.
-.TP
--endorseddirs \fIdirectories\fR
-.br
+.RE
+.PP
+\-d \fIdirectory\fR
+.RS 4
+Sets the destination directory for class files\&. The directory must already exist because
+\fBjavac\fR
+does not create it\&. If a class is part of a package, then
+\fBjavac\fR
+puts the class file in a subdirectory that reflects the package name and creates directories as needed\&.
+.sp
+If you specify
+\fB\-d\fR
+\fB/home/myclasses\fR
+and the class is called
+\fBcom\&.mypackage\&.MyClass\fR, then the class file is
+\fB/home/myclasses/com/mypackage/MyClass\&.class\fR\&.
+.sp
+If the
+\fI\-d\fR
+option is not specified, then
+\fBjavac\fR
+puts each class file in the same directory as the source file from which it was generated\&.
+.sp
+\fBNote:\fR
+The directory specified by the
+\fI\-d\fR
+option is not automatically added to your user class path\&.
+.RE
+.PP
+\-deprecation
+.RS 4
+Shows a description of each use or override of a deprecated member or class\&. Without the
+\fB\-deprecation\fR
+option,
+\fBjavac\fR
+shows a summary of the source files that use or override deprecated members or classes\&. The
+\fB\-deprecation\fR
+option is shorthand for
+\fB\-Xlint:deprecation\fR\&.
+.RE
+.PP
+\-encoding \fIencoding\fR
+.RS 4
+Sets the source file encoding name, such as EUC\-JP and UTF\-8\&. If the
+\fB\-encoding\fR
+option is not specified, then the platform default converter is used\&.
+.RE
+.PP
+\-endorseddirs \fIdirectories\fR
+.RS 4
Overrides the location of the endorsed standards path\&.
-.TP
--extdirs \fIdirectories\fR
-.br
-Overrides the location of the \f3ext\fR directory\&. The directories variable is a colon-separated list of directories\&. Each JAR file in the specified directories is searched for class files\&. All JAR files found become part of the class path\&.
-
-If you are cross-compiling (compiling classes against bootstrap and extension classes of a different Java platform implementation), then this option specifies the directories that contain the extension classes\&. See Cross-Compilation Options for more information\&.
-.TP
--g
-.br
+.RE
+.PP
+\-extdirs \fIdirectories\fR
+.RS 4
+Overrides the location of the
+\fBext\fR
+directory\&. The directories variable is a colon\-separated list of directories\&. Each JAR file in the specified directories is searched for class files\&. All JAR files found become part of the class path\&.
+.sp
+If you are cross\-compiling (compiling classes against bootstrap and extension classes of a different Java platform implementation), then this option specifies the directories that contain the extension classes\&. See Cross\-Compilation Options for more information\&.
+.RE
+.PP
+\-g
+.RS 4
Generates all debugging information, including local variables\&. By default, only line number and source file information is generated\&.
-.TP
--g:none
-.br
+.RE
+.PP
+\-g:none
+.RS 4
Does not generate any debugging information\&.
-.TP
--g:[\fIkeyword list\fR]
-.br
+.RE
+.PP
+\-g:[\fIkeyword list\fR]
+.RS 4
Generates only some kinds of debugging information, specified by a comma separated list of keywords\&. Valid keywords are:
-.RS
-.TP
+.PP
source
+.RS 4
Source file debugging information\&.
-.TP
+.RE
+.PP
lines
+.RS 4
Line number debugging information\&.
-.TP
+.RE
+.PP
vars
+.RS 4
Local variable debugging information\&.
-.RE
-
-.TP
--help
-.br
+.RE
+.RE
+.PP
+\-help
+.RS 4
Prints a synopsis of standard options\&.
-.TP
--implicit:[\fIclass, none\fR]
-.br
-Controls the generation of class files for implicitly loaded source files\&. To automatically generate class files, use \f3-implicit:class\fR\&. To suppress class file generation, use \f3-implicit:none\fR\&. If this option is not specified, then the default is to automatically generate class files\&. In this case, the compiler issues a warning if any such class files are generated when also doing annotation processing\&. The warning is not issued when the \f3-implicit\fR option is set explicitly\&. See Searching for Types\&.
-.TP
--J\fIoption\fR
-.br
-Passes \f3option\fR to the Java Virtual Machine (JVM), where option is one of the options described on the reference page for the Java launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
-
-\fINote:\fR The \fICLASSPATH\fR, \f3-classpath\fR, \f3-bootclasspath\fR, and \f3-extdirs\fR options do not specify the classes used to run \f3javac\fR\&. Trying to customize the compiler implementation with these options and variables is risky and often does not accomplish what you want\&. If you must customize the complier implementation, then use the \f3-J\fR option to pass options through to the underlying \f3\fRJava launcher\&.
-.TP
--nowarn
-.br
-Disables warning messages\&. This option operates the same as the \f3-Xlint:none\fR option\&.
-.TP
--parameters
-.br
-Stores formal parameter names of constructors and methods in the generated class file so that the method \f3java\&.lang\&.reflect\&.Executable\&.getParameters\fR from the Reflection API can retrieve them\&.
-.TP
--proc: [\fInone\fR, \fIonly\fR]
-.br
-Controls whether annotation processing and compilation are done\&. \f3-proc:none\fR means that compilation takes place without annotation processing\&. \f3-proc:only\fR means that only annotation processing is done, without any subsequent compilation\&.
-.TP
--processor \fIclass1\fR [,\fIclass2\fR,\fIclass3\fR\&.\&.\&.]
-.br
+.RE
+.PP
+\-implicit:[\fIclass, none\fR]
+.RS 4
+Controls the generation of class files for implicitly loaded source files\&. To automatically generate class files, use
+\fB\-implicit:class\fR\&. To suppress class file generation, use
+\fB\-implicit:none\fR\&. If this option is not specified, then the default is to automatically generate class files\&. In this case, the compiler issues a warning if any such class files are generated when also doing annotation processing\&. The warning is not issued when the
+\fB\-implicit\fR
+option is set explicitly\&. See Searching for Types\&.
+.RE
+.PP
+\-J\fIoption\fR
+.RS 4
+Passes
+\fBoption\fR
+to the Java Virtual Machine (JVM), where option is one of the options described on the reference page for the Java launcher\&. For example,
+\fB\-J\-Xms48m\fR
+sets the startup memory to 48 MB\&. See
+java(1)\&.
+.sp
+\fBNote:\fR
+The
+\fICLASSPATH\fR,
+\fB\-classpath\fR,
+\fB\-bootclasspath\fR, and
+\fB\-extdirs\fR
+options do not specify the classes used to run
+\fBjavac\fR\&. Trying to customize the compiler implementation with these options and variables is risky and often does not accomplish what you want\&. If you must customize the complier implementation, then use the
+\fB\-J\fR
+option to pass options through to the underlying Java launcher\&.
+.RE
+.PP
+\-nowarn
+.RS 4
+Disables warning messages\&. This option operates the same as the
+\fB\-Xlint:none\fR
+option\&.
+.RE
+.PP
+\-parameters
+.RS 4
+Stores formal parameter names of constructors and methods in the generated class file so that the method
+\fBjava\&.lang\&.reflect\&.Executable\&.getParameters\fR
+from the Reflection API can retrieve them\&.
+.RE
+.PP
+\-proc: [\fInone\fR, \fIonly\fR]
+.RS 4
+Controls whether annotation processing and compilation are done\&.
+\fB\-proc:none\fR
+means that compilation takes place without annotation processing\&.
+\fB\-proc:only\fR
+means that only annotation processing is done, without any subsequent compilation\&.
+.RE
+.PP
+\-processor \fIclass1\fR [,\fIclass2\fR,\fIclass3\fR\&.\&.\&.]
+.RS 4
Names of the annotation processors to run\&. This bypasses the default discovery process\&.
-.TP
--processorpath \fIpath\fR
-.br
+.RE
+.PP
+\-processorpath \fIpath\fR
+.RS 4
Specifies where to find annotation processors\&. If this option is not used, then the class path is searched for processors\&.
-.TP
--s \fIdir\fR
-.br
-Specifies the directory where to place the generated source files\&. The directory must already exist because \f3javac\fR does not create it\&. If a class is part of a package, then the compiler puts the source file in a subdirectory that reflects the package name and creates directories as needed\&.
-
-If you specify \f3-s /home/mysrc\fR and the class is called \f3com\&.mypackage\&.MyClass\fR, then the source file is put in \f3/home/mysrc/com/mypackage/MyClass\&.java\fR\&.
-.TP
--source \fIrelease\fR
-.br
-Specifies the version of source code accepted\&. The following values for \f3release\fR are allowed:
-.RS
-.TP
+.RE
+.PP
+\-s \fIdir\fR
+.RS 4
+Specifies the directory where to place the generated source files\&. The directory must already exist because
+\fBjavac\fR
+does not create it\&. If a class is part of a package, then the compiler puts the source file in a subdirectory that reflects the package name and creates directories as needed\&.
+.sp
+If you specify
+\fB\-s /home/mysrc\fR
+and the class is called
+\fBcom\&.mypackage\&.MyClass\fR, then the source file is put in
+\fB/home/mysrc/com/mypackage/MyClass\&.java\fR\&.
+.RE
+.PP
+\-source \fIrelease\fR
+.RS 4
+Specifies the version of source code accepted\&. The following values for
+\fBrelease\fR
+are allowed:
+.PP
1\&.3
+.RS 4
The compiler does not support assertions, generics, or other language features introduced after Java SE 1\&.3\&.
-.TP
+.RE
+.PP
1\&.4
+.RS 4
The compiler accepts code containing assertions, which were introduced in Java SE 1\&.4\&.
-.TP
+.RE
+.PP
1\&.5
+.RS 4
The compiler accepts code containing generics and other language features introduced in Java SE 5\&.
-.TP
+.RE
+.PP
5
+.RS 4
Synonym for 1\&.5\&.
-.TP
+.RE
+.PP
1\&.6
+.RS 4
No language changes were introduced in Java SE 6\&. However, encoding errors in source files are now reported as errors instead of warnings as in earlier releases of Java Platform, Standard Edition\&.
-.TP
+.RE
+.PP
6
+.RS 4
Synonym for 1\&.6\&.
-.TP
+.RE
+.PP
1\&.7
-This is the default value\&. The compiler accepts code with features introduced in Java SE 7\&.
-.TP
+.RS 4
+The compiler accepts code with features introduced in Java SE 7\&.
+.RE
+.PP
7
+.RS 4
Synonym for 1\&.7\&.
-.RE
-
-.TP
--sourcepath \fIsourcepath\fR
-.br
+.RE
+.PP
+1\&.8
+.RS 4
+This is the default value\&. The compiler accepts code with features introduced in Java SE 8\&.
+.RE
+.PP
+8
+.RS 4
+Synonym for 1\&.8\&.
+.RE
+.RE
+.PP
+\-sourcepath \fIsourcepath\fR
+.RS 4
Specifies the source code path to search for class or interface definitions\&. As with the user class path, source path entries are separated by colons (:) on Oracle Solaris and semicolons on Windows and can be directories, JAR archives, or ZIP archives\&. If packages are used, then the local path name within the directory or archive must reflect the package name\&.
-
-\fINote:\fR Classes found through the class path might be recompiled when their source files are also found\&. See Searching for Types\&.
-.TP
--verbose
-.br
+.sp
+\fBNote:\fR
+Classes found through the class path might be recompiled when their source files are also found\&. See Searching for Types\&.
+.RE
+.PP
+\-verbose
+.RS 4
Uses verbose output, which includes information about each class loaded and each source file compiled\&.
-.TP
--version
-.br
+.RE
+.PP
+\-version
+.RS 4
Prints release information\&.
-.TP
--werror
-.br
+.RE
+.PP
+\-werror
+.RS 4
Terminates compilation when warnings occur\&.
-.TP
--X
-.br
+.RE
+.PP
+\-X
+.RS 4
Displays information about nonstandard options and exits\&.
-.SS CROSS-COMPILATION\ OPTIONS
-By default, classes are compiled against the bootstrap and extension classes of the platform that \f3javac\fR shipped with\&. But \f3javac\fR also supports cross-compiling, where classes are compiled against a bootstrap and extension classes of a different Java platform implementation\&. It is important to use the \f3-bootclasspath\fR and \f3-extdirs\fR options when cross-compiling\&.
-.TP
--target \fIversion\fR
-.br
-Generates class files that target a specified release of the virtual machine\&. Class files will run on the specified target and on later releases, but not on earlier releases of the JVM\&. Valid targets are 1\&.1, 1\&.2, 1\&.3, 1\&.4, 1\&.5 (also 5), 1\&.6 (also 6), and 1\&.7 (also 7)\&.
-
-The default for the \f3-target\fR option depends on the value of the \f3-source\fR option:
-.RS
-.TP 0.2i
-\(bu
-If the \f3-source\fR option is not specified, then the value of the \f3-target\fR option is 1\&.7
-.TP 0.2i
-\(bu
-If the \f3-source\fR option is 1\&.2, then the value of the \f3-target\fR option is 1\&.4
-.TP 0.2i
-\(bu
-If the \f3-source\fR option is 1\&.3, then the value of the \f3-target\fR option is 1\&.4
-.TP 0.2i
-\(bu
-If the \f3-source\fR option is 1\&.5, then the value of the \f3-target\fR option is 1\&.7
-.TP 0.2i
-\(bu
-If the \f3-source\fR option is 1\&.6, then the value of the \f3-target\fR is option 1\&.7
-.TP 0.2i
-\(bu
-For all other values of the \f3-source\fR option, the value of the \f3-target\fR option is the value of the \f3-source\fR option\&.
-.RE
-
-.TP
--bootclasspath \fIbootclasspath\fR
-.br
-Cross-compiles against the specified set of boot classes\&. As with the user class path, boot class path entries are separated by colons (:) and can be directories, JAR archives, or ZIP archives\&.
-.SS COMPACT\ PROFILE\ OPTION
-Beginning with JDK 8, the \f3javac\fR compiler supports compact profiles\&. With compact profiles, applications that do not require the entire Java platform can be deployed and run with a smaller footprint\&. The compact profiles feature could be used to shorten the download time for applications from app stores\&. This feature makes for more compact deployment of Java applications that bundle the JRE\&. This feature is also useful in small devices\&.
+.RE
+.SS "Cross\-Compilation Options"
.PP
-The supported profile values are \f3compact1\fR, \f3compact2\fR, and \f3compact3\fR\&. These are additive layers\&. Each higher-numbered compact profile contains all of the APIs in profiles with smaller number names\&.
-.TP
--profile
-.br
+By default, classes are compiled against the bootstrap and extension classes of the platform that
+\fBjavac\fR
+shipped with\&. But
+\fBjavac\fR
+also supports cross\-compiling, where classes are compiled against a bootstrap and extension classes of a different Java platform implementation\&. It is important to use the
+\fB\-bootclasspath\fR
+and
+\fB\-extdirs\fR
+options when cross\-compiling\&.
+.PP
+\-target \fIversion\fR
+.RS 4
+Generates class files that target a specified release of the virtual machine\&. Class files will run on the specified target and on later releases, but not on earlier releases of the JVM\&. Valid targets are 1\&.1, 1\&.2, 1\&.3, 1\&.4, 1\&.5 (also 5), 1\&.6 (also 6), 1\&.7 (also 7), and 1\&.8 (also 8)\&.
+.sp
+The default for the
+\fB\-target\fR
+option depends on the value of the
+\fB\-source\fR
+option:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+If the
+\fB\-source\fR
+option is not specified, then the value of the
+\fB\-target\fR
+option is 1\&.8
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+If the
+\fB\-source\fR
+option is 1\&.2, then the value of the
+\fB\-target\fR
+option is 1\&.4
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+If the
+\fB\-source\fR
+option is 1\&.3, then the value of the
+\fB\-target\fR
+option is 1\&.4
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+If the
+\fB\-source\fR
+option is 1\&.5, then the value of the
+\fB\-target\fR
+option is 1\&.8
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+If the
+\fB\-source\fR
+option is 1\&.6, then the value of the
+\fB\-target\fR
+is option 1\&.8
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+If the
+\fB\-source\fR
+option is 1\&.7, then the value of the
+\fB\-target\fR
+is option 1\&.8
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+For all other values of the
+\fB\-source\fR
+option, the value of the
+\fB\-target\fR
+option is the value of the
+\fB\-source\fR
+option\&.
+.RE
+.RE
+.PP
+\-bootclasspath \fIbootclasspath\fR
+.RS 4
+Cross\-compiles against the specified set of boot classes\&. As with the user class path, boot class path entries are separated by colons (:) and can be directories, JAR archives, or ZIP archives\&.
+.RE
+.SS "Compact Profile Option"
+.PP
+Beginning with JDK 8, the
+\fBjavac\fR
+compiler supports compact profiles\&. With compact profiles, applications that do not require the entire Java platform can be deployed and run with a smaller footprint\&. The compact profiles feature could be used to shorten the download time for applications from app stores\&. This feature makes for more compact deployment of Java applications that bundle the JRE\&. This feature is also useful in small devices\&.
+.PP
+The supported profile values are
+\fBcompact1\fR,
+\fBcompact2\fR, and
+\fBcompact3\fR\&. These are additive layers\&. Each higher\-numbered compact profile contains all of the APIs in profiles with smaller number names\&.
+.PP
+\-profile
+.RS 4
When using compact profiles, this option specifies the profile name when compiling\&. For example:
-.sp
-.nf
-\f3javac \-profile compact1 Hello\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac \-profile compact1 Hello\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
javac does not compile source code that uses any Java SE APIs that is not in the specified profile\&. Here is an example of the error message that results from attempting to compile such source code:
-.sp
-.nf
-\f3cd jdk1\&.8\&.0/bin\fP
-.fi
-.nf
-\f3\&./javac \-profile compact1 Paint\&.java\fP
-.fi
-.nf
-\f3Paint\&.java:5: error: Applet is not available in profile \&'compact1\&'\fP
-.fi
-.nf
-\f3import java\&.applet\&.Applet;\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-In this example, you can correct the error by modifying the source to not use the \f3Applet\fR class\&. You could also correct the error by compiling without the -profile option\&. Then the compilation would be run against the full set of Java SE APIs\&. (None of the compact profiles include the \f3Applet\fR class\&.)
-
-An alternative way to compile with compact profiles is to use the \f3-bootclasspath\fR option to specify a path to an \f3rt\&.jar\fR file that specifies a profile\&'s image\&. Using the \f3-profile\fR option instead does not require a profile image to be present on the system at compile time\&. This is useful when cross-compiling\&.
-.SS NONSTANDARD\ OPTIONS
-.TP
--Xbootclasspath/p:\fIpath\fR
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBcd jdk1\&.8\&.0/bin\fR
+\fB\&./javac \-profile compact1 Paint\&.java\fR
+\fBPaint\&.java:5: error: Applet is not available in profile \*(Aqcompact1\*(Aq\fR
+\fBimport java\&.applet\&.Applet;\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+In this example, you can correct the error by modifying the source to not use the
+\fBApplet\fR
+class\&. You could also correct the error by compiling without the \-profile option\&. Then the compilation would be run against the full set of Java SE APIs\&. (None of the compact profiles include the
+\fBApplet\fR
+class\&.)
+.sp
+An alternative way to compile with compact profiles is to use the
+\fB\-bootclasspath\fR
+option to specify a path to an
+\fBrt\&.jar\fR
+file that specifies a profile\*(Aqs image\&. Using the
+\fB\-profile\fR
+option instead does not require a profile image to be present on the system at compile time\&. This is useful when cross\-compiling\&.
+.RE
+.SS "Nonstandard Options"
+.PP
+\-Xbootclasspath/p:\fIpath\fR
+.RS 4
Adds a suffix to the bootstrap class path\&.
-.TP
--Xbootclasspath/a:\fIpath\fR
-.br
+.RE
+.PP
+\-Xbootclasspath/a:\fIpath\fR
+.RS 4
Adds a prefix to the bootstrap class path\&.
-.TP
--Xbootclasspath/:\fIpath\fR
-.br
+.RE
+.PP
+\-Xbootclasspath/:\fIpath\fR
+.RS 4
Overrides the location of the bootstrap class files\&.
-.TP
--Xdoclint:[-]\fIgroup\fR [\fI/access\fR]
-.br
-Enables or disables specific groups of checks, where \fIgroup\fR is one of the following values: \f3accessibility\fR, \f3syntax\fR, \f3reference\fR, \f3html\fR or \f3missing\fR\&. For more information about these groups of checks see the \f3-Xdoclint\fR option of the \f3javadoc\fR command\&. The \f3-Xdoclint\fR option is disabled by default in the \f3javac\fR command\&.
-
-The variable \fIaccess\fR specifies the minimum visibility level of classes and members that the \f3-Xdoclint\fR option checks\&. It can have one of the following values (in order of most to least visible) : \f3public\fR, \f3protected\fR, \f3package\fR and \f3private\fR\&. For example, the following option checks classes and members (with all groups of checks) that have the access level protected and higher (which includes protected, package and public):
-.sp
-.nf
-\f3\-Xdoclint:all/protected\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.RE
+.PP
+\-Xdoclint:[\-]\fIgroup\fR [\fI/access\fR]
+.RS 4
+Enables or disables specific groups of checks, where
+\fIgroup\fR
+is one of the following values:
+\fBaccessibility\fR,
+\fBsyntax\fR,
+\fBreference\fR,
+\fBhtml\fR
+or
+\fBmissing\fR\&. For more information about these groups of checks see the
+\fB\-Xdoclint\fR
+option of the
+\fBjavadoc\fR
+command\&. The
+\fB\-Xdoclint\fR
+option is disabled by default in the
+\fBjavac\fR
+command\&.
+.sp
+The variable
+\fIaccess\fR
+specifies the minimum visibility level of classes and members that the
+\fB\-Xdoclint\fR
+option checks\&. It can have one of the following values (in order of most to least visible) :
+\fBpublic\fR,
+\fBprotected\fR,
+\fBpackage\fR
+and
+\fBprivate\fR\&. For example, the following option checks classes and members (with all groups of checks) that have the access level protected and higher (which includes protected, package and public):
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-Xdoclint:all/protected\fR
+
+.fi
+.if n \{\
+.RE
+.\}
The following option enables all groups of checks for all access levels, except it will not check for HTML errors for classes and members that have access level package and higher (which includes package and public):
-.sp
-.nf
-\f3\-Xdoclint:all,\-html/package\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
--Xdoclint:none
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-Xdoclint:all,\-html/package\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\-Xdoclint:none
+.RS 4
Disables all groups of checks\&.
-.TP
--Xdoclint:all[\fI/access\fR]
-.br
+.RE
+.PP
+\-Xdoclint:all[\fI/access\fR]
+.RS 4
Enables all groups of checks\&.
-.TP
--Xlint
-.br
-\fI\fREnables all recommended warnings\&. In this release, enabling all available warnings is recommended\&.
-.TP
--Xlint:all
-.br
-\fI\fREnables all recommended warnings\&. In this release, enabling all available warnings is recommended\&.
-.TP
--Xlint:none
-.br
+.RE
+.PP
+\-Xlint
+.RS 4
+Enables all recommended warnings\&. In this release, enabling all available warnings is recommended\&.
+.RE
+.PP
+\-Xlint:all
+.RS 4
+Enables all recommended warnings\&. In this release, enabling all available warnings is recommended\&.
+.RE
+.PP
+\-Xlint:none
+.RS 4
Disables all warnings\&.
-.TP
--Xlint:\fIname\fR
-.br
-Disables warning name\&. See Enable or Disable Warnings with the -Xlint Option for a list of warnings you can disable with this option\&.
-.TP
--Xlint:\fI-name\fR
-.br
-Disables warning name\&. See Enable or Disable Warnings with the -Xlint Option with the \f3-Xlint\fR option to get a list of warnings that you can disable with this option\&.
-.TP
--Xmaxerrs \fInumber\fR
-.br
+.RE
+.PP
+\-Xlint:\fIname\fR
+.RS 4
+Disables warning name\&. See Enable or Disable Warnings with the \-Xlint Option for a list of warnings you can disable with this option\&.
+.RE
+.PP
+\-Xlint:\fI\-name\fR
+.RS 4
+Disables warning name\&. See Enable or Disable Warnings with the \-Xlint Option with the
+\fB\-Xlint\fR
+option to get a list of warnings that you can disable with this option\&.
+.RE
+.PP
+\-Xmaxerrs \fInumber\fR
+.RS 4
Sets the maximum number of errors to print\&.
-.TP
--Xmaxwarns \fInumber\fR
-.br
+.RE
+.PP
+\-Xmaxwarns \fInumber\fR
+.RS 4
Sets the maximum number of warnings to print\&.
-.TP
--Xstdout \fIfilename\fR
-.br
-Sends compiler messages to the named file\&. By default, compiler messages go to \f3System\&.err\fR\&.
-.TP
--Xprefer:[\fInewer,source\fR]
-.br
-Specifies which file to read when both a source file and class file are found for a type\&. (See Searching for Types)\&. If the \f3-Xprefer:newer\fR option is used, then it reads the newer of the source or class file for a type (default)\&. If the \f3-Xprefer:source\fR option is used, then it reads the source file\&. Use -\f3Xprefer:source\fR when you want to be sure that any annotation processors can access annotations declared with a retention policy of \f3SOURCE\fR\&.
-.TP
--Xpkginfo:[\fIalways\fR,\fIlegacy\fR,\fInonempty\fR]
-.br
-Control whether javac generates \f3package-info\&.class\fR files from package-info\&.java files\&. Possible mode arguments for this option include the following\&.
-.RS
-.TP
+.RE
+.PP
+\-Xstdout \fIfilename\fR
+.RS 4
+Sends compiler messages to the named file\&. By default, compiler messages go to
+\fBSystem\&.err\fR\&.
+.RE
+.PP
+\-Xprefer:[\fInewer,source\fR]
+.RS 4
+Specifies which file to read when both a source file and class file are found for a type\&. (See Searching for Types)\&. If the
+\fB\-Xprefer:newer\fR
+option is used, then it reads the newer of the source or class file for a type (default)\&. If the
+\fB\-Xprefer:source\fR
+option is used, then it reads the source file\&. Use \-\fBXprefer:source\fR
+when you want to be sure that any annotation processors can access annotations declared with a retention policy of
+\fBSOURCE\fR\&.
+.RE
+.PP
+\-Xpkginfo:[\fIalways\fR,\fIlegacy\fR,\fInonempty\fR]
+.RS 4
+Control whether javac generates
+\fBpackage\-info\&.class\fR
+files from package\-info\&.java files\&. Possible mode arguments for this option include the following\&.
+.PP
always
-Always generate a \f3package-info\&.class\fR file for every \f3package-info\&.java\fR file\&. This option may be useful if you use a build system such as Ant, which checks that each \f3\&.java\fR file has a corresponding \f3\&.class\fR file\&.
-.TP
+.RS 4
+Always generate a
+\fBpackage\-info\&.class\fR
+file for every
+\fBpackage\-info\&.java\fR
+file\&. This option may be useful if you use a build system such as Ant, which checks that each
+\fB\&.java\fR
+file has a corresponding
+\fB\&.class\fR
+file\&.
+.RE
+.PP
legacy
-Generate a \f3package-info\&.class\fR file only if package-info\&.java contains annotations\&. Don\&'t generate a \f3package-info\&.class\fR file if package-info\&.java only contains comments\&.
-
-\fINote:\fR A \f3package-info\&.class\fR file might be generated but be empty if all the annotations in the package-info\&.java file have \f3RetentionPolicy\&.SOURCE\fR\&.
-.TP
+.RS 4
+Generate a
+\fBpackage\-info\&.class\fR
+file only if package\-info\&.java contains annotations\&. Don\*(Aqt generate a
+\fBpackage\-info\&.class\fR
+file if package\-info\&.java only contains comments\&.
+.sp
+\fBNote:\fR
+A
+\fBpackage\-info\&.class\fR
+file might be generated but be empty if all the annotations in the package\-info\&.java file have
+\fBRetentionPolicy\&.SOURCE\fR\&.
+.RE
+.PP
nonempty
-Generate a \f3package-info\&.class\fR file only if package-info\&.java contains annotations with \f3RetentionPolicy\&.CLASS\fR or \f3RetentionPolicy\&.RUNTIME\fR\&.
-.RE
-
-.TP
--Xprint
-.br
+.RS 4
+Generate a
+\fBpackage\-info\&.class\fR
+file only if package\-info\&.java contains annotations with
+\fBRetentionPolicy\&.CLASS\fR
+or
+\fBRetentionPolicy\&.RUNTIME\fR\&.
+.RE
+.RE
+.PP
+\-Xprint
+.RS 4
Prints a textual representation of specified types for debugging purposes\&. Perform neither annotation processing nor compilation\&. The format of the output could change\&.
-.TP
--XprintProcessorInfo
-.br
+.RE
+.PP
+\-XprintProcessorInfo
+.RS 4
Prints information about which annotations a processor is asked to process\&.
-.TP
--XprintRounds
-.br
+.RE
+.PP
+\-XprintRounds
+.RS 4
Prints information about initial and subsequent annotation processing rounds\&.
-.SH ENABLE\ OR\ DISABLE\ WARNINGS\ WITH\ THE\ -XLINT\ OPTION
-Enable warning \fIname\fR with the \f3-Xlint:name\fR option, where \f3name\fR is one of the following warning names\&. Note that you can disable a warning with the \f3-Xlint:-name:\fR option\&.
-.TP
+.RE
+.SH "ENABLE OR DISABLE WARNINGS WITH THE -XLINT OPTION"
+.PP
+Enable warning
+\fIname\fR
+with the
+\fB\-Xlint:name\fR
+option, where
+\fBname\fR
+is one of the following warning names\&. Note that you can disable a warning with the
+\fB\-Xlint:\-name:\fR
+option\&.
+.PP
cast
+.RS 4
Warns about unnecessary and redundant casts, for example:
-.sp
-.nf
-\f3String s = (String) "Hello!"\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBString s = (String) "Hello!"\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
classfile
+.RS 4
Warns about issues related to class file contents\&.
-.TP
+.RE
+.PP
deprecation
+.RS 4
Warns about the use of deprecated items, for example:
-.sp
-.nf
-\f3java\&.util\&.Date myDate = new java\&.util\&.Date();\fP
-.fi
-.nf
-\f3int currentDay = myDate\&.getDay();\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-The method \f3java\&.util\&.Date\&.getDay\fR has been deprecated since JDK 1\&.1
-.TP
-dep-ann
-Warns about items that are documented with an \f3@deprecated\fR Javadoc comment, but do not have a \f3@Deprecated\fR annotation, for example:
-.sp
-.nf
-\f3/**\fP
-.fi
-.nf
-\f3 * @deprecated As of Java SE 7, replaced by {@link #newMethod()}\fP
-.fi
-.nf
-\f3 */\fP
-.fi
-.nf
-\f3public static void deprecatedMethood() { }\fP
-.fi
-.nf
-\f3public static void newMethod() { }\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjava\&.util\&.Date myDate = new java\&.util\&.Date();\fR
+\fBint currentDay = myDate\&.getDay();\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The method
+\fBjava\&.util\&.Date\&.getDay\fR
+has been deprecated since JDK 1\&.1
+.RE
+.PP
+dep\-ann
+.RS 4
+Warns about items that are documented with an
+\fB@deprecated\fR
+Javadoc comment, but do not have a
+\fB@Deprecated\fR
+annotation, for example:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB/**\fR
+\fB * @deprecated As of Java SE 7, replaced by {@link #newMethod()}\fR
+\fB */\fR
+\fBpublic static void deprecatedMethood() { }\fR
+\fBpublic static void newMethod() { }\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
divzero
+.RS 4
Warns about division by the constant integer 0, for example:
-.sp
-.nf
-\f3int divideByZero = 42 / 0;\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBint divideByZero = 42 / 0;\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
empty
-Warns about empty statements after \f3if\fRstatements, for example:
-.sp
-.nf
-\f3class E {\fP
-.fi
-.nf
-\f3 void m() {\fP
-.fi
-.nf
-\f3 if (true) ;\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
+.RS 4
+Warns about empty statements after
+\fBif \fRstatements, for example:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBclass E {\fR
+\fB void m() {\fR
+\fB if (true) ;\fR
+\fB }\fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
fallthrough
-Checks the switch blocks for fall-through cases and provides a warning message for any that are found\&. Fall-through cases are cases in a switch block, other than the last case in the block, whose code does not include a break statement, allowing code execution to fall through from that case to the next case\&. For example, the code following the case 1 label in this switch block does not end with a break statement:
-.sp
-.nf
-\f3switch (x) {\fP
-.fi
-.nf
-\f3case 1:\fP
-.fi
-.nf
-\f3 System\&.out\&.println("1");\fP
-.fi
-.nf
-\f3 // No break statement here\&.\fP
-.fi
-.nf
-\f3case 2:\fP
-.fi
-.nf
-\f3 System\&.out\&.println("2");\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-If the \f3-Xlint:fallthrough\fR option was used when compiling this code, then the compiler emits a warning about possible fall-through into case, with the line number of the case in question\&.
-.TP
+.RS 4
+Checks the switch blocks for fall\-through cases and provides a warning message for any that are found\&. Fall\-through cases are cases in a switch block, other than the last case in the block, whose code does not include a break statement, allowing code execution to fall through from that case to the next case\&. For example, the code following the case 1 label in this switch block does not end with a break statement:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBswitch (x) {\fR
+\fBcase 1:\fR
+\fB System\&.out\&.println("1");\fR
+\fB // No break statement here\&.\fR
+\fBcase 2:\fR
+\fB System\&.out\&.println("2");\fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+If the
+\fB\-Xlint:fallthrough\fR
+option was used when compiling this code, then the compiler emits a warning about possible fall\-through into case, with the line number of the case in question\&.
+.RE
+.PP
finally
-Warns about \f3finally\fR clauses that cannot complete normally, for example:
-.sp
-.nf
-\f3public static int m() {\fP
-.fi
-.nf
-\f3 try {\fP
-.fi
-.nf
-\f3 throw new NullPointerException();\fP
-.fi
-.nf
-\f3 } catch (NullPointerException(); {\fP
-.fi
-.nf
-\f3 System\&.err\&.println("Caught NullPointerException\&.");\fP
-.fi
-.nf
-\f3 return 1;\fP
-.fi
-.nf
-\f3 } finally {\fP
-.fi
-.nf
-\f3 return 0;\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-The compiler generates a warning for the \f3finally\fR block in this example\&. When the \f3int\fR method is called, it returns a value of 0\&. A \f3finally\fR block executes when the \f3try\fR block exits\&. In this example, when control is transferred to the \f3catch\fR block, the \f3int\fR method exits\&. However, the \f3finally\fR block must execute, so it is executed, even though control was transferred outside the method\&.
-.TP
+.RS 4
+Warns about
+\fBfinally\fR
+clauses that cannot complete normally, for example:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBpublic static int m() {\fR
+\fB try {\fR
+\fB throw new NullPointerException();\fR
+\fB } catch (NullPointerException(); {\fR
+\fB System\&.err\&.println("Caught NullPointerException\&.");\fR
+\fB return 1;\fR
+\fB } finally {\fR
+\fB return 0;\fR
+\fB }\fR
+\fB }\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The compiler generates a warning for the
+\fBfinally\fR
+block in this example\&. When the
+\fBint\fR
+method is called, it returns a value of 0\&. A
+\fBfinally\fR
+block executes when the
+\fBtry\fR
+block exits\&. In this example, when control is transferred to the
+\fBcatch\fR
+block, the
+\fBint\fR
+method exits\&. However, the
+\fBfinally\fR
+block must execute, so it is executed, even though control was transferred outside the method\&.
+.RE
+.PP
options
-Warns about issues that related to the use of command-line options\&. See Cross-Compilation Options\&.
-.TP
+.RS 4
+Warns about issues that related to the use of command\-line options\&. See Cross\-Compilation Options\&.
+.RE
+.PP
overrides
+.RS 4
Warns about issues regarding method overrides\&. For example, consider the following two classes:
-.sp
-.nf
-\f3public class ClassWithVarargsMethod {\fP
-.fi
-.nf
-\f3 void varargsMethod(String\&.\&.\&. s) { }\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3public class ClassWithOverridingMethod extends ClassWithVarargsMethod {\fP
-.fi
-.nf
-\f3 @Override\fP
-.fi
-.nf
-\f3 void varargsMethod(String[] s) { }\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBpublic class ClassWithVarargsMethod {\fR
+\fB void varargsMethod(String\&.\&.\&. s) { }\fR
+\fB}\fR
+
+\fBpublic class ClassWithOverridingMethod extends ClassWithVarargsMethod {\fR
+\fB @Override\fR
+\fB void varargsMethod(String[] s) { }\fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
The compiler generates a warning similar to the following:\&.
-.sp
-.nf
-\f3warning: [override] varargsMethod(String[]) in ClassWithOverridingMethod \fP
-.fi
-.nf
-\f3overrides varargsMethod(String\&.\&.\&.) in ClassWithVarargsMethod; overriding\fP
-.fi
-.nf
-\f3method is missing \&'\&.\&.\&.\&'\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-When the compiler encounters a \f3varargs\fR method, it translates the \f3varargs\fR formal parameter into an array\&. In the method \f3ClassWithVarargsMethod\&.varargsMethod\fR, the compiler translates the \f3varargs\fR formal parameter \f3String\&.\&.\&. s\fR to the formal parameter \f3String[] s\fR, an array, which matches the formal parameter of the method \f3ClassWithOverridingMethod\&.varargsMethod\fR\&. Consequently, this example compiles\&.
-.TP
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBwarning: [override] varargsMethod(String[]) in ClassWithOverridingMethod \fR
+\fBoverrides varargsMethod(String\&.\&.\&.) in ClassWithVarargsMethod; overriding\fR
+\fBmethod is missing \*(Aq\&.\&.\&.\*(Aq\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+When the compiler encounters a
+\fBvarargs\fR
+method, it translates the
+\fBvarargs\fR
+formal parameter into an array\&. In the method
+\fBClassWithVarargsMethod\&.varargsMethod\fR, the compiler translates the
+\fBvarargs\fR
+formal parameter
+\fBString\&.\&.\&. s\fR
+to the formal parameter
+\fBString[] s\fR, an array, which matches the formal parameter of the method
+\fBClassWithOverridingMethod\&.varargsMethod\fR\&. Consequently, this example compiles\&.
+.RE
+.PP
path
-Warns about invalid path elements and nonexistent path directories on the command line (with regard to the class path, the source path, and other paths)\&. Such warnings cannot be suppressed with the \f3@SuppressWarnings\fR annotation, for example:
-.sp
-.nf
-\f3javac \-Xlint:path \-classpath /nonexistentpath Example\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
+.RS 4
+Warns about invalid path elements and nonexistent path directories on the command line (with regard to the class path, the source path, and other paths)\&. Such warnings cannot be suppressed with the
+\fB@SuppressWarnings\fR
+annotation, for example:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac \-Xlint:path \-classpath /nonexistentpath Example\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
processing
+.RS 4
Warn about issues regarding annotation processing\&. The compiler generates this warning when you have a class that has an annotation, and you use an annotation processor that cannot handle that type of exception\&. For example, the following is a simple annotation processor:
-
-\fISource file AnnocProc\&.java\fR:
-.sp
-.nf
-\f3import java\&.util\&.*;\fP
-.fi
-.nf
-\f3import javax\&.annotation\&.processing\&.*;\fP
-.fi
-.nf
-\f3import javax\&.lang\&.model\&.*;\fP
-.fi
-.nf
-\f3import\&.javaz\&.lang\&.model\&.element\&.*;\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3@SupportedAnnotationTypes("NotAnno")\fP
-.fi
-.nf
-\f3public class AnnoProc extends AbstractProcessor {\fP
-.fi
-.nf
-\f3 public boolean process(Set<? extends TypeElement> elems, RoundEnvironment renv){\fP
-.fi
-.nf
-\f3 return true;\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3 public SourceVersion getSupportedSourceVersion() {\fP
-.fi
-.nf
-\f3 return SourceVersion\&.latest();\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-\fISource file AnnosWithoutProcessors\&.java\fR:
-.sp
-.nf
-\f3@interface Anno { }\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3@Anno\fP
-.fi
-.nf
-\f3class AnnosWithoutProcessors { }\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-The following commands compile the annotation processor \f3AnnoProc\fR, then run this annotation processor against the source file \f3AnnosWithoutProcessors\&.java\fR:
-.sp
-.nf
-\f3javac AnnoProc\&.java\fP
-.fi
-.nf
-\f3javac \-cp \&. \-Xlint:processing \-processor AnnoProc \-proc:only AnnosWithoutProcessors\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-When the compiler runs the annotation processor against the source file \f3AnnosWithoutProcessors\&.java\fR, it generates the following warning:
-.sp
-.nf
-\f3warning: [processing] No processor claimed any of these annotations: Anno\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-To resolve this issue, you can rename the annotation defined and used in the class \f3AnnosWithoutProcessors\fR from \f3Anno\fR to \f3NotAnno\fR\&.
-.TP
+.sp
+\fBSource file AnnocProc\&.java\fR:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBimport java\&.util\&.*;\fR
+\fBimport javax\&.annotation\&.processing\&.*;\fR
+\fBimport javax\&.lang\&.model\&.*;\fR
+\fBimport\&.javaz\&.lang\&.model\&.element\&.*;\fR
+
+\fB@SupportedAnnotationTypes("NotAnno")\fR
+\fBpublic class AnnoProc extends AbstractProcessor {\fR
+\fB public boolean process(Set<? extends TypeElement> elems, RoundEnvironment renv){\fR
+\fB return true;\fR
+\fB }\fR
+
+\fB public SourceVersion getSupportedSourceVersion() {\fR
+\fB return SourceVersion\&.latest();\fR
+\fB }\fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+\fBSource file AnnosWithoutProcessors\&.java\fR:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB@interface Anno { }\fR
+\fB \fR
+\fB@Anno\fR
+\fBclass AnnosWithoutProcessors { }\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The following commands compile the annotation processor
+\fBAnnoProc\fR, then run this annotation processor against the source file
+\fBAnnosWithoutProcessors\&.java\fR:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac AnnoProc\&.java\fR
+\fBjavac \-cp \&. \-Xlint:processing \-processor AnnoProc \-proc:only AnnosWithoutProcessors\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+When the compiler runs the annotation processor against the source file
+\fBAnnosWithoutProcessors\&.java\fR, it generates the following warning:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBwarning: [processing] No processor claimed any of these annotations: Anno\fR
+\fB \fR
+.fi
+.if n \{\
+.RE
+.\}
+To resolve this issue, you can rename the annotation defined and used in the class
+\fBAnnosWithoutProcessors\fR
+from
+\fBAnno\fR
+to
+\fBNotAnno\fR\&.
+.RE
+.PP
rawtypes
-Warns about unchecked operations on raw types\&. The following statement generates a \f3rawtypes\fR warning:
-.sp
-.nf
-\f3void countElements(List l) { \&.\&.\&. }\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-The following example does not generate a \f3rawtypes\fR warning
-.sp
-.nf
-\f3void countElements(List<?> l) { \&.\&.\&. }\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-\f3List\fR is a raw type\&. However, \f3List<?>\fR is an unbounded wildcard parameterized type\&. Because \f3List\fR is a parameterized interface, always specify its type argument\&. In this example, the \f3List\fR formal argument is specified with an unbounded wildcard (\f3?\fR) as its formal type parameter, which means that the \f3countElements\fR method can accept any instantiation of the \f3List\fR interface\&.
-.TP
+.RS 4
+Warns about unchecked operations on raw types\&. The following statement generates a
+\fBrawtypes\fR
+warning:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBvoid countElements(List l) { \&.\&.\&. }\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The following example does not generate a
+\fBrawtypes\fR
+warning
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBvoid countElements(List<?> l) { \&.\&.\&. }\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+\fBList\fR
+is a raw type\&. However,
+\fBList<?>\fR
+is an unbounded wildcard parameterized type\&. Because
+\fBList\fR
+is a parameterized interface, always specify its type argument\&. In this example, the
+\fBList\fR
+formal argument is specified with an unbounded wildcard (\fB?\fR) as its formal type parameter, which means that the
+\fBcountElements\fR
+method can accept any instantiation of the
+\fBList\fR
+interface\&.
+.RE
+.PP
Serial
-Warns about missing \f3serialVersionUID\fR definitions on serializable classes, for example:
-.sp
-.nf
-\f3public class PersistentTime implements Serializable\fP
-.fi
-.nf
-\f3{\fP
-.fi
-.nf
-\f3 private Date time;\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3 public PersistentTime() {\fP
-.fi
-.nf
-\f3 time = Calendar\&.getInstance()\&.getTime();\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3 public Date getTime() {\fP
-.fi
-.nf
-\f3 return time;\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.RS 4
+Warns about missing
+\fBserialVersionUID\fR
+definitions on serializable classes, for example:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBpublic class PersistentTime implements Serializable\fR
+\fB{\fR
+\fB private Date time;\fR
+\fB \fR
+\fB public PersistentTime() {\fR
+\fB time = Calendar\&.getInstance()\&.getTime();\fR
+\fB }\fR
+\fB \fR
+\fB public Date getTime() {\fR
+\fB return time;\fR
+\fB }\fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
The compiler generates the following warning:
-.sp
-.nf
-\f3warning: [serial] serializable class PersistentTime has no definition of\fP
-.fi
-.nf
-\f3serialVersionUID\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-If a serializable class does not explicitly declare a field named \f3serialVersionUID\fR, then the serialization runtime environment calculates a default \f3serialVersionUID\fR value for that class based on various aspects of the class, as described in the Java Object Serialization Specification\&. However, it is strongly recommended that all serializable classes explicitly declare \f3serialVersionUID\fR values because the default process of computing \f3serialVersionUID\fR vales is highly sensitive to class details that can vary depending on compiler implementations, and as a result, might cause an unexpected \f3InvalidClassExceptions\fR during deserialization\&. To guarantee a consistent \f3serialVersionUID\fR value across different Java compiler implementations, a serializable class must declare an explicit \f3serialVersionUID\fR value\&.
-.TP
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBwarning: [serial] serializable class PersistentTime has no definition of\fR
+\fBserialVersionUID\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+If a serializable class does not explicitly declare a field named
+\fBserialVersionUID\fR, then the serialization runtime environment calculates a default
+\fBserialVersionUID\fR
+value for that class based on various aspects of the class, as described in the Java Object Serialization Specification\&. However, it is strongly recommended that all serializable classes explicitly declare
+\fBserialVersionUID\fR
+values because the default process of computing
+\fBserialVersionUID\fR
+vales is highly sensitive to class details that can vary depending on compiler implementations, and as a result, might cause an unexpected
+\fBInvalidClassExceptions\fR
+during deserialization\&. To guarantee a consistent
+\fBserialVersionUID\fR
+value across different Java compiler implementations, a serializable class must declare an explicit
+\fBserialVersionUID\fR
+value\&.
+.RE
+.PP
static
+.RS 4
Warns about issues relating to the use of statics, for example:
-.sp
-.nf
-\f3class XLintStatic {\fP
-.fi
-.nf
-\f3 static void m1() { }\fP
-.fi
-.nf
-\f3 void m2() { this\&.m1(); }\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBclass XLintStatic {\fR
+\fB static void m1() { }\fR
+\fB void m2() { this\&.m1(); }\fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
The compiler generates the following warning:
-.sp
-.nf
-\f3warning: [static] static method should be qualified by type name, \fP
-.fi
-.nf
-\f3XLintStatic, instead of by an expression\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-To resolve this issue, you can call the \f3static\fR method \f3m1\fR as follows:
-.sp
-.nf
-\f3XLintStatic\&.m1();\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-Alternately, you can remove the \f3static\fR keyword from the declaration of the method \f3m1\fR\&.
-.TP
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBwarning: [static] static method should be qualified by type name, \fR
+\fBXLintStatic, instead of by an expression\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+To resolve this issue, you can call the
+\fBstatic\fR
+method
+\fBm1\fR
+as follows:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBXLintStatic\&.m1();\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Alternately, you can remove the
+\fBstatic\fR
+keyword from the declaration of the method
+\fBm1\fR\&.
+.RE
+.PP
try
-Warns about issues relating to use of \f3try\fR blocks, including try-with-resources statements\&. For example, a warning is generated for the following statement because the resource \f3ac\fR declared in the \f3try\fR block is not used:
-.sp
-.nf
-\f3try ( AutoCloseable ac = getResource() ) { // do nothing}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-.TP
+.RS 4
+Warns about issues relating to use of
+\fBtry\fR
+blocks, including try\-with\-resources statements\&. For example, a warning is generated for the following statement because the resource
+\fBac\fR
+declared in the
+\fBtry\fR
+block is not used:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBtry ( AutoCloseable ac = getResource() ) { // do nothing}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
unchecked
+.RS 4
Gives more detail for unchecked conversion warnings that are mandated by the Java Language Specification, for example:
-.sp
-.nf
-\f3List l = new ArrayList<Number>();\fP
-.fi
-.nf
-\f3List<String> ls = l; // unchecked warning\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-During type erasure, the types \f3ArrayList<Number>\fR and \f3List<String>\fR become \f3ArrayList\fR and \f3List\fR, respectively\&.
-
-The \f3ls\fR command has the parameterized type \f3List<String>\fR\&. When the \f3List\fR referenced by \f3l\fR is assigned to \f3ls\fR, the compiler generates an unchecked warning\&. At compile time, the compiler and JVM cannot determine whether \f3l\fR refers to a \f3List<String>\fR type\&. In this case, \f3l\fR does not refer to a \f3List<String>\fR type\&. As a result, heap pollution occurs\&.
-
-A heap pollution situation occurs when the \f3List\fR object \f3l\fR, whose static type is \f3List<Number>\fR, is assigned to another \f3List\fR object, \f3ls\fR, that has a different static type, \f3List<String>\fR\&. However, the compiler still allows this assignment\&. It must allow this assignment to preserve backward compatibility with releases of Java SE that do not support generics\&. Because of type erasure, \f3List<Number>\fR and \f3List<String>\fR both become \f3List\fR\&. Consequently, the compiler allows the assignment of the object \f3l\fR\f3,\fR which has a raw type of \f3List\fR, to the object \f3ls\fR\&.
-.TP
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBList l = new ArrayList<Number>();\fR
+\fBList<String> ls = l; // unchecked warning\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+During type erasure, the types
+\fBArrayList<Number>\fR
+and
+\fBList<String>\fR
+become
+\fBArrayList\fR
+and
+\fBList\fR, respectively\&.
+.sp
+The
+\fBls\fR
+command has the parameterized type
+\fBList<String>\fR\&. When the
+\fBList\fR
+referenced by
+\fBl\fR
+is assigned to
+\fBls\fR, the compiler generates an unchecked warning\&. At compile time, the compiler and JVM cannot determine whether
+\fBl\fR
+refers to a
+\fBList<String>\fR
+type\&. In this case,
+\fBl\fR
+does not refer to a
+\fBList<String>\fR
+type\&. As a result, heap pollution occurs\&.
+.sp
+A heap pollution situation occurs when the
+\fBList\fR
+object
+\fBl\fR, whose static type is
+\fBList<Number>\fR, is assigned to another
+\fBList\fR
+object,
+\fBls\fR, that has a different static type,
+\fBList<String>\fR\&. However, the compiler still allows this assignment\&. It must allow this assignment to preserve backward compatibility with releases of Java SE that do not support generics\&. Because of type erasure,
+\fBList<Number>\fR
+and
+\fBList<String>\fR
+both become
+\fBList\fR\&. Consequently, the compiler allows the assignment of the object
+\fBl\fR\fB,\fR
+which has a raw type of
+\fBList\fR, to the object
+\fBls\fR\&.
+.RE
+.PP
varargs
-Warns about unsafe usages of variable arguments (\f3varargs\fR) methods, in particular, those that contain non-reifiable arguments, for example:
-.sp
-.nf
-\f3public class ArrayBuilder {\fP
-.fi
-.nf
-\f3 public static <T> void addToList (List<T> listArg, T\&.\&.\&. elements) {\fP
-.fi
-.nf
-\f3 for (T x : elements) {\fP
-.fi
-.nf
-\f3 listArg\&.add(x);\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-\fINote:\fR A non-reifiable type is a type whose type information is not fully available at runtime\&.
-
-The compiler generates the following warning for the definition of the method \f3ArrayBuilder\&.addToList\fR
-.sp
-.nf
-\f3warning: [varargs] Possible heap pollution from parameterized vararg type T\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-When the compiler encounters a varargs method, it translates the \f3varargs\fR formal parameter into an array\&. However, the Java programming language does not permit the creation of arrays of parameterized types\&. In the method \f3ArrayBuilder\&.addToList\fR, the compiler translates the \f3varargs\fR formal parameter \f3T\&.\&.\&.\fR elements to the formal parameter \f3T[]\fR elements, an array\&. However, because of type erasure, the compiler converts the \f3varargs\fR formal parameter to \f3Object[]\fR elements\&. Consequently, there is a possibility of heap pollution\&.
-.SH COMMAND-LINE\ ARGUMENT\ FILES
-To shorten or simplify the \f3javac\fR command, you can specify one or more files that contain arguments to the \f3javac\fR command (except \f3-J\fR options)\&. This enables you to create \f3javac\fR commands of any length on any operating system\&.
-.PP
-An argument file can include \f3javac\fR options and source file names in any combination\&. The arguments within a file can be separated by spaces or new line characters\&. If a file name contains embedded spaces, then put the whole file name in double quotation marks\&.
-.PP
-File Names within an argument file are relative to the current directory, not the location of the argument file\&. Wild cards (*) are not allowed in these lists (such as for specifying \f3*\&.java\fR)\&. Use of the at sign (@) to recursively interpret files is not supported\&. The \f3-J\fR options are not supported because they are passed to the launcher, which does not support argument files\&.
-.PP
-When executing the \f3javac\fR command, pass in the path and name of each argument file with the at sign (@) leading character\&. When the \f3javac\fR command encounters an argument beginning with the at sign (@), it expands the contents of that file into the argument list\&.
-.PP
-\f3Example 1 Single Argument File\fR
-.PP
-You could use a single argument file named \f3argfile\fR to hold all \f3javac\fR arguments:
-.sp
-.nf
-\f3javac @argfile\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-This argument file could contain the contents of both files shown in Example 2
+.RS 4
+Warns about unsafe usages of variable arguments (\fBvarargs\fR) methods, in particular, those that contain non\-reifiable arguments, for example:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBpublic class ArrayBuilder {\fR
+\fB public static <T> void addToList (List<T> listArg, T\&.\&.\&. elements) {\fR
+\fB for (T x : elements) {\fR
+\fB listArg\&.add(x);\fR
+\fB }\fR
+\fB }\fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+\fBNote:\fR
+A non\-reifiable type is a type whose type information is not fully available at runtime\&.
+.sp
+The compiler generates the following warning for the definition of the method
+\fBArrayBuilder\&.addToList\fR
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBwarning: [varargs] Possible heap pollution from parameterized vararg type T\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+When the compiler encounters a varargs method, it translates the
+\fBvarargs\fR
+formal parameter into an array\&. However, the Java programming language does not permit the creation of arrays of parameterized types\&. In the method
+\fBArrayBuilder\&.addToList\fR, the compiler translates the
+\fBvarargs\fR
+formal parameter
+\fBT\&.\&.\&.\fR
+elements to the formal parameter
+\fBT[]\fR
+elements, an array\&. However, because of type erasure, the compiler converts the
+\fBvarargs\fR
+formal parameter to
+\fBObject[]\fR
+elements\&. Consequently, there is a possibility of heap pollution\&.
+.RE
+.SH "COMMAND-LINE ARGUMENT FILES"
+.PP
+To shorten or simplify the
+\fBjavac\fR
+command, you can specify one or more files that contain arguments to the
+\fBjavac\fR
+command (except
+\fB\-J\fR
+options)\&. This enables you to create
+\fBjavac\fR
+commands of any length on any operating system\&.
.PP
-\f3Example 2 Two Argument Files\fR
+An argument file can include
+\fBjavac\fR
+options and source file names in any combination\&. The arguments within a file can be separated by spaces or new line characters\&. If a file name contains embedded spaces, then put the whole file name in double quotation marks\&.
.PP
-You can create two argument files: one for the \f3javac\fR options and the other for the source file names\&. Note that the following lists have no line-continuation characters\&.
+File Names within an argument file are relative to the current directory, not the location of the argument file\&. Wild cards (*) are not allowed in these lists (such as for specifying
+\fB*\&.java\fR)\&. Use of the at sign (@) to recursively interpret files is not supported\&. The
+\fB\-J\fR
+options are not supported because they are passed to the launcher, which does not support argument files\&.
+.PP
+When executing the
+\fBjavac\fR
+command, pass in the path and name of each argument file with the at sign (@) leading character\&. When the
+\fBjavac\fR
+command encounters an argument beginning with the at sign (@), it expands the contents of that file into the argument list\&.
+.PP
+\fBExample 1\fR
+.br
+Single Argument File
+.RS 4
+You could use a single argument file named
+\fBargfile\fR
+to hold all
+\fBjavac\fR
+arguments:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac @argfile\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+This argument file could contain the contents of both files shown in Example 2
+.RE
.PP
+\fBExample 2\fR
+.br
+Two Argument Files
+.RS 4
+You can create two argument files: one for the
+\fBjavac\fR
+options and the other for the source file names\&. Note that the following lists have no line\-continuation characters\&.
+.sp
Create a file named options that contains the following:
-.sp
-.nf
-\f3\-d classes\fP
-.fi
-.nf
-\f3\-g\fP
-.fi
-.nf
-\f3\-sourcepath /java/pubs/ws/1\&.3/src/share/classes\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-d classes\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-g\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB\-sourcepath /java/pubs/ws/1\&.3/src/share/classes\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+
+.fi
+.if n \{\
+.RE
+.\}
Create a file named classes that contains the following:
-.sp
-.nf
-\f3MyClass1\&.java\fP
-.fi
-.nf
-\f3MyClass2\&.java\fP
-.fi
-.nf
-\f3MyClass3\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-Then, run the \f3javac\fR command as follows:
-.sp
-.nf
-\f3javac @options @classes\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-\f3Example 3 Argument Files with Paths\fR
-.PP
-The argument files can have paths, but any file names inside the files are relative to the current working directory (not \f3path1\fR or \f3path2\fR):
-.sp
-.nf
-\f3javac @path1/options @path2/classes\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-.SH ANNOTATION\ PROCESSING
-The \f3javac\fR command provides direct support for annotation processing, superseding the need for the separate annotation processing command, \f3apt\fR\&.
-.PP
-The API for annotation processors is defined in the \f3javax\&.annotation\&.processing\fR and j\f3avax\&.lang\&.model\fR packages and subpackages\&.
-.SS HOW\ ANNOTATION\ PROCESSING\ WORKS
-Unless annotation processing is disabled with the \f3-proc:none\fR option, the compiler searches for any annotation processors that are available\&. The search path can be specified with the \f3-processorpath\fR option\&. If no path is specified, then the user class path is used\&. Processors are located by means of service provider-configuration files named \f3META-INF/services/javax\&.annotation\&.processing\fR\&.Processor on the search path\&. Such files should contain the names of any annotation processors to be used, listed one per line\&. Alternatively, processors can be specified explicitly, using the \f3-processor\fR option\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBMyClass1\&.java\fR
+\fBMyClass2\&.java\fR
+\fBMyClass3\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Then, run the
+\fBjavac\fR
+command as follows:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac @options @classes\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBExample 3\fR
+.br
+Argument Files with Paths
+.RS 4
+The argument files can have paths, but any file names inside the files are relative to the current working directory (not
+\fBpath1\fR
+or
+\fBpath2\fR):
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac @path1/options @path2/classes\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.SH "ANNOTATION PROCESSING"
+.PP
+The
+\fBjavac\fR
+command provides direct support for annotation processing, superseding the need for the separate annotation processing command,
+\fBapt\fR\&.
+.PP
+The API for annotation processors is defined in the
+\fBjavax\&.annotation\&.processing\fR
+and j\fBavax\&.lang\&.model\fR
+packages and subpackages\&.
+.SS "How Annotation Processing Works"
+.PP
+Unless annotation processing is disabled with the
+\fB\-proc:none\fR
+option, the compiler searches for any annotation processors that are available\&. The search path can be specified with the
+\fB\-processorpath\fR
+option\&. If no path is specified, then the user class path is used\&. Processors are located by means of service provider\-configuration files named
+\fBMETA\-INF/services/javax\&.annotation\&.processing\fR\&.Processor on the search path\&. Such files should contain the names of any annotation processors to be used, listed one per line\&. Alternatively, processors can be specified explicitly, using the
+\fB\-processor\fR
+option\&.
.PP
After scanning the source files and classes on the command line to determine what annotations are present, the compiler queries the processors to determine what annotations they process\&. When a match is found, the processor is called\&. A processor can claim the annotations it processes, in which case no further attempt is made to find any processors for those annotations\&. After all of the annotations are claimed, the compiler does not search for additional processors\&.
.PP
If any processors generate new source files, then another round of annotation processing occurs: Any newly generated source files are scanned, and the annotations processed as before\&. Any processors called on previous rounds are also called on all subsequent rounds\&. This continues until no new source files are generated\&.
.PP
-After a round occurs where no new source files are generated, the annotation processors are called one last time, to give them a chance to complete any remaining work\&. Finally, unless the \f3-proc:only\fR option is used, the compiler compiles the original and all generated source files\&.
-.SS IMPLICITLY\ LOADED\ SOURCE\ FILES
-To compile a set of source files, the compiler might need to implicitly load additional source files\&. See Searching for Types\&. Such files are currently not subject to annotation processing\&. By default, the compiler gives a warning when annotation processing occurred and any implicitly loaded source files are compiled\&. The \f3-implicit\fR option provides a way to suppress the warning\&.
-.SH SEARCHING\ FOR\ TYPES
+After a round occurs where no new source files are generated, the annotation processors are called one last time, to give them a chance to complete any remaining work\&. Finally, unless the
+\fB\-proc:only\fR
+option is used, the compiler compiles the original and all generated source files\&.
+.SS "Implicitly Loaded Source Files"
+.PP
+To compile a set of source files, the compiler might need to implicitly load additional source files\&. See Searching for Types\&. Such files are currently not subject to annotation processing\&. By default, the compiler gives a warning when annotation processing occurred and any implicitly loaded source files are compiled\&. The
+\fB\-implicit\fR
+option provides a way to suppress the warning\&.
+.SH "SEARCHING FOR TYPES"
+.PP
To compile a source file, the compiler often needs information about a type, but the type definition is not in the source files specified on the command line\&. The compiler needs type information for every class or interface used, extended, or implemented in the source file\&. This includes classes and interfaces not explicitly mentioned in the source file, but that provide information through inheritance\&.
.PP
-For example, when you create a subclass \f3java\&.applet\&.Applet\fR, you are also using the ancestor classes of \f3Applet\fR: \f3java\&.awt\&.Panel\fR, \f3java\&.awt\&.Container\fR, \f3java\&.awt\&.Component\fR, and \f3java\&.lang\&.Object\fR\&.
-.PP
-When the compiler needs type information, it searches for a source file or class file that defines the type\&. The compiler searches for class files first in the bootstrap and extension classes, then in the user class path (which by default is the current directory)\&. The user class path is defined by setting the \f3CLASSPATH\fR environment variable or by using the \f3-classpath\fR option\&.
-.PP
-If you set the \f3-sourcepath\fR option, then the compiler searches the indicated path for source files\&. Otherwise, the compiler searches the user class path for both class files and source files\&.
-.PP
-You can specify different bootstrap or extension classes with the \f3-bootclasspath\fR and the \f3-extdirs\fR options\&. See Cross-Compilation Options\&.
-.PP
-A successful type search may produce a class file, a source file, or both\&. If both are found, then you can use the \f3-Xprefer\fR option to instruct the compiler which to use\&. If \f3newer\fR is specified, then the compiler uses the newer of the two files\&. If \f3source\fR is specified, the compiler uses the source file\&. The default is \f3newer\fR\&.
-.PP
-If a type search finds a source file for a required type, either by itself, or as a result of the setting for the \f3-Xprefer\fR option, then the compiler reads the source file to get the information it needs\&. By default the compiler also compiles the source file\&. You can use the \f3-implicit\fR option to specify the behavior\&. If \f3none\fR is specified, then no class files are generated for the source file\&. If \f3class\fR is specified, then class files are generated for the source file\&.
-.PP
-The compiler might not discover the need for some type information until after annotation processing completes\&. When the type information is found in a source file and no \f3-implicit\fR option is specified, the compiler gives a warning that the file is being compiled without being subject to annotation processing\&. To disable the warning, either specify the file on the command line (so that it will be subject to annotation processing) or use the \f3-implicit\fR option to specify whether or not class files should be generated for such source files\&.
-.SH PROGRAMMATIC\ INTERFACE
-The \f3javac\fR command supports the new Java Compiler API defined by the classes and interfaces in the \f3javax\&.tools\fR package\&.
-.SS EXAMPLE
-To compile as though providing command-line arguments, use the following syntax:
-.sp
-.nf
-\f3JavaCompiler javac = ToolProvider\&.getSystemJavaCompiler();\fP
-.fi
-.nf
-\f3JavaCompiler javac = ToolProvider\&.getSystemJavaCompiler();\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-The example writes diagnostics to the standard output stream and returns the exit code that \f3javac\fR would give when called from the command line\&.
-.PP
-You can use other methods in the \f3javax\&.tools\&.JavaCompiler\fR interface to handle diagnostics, control where files are read from and written to, and more\&.
-.SS OLD\ INTERFACE
-\fINote:\fR This API is retained for backward compatibility only\&. All new code should use the newer Java Compiler API\&.
-.PP
-The \f3com\&.sun\&.tools\&.javac\&.Main\fR class provides two static methods to call the compiler from a program:
-.sp
-.nf
-\f3public static int compile(String[] args);\fP
-.fi
-.nf
-\f3public static int compile(String[] args, PrintWriter out);\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-The \f3args\fR parameter represents any of the command-line arguments that would typically be passed to the compiler\&.
-.PP
-The \f3out\fR parameter indicates where the compiler diagnostic output is directed\&.
-.PP
-The \f3return\fR value is equivalent to the \f3exit\fR value from \f3javac\fR\&.
-.PP
-\fINote:\fR All other classes and methods found in a package with names that start with \f3com\&.sun\&.tools\&.javac\fR (subpackages of \f3com\&.sun\&.tools\&.javac\fR) are strictly internal and subject to change at any time\&.
-.SH EXAMPLES
-\f3Example 1 Compile a Simple Program\fR
-.PP
-This example shows how to compile the \f3Hello\&.java\fR source file in the greetings directory\&. The class defined in \f3Hello\&.java\fR is called \f3greetings\&.Hello\fR\&. The greetings directory is the package directory both for the source file and the class file and is underneath the current directory\&. This makes it possible to use the default user class path\&. It also makes it unnecessary to specify a separate destination directory with the \f3-d\fR option\&.
-.PP
-The source code in \f3Hello\&.java\fR:
-.sp
-.nf
-\f3package greetings;\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3public class Hello {\fP
-.fi
-.nf
-\f3 public static void main(String[] args) {\fP
-.fi
-.nf
-\f3 for (int i=0; i < args\&.length; i++) {\fP
-.fi
-.nf
-\f3 System\&.out\&.println("Hello " + args[i]);\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
+For example, when you create a subclass
+\fBjava\&.applet\&.Applet\fR, you are also using the ancestor classes of
+\fBApplet\fR:
+\fBjava\&.awt\&.Panel\fR,
+\fBjava\&.awt\&.Container\fR,
+\fBjava\&.awt\&.Component\fR, and
+\fBjava\&.lang\&.Object\fR\&.
+.PP
+When the compiler needs type information, it searches for a source file or class file that defines the type\&. The compiler searches for class files first in the bootstrap and extension classes, then in the user class path (which by default is the current directory)\&. The user class path is defined by setting the
+\fBCLASSPATH\fR
+environment variable or by using the
+\fB\-classpath\fR
+option\&.
+.PP
+If you set the
+\fB\-sourcepath\fR
+option, then the compiler searches the indicated path for source files\&. Otherwise, the compiler searches the user class path for both class files and source files\&.
+.PP
+You can specify different bootstrap or extension classes with the
+\fB\-bootclasspath\fR
+and the
+\fB\-extdirs\fR
+options\&. See Cross\-Compilation Options\&.
+.PP
+A successful type search may produce a class file, a source file, or both\&. If both are found, then you can use the
+\fB\-Xprefer\fR
+option to instruct the compiler which to use\&. If
+\fBnewer\fR
+is specified, then the compiler uses the newer of the two files\&. If
+\fBsource\fR
+is specified, the compiler uses the source file\&. The default is
+\fBnewer\fR\&.
+.PP
+If a type search finds a source file for a required type, either by itself, or as a result of the setting for the
+\fB\-Xprefer\fR
+option, then the compiler reads the source file to get the information it needs\&. By default the compiler also compiles the source file\&. You can use the
+\fB\-implicit\fR
+option to specify the behavior\&. If
+\fBnone\fR
+is specified, then no class files are generated for the source file\&. If
+\fBclass\fR
+is specified, then class files are generated for the source file\&.
+.PP
+The compiler might not discover the need for some type information until after annotation processing completes\&. When the type information is found in a source file and no
+\fB\-implicit\fR
+option is specified, the compiler gives a warning that the file is being compiled without being subject to annotation processing\&. To disable the warning, either specify the file on the command line (so that it will be subject to annotation processing) or use the
+\fB\-implicit\fR
+option to specify whether or not class files should be generated for such source files\&.
+.SH "PROGRAMMATIC INTERFACE"
+.PP
+The
+\fBjavac\fR
+command supports the new Java Compiler API defined by the classes and interfaces in the
+\fBjavax\&.tools\fR
+package\&.
+.SS "Example"
+.PP
+To compile as though providing command\-line arguments, use the following syntax:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBJavaCompiler javac = ToolProvider\&.getSystemJavaCompiler();\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+The example writes diagnostics to the standard output stream and returns the exit code that
+\fBjavac\fR
+would give when called from the command line\&.
+.PP
+You can use other methods in the
+\fBjavax\&.tools\&.JavaCompiler\fR
+interface to handle diagnostics, control where files are read from and written to, and more\&.
+.SS "Old Interface"
+.PP
+\fBNote:\fR
+This API is retained for backward compatibility only\&. All new code should use the newer Java Compiler API\&.
+.PP
+The
+\fBcom\&.sun\&.tools\&.javac\&.Main\fR
+class provides two static methods to call the compiler from a program:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBpublic static int compile(String[] args);\fR
+\fBpublic static int compile(String[] args, PrintWriter out);\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+The
+\fBargs\fR
+parameter represents any of the command\-line arguments that would typically be passed to the compiler\&.
+.PP
+The
+\fBout\fR
+parameter indicates where the compiler diagnostic output is directed\&.
+.PP
+The
+\fBreturn\fR
+value is equivalent to the
+\fBexit\fR
+value from
+\fBjavac\fR\&.
+.PP
+\fBNote:\fR
+All other classes and methods found in a package with names that start with
+\fBcom\&.sun\&.tools\&.javac\fR
+(subpackages of
+\fBcom\&.sun\&.tools\&.javac\fR) are strictly internal and subject to change at any time\&.
+.SH "EXAMPLES"
+.PP
+\fBExample 1\fR
+.br
+Compile a Simple Program
+.RS 4
+This example shows how to compile the
+\fBHello\&.java\fR
+source file in the greetings directory\&. The class defined in
+\fBHello\&.java\fR
+is called
+\fBgreetings\&.Hello\fR\&. The greetings directory is the package directory both for the source file and the class file and is underneath the current directory\&. This makes it possible to use the default user class path\&. It also makes it unnecessary to specify a separate destination directory with the
+\fB\-d\fR
+option\&.
+.sp
+The source code in
+\fBHello\&.java\fR:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBpackage greetings;\fR
+\fB \fR
+\fBpublic class Hello {\fR
+\fB public static void main(String[] args) {\fR
+\fB for (int i=0; i < args\&.length; i++) {\fR
+\fB System\&.out\&.println("Hello " + args[i]);\fR
+\fB }\fR
+\fB }\fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
Compile greetings\&.Hello:
-.sp
-.nf
-\f3javac greetings/Hello\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-Run \f3greetings\&.Hello\fR:
-.sp
-.nf
-\f3java greetings\&.Hello World Universe Everyone\fP
-.fi
-.nf
-\f3Hello World\fP
-.fi
-.nf
-\f3Hello Universe\fP
-.fi
-.nf
-\f3Hello Everyone\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-\f3Example 2 Compile Multiple Source Files\fR
-.PP
-This example compiles the \f3Aloha\&.java\fR, \f3GutenTag\&.java\fR, \f3Hello\&.java\fR, and \f3Hi\&.java\fR source files in the \f3greetings\fR package\&.
-.sp
-.nf
-\f3% javac greetings/*\&.java\fP
-.fi
-.nf
-\f3% ls greetings\fP
-.fi
-.nf
-\f3Aloha\&.class GutenTag\&.class Hello\&.class Hi\&.class\fP
-.fi
-.nf
-\f3Aloha\&.java GutenTag\&.java Hello\&.java Hi\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-\f3Example 3 Specify a User Class Path\fR
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac greetings/Hello\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Run
+\fBgreetings\&.Hello\fR:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjava greetings\&.Hello World Universe Everyone\fR
+\fBHello World\fR
+\fBHello Universe\fR
+\fBHello Everyone\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
.PP
+\fBExample 2\fR
+.br
+Compile Multiple Source Files
+.RS 4
+This example compiles the
+\fBAloha\&.java\fR,
+\fBGutenTag\&.java\fR,
+\fBHello\&.java\fR, and
+\fBHi\&.java\fR
+source files in the
+\fBgreetings\fR
+package\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB% javac greetings/*\&.java\fR
+\fB% ls greetings\fR
+\fBAloha\&.class GutenTag\&.class Hello\&.class Hi\&.class\fR
+\fBAloha\&.java GutenTag\&.java Hello\&.java Hi\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBExample 3\fR
+.br
+Specify a User Class Path
+.RS 4
After changing one of the source files in the previous example, recompile it:
-.sp
-.nf
-\f3pwd\fP
-.fi
-.nf
-\f3/examples\fP
-.fi
-.nf
-\f3javac greetings/Hi\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-Because \f3greetings\&.Hi\fR refers to other classes in the \f3greetings\fR package, the compiler needs to find these other classes\&. The previous example works because the default user class path is the directory that contains the package directory\&. If you want to recompile this file without concern for which directory you are in, then add the examples directory to the user class path by setting \f3CLASSPATH\fR\&. This example uses the \f3-classpath\fR option\&.
-.sp
-.nf
-\f3javac \-classpath /examples /examples/greetings/Hi\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-If you change \f3greetings\&.Hi\fR to use a banner utility, then that utility also needs to be accessible through the user class path\&.
-.sp
-.nf
-\f3javac \-classpath /examples:/lib/Banners\&.jar \e\fP
-.fi
-.nf
-\f3 /examples/greetings/Hi\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-To execute a class in the \f3greetings\fR package, the program needs access to the \f3greetings\fR package, and to the classes that the \f3greetings\fR classes use\&.
-.sp
-.nf
-\f3java \-classpath /examples:/lib/Banners\&.jar greetings\&.Hi\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-\f3Example 4 Separate Source Files and Class Files\fR
-.PP
-The following example uses \f3javac\fR to compile code that runs on JVM 1\&.6\&.
-.sp
-.nf
-\f3javac \-source 1\&.6 \-target 1\&.6 \-bootclasspath jdk1\&.6\&.0/lib/rt\&.jar \e \fP
-.fi
-.nf
-\f3\-extdirs "" OldCode\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-The \f3-source 1\&.6\fR option specifies that release 1\&.6 (or 6) of the Java programming language be used to compile \f3OldCode\&.java\fR\&. The option \f3-target 1\&.6\fR option ensures that the generated class files are compatible with JVM 1\&.6\&. Note that in most cases, the value of the \f3-target\fR option is the value of the \f3-source\fR option; in this example, you can omit the \f3-target\fR option\&.
-.PP
-You must specify the \f3-bootclasspath\fR option to specify the correct version of the bootstrap classes (the \f3rt\&.jar\fR library)\&. If not, then the compiler generates a warning:
-.sp
-.nf
-\f3javac \-source 1\&.6 OldCode\&.java\fP
-.fi
-.nf
-\f3warning: [options] bootstrap class path not set in conjunction with \fP
-.fi
-.nf
-\f3\-source 1\&.6\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-If you do not specify the correct version of bootstrap classes, then the compiler uses the old language rules (in this example, it uses version 1\&.6 of the Java programming language) combined with the new bootstrap classes, which can result in class files that do not work on the older platform (in this case, Java SE 6) because reference to nonexistent methods can get included\&.
-.PP
-\f3Example 5 Cross Compile\fR
-.PP
-This example uses \f3javac\fR to compile code that runs on JVM 1\&.6\&.
-.sp
-.nf
-\f3javac \-source 1\&.6 \-target 1\&.6 \-bootclasspath jdk1\&.6\&.0/lib/rt\&.jar \e\fP
-.fi
-.nf
-\f3 \-extdirs "" OldCode\&.java\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-The\f3-source 1\&.6\fR option specifies that release 1\&.6 (or 6) of the Java programming language to be used to compile OldCode\&.java\&. The \f3-target 1\&.6\fR option ensures that the generated class files are compatible with JVM 1\&.6\&. In most cases, the value of the \f3-target\fR is the value of \f3-source\fR\&. In this example, the \f3-target\fR option is omitted\&.
-.PP
-You must specify the \f3-bootclasspath\fR option to specify the correct version of the bootstrap classes (the \f3rt\&.jar\fR library)\&. If not, then the compiler generates a warning:
-.sp
-.nf
-\f3javac \-source 1\&.6 OldCode\&.java\fP
-.fi
-.nf
-\f3warning: [options] bootstrap class path not set in conjunction with \-source 1\&.6\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-If you do not specify the correct version of bootstrap classes, then the compiler uses the old language rules combined with the new bootstrap classes\&. This combination can result in class files that do not work on the older platform (in this case, Java SE 6) because reference to nonexistent methods can get included\&. In this example, the compiler uses release 1\&.6 of the Java programming language\&.
-.SH SEE\ ALSO
-.TP 0.2i
-\(bu
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBpwd\fR
+\fB/examples\fR
+\fBjavac greetings/Hi\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+Because
+\fBgreetings\&.Hi\fR
+refers to other classes in the
+\fBgreetings\fR
+package, the compiler needs to find these other classes\&. The previous example works because the default user class path is the directory that contains the package directory\&. If you want to recompile this file without concern for which directory you are in, then add the examples directory to the user class path by setting
+\fBCLASSPATH\fR\&. This example uses the
+\fB\-classpath\fR
+option\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac \-classpath /examples /examples/greetings/Hi\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+If you change
+\fBgreetings\&.Hi\fR
+to use a banner utility, then that utility also needs to be accessible through the user class path\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac \-classpath /examples:/lib/Banners\&.jar \e\fR
+\fB /examples/greetings/Hi\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+To execute a class in the
+\fBgreetings\fR
+package, the program needs access to the
+\fBgreetings\fR
+package, and to the classes that the
+\fBgreetings\fR
+classes use\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjava \-classpath /examples:/lib/Banners\&.jar greetings\&.Hi\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBExample 4\fR
+.br
+Separate Source Files and Class Files
+.RS 4
+The following example uses
+\fBjavac\fR
+to compile code that runs on JVM 1\&.7\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac \-source 1\&.7 \-target 1\&.7 \-bootclasspath jdk1\&.7\&.0/lib/rt\&.jar \e \fR
+\fB\-extdirs "" OldCode\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The
+\fB\-source 1\&.7\fR
+option specifies that release 1\&.7 (or 7) of the Java programming language be used to compile
+\fBOldCode\&.java\fR\&. The option
+\fB\-target 1\&.7\fR
+option ensures that the generated class files are compatible with JVM 1\&.7\&. Note that in most cases, the value of the
+\fB\-target\fR
+option is the value of the
+\fB\-source\fR
+option; in this example, you can omit the
+\fB\-target\fR
+option\&.
+.sp
+You must specify the
+\fB\-bootclasspath\fR
+option to specify the correct version of the bootstrap classes (the
+\fBrt\&.jar\fR
+library)\&. If not, then the compiler generates a warning:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac \-source 1\&.7 OldCode\&.java\fR
+\fBwarning: [options] bootstrap class path not set in conjunction with \fR
+\fB\-source 1\&.7\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+If you do not specify the correct version of bootstrap classes, then the compiler uses the old language rules (in this example, it uses version 1\&.7 of the Java programming language) combined with the new bootstrap classes, which can result in class files that do not work on the older platform (in this case, Java SE 7) because reference to nonexistent methods can get included\&.
+.RE
+.PP
+\fBExample 5\fR
+.br
+Cross Compile
+.RS 4
+This example uses
+\fBjavac\fR
+to compile code that runs on JVM 1\&.7\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac \-source 1\&.7 \-target 1\&.7 \-bootclasspath jdk1\&.7\&.0/lib/rt\&.jar \e\fR
+\fB \-extdirs "" OldCode\&.java\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+The\fB \-source 1\&.7\fR
+option specifies that release 1\&.7 (or 7) of the Java programming language to be used to compile OldCode\&.java\&. The
+\fB\-target 1\&.7\fR
+option ensures that the generated class files are compatible with JVM 1\&.7\&. In most cases, the value of the
+\fB\-target\fR
+is the value of
+\fB\-source\fR\&. In this example, the
+\fB\-target\fR
+option is omitted\&.
+.sp
+You must specify the
+\fB\-bootclasspath\fR
+option to specify the correct version of the bootstrap classes (the
+\fBrt\&.jar\fR
+library)\&. If not, then the compiler generates a warning:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavac \-source 1\&.7 OldCode\&.java\fR
+\fBwarning: [options] bootstrap class path not set in conjunction with \-source 1\&.7\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+If you do not specify the correct version of bootstrap classes, then the compiler uses the old language rules combined with the new bootstrap classes\&. This combination can result in class files that do not work on the older platform (in this case, Java SE 7) because reference to nonexistent methods can get included\&. In this example, the compiler uses release 1\&.7 of the Java programming language\&.
+.RE
+.SH "SEE ALSO"
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
java(1)
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
jdb(1)
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
javah(1)
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
javadoc(1)
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
jar(1)
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
jdb(1)
-.RE
-.br
-'pl 8.5i
-'bp
+.RE
+.br
+'pl 8.5i
+'bp
diff --git a/src/solaris/doc/sun/man/man1/javap.1 b/src/solaris/doc/sun/man/man1/javap.1
index 353a13fb0..2580bf124 100644
--- a/src/solaris/doc/sun/man/man1/javap.1
+++ b/src/solaris/doc/sun/man/man1/javap.1
@@ -1,443 +1,392 @@
'\" t
-.\" Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
-.\"
-.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-.\"
-.\" This code is free software; you can redistribute it and/or modify it
-.\" under the terms of the GNU General Public License version 2 only, as
-.\" published by the Free Software Foundation.
-.\"
-.\" 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.
-.\"
-.\" Arch: generic
-.\" Software: JDK 8
-.\" Date: 21 November 2013
-.\" SectDesc: Basic Tools
-.\" Title: javap.1
+.\" Copyright (c) 1994, 2014, Oracle and/or its affiliates. All rights reserved.
+.\"
+.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+.\"
+.\" This code is free software; you can redistribute it and/or modify it
+.\" under the terms of the GNU General Public License version 2 only, as
+.\" published by the Free Software Foundation.
+.\"
+.\" 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.
+.\"
+.\" Title: javap
+.\" Language: English
+.\" Date: 8 August 2014
+.\" SectDesc: Basic Tools
+.\" Software: JDK 8
+.\" Arch: generic
+.\" Part Number: E38207-03
.\"
.if n .pl 99999
-.TH javap 1 "21 November 2013" "JDK 8" "Basic Tools"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-
-.SH NAME
+.TH "javap" "1" "8 August 2014" "JDK 8" "Basic Tools"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
javap \- Disassembles one or more class files\&.
-.SH SYNOPSIS
-.sp
-.nf
-
+.SH "SYNOPSIS"
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
\fBjavap\fR [\fIoptions\fR] \fIclassfile\fR\&.\&.\&.
-.fi
-.sp
-.TP
+.fi
+.if n \{\
+.RE
+.\}
+.PP
\fIoptions\fR
-The command-line options\&. See Options\&.
-.TP
+.RS 4
+The command\-line options\&. See Options\&.
+.RE
+.PP
\fIclassfile\fR
-One or more classes separated by spaces to be processed for annotations such as DocFooter\&.class\&. You can specify a class that can be found in the class path, by its file name or with a URL such as \f3file:///home/user/myproject/src/DocFooter\&.class\fR\&.
-.SH DESCRIPTION
-The \f3javap\fR command disassembles one or more class files\&. The output depends on the options used\&. When no options are used, then the \f3javap\fR command prints the package, protected and public fields, and methods of the classes passed to it\&. The \f3javap\fR command prints its output to \f3stdout\fR\&.
-.SH OPTIONS
-.TP
--help, --help, -?
+.RS 4
+One or more classes separated by spaces to be processed for annotations such as DocFooter\&.class\&. You can specify a class that can be found in the class path, by its file name or with a URL such as
+\fBfile:///home/user/myproject/src/DocFooter\&.class\fR\&.
+.RE
+.SH "DESCRIPTION"
+.PP
+The
+\fBjavap\fR
+command disassembles one or more class files\&. The output depends on the options used\&. When no options are used, then the
+\fBjavap\fR
+command prints the package, protected and public fields, and methods of the classes passed to it\&. The
+\fBjavap\fR
+command prints its output to
+\fBstdout\fR\&.
+.SH "OPTIONS"
+.PP
+\-help
.br
-Prints a help message for the \f3javap\fR command\&.
-.TP
--version
+\-\-help
.br
+\-?
+.RS 4
+Prints a help message for the
+\fBjavap\fR
+command\&.
+.RE
+.PP
+\-version
+.RS 4
Prints release information\&.
-.TP
--l
-.br
+.RE
+.PP
+\-l
+.RS 4
Prints line and local variable tables\&.
-.TP
--public
-.br
+.RE
+.PP
+\-public
+.RS 4
Shows only public classes and members\&.
-.TP
--protected
-.br
+.RE
+.PP
+\-protected
+.RS 4
Shows only protected and public classes and members\&.
-.TP
--private, -p
+.RE
+.PP
+\-private
.br
+\-p
+.RS 4
Shows all classes and members\&.
-.TP
--J\fIoption\fR
-.br
+.RE
+.PP
+\-J\fIoption\fR
+.RS 4
Passes the specified option to the JVM\&. For example:
-.sp
-.nf
-\f3javap \-J\-version\fP
-.fi
-.nf
-\f3javap \-J\-Djava\&.security\&.manager \-J\-Djava\&.security\&.policy=MyPolicy MyClassName\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-
-
-For more information about JVM options, see the \f3java(1)\fR command documentation\&.
-.TP
--s
-.br
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBjavap \-J\-version\fR
+\fBjavap \-J\-Djava\&.security\&.manager \-J\-Djava\&.security\&.policy=MyPolicy MyClassName\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+For more information about JVM options, see the command documentation\&.
+.RE
+.PP
+\-s
+.RS 4
Prints internal type signatures\&.
-.TP
--sysinfo
-.br
+.RE
+.PP
+\-sysinfo
+.RS 4
Shows system information (path, size, date, MD5 hash) of the class being processed\&.
-.TP
--constants
-.br
-Shows \f3static final\fR constants\&.
-.TP
--c
-.br
+.RE
+.PP
+\-constants
+.RS 4
+Shows
+\fBstatic final\fR
+constants\&.
+.RE
+.PP
+\-c
+.RS 4
Prints disassembled code, for example, the instructions that comprise the Java bytecodes, for each of the methods in the class\&.
-.TP
--verbose
-.br
+.RE
+.PP
+\-verbose
+.RS 4
Prints stack size, number of locals and arguments for methods\&.
-.TP
--classpath \fIpath\fR
-.br
-Specifies the path the \f3javap\fR command uses to look up classes\&. Overrides the default or the \f3CLASSPATH\fR environment variable when it is set\&.
-.TP
--bootclasspath \fIpath\fR
-.br
-Specifies the path from which to load bootstrap classes\&. By default, the bootstrap classes are the classes that implement the core Java platform located in \f3jre/lib/rt\&.jar\fR and several other JAR files\&.
-.TP
--extdir \fIdirs\fR
-.br
-Overrides the location at which installed extensions are searched for\&. The default location for extensions is the value of \f3java\&.ext\&.dirs\fR\&.
-.SH EXAMPLE
-Compile the following \f3DocFooter\fR class:
-.sp
-.nf
-\f3import java\&.awt\&.*;\fP
-.fi
-.nf
-\f3import java\&.applet\&.*;\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3public class DocFooter extends Applet {\fP
-.fi
-.nf
-\f3 String date;\fP
-.fi
-.nf
-\f3 String email;\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3 public void init() {\fP
-.fi
-.nf
-\f3 resize(500,100);\fP
-.fi
-.nf
-\f3 date = getParameter("LAST_UPDATED");\fP
-.fi
-.nf
-\f3 email = getParameter("EMAIL");\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3 public void paint(Graphics g) {\fP
-.fi
-.nf
-\f3 g\&.drawString(date + " by ",100, 15);\fP
-.fi
-.nf
-\f3 g\&.drawString(email,290,15);\fP
-.fi
-.nf
-\f3 }\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-The output from the \f3javap DocFooter\&.class\fR command yields the following:
-.sp
-.nf
-\f3Compiled from "DocFooter\&.java"\fP
-.fi
-.nf
-\f3public class DocFooter extends java\&.applet\&.Applet {\fP
-.fi
-.nf
-\f3 java\&.lang\&.String date;\fP
-.fi
-.nf
-\f3 java\&.lang\&.String email;\fP
-.fi
-.nf
-\f3 public DocFooter();\fP
-.fi
-.nf
-\f3 public void init();\fP
-.fi
-.nf
-\f3 public void paint(java\&.awt\&.Graphics);\fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-The output from \f3javap -c DocFooter\&.class\fR command yields the following:
-.sp
-.nf
-\f3Compiled from "DocFooter\&.java"\fP
-.fi
-.nf
-\f3public class DocFooter extends java\&.applet\&.Applet {\fP
-.fi
-.nf
-\f3 java\&.lang\&.String date;\fP
-.fi
-.nf
-\f3 java\&.lang\&.String email;\fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3 public DocFooter();\fP
-.fi
-.nf
-\f3 Code:\fP
-.fi
-.nf
-\f3 0: aload_0 \fP
-.fi
-.nf
-\f3 1: invokespecial #1 // Method\fP
-.fi
-.nf
-\f3java/applet/Applet\&."<init>":()V\fP
-.fi
-.nf
-\f3 4: return \fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3 public void init();\fP
-.fi
-.nf
-\f3 Code:\fP
-.fi
-.nf
-\f3 0: aload_0 \fP
-.fi
-.nf
-\f3 1: sipush 500\fP
-.fi
-.nf
-\f3 4: bipush 100\fP
-.fi
-.nf
-\f3 6: invokevirtual #2 // Method resize:(II)V\fP
-.fi
-.nf
-\f3 9: aload_0 \fP
-.fi
-.nf
-\f3 10: aload_0 \fP
-.fi
-.nf
-\f3 11: ldc #3 // String LAST_UPDATED\fP
-.fi
-.nf
-\f3 13: invokevirtual #4 // Method\fP
-.fi
-.nf
-\f3 getParameter:(Ljava/lang/String;)Ljava/lang/String;\fP
-.fi
-.nf
-\f3 16: putfield #5 // Field date:Ljava/lang/String;\fP
-.fi
-.nf
-\f3 19: aload_0 \fP
-.fi
-.nf
-\f3 20: aload_0 \fP
-.fi
-.nf
-\f3 21: ldc #6 // String EMAIL\fP
-.fi
-.nf
-\f3 23: invokevirtual #4 // Method\fP
-.fi
-.nf
-\f3 getParameter:(Ljava/lang/String;)Ljava/lang/String;\fP
-.fi
-.nf
-\f3 26: putfield #7 // Field email:Ljava/lang/String;\fP
-.fi
-.nf
-\f3 29: return \fP
-.fi
-.nf
-\f3\fP
-.fi
-.nf
-\f3 public void paint(java\&.awt\&.Graphics);\fP
-.fi
-.nf
-\f3 Code:\fP
-.fi
-.nf
-\f3 0: aload_1 \fP
-.fi
-.nf
-\f3 1: new #8 // class java/lang/StringBuilder\fP
-.fi
-.nf
-\f3 4: dup \fP
-.fi
-.nf
-\f3 5: invokespecial #9 // Method\fP
-.fi
-.nf
-\f3 java/lang/StringBuilder\&."<init>":()V\fP
-.fi
-.nf
-\f3 8: aload_0 \fP
-.fi
-.nf
-\f3 9: getfield #5 // Field date:Ljava/lang/String;\fP
-.fi
-.nf
-\f3 12: invokevirtual #10 // Method\fP
-.fi
-.nf
-\f3 java/lang/StringBuilder\&.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;\fP
-.fi
-.nf
-\f3 15: ldc #11 // String by \fP
-.fi
-.nf
-\f3 17: invokevirtual #10 // Method\fP
-.fi
-.nf
-\f3 java/lang/StringBuilder\&.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;\fP
-.fi
-.nf
-\f3 20: invokevirtual #12 // Method\fP
-.fi
-.nf
-\f3 java/lang/StringBuilder\&.toString:()Ljava/lang/String;\fP
-.fi
-.nf
-\f3 23: bipush 100\fP
-.fi
-.nf
-\f3 25: bipush 15\fP
-.fi
-.nf
-\f3 27: invokevirtual #13 // Method\fP
-.fi
-.nf
-\f3 java/awt/Graphics\&.drawString:(Ljava/lang/String;II)V\fP
-.fi
-.nf
-\f3 30: aload_1 \fP
-.fi
-.nf
-\f3 31: aload_0 \fP
-.fi
-.nf
-\f3 32: getfield #7 // Field email:Ljava/lang/String;\fP
-.fi
-.nf
-\f3 35: sipush 290\fP
-.fi
-.nf
-\f3 38: bipush 15\fP
-.fi
-.nf
-\f3 40: invokevirtual #13 // Method\fP
-.fi
-.nf
-\f3java/awt/Graphics\&.drawString:(Ljava/lang/String;II)V\fP
-.fi
-.nf
-\f3 43: return \fP
-.fi
-.nf
-\f3}\fP
-.fi
-.nf
-\f3\fP
-.fi
-.sp
-.SH SEE\ ALSO
-.TP 0.2i
-\(bu
-javac(1)
-.TP 0.2i
-\(bu
+.RE
+.PP
+\-classpath \fIpath\fR
+.RS 4
+Specifies the path the
+\fBjavap\fR
+command uses to look up classes\&. Overrides the default or the
+\fBCLASSPATH\fR
+environment variable when it is set\&.
+.RE
+.PP
+\-bootclasspath \fIpath\fR
+.RS 4
+Specifies the path from which to load bootstrap classes\&. By default, the bootstrap classes are the classes that implement the core Java platform located in
+\fBjre/lib/rt\&.jar\fR
+and several other JAR files\&.
+.RE
+.PP
+\-extdir \fIdirs\fR
+.RS 4
+Overrides the location at which installed extensions are searched for\&. The default location for extensions is the value of
+\fBjava\&.ext\&.dirs\fR\&.
+.RE
+.SH "EXAMPLE"
+.PP
+Compile the following
+\fBDocFooter\fR
+class:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBimport java\&.awt\&.*;\fR
+\fBimport java\&.applet\&.*;\fR
+\fB \fR
+\fBpublic class DocFooter extends Applet {\fR
+\fB String date;\fR
+\fB String email;\fR
+\fB \fR
+\fB public void init() {\fR
+\fB resize(500,100);\fR
+\fB date = getParameter("LAST_UPDATED");\fR
+\fB email = getParameter("EMAIL");\fR
+\fB }\fR
+\fB \fR
+\fB public void paint(Graphics g) {\fR
+\fB g\&.drawString(date + " by ",100, 15);\fR
+\fB g\&.drawString(email,290,15);\fR
+\fB }\fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+The output from the
+\fBjavap DocFooter\&.class\fR
+command yields the following:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBCompiled from "DocFooter\&.java"\fR
+\fBpublic class DocFooter extends java\&.applet\&.Applet {\fR
+\fB java\&.lang\&.String date;\fR
+\fB java\&.lang\&.String email;\fR
+\fB public DocFooter();\fR
+\fB public void init();\fR
+\fB public void paint(java\&.awt\&.Graphics);\fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.PP
+The output from
+\fBjavap \-c DocFooter\&.class\fR
+command yields the following:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBCompiled from "DocFooter\&.java"\fR
+\fBpublic class DocFooter extends java\&.applet\&.Applet {\fR
+\fB java\&.lang\&.String date;\fR
+\fB java\&.lang\&.String email;\fR
+
+\fB public DocFooter();\fR
+\fB Code:\fR
+\fB 0: aload_0 \fR
+\fB 1: invokespecial #1 // Method\fR
+\fBjava/applet/Applet\&."<init>":()V\fR
+\fB 4: return \fR
+
+\fB public void init();\fR
+\fB Code:\fR
+\fB 0: aload_0 \fR
+\fB 1: sipush 500\fR
+\fB 4: bipush 100\fR
+\fB 6: invokevirtual #2 // Method resize:(II)V\fR
+\fB 9: aload_0 \fR
+\fB 10: aload_0 \fR
+\fB 11: ldc #3 // String LAST_UPDATED\fR
+\fB 13: invokevirtual #4 // Method\fR
+\fB getParameter:(Ljava/lang/String;)Ljava/lang/String;\fR
+\fB 16: putfield #5 // Field date:Ljava/lang/String;\fR
+\fB 19: aload_0 \fR
+\fB 20: aload_0 \fR
+\fB 21: ldc #6 // String EMAIL\fR
+\fB 23: invokevirtual #4 // Method\fR
+\fB getParameter:(Ljava/lang/String;)Ljava/lang/String;\fR
+\fB 26: putfield #7 // Field email:Ljava/lang/String;\fR
+\fB 29: return \fR
+
+\fB public void paint(java\&.awt\&.Graphics);\fR
+\fB Code:\fR
+\fB 0: aload_1 \fR
+\fB 1: new #8 // class java/lang/StringBuilder\fR
+\fB 4: dup \fR
+\fB 5: invokespecial #9 // Method\fR
+\fB java/lang/StringBuilder\&."<init>":()V\fR
+\fB 8: aload_0 \fR
+\fB 9: getfield #5 // Field date:Ljava/lang/String;\fR
+\fB 12: invokevirtual #10 // Method\fR
+\fB java/lang/StringBuilder\&.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;\fR
+\fB 15: ldc #11 // String by \fR
+\fB 17: invokevirtual #10 // Method\fR
+\fB java/lang/StringBuilder\&.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;\fR
+\fB 20: invokevirtual #12 // Method\fR
+\fB java/lang/StringBuilder\&.toString:()Ljava/lang/String;\fR
+\fB 23: bipush 100\fR
+\fB 25: bipush 15\fR
+\fB 27: invokevirtual #13 // Method\fR
+\fB java/awt/Graphics\&.drawString:(Ljava/lang/String;II)V\fR
+\fB 30: aload_1 \fR
+\fB 31: aload_0 \fR
+\fB 32: getfield #7 // Field email:Ljava/lang/String;\fR
+\fB 35: sipush 290\fR
+\fB 38: bipush 15\fR
+\fB 40: invokevirtual #13 // Method\fR
+\fBjava/awt/Graphics\&.drawString:(Ljava/lang/String;II)V\fR
+\fB 43: return \fR
+\fB}\fR
+
+.fi
+.if n \{\
+.RE
+.\}
+.SH "SEE ALSO"
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
java(1)
-.TP 0.2i
-\(bu
-jdb(1)
-.TP 0.2i
-\(bu
-javah(1)
-.TP 0.2i
-\(bu
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+javac(1)
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
javadoc(1)
-.RE
-.br
-'pl 8.5i
-'bp
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+javah(1)
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+jdb(1)
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+jdeps(1)
+.RE
+.br
+'pl 8.5i
+'bp
diff --git a/src/solaris/native/java/net/ExtendedOptionsImpl.c b/src/solaris/native/java/net/ExtendedOptionsImpl.c
index 145d16685..8b43e3de5 100644
--- a/src/solaris/native/java/net/ExtendedOptionsImpl.c
+++ b/src/solaris/native/java/net/ExtendedOptionsImpl.c
@@ -215,6 +215,9 @@ JNIEXPORT void JNICALL Java_sun_net_ExtendedOptionsImpl_setFlowOption
if (errno == ENOPROTOOPT) {
JNU_ThrowByName(env, "java/lang/UnsupportedOperationException",
"unsupported socket option");
+ } else if (errno == EACCES || errno == EPERM) {
+ NET_ERROR(env, JNU_JAVANETPKG "SocketException",
+ "Permission denied");
} else {
NET_ERROR(env, JNU_JAVANETPKG "SocketException",
"set option SO_FLOW_SLA failed");
@@ -247,6 +250,9 @@ JNIEXPORT void JNICALL Java_sun_net_ExtendedOptionsImpl_getFlowOption
if (errno == ENOPROTOOPT) {
JNU_ThrowByName(env, "java/lang/UnsupportedOperationException",
"unsupported socket option");
+ } else if (errno == EACCES || errno == EPERM) {
+ NET_ERROR(env, JNU_JAVANETPKG "SocketException",
+ "Permission denied");
} else {
NET_ERROR(env, JNU_JAVANETPKG "SocketException",
"set option SO_FLOW_SLA failed");
diff --git a/src/solaris/native/java/net/NetworkInterface.c b/src/solaris/native/java/net/NetworkInterface.c
index 16acf07a2..7ee0c38c6 100644
--- a/src/solaris/native/java/net/NetworkInterface.c
+++ b/src/solaris/native/java/net/NetworkInterface.c
@@ -250,7 +250,11 @@ JNIEXPORT jobject JNICALL Java_java_net_NetworkInterface_getByName0
}
name_utf = (*env)->GetStringUTFChars(env, name, &isCopy);
-
+ if (name_utf == NULL) {
+ if (!(*env)->ExceptionCheck(env))
+ JNU_ThrowOutOfMemoryError(env, NULL);
+ return NULL;
+ }
/*
* Search the list of interface based on name
*/
@@ -518,7 +522,11 @@ JNIEXPORT jbyteArray JNICALL Java_java_net_NetworkInterface_getMacAddr0(JNIEnv *
const char* name_utf;
name_utf = (*env)->GetStringUTFChars(env, name, &isCopy);
-
+ if (name_utf == NULL) {
+ if (!(*env)->ExceptionCheck(env))
+ JNU_ThrowOutOfMemoryError(env, NULL);
+ return NULL;
+ }
if ((sock =openSocketWithFallback(env, name_utf)) < 0) {
(*env)->ReleaseStringUTFChars(env, name, name_utf);
return JNI_FALSE;
@@ -565,6 +573,11 @@ JNIEXPORT jint JNICALL Java_java_net_NetworkInterface_getMTU0(JNIEnv *env, jclas
const char* name_utf;
name_utf = (*env)->GetStringUTFChars(env, name, &isCopy);
+ if (name_utf == NULL) {
+ if (!(*env)->ExceptionCheck(env))
+ JNU_ThrowOutOfMemoryError(env, NULL);
+ return ret;
+ }
if ((sock =openSocketWithFallback(env, name_utf)) < 0) {
(*env)->ReleaseStringUTFChars(env, name, name_utf);
@@ -588,7 +601,11 @@ static int getFlags0(JNIEnv *env, jstring name) {
int flags = 0;
name_utf = (*env)->GetStringUTFChars(env, name, &isCopy);
-
+ if (name_utf == NULL) {
+ if (!(*env)->ExceptionCheck(env))
+ JNU_ThrowOutOfMemoryError(env, NULL);
+ return -1;
+ }
if ((sock = openSocketWithFallback(env, name_utf)) < 0) {
(*env)->ReleaseStringUTFChars(env, name, name_utf);
return -1;
@@ -632,10 +649,9 @@ jobject createNetworkInterface(JNIEnv *env, netif *ifs) {
* Create a NetworkInterface object and populate it
*/
netifObj = (*env)->NewObject(env, ni_class, ni_ctrID);
+ CHECK_NULL_RETURN(netifObj, NULL);
name = (*env)->NewStringUTF(env, ifs->name);
- if (netifObj == NULL || name == NULL) {
- return NULL;
- }
+ CHECK_NULL_RETURN(name, NULL);
(*env)->SetObjectField(env, netifObj, ni_nameID, name);
(*env)->SetObjectField(env, netifObj, ni_descID, name);
(*env)->SetIntField(env, netifObj, ni_indexID, ifs->index);
@@ -674,6 +690,8 @@ jobject createNetworkInterface(JNIEnv *env, netif *ifs) {
iaObj = (*env)->NewObject(env, ni_ia4cls, ni_ia4ctrID);
if (iaObj) {
setInetAddress_addr(env, iaObj, htonl(((struct sockaddr_in*)addrP->addr)->sin_addr.s_addr));
+ } else {
+ return NULL;
}
ibObj = (*env)->NewObject(env, ni_ibcls, ni_ibctrID);
if (ibObj) {
@@ -684,10 +702,14 @@ jobject createNetworkInterface(JNIEnv *env, netif *ifs) {
if (ia2Obj) {
setInetAddress_addr(env, ia2Obj, htonl(((struct sockaddr_in*)addrP->brdcast)->sin_addr.s_addr));
(*env)->SetObjectField(env, ibObj, ni_ib4broadcastID, ia2Obj);
+ } else {
+ return NULL;
}
}
(*env)->SetShortField(env, ibObj, ni_ib4maskID, addrP->mask);
(*env)->SetObjectArrayElement(env, bindArr, bind_index++, ibObj);
+ } else {
+ return NULL;
}
}
@@ -707,20 +729,20 @@ jobject createNetworkInterface(JNIEnv *env, netif *ifs) {
setInet6Address_scopeid(env, iaObj, scope);
setInet6Address_scopeifname(env, iaObj, netifObj);
}
+ } else {
+ return NULL;
}
ibObj = (*env)->NewObject(env, ni_ibcls, ni_ibctrID);
if (ibObj) {
(*env)->SetObjectField(env, ibObj, ni_ibaddressID, iaObj);
(*env)->SetShortField(env, ibObj, ni_ib4maskID, addrP->mask);
(*env)->SetObjectArrayElement(env, bindArr, bind_index++, ibObj);
+ } else {
+ return NULL;
}
}
#endif
- if (iaObj == NULL) {
- return NULL;
- }
-
(*env)->SetObjectArrayElement(env, addrArr, addr_index++, iaObj);
addrP = addrP->next;
}
@@ -912,9 +934,14 @@ netif *addif(JNIEnv *env, int sock, const char * if_name,
// Deal with broadcast addr & subnet mask
struct sockaddr * brdcast_to = (struct sockaddr *) ((char *) addrP + sizeof(netaddr) + addr_size);
addrP->brdcast = getBroadcast(env, sock, name, brdcast_to );
-
- if ((mask = getSubnet(env, sock, name)) != -1)
+ if ((*env)->ExceptionCheck(env) == JNI_TRUE) {
+ return ifs;
+ }
+ if ((mask = getSubnet(env, sock, name)) != -1) {
addrP->mask = mask;
+ } else if((*env)->ExceptionCheck(env)) {
+ return ifs;
+ }
}
/**
@@ -1396,6 +1423,7 @@ static int getMacAddress(JNIEnv *env, int sock, const char* ifname, const struct
nddp = (struct kinfo_ndd *)malloc(size);
if (!nddp) {
+ JNU_ThrowOutOfMemoryError(env, "Network interface getMacAddress native buffer allocation failed");
return -1;
}
diff --git a/src/solaris/native/sun/awt/gtk2_interface.c b/src/solaris/native/sun/awt/gtk2_interface.c
index cfcef70fe..0b6cbd63a 100644
--- a/src/solaris/native/sun/awt/gtk2_interface.c
+++ b/src/solaris/native/sun/awt/gtk2_interface.c
@@ -538,9 +538,7 @@ gboolean gtk2_show_uri_load(JNIEnv *env) {
fprintf(stderr, "dlsym(gtk_show_uri) returned NULL\n");
#endif /* INTERNAL_BUILD */
} else {
-#ifdef __solaris__
update_supported_actions(env);
-#endif
success = TRUE;
}
}
diff --git a/src/solaris/native/sun/nio/ch/FileChannelImpl.c b/src/solaris/native/sun/nio/ch/FileChannelImpl.c
index d47cc3da1..895289067 100644
--- a/src/solaris/native/sun/nio/ch/FileChannelImpl.c
+++ b/src/solaris/native/sun/nio/ch/FileChannelImpl.c
@@ -39,6 +39,8 @@
#if defined(__linux__) || defined(__solaris__)
#include <sys/sendfile.h>
+#elif defined(_AIX)
+#include <sys/socket.h>
#elif defined(_ALLBSD_SOURCE)
#include <sys/types.h>
#include <sys/socket.h>
@@ -207,9 +209,7 @@ Java_sun_nio_ch_FileChannelImpl_transferTo0(JNIEnv *env, jobject this,
numBytes = count;
-#ifdef __APPLE__
result = sendfile(srcFD, dstFD, position, &numBytes, NULL, 0);
-#endif
if (numBytes > 0)
return numBytes;
@@ -228,7 +228,48 @@ Java_sun_nio_ch_FileChannelImpl_transferTo0(JNIEnv *env, jobject this,
}
return result;
+
+#elif defined(_AIX)
+ jlong max = (jlong)java_lang_Integer_MAX_VALUE;
+ struct sf_parms sf_iobuf;
+ jlong result;
+
+ if (position > max)
+ return IOS_UNSUPPORTED_CASE;
+
+ if (count > max)
+ count = max;
+
+ memset(&sf_iobuf, 0, sizeof(sf_iobuf));
+ sf_iobuf.file_descriptor = srcFD;
+ sf_iobuf.file_offset = (off_t)position;
+ sf_iobuf.file_bytes = count;
+
+ result = send_file(&dstFD, &sf_iobuf, SF_SYNC_CACHE);
+
+ /* AIX send_file() will return 0 when this operation complete successfully,
+ * return 1 when partial bytes transfered and return -1 when an error has
+ * Occured.
+ */
+ if (result == -1) {
+ if (errno == EWOULDBLOCK)
+ return IOS_UNAVAILABLE;
+ if ((errno == EINVAL) && ((ssize_t)count >= 0))
+ return IOS_UNSUPPORTED_CASE;
+ if (errno == EINTR)
+ return IOS_INTERRUPTED;
+ if (errno == ENOTSOCK)
+ return IOS_UNSUPPORTED;
+ JNU_ThrowIOExceptionWithLastError(env, "Transfer failed");
+ return IOS_THROWN;
+ }
+
+ if (sf_iobuf.bytes_sent > 0)
+ return (jlong)sf_iobuf.bytes_sent;
+
+ return IOS_UNSUPPORTED_CASE;
#else
return IOS_UNSUPPORTED_CASE;
#endif
}
+
diff --git a/src/solaris/native/sun/security/smartcardio/MUSCLE/pcsclite.h b/src/solaris/native/sun/security/smartcardio/MUSCLE/pcsclite.h
index e17cf8061..02e7035b3 100644
--- a/src/solaris/native/sun/security/smartcardio/MUSCLE/pcsclite.h
+++ b/src/solaris/native/sun/security/smartcardio/MUSCLE/pcsclite.h
@@ -62,6 +62,8 @@ typedef SCARDHANDLE *LPSCARDHANDLE;
#define MAX_ATR_SIZE 33 /* Maximum ATR size */
+#ifndef __APPLE__
+
typedef struct
{
const char *szReader;
@@ -73,6 +75,23 @@ typedef struct
}
SCARD_READERSTATE_A;
+#else // __APPLE__
+
+#pragma pack(1)
+typedef struct
+{
+ const char *szReader;
+ void *pvUserData;
+ uint32_t dwCurrentState;
+ uint32_t dwEventState;
+ uint32_t cbAtr;
+ unsigned char rgbAtr[MAX_ATR_SIZE];
+}
+SCARD_READERSTATE_A;
+#pragma pack()
+
+#endif // __APPLE__
+
typedef SCARD_READERSTATE_A SCARD_READERSTATE, *PSCARD_READERSTATE_A,
*LPSCARD_READERSTATE_A;
diff --git a/src/solaris/native/sun/security/smartcardio/pcsc_md.c b/src/solaris/native/sun/security/smartcardio/pcsc_md.c
index 999402c42..f344f4a00 100644
--- a/src/solaris/native/sun/security/smartcardio/pcsc_md.c
+++ b/src/solaris/native/sun/security/smartcardio/pcsc_md.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -89,6 +89,10 @@ void *findFunction(JNIEnv *env, void *hModule, char *functionName) {
JNIEXPORT void JNICALL Java_sun_security_smartcardio_PlatformPCSC_initialize
(JNIEnv *env, jclass thisClass, jstring jLibName) {
const char *libName = (*env)->GetStringUTFChars(env, jLibName, NULL);
+ if (libName == NULL) {
+ throwNullPointerException(env, "PCSC library name is null");
+ return;
+ }
hModule = dlopen(libName, RTLD_LAZY);
(*env)->ReleaseStringUTFChars(env, jLibName, libName);
@@ -97,13 +101,44 @@ JNIEXPORT void JNICALL Java_sun_security_smartcardio_PlatformPCSC_initialize
return;
}
scardEstablishContext = (FPTR_SCardEstablishContext)findFunction(env, hModule, "SCardEstablishContext");
+ if ((*env)->ExceptionCheck(env)) {
+ return;
+ }
scardConnect = (FPTR_SCardConnect) findFunction(env, hModule, "SCardConnect");
+ if ((*env)->ExceptionCheck(env)) {
+ return;
+ }
scardDisconnect = (FPTR_SCardDisconnect) findFunction(env, hModule, "SCardDisconnect");
+ if ((*env)->ExceptionCheck(env)) {
+ return;
+ }
scardStatus = (FPTR_SCardStatus) findFunction(env, hModule, "SCardStatus");
+ if ((*env)->ExceptionCheck(env)) {
+ return;
+ }
scardGetStatusChange = (FPTR_SCardGetStatusChange) findFunction(env, hModule, "SCardGetStatusChange");
+ if ((*env)->ExceptionCheck(env)) {
+ return;
+ }
scardTransmit = (FPTR_SCardTransmit) findFunction(env, hModule, "SCardTransmit");
+ if ((*env)->ExceptionCheck(env)) {
+ return;
+ }
scardListReaders = (FPTR_SCardListReaders) findFunction(env, hModule, "SCardListReaders");
+ if ((*env)->ExceptionCheck(env)) {
+ return;
+ }
scardBeginTransaction = (FPTR_SCardBeginTransaction)findFunction(env, hModule, "SCardBeginTransaction");
+ if ((*env)->ExceptionCheck(env)) {
+ return;
+ }
scardEndTransaction = (FPTR_SCardEndTransaction) findFunction(env, hModule, "SCardEndTransaction");
+ if ((*env)->ExceptionCheck(env)) {
+ return;
+ }
+#ifndef __APPLE__
scardControl = (FPTR_SCardControl) findFunction(env, hModule, "SCardControl");
+#else
+ scardControl = (FPTR_SCardControl) findFunction(env, hModule, "SCardControl132");
+#endif // __APPLE__
}
diff --git a/src/solaris/native/sun/xawt/XlibWrapper.c b/src/solaris/native/sun/xawt/XlibWrapper.c
index 09b8a00c2..60298f7c4 100644
--- a/src/solaris/native/sun/xawt/XlibWrapper.c
+++ b/src/solaris/native/sun/xawt/XlibWrapper.c
@@ -1236,10 +1236,8 @@ JNIEXPORT jbyteArray JNICALL Java_sun_awt_X11_XlibWrapper_getStringBytes
long length = strlen((char*)str);
jbyteArray res = (*env)->NewByteArray(env, length);
CHECK_NULL_RETURN(res, NULL);
- void * storage = malloc(length+1);
- memcpy(storage, str, length+1);
(*env)->SetByteArrayRegion(env, res, 0, length,
- (const signed char*) storage);
+ (const signed char*) str);
return res;
}
diff --git a/src/windows/classes/sun/awt/windows/WWindowPeer.java b/src/windows/classes/sun/awt/windows/WWindowPeer.java
index 128415252..51bf83794 100644
--- a/src/windows/classes/sun/awt/windows/WWindowPeer.java
+++ b/src/windows/classes/sun/awt/windows/WWindowPeer.java
@@ -450,8 +450,8 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer,
* active window is always at the end.
*/
@SuppressWarnings("unchecked")
- public static long[] getActiveWindowHandles() {
- AppContext appContext = AppContext.getAppContext();
+ public static long[] getActiveWindowHandles(Component target) {
+ AppContext appContext = SunToolkit.targetToAppContext(target);
if (appContext == null) return null;
synchronized (appContext) {
List<WWindowPeer> l = (List<WWindowPeer>)appContext.get(ACTIVE_WINDOWS_KEY);
diff --git a/src/windows/lib/tzmappings b/src/windows/lib/tzmappings
index 706eff6eb..953ea10be 100644
--- a/src/windows/lib/tzmappings
+++ b/src/windows/lib/tzmappings
@@ -137,8 +137,8 @@ Central:36,37::America/Chicago:
Central Standard Time:36,37::America/Chicago:
Eastern:38,39::America/New_York:
Eastern Standard Time:38,39::America/New_York:
-E. Europe:4,5:BY:Europe/Minsk:
-E. Europe Standard Time:4,5:BY:Europe/Minsk:
+E. Europe:4,5::EET:
+E. Europe Standard Time:4,5::EET:
Egypt:4,68::Africa/Cairo:
Egypt Standard Time:4,68::Africa/Cairo:
South Africa:4,69::Africa/Harare:
@@ -192,5 +192,6 @@ Magadan Standard Time:924,924::Asia/Magadan:
Kaliningrad Standard Time:925,925:RU:Europe/Kaliningrad:
Turkey Standard Time:926,926::Asia/Istanbul:
Bahia Standard Time:927,927::America/Bahia:
-Western Brazilian Standard Time:928,928:BR:America/Rio_Branco:
-Armenian Standard Time:929,929:AM:Asia/Yerevan:
+Libya Standard Time:928,928:LY:Africa/Tripoli:
+Western Brazilian Standard Time:929,929:BR:America/Rio_Branco:
+Armenian Standard Time:930,930:AM:Asia/Yerevan:
diff --git a/src/windows/native/java/io/WinNTFileSystem_md.c b/src/windows/native/java/io/WinNTFileSystem_md.c
index 3c8b821e0..2a0d477a7 100644
--- a/src/windows/native/java/io/WinNTFileSystem_md.c
+++ b/src/windows/native/java/io/WinNTFileSystem_md.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -83,7 +83,7 @@ extern int wcanonicalizeWithPrefix(const WCHAR *canonicalPrefix, const WCHAR *pa
* Retrieves the fully resolved (final) path for the given path or NULL
* if the function fails.
*/
-static WCHAR* getFinalPath(const WCHAR *path)
+static WCHAR* getFinalPath(JNIEnv *env, const WCHAR *path)
{
HANDLE h;
WCHAR *result;
@@ -119,6 +119,7 @@ static WCHAR* getFinalPath(const WCHAR *path)
len = (*GetFinalPathNameByHandle_func)(h, result, len, 0);
} else {
len = 0;
+ JNU_ThrowOutOfMemoryError(env, "native memory allocation failed");
}
}
@@ -139,6 +140,7 @@ static WCHAR* getFinalPath(const WCHAR *path)
/* copy result without prefix into new buffer */
WCHAR *tmp = (WCHAR*)malloc(resultLen * sizeof(WCHAR));
if (tmp == NULL) {
+ JNU_ThrowOutOfMemoryError(env, "native memory allocation failed");
len = 0;
} else {
WCHAR *p = result;
@@ -162,6 +164,8 @@ static WCHAR* getFinalPath(const WCHAR *path)
free(result);
result = NULL;
}
+ } else {
+ JNU_ThrowOutOfMemoryError(env, "native memory allocation failed");
}
error = GetLastError();
@@ -255,6 +259,8 @@ Java_java_io_WinNTFileSystem_canonicalize0(JNIEnv *env, jobject this,
rv = (*env)->NewString(env, cp, (jsize)wcslen(cp));
}
free(cp);
+ } else {
+ JNU_ThrowOutOfMemoryError(env, "native memory allocation failed");
}
} else
if (wcanonicalize(path, canonicalPath, MAX_PATH_LENGTH) >= 0) {
@@ -287,6 +293,8 @@ Java_java_io_WinNTFileSystem_canonicalizeWithPrefix0(JNIEnv *env, jobject this,
rv = (*env)->NewString(env, cp, (jsize)wcslen(cp));
}
free(cp);
+ } else {
+ JNU_ThrowOutOfMemoryError(env, "native memory allocation failed");
}
} else
if (wcanonicalizeWithPrefix(canonicalPrefix,
@@ -434,7 +442,7 @@ Java_java_io_WinNTFileSystem_setPermission(JNIEnv *env, jobject this,
if ((a != INVALID_FILE_ATTRIBUTES) &&
((a & FILE_ATTRIBUTE_REPARSE_POINT) != 0))
{
- WCHAR *fp = getFinalPath(pathbuf);
+ WCHAR *fp = getFinalPath(env, pathbuf);
if (fp == NULL) {
a = INVALID_FILE_ATTRIBUTES;
} else {
@@ -624,6 +632,7 @@ Java_java_io_WinNTFileSystem_list(JNIEnv *env, jobject this, jobject file)
if (search_path == 0) {
free (pathbuf);
errno = ENOMEM;
+ JNU_ThrowOutOfMemoryError(env, "native memory allocation faiuled");
return NULL;
}
wcscpy(search_path, pathbuf);
@@ -801,7 +810,7 @@ Java_java_io_WinNTFileSystem_setReadOnly(JNIEnv *env, jobject this,
if ((a != INVALID_FILE_ATTRIBUTES) &&
((a & FILE_ATTRIBUTE_REPARSE_POINT) != 0))
{
- WCHAR *fp = getFinalPath(pathbuf);
+ WCHAR *fp = getFinalPath(env, pathbuf);
if (fp == NULL) {
a = INVALID_FILE_ATTRIBUTES;
} else {
diff --git a/src/windows/native/java/io/io_util_md.c b/src/windows/native/java/io/io_util_md.c
index 55e962537..8f777a0a4 100644
--- a/src/windows/native/java/io/io_util_md.c
+++ b/src/windows/native/java/io/io_util_md.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -161,10 +161,17 @@ pathToNTPath(JNIEnv *env, jstring path, jboolean throwFNFE) {
{
if (pathlen > max_path - 1) {
pathbuf = prefixAbpath(ps, pathlen, pathlen);
+ if (pathbuf == NULL) {
+ JNU_ThrowOutOfMemoryError(env, "native memory allocation failed");
+ return NULL;
+ }
} else {
pathbuf = (WCHAR*)malloc((pathlen + 6) * sizeof(WCHAR));
if (pathbuf != 0) {
wcscpy(pathbuf, ps);
+ } else {
+ JNU_ThrowOutOfMemoryError(env, "native memory allocation failed");
+ return NULL;
}
}
} else {
@@ -184,10 +191,17 @@ pathToNTPath(JNIEnv *env, jstring path, jboolean throwFNFE) {
int dirlen = currentDirLength(ps, pathlen);
if (dirlen + pathlen + 1 > max_path - 1) {
pathbuf = prefixAbpath(ps, pathlen, dirlen + pathlen);
+ if (pathbuf == NULL) {
+ JNU_ThrowOutOfMemoryError(env, "native memory allocation failed");
+ return NULL;
+ }
} else {
pathbuf = (WCHAR*)malloc((pathlen + 6) * sizeof(WCHAR));
if (pathbuf != 0) {
wcscpy(pathbuf, ps);
+ } else {
+ JNU_ThrowOutOfMemoryError(env, "native memory allocation failed");
+ return NULL;
}
}
}
@@ -196,15 +210,24 @@ pathToNTPath(JNIEnv *env, jstring path, jboolean throwFNFE) {
if (pathlen == 0) {
if (throwFNFE == JNI_TRUE) {
- throwFileNotFoundException(env, path);
+ if (!(*env)->ExceptionCheck(env)) {
+ throwFileNotFoundException(env, path);
+ }
return NULL;
} else {
pathbuf = (WCHAR*)malloc(sizeof(WCHAR));
- pathbuf[0] = L'\0';
+ if (pathbuf != NULL) {
+ pathbuf[0] = L'\0';
+ } else {
+ JNU_ThrowOutOfMemoryError(env, "native memory allocation failed");
+ return NULL;
+ }
}
}
if (pathbuf == 0) {
- JNU_ThrowOutOfMemoryError(env, 0);
+ if (!(*env)->ExceptionCheck(env)) {
+ JNU_ThrowOutOfMemoryError(env, "native memory allocation failed");
+ }
return NULL;
}
return pathbuf;
diff --git a/src/windows/native/java/lang/ProcessEnvironment_md.c b/src/windows/native/java/lang/ProcessEnvironment_md.c
index e64d30b74..69bd50b28 100644
--- a/src/windows/native/java/lang/ProcessEnvironment_md.c
+++ b/src/windows/native/java/lang/ProcessEnvironment_md.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014 Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -32,10 +32,17 @@ static jstring
environmentBlock9x(JNIEnv *env)
{
int i;
- jmethodID String_init_ID =
- (*env)->GetMethodID(env, JNU_ClassString(env), "<init>", "([B)V");
+ jmethodID String_init_ID;
jbyteArray bytes;
- jbyte *blockA = (jbyte *) GetEnvironmentStringsA();
+ jbyte *blockA;
+ jclass string_class;
+
+ string_class= JNU_ClassString(env);
+ CHECK_NULL_RETURN(string_class, NULL);
+ String_init_ID =
+ (*env)->GetMethodID(env, string_class, "<init>", "([B)V");
+ CHECK_NULL_RETURN(String_init_ID, NULL);
+ blockA = (jbyte *) GetEnvironmentStringsA();
if (blockA == NULL) {
/* Both GetEnvironmentStringsW and GetEnvironmentStringsA
* failed. Out of memory is our best guess. */
@@ -49,10 +56,13 @@ environmentBlock9x(JNIEnv *env)
while (blockA[i++])
;
- if ((bytes = (*env)->NewByteArray(env, i)) == NULL) return NULL;
+ if ((bytes = (*env)->NewByteArray(env, i)) == NULL) {
+ FreeEnvironmentStringsA(blockA);
+ return NULL;
+ }
(*env)->SetByteArrayRegion(env, bytes, 0, i, blockA);
FreeEnvironmentStringsA(blockA);
- return (*env)->NewObject(env, JNU_ClassString(env),
+ return (*env)->NewObject(env, string_class,
String_init_ID, bytes);
}
diff --git a/src/windows/native/java/lang/ProcessImpl_md.c b/src/windows/native/java/lang/ProcessImpl_md.c
index 86f403f86..922e5a501 100644
--- a/src/windows/native/java/lang/ProcessImpl_md.c
+++ b/src/windows/native/java/lang/ProcessImpl_md.c
@@ -359,24 +359,28 @@ Java_java_lang_ProcessImpl_create(JNIEnv *env, jclass ignored,
const jchar *penvBlock = (envBlock != NULL)
? (*env)->GetStringChars(env, envBlock, NULL)
: NULL;
- const jchar *pdir = (dir != NULL)
- ? (*env)->GetStringChars(env, dir, NULL)
- : NULL;
- jlong *handles = (*env)->GetLongArrayElements(env, stdHandles, NULL);
- if (handles != NULL) {
- ret = processCreate(
- env,
- pcmd,
- penvBlock,
- pdir,
- handles,
- redirectErrorStream);
- (*env)->ReleaseLongArrayElements(env, stdHandles, handles, 0);
+ if (!(*env)->ExceptionCheck(env)) {
+ const jchar *pdir = (dir != NULL)
+ ? (*env)->GetStringChars(env, dir, NULL)
+ : NULL;
+ if (!(*env)->ExceptionCheck(env)) {
+ jlong *handles = (*env)->GetLongArrayElements(env, stdHandles, NULL);
+ if (handles != NULL) {
+ ret = processCreate(
+ env,
+ pcmd,
+ penvBlock,
+ pdir,
+ handles,
+ redirectErrorStream);
+ (*env)->ReleaseLongArrayElements(env, stdHandles, handles, 0);
+ }
+ if (pdir != NULL)
+ (*env)->ReleaseStringChars(env, dir, pdir);
+ }
+ if (penvBlock != NULL)
+ (*env)->ReleaseStringChars(env, envBlock, penvBlock);
}
- if (pdir != NULL)
- (*env)->ReleaseStringChars(env, dir, pdir);
- if (penvBlock != NULL)
- (*env)->ReleaseStringChars(env, envBlock, penvBlock);
(*env)->ReleaseStringChars(env, cmd, pcmd);
}
}
@@ -448,7 +452,7 @@ Java_java_lang_ProcessImpl_isProcessAlive(JNIEnv *env, jclass ignored, jlong han
JNIEXPORT jboolean JNICALL
Java_java_lang_ProcessImpl_closeHandle(JNIEnv *env, jclass ignored, jlong handle)
{
- return CloseHandle((HANDLE) handle);
+ return (jboolean) CloseHandle((HANDLE) handle);
}
/**
diff --git a/src/windows/native/java/net/DualStackPlainDatagramSocketImpl.c b/src/windows/native/java/net/DualStackPlainDatagramSocketImpl.c
index 11b7a4246..454e993b0 100644
--- a/src/windows/native/java/net/DualStackPlainDatagramSocketImpl.c
+++ b/src/windows/native/java/net/DualStackPlainDatagramSocketImpl.c
@@ -376,15 +376,19 @@ JNIEXPORT jint JNICALL Java_java_net_DualStackPlainDatagramSocketImpl_socketRece
if (packetAddress == NULL) {
packetAddress = NET_SockaddrToInetAddress(env, (struct sockaddr *)&sa,
&port);
- /* stuff the new Inetaddress into the packet */
- (*env)->SetObjectField(env, dpObj, dp_addressID, packetAddress);
+ if (packetAddress != NULL) {
+ /* stuff the new Inetaddress into the packet */
+ (*env)->SetObjectField(env, dpObj, dp_addressID, packetAddress);
+ }
}
- /* populate the packet */
- (*env)->SetByteArrayRegion(env, packetBuffer, packetBufferOffset, rv,
+ if (!(*env)->ExceptionCheck(env)) {
+ /* populate the packet */
+ (*env)->SetByteArrayRegion(env, packetBuffer, packetBufferOffset, rv,
(jbyte *)fullPacket);
- (*env)->SetIntField(env, dpObj, dp_portID, port);
- (*env)->SetIntField(env, dpObj, dp_lengthID, rv);
+ (*env)->SetIntField(env, dpObj, dp_portID, port);
+ (*env)->SetIntField(env, dpObj, dp_lengthID, rv);
+ }
}
if (packetBufferLen > MAX_BUFFER_LEN) {
diff --git a/src/windows/native/java/net/NetworkInterface.c b/src/windows/native/java/net/NetworkInterface.c
index eda951a6d..c436e8669 100644
--- a/src/windows/native/java/net/NetworkInterface.c
+++ b/src/windows/native/java/net/NetworkInterface.c
@@ -567,16 +567,16 @@ jobject createNetworkInterface
* Create a NetworkInterface object and populate it
*/
netifObj = (*env)->NewObject(env, ni_class, ni_ctor);
+ CHECK_NULL_RETURN(netifObj, NULL);
name = (*env)->NewStringUTF(env, ifs->name);
+ CHECK_NULL_RETURN(name, NULL);
if (ifs->dNameIsUnicode) {
displayName = (*env)->NewString(env, (PWCHAR)ifs->displayName,
(jsize)wcslen ((PWCHAR)ifs->displayName));
} else {
displayName = (*env)->NewStringUTF(env, ifs->displayName);
}
- if (netifObj == NULL || name == NULL || displayName == NULL) {
- return NULL;
- }
+ CHECK_NULL_RETURN(displayName, NULL);
(*env)->SetObjectField(env, netifObj, ni_nameID, name);
(*env)->SetObjectField(env, netifObj, ni_displayNameID, displayName);
(*env)->SetIntField(env, netifObj, ni_indexID, ifs->index);
@@ -706,23 +706,28 @@ JNIEXPORT jobject JNICALL Java_java_net_NetworkInterface_getByName0
/* get the name as a C string */
name_utf = (*env)->GetStringUTFChars(env, name, &isCopy);
+ if (name_utf != NULL) {
- /* Search by name */
- curr = ifList;
- while (curr != NULL) {
- if (strcmp(name_utf, curr->name) == 0) {
- break;
+ /* Search by name */
+ curr = ifList;
+ while (curr != NULL) {
+ if (strcmp(name_utf, curr->name) == 0) {
+ break;
+ }
+ curr = curr->next;
}
- curr = curr->next;
- }
- /* if found create a NetworkInterface */
- if (curr != NULL) {;
- netifObj = createNetworkInterface(env, curr, -1, NULL);
- }
+ /* if found create a NetworkInterface */
+ if (curr != NULL) {;
+ netifObj = createNetworkInterface(env, curr, -1, NULL);
+ }
- /* release the UTF string */
- (*env)->ReleaseStringUTFChars(env, name, name_utf);
+ /* release the UTF string */
+ (*env)->ReleaseStringUTFChars(env, name, name_utf);
+ } else {
+ if (!(*env)->ExceptionCheck(env))
+ JNU_ThrowOutOfMemoryError(env, NULL);
+ }
/* release the interface list */
free_netif(ifList);
diff --git a/src/windows/native/java/util/WindowsPreferences.c b/src/windows/native/java/util/WindowsPreferences.c
index 3cfd8ce10..eacfe397f 100644
--- a/src/windows/native/java/util/WindowsPreferences.c
+++ b/src/windows/native/java/util/WindowsPreferences.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,8 +24,10 @@
*/
#include <stdlib.h>
-#include <jni.h>
#include <windows.h>
+#include "jni.h"
+#include "jni_util.h"
+#include "jvm.h"
#ifdef __cplusplus
extern "C" {
#endif
@@ -37,12 +39,15 @@ extern "C" {
int errorCode=-1;
jintArray result;
str = (*env)->GetByteArrayElements(env, lpSubKey, NULL);
+ CHECK_NULL_RETURN(str, NULL);
errorCode = RegOpenKeyEx((HKEY)hKey, str, 0, securityMask, &handle);
(*env)->ReleaseByteArrayElements(env, lpSubKey, str, 0);
tmp[0]= (int) handle;
tmp[1]= errorCode;
result = (*env)->NewIntArray(env,2);
- (*env)->SetIntArrayRegion(env, result, 0, 2, tmp);
+ if (result != NULL) {
+ (*env)->SetIntArrayRegion(env, result, 0, 2, tmp);
+ }
return result;
}
@@ -58,8 +63,9 @@ extern "C" {
int tmp[3];
DWORD lpdwDisposition;
int errorCode;
- jintArray result;
+ jintArray result = NULL;
str = (*env)->GetByteArrayElements(env, lpSubKey, NULL);
+ CHECK_NULL_RETURN(str, NULL);
errorCode = RegCreateKeyEx((HKEY)hKey, str, 0, NULL,
REG_OPTION_NON_VOLATILE, KEY_READ,
NULL, &handle, &lpdwDisposition);
@@ -68,7 +74,9 @@ extern "C" {
tmp[1]= errorCode;
tmp[2]= lpdwDisposition;
result = (*env)->NewIntArray(env,3);
- (*env)->SetIntArrayRegion(env, result, 0, 3, tmp);
+ if (result != NULL) {
+ (*env)->SetIntArrayRegion(env, result, 0, 3, tmp);
+ }
return result;
}
@@ -77,6 +85,7 @@ extern "C" {
char* str;
int result;
str = (*env)->GetByteArrayElements(env, lpSubKey, NULL);
+ CHECK_NULL_RETURN(str, -1);
result = RegDeleteKey((HKEY)hKey, str);
(*env)->ReleaseByteArrayElements(env, lpSubKey, str, 0);
return result;
@@ -96,6 +105,7 @@ extern "C" {
DWORD valueType;
DWORD valueSize;
valueNameStr = (*env)->GetByteArrayElements(env, valueName, NULL);
+ CHECK_NULL_RETURN(valueNameStr, NULL);
if (RegQueryValueEx((HKEY)hKey, valueNameStr, NULL, &valueType, NULL,
&valueSize) != ERROR_SUCCESS) {
(*env)->ReleaseByteArrayElements(env, valueName, valueNameStr, 0);
@@ -104,18 +114,26 @@ extern "C" {
buffer = (char*)malloc(valueSize);
- if (RegQueryValueEx((HKEY)hKey, valueNameStr, NULL, &valueType, buffer,
- &valueSize) != ERROR_SUCCESS) {
- free(buffer);
+ if (buffer != NULL) {
+ if (RegQueryValueEx((HKEY)hKey, valueNameStr, NULL, &valueType, buffer,
+ &valueSize) != ERROR_SUCCESS) {
+ free(buffer);
+ (*env)->ReleaseByteArrayElements(env, valueName, valueNameStr, 0);
+ return NULL;
+ }
+ } else {
+ JNU_ThrowOutOfMemoryError(env, "native memory allocation failed");
(*env)->ReleaseByteArrayElements(env, valueName, valueNameStr, 0);
- return NULL;
+ return NULL;
}
if (valueType == REG_SZ) {
- result = (*env)->NewByteArray(env, valueSize);
- (*env)->SetByteArrayRegion(env, result, 0, valueSize, buffer);
+ result = (*env)->NewByteArray(env, valueSize);
+ if (result != NULL) {
+ (*env)->SetByteArrayRegion(env, result, 0, valueSize, buffer);
+ }
} else {
- result = NULL;
+ result = NULL;
}
free(buffer);
(*env)->ReleaseByteArrayElements(env, valueName, valueNameStr, 0);
@@ -135,7 +153,9 @@ extern "C" {
if ((valueName == NULL)||(data == NULL)) {return -1;}
size = (*env)->GetArrayLength(env, data);
dataStr = (*env)->GetByteArrayElements(env, data, NULL);
+ CHECK_NULL_RETURN(dataStr, -1);
valueNameStr = (*env)->GetByteArrayElements(env, valueName, NULL);
+ CHECK_NULL_RETURN(valueNameStr, -1);
error_code = RegSetValueEx((HKEY)hKey, valueNameStr, 0,
REG_SZ, dataStr, size);
(*env)->ReleaseByteArrayElements(env, data, dataStr, 0);
@@ -149,6 +169,7 @@ extern "C" {
int error_code = -1;
if (valueName == NULL) {return -1;}
valueNameStr = (*env)->GetByteArrayElements(env, valueName, NULL);
+ CHECK_NULL_RETURN(valueNameStr, -1);
error_code = RegDeleteValue((HKEY)hKey, valueNameStr);
(*env)->ReleaseByteArrayElements(env, valueName, valueNameStr, 0);
return error_code;
@@ -156,7 +177,7 @@ extern "C" {
JNIEXPORT jintArray JNICALL Java_java_util_prefs_WindowsPreferences_WindowsRegQueryInfoKey
(JNIEnv* env, jclass this_class, jint hKey) {
- jintArray result;
+ jintArray result = NULL;
int tmp[5];
int valuesNumber = -1;
int maxValueNameLength = -1;
@@ -173,7 +194,9 @@ extern "C" {
tmp[3]= maxSubKeyLength;
tmp[4]= maxValueNameLength;
result = (*env)->NewIntArray(env,5);
- (*env)->SetIntArrayRegion(env, result, 0, 5, tmp);
+ if (result != NULL) {
+ (*env)->SetIntArrayRegion(env, result, 0, 5, tmp);
+ }
return result;
}
@@ -183,13 +206,19 @@ extern "C" {
jbyteArray result;
char* buffer = NULL;
buffer = (char*)malloc(maxKeyLength);
+ if (buffer == NULL) {
+ JNU_ThrowOutOfMemoryError(env, "native memory allocation failed");
+ return NULL;
+ }
if (RegEnumKeyEx((HKEY) hKey, subKeyIndex, buffer, &size, NULL, NULL,
NULL, NULL) != ERROR_SUCCESS){
free(buffer);
return NULL;
}
result = (*env)->NewByteArray(env, size + 1);
- (*env)->SetByteArrayRegion(env, result, 0, size + 1, buffer);
+ if (result != NULL) {
+ (*env)->SetByteArrayRegion(env, result, 0, size + 1, buffer);
+ }
free(buffer);
return result;
}
@@ -201,6 +230,10 @@ extern "C" {
char* buffer = NULL;
int error_code;
buffer = (char*)malloc(maxValueNameLength);
+ if (buffer == NULL) {
+ JNU_ThrowOutOfMemoryError(env, "native memory allocation failed");
+ return NULL;
+ }
error_code = RegEnumValue((HKEY) hKey, valueIndex, buffer,
&size, NULL, NULL, NULL, NULL);
if (error_code!= ERROR_SUCCESS){
@@ -208,7 +241,9 @@ extern "C" {
return NULL;
}
result = (*env)->NewByteArray(env, size + 1);
- (*env)->SetByteArrayRegion(env, result, 0, size + 1, buffer);
+ if (result != NULL) {
+ (*env)->SetByteArrayRegion(env, result, 0, size + 1, buffer);
+ }
free(buffer);
return result;
}
diff --git a/src/windows/native/sun/net/dns/ResolverConfigurationImpl.c b/src/windows/native/sun/net/dns/ResolverConfigurationImpl.c
index bd4a971cc..13b28044a 100644
--- a/src/windows/native/sun/net/dns/ResolverConfigurationImpl.c
+++ b/src/windows/native/sun/net/dns/ResolverConfigurationImpl.c
@@ -39,6 +39,7 @@
#define STS_NO_CONFIG 0x0 /* no configuration found */
#define STS_SL_FOUND 0x1 /* search list found */
#define STS_NS_FOUND 0x2 /* name servers found */
+#define STS_ERROR -1 /* error return lodConfig failed memory allccation failure*/
#define IS_SL_FOUND(sts) (sts & STS_SL_FOUND)
#define IS_NS_FOUND(sts) (sts & STS_NS_FOUND)
@@ -123,14 +124,14 @@ static int loadConfig(char *sl, char *ns) {
size = sizeof(IP_ADAPTER_INFO);
adapterP = (IP_ADAPTER_INFO *)malloc(size);
if (adapterP == NULL) {
- return -1;
+ return STS_ERROR;
}
ret = GetAdaptersInfo(adapterP, &size);
if (ret == ERROR_BUFFER_OVERFLOW) {
IP_ADAPTER_INFO *newAdapterP = (IP_ADAPTER_INFO *)realloc(adapterP, size);
if (newAdapterP == NULL) {
free(adapterP);
- return -1;
+ return STS_ERROR;
}
adapterP = newAdapterP;
@@ -239,6 +240,7 @@ Java_sun_net_dns_ResolverConfigurationImpl_init0(JNIEnv *env, jclass cls)
{
searchlistID = (*env)->GetStaticFieldID(env, cls, "os_searchlist",
"Ljava/lang/String;");
+ CHECK_NULL(searchlistID);
nameserversID = (*env)->GetStaticFieldID(env, cls, "os_nameservers",
"Ljava/lang/String;");
}
@@ -258,16 +260,21 @@ Java_sun_net_dns_ResolverConfigurationImpl_loadDNSconfig0(JNIEnv *env, jclass cl
searchlist[0] = '\0';
nameservers[0] = '\0';
- loadConfig(searchlist, nameservers);
+ if (loadConfig(searchlist, nameservers) != STS_ERROR) {
- /*
- * Populate static fields in sun.net.DefaultResolverConfiguration
- */
- obj = (*env)->NewStringUTF(env, searchlist);
- (*env)->SetStaticObjectField(env, cls, searchlistID, obj);
+ /*
+ * Populate static fields in sun.net.DefaultResolverConfiguration
+ */
+ obj = (*env)->NewStringUTF(env, searchlist);
+ CHECK_NULL(obj);
+ (*env)->SetStaticObjectField(env, cls, searchlistID, obj);
- obj = (*env)->NewStringUTF(env, nameservers);
- (*env)->SetStaticObjectField(env, cls, nameserversID, obj);
+ obj = (*env)->NewStringUTF(env, nameservers);
+ CHECK_NULL(obj);
+ (*env)->SetStaticObjectField(env, cls, nameserversID, obj);
+ } else {
+ JNU_ThrowOutOfMemoryError(env, "native memory allocation failed");
+ }
}
diff --git a/src/windows/native/sun/net/www/protocol/http/ntlm/NTLMAuthSequence.c b/src/windows/native/sun/net/www/protocol/http/ntlm/NTLMAuthSequence.c
index 4d4f6f118..786f80635 100644
--- a/src/windows/native/sun/net/www/protocol/http/ntlm/NTLMAuthSequence.c
+++ b/src/windows/native/sun/net/www/protocol/http/ntlm/NTLMAuthSequence.c
@@ -53,7 +53,9 @@ JNIEXPORT void JNICALL Java_sun_net_www_protocol_http_ntlm_NTLMAuthSequence_init
(JNIEnv *env, jclass authseq_clazz, jclass status_clazz)
{
ntlm_ctxHandleID = (*env)->GetFieldID(env, authseq_clazz, "ctxHandle", "J");
+ CHECK_NULL(ntlm_ctxHandleID);
ntlm_crdHandleID = (*env)->GetFieldID(env, authseq_clazz, "crdHandle", "J");
+ CHECK_NULL(ntlm_crdHandleID);
status_seqCompleteID = (*env)->GetFieldID(env, status_clazz, "sequenceComplete", "Z");
}
@@ -100,6 +102,16 @@ JNIEXPORT jlong JNICALL Java_sun_net_www_protocol_http_ntlm_NTLMAuthSequence_get
}
}
pCred = (CredHandle *)malloc(sizeof (CredHandle));
+ if (pCred == NULL) {
+ JNU_ThrowOutOfMemoryError(env, "native memory allocation failed");
+ if (pUser != NULL)
+ JNU_ReleaseStringPlatformChars(env, user, pUser);
+ if (pPassword != NULL)
+ JNU_ReleaseStringPlatformChars(env, password, pPassword);
+ if (pDomain != NULL)
+ JNU_ReleaseStringPlatformChars(env, domain, pDomain);
+ return NULL;
+ }
if ( ((pUser != NULL) || (pPassword != NULL)) || (pDomain != NULL)) {
pAuthId = &AuthId;
@@ -177,7 +189,12 @@ JNIEXPORT jbyteArray JNICALL Java_sun_net_www_protocol_http_ntlm_NTLMAuthSequenc
pCtx = (CtxtHandle *) (*env)->GetLongField (env, this, ntlm_ctxHandleID);
if (pCtx == 0) { /* first call */
newContext = (CtxtHandle *)malloc(sizeof(CtxtHandle));
- (*env)->SetLongField (env, this, ntlm_ctxHandleID, (jlong)newContext);
+ if (newContext != NULL) {
+ (*env)->SetLongField (env, this, ntlm_ctxHandleID, (jlong)newContext);
+ } else {
+ JNU_ThrowOutOfMemoryError(env, "native memory allocation failed");
+ return NULL;
+ }
} else {
newContext = pCtx;
}
@@ -198,6 +215,7 @@ JNIEXPORT jbyteArray JNICALL Java_sun_net_www_protocol_http_ntlm_NTLMAuthSequenc
if (lastToken != 0)
{
pInput = (VOID *)(*env)->GetByteArrayElements(env, lastToken, &isCopy);
+ CHECK_NULL_RETURN(pInput, NULL);
inputLen = (*env)->GetArrayLength(env, lastToken);
InBuffDesc.ulVersion = 0;
@@ -240,8 +258,10 @@ JNIEXPORT jbyteArray JNICALL Java_sun_net_www_protocol_http_ntlm_NTLMAuthSequenc
if ( OutSecBuff.cbBuffer > 0 ) {
jbyteArray ret = (*env)->NewByteArray(env, OutSecBuff.cbBuffer);
- (*env)->SetByteArrayRegion(env, ret, 0, OutSecBuff.cbBuffer,
- OutSecBuff.pvBuffer);
+ if (ret != NULL) {
+ (*env)->SetByteArrayRegion(env, ret, 0, OutSecBuff.cbBuffer,
+ OutSecBuff.pvBuffer);
+ }
if (lastToken != 0) // 2nd stage
endSequence (pCred, pCtx, env, status);
result = ret;
diff --git a/src/windows/native/sun/nio/fs/WindowsNativeDispatcher.c b/src/windows/native/sun/nio/fs/WindowsNativeDispatcher.c
index dc8378b74..566d2aeca 100644
--- a/src/windows/native/sun/nio/fs/WindowsNativeDispatcher.c
+++ b/src/windows/native/sun/nio/fs/WindowsNativeDispatcher.c
@@ -1118,11 +1118,13 @@ Java_sun_nio_fs_WindowsNativeDispatcher_GetFullPathName0(JNIEnv *env,
JNU_ThrowInternalError(env, "GetFullPathNameW failed");
}
free(lpBuf);
+ } else {
+ JNU_ThrowOutOfMemoryError(env, "native memory allocation failure");
}
}
- }
- if (len == 0)
+ } else {
throwWindowsException(env, GetLastError());
+ }
return rv;
}
@@ -1157,13 +1159,13 @@ Java_sun_nio_fs_WindowsNativeDispatcher_GetFinalPathNameByHandle(JNIEnv* env,
JNU_ThrowInternalError(env, "GetFinalPathNameByHandleW failed");
}
free(lpBuf);
+ } else {
+ JNU_ThrowOutOfMemoryError(env, "native memory allocation failure");
}
}
- }
-
- if (len == 0)
+ } else {
throwWindowsException(env, GetLastError());
-
+ }
return rv;
}
diff --git a/src/windows/native/sun/windows/awt_Dialog.cpp b/src/windows/native/sun/windows/awt_Dialog.cpp
index cbba78e3b..7bb201b49 100644
--- a/src/windows/native/sun/windows/awt_Dialog.cpp
+++ b/src/windows/native/sun/windows/awt_Dialog.cpp
@@ -464,7 +464,8 @@ void AwtDialog::ModalActivateNextWindow(HWND dialogHWnd,
&exc,
"sun/awt/windows/WWindowPeer",
"getActiveWindowHandles",
- "()[J").l;
+ "(Ljava/awt/Component;)[J",
+ dialogTarget).l;
if (exc == JNI_TRUE) {
throw std::bad_alloc();
}
diff --git a/src/windows/native/sun/windows/awt_InputMethod.cpp b/src/windows/native/sun/windows/awt_InputMethod.cpp
index 1b087aa15..644750410 100644
--- a/src/windows/native/sun/windows/awt_InputMethod.cpp
+++ b/src/windows/native/sun/windows/awt_InputMethod.cpp
@@ -454,7 +454,7 @@ JNIEXPORT jobjectArray JNICALL Java_sun_awt_windows_WInputMethodDescriptor_getNa
TRY;
// get list of available HKLs
- int layoutCount = ::GetKeyboardLayoutList(0, NULL);
+ const int layoutCount = ::GetKeyboardLayoutList(0, NULL);
HKL FAR * hKLList = (HKL FAR *)SAFE_SIZE_ARRAY_ALLOC(safe_Malloc, sizeof(HKL), layoutCount);
CHECK_NULL_RETURN(hKLList, NULL);
::GetKeyboardLayoutList(layoutCount, hKLList);
diff --git a/src/windows/native/sun/windows/awt_List.cpp b/src/windows/native/sun/windows/awt_List.cpp
index c35c0f420..c6cec8fe0 100644
--- a/src/windows/native/sun/windows/awt_List.cpp
+++ b/src/windows/native/sun/windows/awt_List.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -219,7 +219,7 @@ void AwtList::SetMultiSelect(BOOL ms) {
JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
/* Copy current box's contents to string array */
- int nCount = GetCount();
+ const int nCount = GetCount();
LPTSTR * strings = new LPTSTR[nCount];
int i;
diff --git a/test/com/sun/jndi/ldap/LdapTimeoutTest.java b/test/com/sun/jndi/ldap/LdapTimeoutTest.java
index 0db3ab923..392703744 100644
--- a/test/com/sun/jndi/ldap/LdapTimeoutTest.java
+++ b/test/com/sun/jndi/ldap/LdapTimeoutTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -64,11 +64,12 @@ public class LdapTimeoutTest {
env.put(Context.SECURITY_PRINCIPAL, "user");
env.put(Context.SECURITY_CREDENTIALS, "password");
- env.put("com.sun.jndi.ldap.connect.timeout", "10");
- env.put("com.sun.jndi.ldap.read.timeout", "3000");
-
InitialContext ctx = null;
try {
+ new LdapTimeoutTest().deadServerNoTimeout(env);
+
+ env.put("com.sun.jndi.ldap.connect.timeout", "10");
+ env.put("com.sun.jndi.ldap.read.timeout", "3000");
new LdapTimeoutTest().ldapReadTimeoutTest(env, false);
new LdapTimeoutTest().ldapReadTimeoutTest(env, true);
new LdapTimeoutTest().simpleAuthConnectTest(env);
@@ -84,7 +85,7 @@ public class LdapTimeoutTest {
void ldapReadTimeoutTest(Hashtable env, boolean ssl) {
InitialContext ctx = null;
if (ssl) env.put(Context.SECURITY_PROTOCOL, "ssl");
- ScheduledFuture killer = killSwitch();
+ ScheduledFuture killer = killSwitch(5000);
long start = System.nanoTime();
try {
ctx = new InitialDirContext(env);
@@ -112,7 +113,7 @@ public class LdapTimeoutTest {
void simpleAuthConnectTest(Hashtable env) {
InitialContext ctx = null;
- ScheduledFuture killer = killSwitch();
+ ScheduledFuture killer = killSwitch(5000);
long start = System.nanoTime();
try {
ctx = new InitialDirContext(env);
@@ -139,6 +140,32 @@ public class LdapTimeoutTest {
}
}
+ void deadServerNoTimeout(Hashtable env) {
+ InitialContext ctx = null;
+ ScheduledFuture killer = killSwitch(30000);
+ long start = System.nanoTime();
+ try {
+ ctx = new InitialDirContext(env);
+ SearchControls scl = new SearchControls();
+ scl.setSearchScope(SearchControls.SUBTREE_SCOPE);
+ NamingEnumeration<SearchResult> answer = ((InitialDirContext)ctx)
+ .search("ou=People,o=JNDITutorial", "(objectClass=*)", scl);
+ // shouldn't reach here
+ fail();
+ } catch (NamingException e) {
+ long end = System.nanoTime();
+ if (TimeUnit.NANOSECONDS.toMillis(end - start) < 14000) {
+ System.err.println("fail: timeout should be at least 15 seconds, actual time: "
+ + TimeUnit.NANOSECONDS.toMillis(end - start));
+ fail();
+ } else {
+ pass();
+ }
+ } finally {
+ if (!shutItDown(killer, ctx)) fail();
+ }
+ }
+
boolean shutItDown(ScheduledFuture killer, InitialContext ctx) {
killer.cancel(true);
try {
@@ -149,15 +176,15 @@ public class LdapTimeoutTest {
}
}
- ScheduledFuture killSwitch() {
+ ScheduledFuture killSwitch(int ms) {
final Thread current = Thread.currentThread();
return LdapTimeoutTest.pool.schedule(new Callable<Void>() {
public Void call() throws Exception {
System.err.println("Fail: killSwitch()");
- current.interrupt();
+ System.exit(0);
return null;
}
- }, 5000, TimeUnit.MILLISECONDS);
+ }, ms, TimeUnit.MILLISECONDS);
}
static class Server extends Thread {
diff --git a/test/java/awt/Choice/RemoveAllShrinkTest/RemoveAllShrinkTest.java b/test/java/awt/Choice/RemoveAllShrinkTest/RemoveAllShrinkTest.java
new file mode 100644
index 000000000..311f7eb9c
--- /dev/null
+++ b/test/java/awt/Choice/RemoveAllShrinkTest/RemoveAllShrinkTest.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 4851798 8041896
+ @summary Tests Choice List shrinks after removeAll
+ @run main RemoveAllShrinkTest
+*/
+
+import java.awt.*;
+import java.awt.event.*;
+
+
+public class RemoveAllShrinkTest {
+
+ public static void main(String[] args) {
+ Frame f = new Frame();
+ Choice choice = new Choice();
+
+ for (int i = 0; i < 10; ++i) {
+ choice.addItem("Item " + i);
+ }
+
+ f.add(choice, BorderLayout.NORTH);
+ Panel panel = new Panel();
+ panel.setBackground(Color.RED);
+ f.add(panel);
+
+ f.setSize(200, 200);
+ f.setVisible(true);
+ f.toFront();
+
+ choice.removeAll();
+
+ try {
+ Robot robot = new Robot();
+ robot.setAutoWaitForIdle(true);
+ robot.setAutoDelay(50);
+
+ robot.waitForIdle();
+ Thread.sleep(200);
+
+ Point pt = choice.getLocationOnScreen();
+ robot.mouseMove(pt.x + choice.getWidth() - choice.getHeight() / 2,
+ pt.y + choice.getHeight() / 2);
+ robot.mousePress(InputEvent.BUTTON1_MASK);
+ robot.mouseRelease(InputEvent.BUTTON1_MASK);
+
+ Thread.sleep(400);
+
+ Point pt1 = panel.getLocationOnScreen();
+
+ Color color = robot.getPixelColor(pt1.x + panel.getWidth() / 2,
+ pt1.y + panel.getHeight() / 2);
+
+ if (!color.equals(Color.RED)) {
+ throw new RuntimeException("RemoveAllShrinkTest failed. " + color);
+ }
+ } catch (Exception e) {
+ throw new RuntimeException("The test was not completed.\n\n" + e);
+ }
+ }
+}
+
diff --git a/test/java/awt/Dialog/CloseDialog/CloseDialogTest.java b/test/java/awt/Dialog/CloseDialog/CloseDialogTest.java
new file mode 100644
index 000000000..0a6288d89
--- /dev/null
+++ b/test/java/awt/Dialog/CloseDialog/CloseDialogTest.java
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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.
+ */
+
+import java.awt.Dialog;
+import java.awt.Frame;
+import java.io.*;
+import javax.swing.*;
+import sun.awt.SunToolkit;
+import java.util.concurrent.atomic.AtomicReference;
+
+/**
+ * @test
+ * @bug 8043705
+ * @summary Can't exit color chooser dialog when running as an applet
+ * @run main CloseDialogTest
+ */
+public class CloseDialogTest {
+
+ private static volatile Frame frame;
+ private static volatile Dialog dialog;
+ private static volatile InputStream testErrorStream;
+ private static final PrintStream systemErrStream = System.err;
+ private static final AtomicReference<Exception> caughtException
+ = new AtomicReference<>();
+
+ public static void main(String[] args) throws Exception {
+
+ // redirect System err
+ PipedOutputStream errorOutputStream = new PipedOutputStream();
+ testErrorStream = new PipedInputStream(errorOutputStream);
+ System.setErr(new PrintStream(errorOutputStream));
+
+ ThreadGroup swingTG = new ThreadGroup(getRootThreadGroup(), "SwingTG");
+ try {
+ new Thread(swingTG, () -> {
+ SunToolkit.createNewAppContext();
+ SwingUtilities.invokeLater(() -> {
+ frame = new Frame();
+ frame.setSize(300, 300);
+ frame.setVisible(true);
+
+ dialog = new Dialog(frame);
+ dialog.setSize(200, 200);
+ dialog.setModal(true);
+ dialog.setVisible(true);
+ });
+ }).start();
+
+ Thread.sleep(400);
+
+ Thread disposeThread = new Thread(swingTG, () ->
+ SwingUtilities.invokeLater(() -> {
+ try {
+ while (dialog == null || !dialog.isVisible()) {
+ Thread.sleep(100);
+ }
+ dialog.setVisible(false);
+ dialog.dispose();
+ frame.dispose();
+ } catch (Exception e) {
+ caughtException.set(e);
+ }
+ }));
+ disposeThread.start();
+ disposeThread.join();
+ Thread.sleep(500);
+
+ // read System err
+ final char[] buffer = new char[2048];
+ System.err.print("END");
+ System.setErr(systemErrStream);
+ try (Reader in = new InputStreamReader(testErrorStream, "UTF-8")) {
+ int size = in.read(buffer, 0, buffer.length);
+ String errorString = new String(buffer, 0, size);
+ if (!errorString.startsWith("END")) {
+ System.err.println(errorString.
+ substring(0, errorString.length() - 4));
+ throw new RuntimeException("Error output is not empty!");
+ }
+ }
+ } finally {
+ if (caughtException.get() != null) {
+ throw new RuntimeException("Failed. Caught exception!",
+ caughtException.get());
+ }
+ }
+ }
+
+ private static ThreadGroup getRootThreadGroup() {
+ ThreadGroup threadGroup = Thread.currentThread().getThreadGroup();
+ while (threadGroup.getParent() != null) {
+ threadGroup = threadGroup.getParent();
+ }
+ return threadGroup;
+ }
+}
diff --git a/test/java/awt/FullScreen/AltTabCrashTest/AltTabCrashTest.java b/test/java/awt/FullScreen/AltTabCrashTest/AltTabCrashTest.java
new file mode 100644
index 000000000..5bb69314b
--- /dev/null
+++ b/test/java/awt/FullScreen/AltTabCrashTest/AltTabCrashTest.java
@@ -0,0 +1,480 @@
+/*
+ * Copyright (c) 2005, 2014 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 6275887 6429971 6459792
+ @summary Test that we don't crash when alt+tabbing in and out of
+ fullscreen app
+ @author Dmitri.Trembovetski@sun.com: area=FullScreen
+ @run main/othervm/timeout=100 AltTabCrashTest -auto -changedm
+ @run main/othervm/timeout=100 -Dsun.java2d.d3d=True AltTabCrashTest -auto -changedm
+ @run main/othervm/timeout=100 -Dsun.java2d.d3d=True AltTabCrashTest -auto -usebs -changedm
+ @run main/othervm/timeout=100 -Dsun.java2d.opengl=True AltTabCrashTest -auto
+*/
+
+import java.awt.AWTException;
+import java.awt.Color;
+import java.awt.DisplayMode;
+import java.awt.Frame;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.GraphicsDevice;
+import java.awt.GraphicsEnvironment;
+import java.awt.Image;
+import java.awt.RenderingHints;
+import java.awt.Robot;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.image.BufferStrategy;
+import java.awt.image.BufferedImage;
+import java.awt.image.VolatileImage;
+import java.util.Random;
+import java.util.Vector;
+
+/**
+ * Note that the alt+tabbing in and out part will most likely only work
+ * on Windows, and only if there are no interventions.
+ */
+
+public class AltTabCrashTest extends Frame {
+ public static int width;
+ public static int height;
+ public static volatile boolean autoMode;
+ public static boolean useBS;
+ public static final int NUM_OF_BALLS = 70;
+ // number of times to alt+tab in and out of the app
+ public static int altTabs = 5;
+ private final Vector<Ball> balls = new Vector<>();
+ GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment()
+ .getDefaultScreenDevice();
+ VolatileImage vimg = null;
+ BufferStrategy bufferStrategy = null;
+ volatile boolean timeToQuit = false;
+ static final Object lock = new Object();
+
+ enum SpriteType {
+ OVALS, VIMAGES, BIMAGES, AAOVALS, TEXT
+ }
+
+ private static boolean changeDM = false;
+ private static SpriteType spriteType;
+ static Random rnd = new Random();
+
+ public AltTabCrashTest( ) {
+ addKeyListener(new KeyAdapter() {
+ public void keyPressed(KeyEvent e) {
+ if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
+ timeToQuit = true;
+ }
+ }
+ });
+ setIgnoreRepaint(true);
+ addMouseListener(new MouseHandler());
+ for (int i = 0; i < NUM_OF_BALLS; i++) {
+ int x = 50 + rnd.nextInt(550), y = 50 + rnd.nextInt(400);
+
+ balls.addElement(createRandomBall(y, x));
+ }
+ setUndecorated(true);
+ gd.setFullScreenWindow(this);
+ GraphicsDevice gd = getGraphicsConfiguration().getDevice();
+ if (gd.isDisplayChangeSupported() && changeDM) {
+ DisplayMode dm = findDisplayMode();
+ if (dm != null) {
+ try {
+ gd.setDisplayMode(dm);
+ } catch (IllegalArgumentException iae) {
+ System.err.println("Error setting display mode");
+ }
+ }
+ }
+ if (useBS) {
+ createBufferStrategy(2);
+ bufferStrategy = getBufferStrategy();
+ } else {
+ Graphics2D g = (Graphics2D) getGraphics();
+ render(g);
+ g.dispose();
+ }
+ Thread t = new BallThread();
+ t.start();
+ if (autoMode) {
+ Thread tt = new AltTabberThread();
+ tt.start();
+ synchronized (lock) {
+ while (!timeToQuit) {
+ try {
+ lock.wait(200);
+ } catch (InterruptedException ex) {
+ ex.printStackTrace();
+ }
+ }
+ }
+ t = null;
+ dispose();
+ }
+ }
+
+ private Ball createRandomBall(final int y, final int x) {
+ Ball b;
+ SpriteType type;
+
+ if (spriteType == null) {
+ int index = rnd.nextInt(SpriteType.values().length);
+ type = SpriteType.values()[index];
+ } else {
+ type = spriteType;
+ }
+ switch (type) {
+ case VIMAGES: b = new VISpriteBall(x, y); break;
+ case AAOVALS: b = new AAOvalBall(x, y); break;
+ case BIMAGES: b = new BISpriteBall(x, y); break;
+ case TEXT: b = new TextBall(x,y, "Text Sprite!"); break;
+ default: b = new Ball(x, y); break;
+ }
+ return b;
+ }
+
+ private class MouseHandler extends MouseAdapter {
+ public void mousePressed(MouseEvent e) {
+ synchronized (balls) {
+ balls.addElement(createRandomBall(e.getX(), e.getY()));
+ }
+ }
+ }
+
+ private class AltTabberThread extends Thread {
+ Robot robot;
+
+ void pressAltTab() {
+ robot.keyPress(KeyEvent.VK_ALT);
+ robot.keyPress(KeyEvent.VK_TAB);
+ robot.keyRelease(KeyEvent.VK_TAB);
+ robot.keyRelease(KeyEvent.VK_ALT);
+ }
+ void pressShiftAltTab() {
+ robot.keyPress(KeyEvent.VK_SHIFT);
+ pressAltTab();
+ robot.keyRelease(KeyEvent.VK_SHIFT);
+ }
+ public void run() {
+ try {
+ robot = new Robot();
+ robot.setAutoDelay(200);
+ } catch (AWTException e) {
+ throw new RuntimeException("Can't create robot");
+ }
+ boolean out = true;
+ while (altTabs-- > 0 && !timeToQuit) {
+ System.err.println("Alt+tabber Iteration: "+altTabs);
+ try { Thread.sleep(2500); } catch (InterruptedException ex) {}
+
+ if (out) {
+ System.err.println("Issuing alt+tab");
+ pressAltTab();
+ } else {
+ System.err.println("Issuing shift ");
+ pressShiftAltTab();
+ }
+ out = !out;
+ }
+ System.err.println("Alt+tabber finished.");
+ synchronized (lock) {
+ timeToQuit = true;
+ lock.notify();
+ }
+ }
+ }
+
+ private class BallThread extends Thread {
+ public void run() {
+ while (!timeToQuit) {
+ if (useBS) {
+ renderToBS();
+ bufferStrategy.show();
+ } else {
+ Graphics g = AltTabCrashTest.this.getGraphics();
+ render(g);
+ g.dispose();
+ }
+ }
+ gd.setFullScreenWindow(null);
+ AltTabCrashTest.this.dispose();
+ }
+ }
+
+ static class Ball {
+
+ int x, y; // current location
+ int dx, dy; // motion delta
+ int diameter = 40;
+ Color color = Color.red;
+
+ public Ball() {
+ }
+
+ public Ball(int x, int y) {
+ this.x = x;
+ this.y = y;
+ dx = x % 20 + 1;
+ dy = y % 20 + 1;
+ color = new Color(rnd.nextInt(0x00ffffff));
+ }
+
+ public void move() {
+ if (x < 10 || x >= AltTabCrashTest.width - 20)
+ dx = -dx;
+ if (y < 10 || y > AltTabCrashTest.height - 20)
+ dy = -dy;
+ x += dx;
+ y += dy;
+ }
+
+ public void paint(Graphics g, Color c) {
+ if (c == null) {
+ g.setColor(color);
+ } else {
+ g.setColor(c);
+ }
+ g.fillOval(x, y, diameter, diameter);
+ }
+
+ }
+
+ static class TextBall extends Ball {
+ String text;
+ public TextBall(int x, int y, String text) {
+ super(x, y);
+ this.text = text;
+ }
+
+ public void paint(Graphics g, Color c) {
+ if (c == null) {
+ g.setColor(color);
+ } else {
+ g.setColor(c);
+ }
+ g.drawString(text, x, y);
+ }
+ }
+
+ static class AAOvalBall extends Ball {
+ public AAOvalBall(int x, int y) {
+ super(x, y);
+ }
+ public void paint(Graphics g, Color c) {
+ if (c == null) {
+ Graphics2D g2d = (Graphics2D)g.create();
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
+ RenderingHints.VALUE_ANTIALIAS_ON);
+ g2d.setColor(color);
+ g2d.fillOval(x, y, diameter, diameter);
+ } else {
+ g.setColor(c);
+ g.fillOval(x-2, y-2, diameter+4, diameter+4);
+ }
+ }
+ }
+
+ static abstract class SpriteBall extends Ball {
+ Image image;
+ public SpriteBall(int x, int y) {
+ super(x, y);
+ image = createSprite();
+ Graphics g = image.getGraphics();
+ g.setColor(color);
+ g.fillRect(0, 0, image.getWidth(null), image.getHeight(null));
+ }
+ public void paint(Graphics g, Color c) {
+ if (c != null) {
+ g.setColor(c);
+ g.fillRect(x, y, image.getWidth(null), image.getHeight(null));
+ } else do {
+ validateSprite();
+ g.drawImage(image, x, y, null);
+ } while (renderingIncomplete());
+ }
+ public abstract Image createSprite();
+ public void validateSprite() {}
+ public boolean renderingIncomplete() { return false; }
+ }
+ class VISpriteBall extends SpriteBall {
+
+ public VISpriteBall(int x, int y) {
+ super(x, y);
+ }
+ public boolean renderingIncomplete() {
+ return ((VolatileImage)image).contentsLost();
+ }
+
+ public Image createSprite() {
+ return gd.getDefaultConfiguration().
+ createCompatibleVolatileImage(20, 20);
+ }
+ public void validateSprite() {
+ int result =
+ ((VolatileImage)image).validate(getGraphicsConfiguration());
+ if (result == VolatileImage.IMAGE_INCOMPATIBLE) {
+ image = createSprite();
+ result = VolatileImage.IMAGE_RESTORED;
+ }
+ if (result == VolatileImage.IMAGE_RESTORED) {
+ Graphics g = image.getGraphics();
+ g.setColor(color);
+ g.fillRect(0, 0, image.getWidth(null), image.getHeight(null));
+ }
+ }
+ }
+ class BISpriteBall extends SpriteBall {
+ public BISpriteBall(int x, int y) {
+ super(x, y);
+ }
+ public Image createSprite() {
+ return new BufferedImage(20, 20, BufferedImage.TYPE_INT_RGB);
+ }
+ }
+
+
+ public void renderOffscreen() {
+ Graphics2D g2d = (Graphics2D) vimg.getGraphics();
+ synchronized (balls) {
+ for (Ball b : balls) {
+ b.paint(g2d, getBackground());
+ b.move();
+ b.paint(g2d, null);
+ }
+ }
+ g2d.dispose();
+ }
+
+ public void renderToBS() {
+ width = getWidth();
+ height = getHeight();
+
+ do {
+ Graphics2D g2d = (Graphics2D)bufferStrategy.getDrawGraphics();
+
+ g2d.clearRect(0, 0, width, height);
+ synchronized (balls) {
+ for (Ball b : balls) {
+ b.move();
+ b.paint(g2d, null);
+ }
+ }
+ g2d.dispose();
+ } while (bufferStrategy.contentsLost() ||
+ bufferStrategy.contentsRestored());
+ }
+
+ public void render(Graphics g) {
+ do {
+ height = getBounds().height;
+ width = getBounds().width;
+ if (vimg == null) {
+ vimg = createVolatileImage(width, height);
+ renderOffscreen();
+ }
+ int returnCode = vimg.validate(getGraphicsConfiguration());
+ if (returnCode == VolatileImage.IMAGE_RESTORED) {
+ renderOffscreen();
+ } else if (returnCode == VolatileImage.IMAGE_INCOMPATIBLE) {
+ vimg = getGraphicsConfiguration().
+ createCompatibleVolatileImage(width, height);
+ renderOffscreen();
+ } else if (returnCode == VolatileImage.IMAGE_OK) {
+ renderOffscreen();
+ }
+ g.drawImage(vimg, 0, 0, this);
+ } while (vimg.contentsLost());
+ }
+
+ public static void main(String args[]) {
+ for (String arg : args) {
+ if (arg.equalsIgnoreCase("-auto")) {
+ autoMode = true;
+ System.err.println("Running in automatic mode using Robot");
+ } else if (arg.equalsIgnoreCase("-usebs")) {
+ useBS = true;
+ System.err.println("Using BufferStrategy instead of VI");
+ } else if (arg.equalsIgnoreCase("-changedm")) {
+ changeDM= true;
+ System.err.println("The test will change display mode");
+ } else if (arg.equalsIgnoreCase("-vi")) {
+ spriteType = SpriteType.VIMAGES;
+ } else if (arg.equalsIgnoreCase("-bi")) {
+ spriteType = SpriteType.BIMAGES;
+ } else if (arg.equalsIgnoreCase("-ov")) {
+ spriteType = SpriteType.OVALS;
+ } else if (arg.equalsIgnoreCase("-aaov")) {
+ spriteType = SpriteType.AAOVALS;
+ } else if (arg.equalsIgnoreCase("-tx")) {
+ spriteType = SpriteType.TEXT;
+ } else {
+ System.err.println("Usage: AltTabCrashTest [-usebs][-auto]" +
+ "[-changedm][-vi|-bi|-ov|-aaov|-tx]");
+ System.err.println(" -usebs: use BufferStrategy instead of VI");
+ System.err.println(" -auto: automatically alt+tab in and out" +
+ " of the application ");
+ System.err.println(" -changedm: change display mode");
+ System.err.println(" -(vi|bi|ov|tx|aaov) : use only VI, BI, " +
+ "text or [AA] [draw]Oval sprites");
+ System.exit(0);
+ }
+ }
+ if (spriteType != null) {
+ System.err.println("The test will only use "+spriteType+" sprites.");
+ }
+ new AltTabCrashTest();
+ }
+
+ private DisplayMode findDisplayMode() {
+ GraphicsDevice gd = getGraphicsConfiguration().getDevice();
+ DisplayMode dms[] = gd.getDisplayModes();
+ DisplayMode currentDM = gd.getDisplayMode();
+ for (DisplayMode dm : dms) {
+ if (dm.getBitDepth() > 8 &&
+ dm.getBitDepth() != DisplayMode.BIT_DEPTH_MULTI &&
+ dm.getBitDepth() != currentDM.getBitDepth() &&
+ dm.getWidth() == currentDM.getWidth() &&
+ dm.getHeight() == currentDM.getHeight())
+ {
+ // found a mode which has the same dimensions but different
+ // depth
+ return dm;
+ }
+ if (dm.getBitDepth() == DisplayMode.BIT_DEPTH_MULTI &&
+ (dm.getWidth() != currentDM.getWidth() ||
+ dm.getHeight() != currentDM.getHeight()))
+ {
+ // found a mode which has the same depth but different
+ // dimensions
+ return dm;
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/test/java/awt/Graphics2D/ScaledCopyArea/ScaledCopyArea.java b/test/java/awt/Graphics2D/ScaledCopyArea/ScaledCopyArea.java
new file mode 100644
index 000000000..c42529058
--- /dev/null
+++ b/test/java/awt/Graphics2D/ScaledCopyArea/ScaledCopyArea.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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.
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+
+/**
+ * @test
+ * @bug 8029455
+ * @summary Tests that copyarea on offscreen images works as expected when
+ * scaled transform is set
+ * @run main ScaledCopyArea
+ */
+public final class ScaledCopyArea {
+
+ public static void main(final String[] args) {
+ final BufferedImage bi = new BufferedImage(100, 300,
+ BufferedImage.TYPE_INT_RGB);
+ final Graphics2D g = bi.createGraphics();
+ g.scale(2, 2);
+ g.setColor(Color.RED);
+ g.fillRect(0, 0, 100, 300);
+ g.setColor(Color.GREEN);
+ g.fillRect(0, 100, 100, 100);
+ g.copyArea(0, 100, 100, 100, 0, -100);
+ g.dispose();
+ for (int x = 0; x < 100; ++x) {
+ for (int y = 0; y < 100; ++y) {
+ final int actual = bi.getRGB(x, y);
+ final int exp = Color.GREEN.getRGB();
+ if (actual != exp) {
+ System.err.println("Expected:" + Integer.toHexString(exp));
+ System.err.println("Actual:" + Integer.toHexString(actual));
+ throw new RuntimeException("Test " + "failed");
+ }
+ }
+ }
+ }
+}
diff --git a/test/java/awt/Multiscreen/MouseEventTest/MouseEventTest.java b/test/java/awt/Multiscreen/MouseEventTest/MouseEventTest.java
new file mode 100644
index 000000000..ea20ccfd2
--- /dev/null
+++ b/test/java/awt/Multiscreen/MouseEventTest/MouseEventTest.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8017472
+ @summary MouseEvent has wrong coordinates when using multiple monitors
+ @run main MouseEventTest
+ */
+
+import sun.awt.SunToolkit;
+
+import java.awt.*;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+
+public class MouseEventTest {
+ static volatile boolean crossed = false;
+
+ static void sleep() throws InterruptedException {
+ ((SunToolkit) Toolkit.getDefaultToolkit()).realSync();
+ Thread.sleep(500);
+ }
+
+ public static void main(String[] args) throws AWTException, InterruptedException {
+ GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
+ GraphicsDevice[] gds = ge.getScreenDevices();
+ if (gds.length < 2) {
+ System.out.println("It's a multiscreen test... skipping!");
+ return;
+ }
+
+ for (int i = 0; i < gds.length; ++i) {
+ GraphicsDevice gd = gds[i];
+ GraphicsConfiguration gc = gd.getDefaultConfiguration();
+ Rectangle screen = gc.getBounds();
+ Robot robot = new Robot(gd);
+ robot.setAutoDelay(100);
+
+
+ Frame frame = new Frame(gc);
+ frame.setUndecorated(true);
+ frame.setSize(200, 200);
+ frame.setLocation(screen.x + 200, screen.y + 200);
+ frame.setBackground(Color.YELLOW);
+ frame.setVisible(true);
+ sleep();
+
+ Point loc = frame.getLocationOnScreen();
+ Dimension size = frame.getSize();
+ final Point point = new Point(
+ loc.x + size.width / 2,
+ loc.y + size.height / 2);
+
+ crossed = false;
+
+ frame.addMouseMotionListener(new MouseAdapter() {
+ @Override
+ public void mouseMoved(MouseEvent e) {
+ if (point.equals(e.getLocationOnScreen())) {
+ crossed = true;
+ }
+ }
+ });
+
+ robot.mouseMove(point.x - 1, point.y - 1);
+ robot.mouseMove(point.x, point.y);
+
+ sleep();
+ frame.dispose();
+
+ if (!crossed) {
+ throw new RuntimeException("An expected mouse motion event was not received on the screen #" + i);
+ }
+ }
+
+ System.out.println("Test PASSED!");
+ }
+}
diff --git a/test/java/awt/geom/Path2D/EmptyCapacity.java b/test/java/awt/geom/Path2D/EmptyCapacity.java
new file mode 100644
index 000000000..9f6d9c18d
--- /dev/null
+++ b/test/java/awt/geom/Path2D/EmptyCapacity.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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.
+ */
+
+import java.awt.geom.Path2D;
+
+/**
+ * @test
+ * @bug 8042103
+ * @summary Path2D.moveTo() should work if empty initial capacity was set.
+ * @author Sergey Bylokhov
+ */
+public final class EmptyCapacity {
+
+ public static void main(final String[] args) {
+ final Path2D path1 = new Path2D.Double(Path2D.WIND_EVEN_ODD, 0);
+ path1.moveTo(10, 10);
+ path1.lineTo(20, 20);
+ final Path2D path2 = new Path2D.Float(Path2D.WIND_EVEN_ODD, 0);
+ path2.moveTo(10, 10);
+ path2.lineTo(20, 20);
+ }
+}
diff --git a/test/java/awt/image/DrawImage/IncorrectAlphaSurface2SW.java b/test/java/awt/image/DrawImage/IncorrectAlphaSurface2SW.java
new file mode 100644
index 000000000..e6fb519d7
--- /dev/null
+++ b/test/java/awt/image/DrawImage/IncorrectAlphaSurface2SW.java
@@ -0,0 +1,161 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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.
+ */
+
+import java.awt.AlphaComposite;
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.GraphicsConfiguration;
+import java.awt.GraphicsEnvironment;
+import java.awt.Image;
+import java.awt.image.BufferedImage;
+import java.awt.image.VolatileImage;
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+
+import static java.awt.Transparency.TRANSLUCENT;
+import static java.awt.image.BufferedImage.TYPE_4BYTE_ABGR;
+import static java.awt.image.BufferedImage.TYPE_4BYTE_ABGR_PRE;
+import static java.awt.image.BufferedImage.TYPE_INT_ARGB;
+import static java.awt.image.BufferedImage.TYPE_INT_ARGB_PRE;
+
+/**
+ * @test
+ * @bug 8017626
+ * @summary Tests drawing transparent volatile image to transparent BI.
+ * Results of the blit compatibleImage to transparent BI used for
+ * comparison.
+ * @author Sergey Bylokhov
+ */
+public final class IncorrectAlphaSurface2SW {
+
+ private static final int[] SCALES = {1, 2, 4, 8};
+ private static final int[] SIZES = {1, 2, 3, 127, 128, 254, 255, 256};
+ private static final int[] dstTypes = {TYPE_INT_ARGB, TYPE_INT_ARGB_PRE,
+ TYPE_4BYTE_ABGR, TYPE_4BYTE_ABGR_PRE};
+ private static final int[] srcTypes = {TRANSLUCENT};
+
+
+ public static void main(final String[] args) throws IOException {
+ GraphicsEnvironment ge = GraphicsEnvironment
+ .getLocalGraphicsEnvironment();
+ GraphicsConfiguration gc = ge.getDefaultScreenDevice()
+ .getDefaultConfiguration();
+ BufferedImage destVI;
+ BufferedImage destBI;
+ BufferedImage sourceBI;
+ VolatileImage sourceVI;
+
+ for (final int s : SIZES) {
+ for (final int srcType : srcTypes) {
+ for (final int dstType : dstTypes) {
+ for (final int scale : SCALES) {
+ int sw = s * scale;
+ destVI = new BufferedImage(sw, sw, dstType);
+ destBI = new BufferedImage(sw, sw, dstType);
+ sourceBI = gc.createCompatibleImage(sw, sw, srcType);
+ sourceVI = gc.createCompatibleVolatileImage(s, s, srcType);
+
+ // draw to dest BI using compatible image
+ fill(sourceBI, s);
+ Graphics2D big = destBI.createGraphics();
+ big.setComposite(AlphaComposite.Src);
+ big.drawImage(sourceBI, 0, 0, sw, sw, null);
+ big.dispose();
+
+ // draw to dest BI using compatible image
+ fill(sourceVI, s);
+ drawVItoBI(gc, destVI, sourceVI);
+
+ validate(destVI, destBI);
+ sourceVI.flush();
+ }
+ }
+ }
+ }
+ System.out.println("Test PASSED");
+ }
+
+ private static void drawVItoBI(GraphicsConfiguration gc,
+ BufferedImage bi, VolatileImage vi) {
+ while (true) {
+ vi.validate(gc);
+ fill(vi, vi.getHeight());
+ if (vi.validate(gc) != VolatileImage.IMAGE_OK) {
+ try {
+ Thread.sleep(100);
+ } catch (final InterruptedException ignored) {
+ }
+ continue;
+ }
+
+ Graphics2D big = bi.createGraphics();
+ big.setComposite(AlphaComposite.Src);
+ big.drawImage(vi, 0, 0, bi.getWidth(), bi.getHeight(), null);
+ big.dispose();
+
+ if (vi.contentsLost()) {
+ try {
+ Thread.sleep(100);
+ } catch (final InterruptedException ignored) {
+ }
+ continue;
+ }
+ break;
+ }
+ }
+
+ private static void validate(BufferedImage bi, BufferedImage gold)
+ throws IOException {
+ for (int x = 0; x < bi.getWidth(); ++x) {
+ for (int y = 0; y < bi.getHeight(); ++y) {
+ if (gold.getRGB(x, y) != bi.getRGB(x, y)) {
+ System.err.println("Expected color = " + gold.getRGB(x, y));
+ System.err.println("Actual color = " + bi.getRGB(x, y));
+ ImageIO.write(gold, "png", new File("gold.png"));
+ ImageIO.write(bi, "png", new File("bi.png"));
+ throw new RuntimeException("Test failed.");
+ }
+ }
+ }
+ }
+
+ /**
+ * Fills the whole image using different alpha for each row.
+ *
+ * @param image to fill
+ */
+ private static void fill(final Image image, final int size) {
+ Graphics2D graphics = (Graphics2D) image.getGraphics();
+ graphics.setComposite(AlphaComposite.Src);
+ graphics.setColor(Color.GREEN);
+ graphics.fillRect(0, 0, image.getWidth(null), image.getHeight(null));
+ int row = image.getHeight(null) / size;
+ for (int i = 0; i < size; ++i) {
+ graphics.setColor(new Color(23, 127, 189, i));
+ graphics.fillRect(0, i * row, image.getWidth(null), row);
+ }
+ graphics.dispose();
+ }
+}
diff --git a/test/java/awt/image/DrawImage/IncorrectClipSurface2SW.java b/test/java/awt/image/DrawImage/IncorrectClipSurface2SW.java
new file mode 100644
index 000000000..3c972b661
--- /dev/null
+++ b/test/java/awt/image/DrawImage/IncorrectClipSurface2SW.java
@@ -0,0 +1,166 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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.
+ */
+
+import java.awt.AlphaComposite;
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.GraphicsConfiguration;
+import java.awt.GraphicsEnvironment;
+import java.awt.Image;
+import java.awt.Rectangle;
+import java.awt.Shape;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Ellipse2D;
+import java.awt.image.BufferedImage;
+import java.awt.image.VolatileImage;
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+
+import static java.awt.geom.Rectangle2D.Double;
+
+/**
+ * @test
+ * @bug 8041644
+ * @summary Tests drawing volatile image to BI using different clip.
+ * Results of the blit compatibleImage to BI used for comparison.
+ * @author Sergey Bylokhov
+ * @run main/othervm -Dsun.java2d.d3d=false IncorrectClipSurface2SW
+ */
+public final class IncorrectClipSurface2SW {
+
+ private static int[] SCALES = {1, 2, 4};
+ private static int[] SIZES = {127, 3, 2, 1};
+ private static final Shape[] SHAPES = {new Rectangle(0, 0, 0, 0),
+ new Rectangle(0, 0, 1, 1),
+ new Rectangle(0, 1, 1, 1),
+ new Rectangle(1, 0, 1, 1),
+ new Rectangle(1, 1, 1, 1),
+
+ new Ellipse2D.Double(0, 0, 1, 1),
+ new Ellipse2D.Double(0, 1, 1, 1),
+ new Ellipse2D.Double(1, 0, 1, 1),
+ new Ellipse2D.Double(1, 1, 1, 1),
+ new Ellipse2D.Double(.25, .25, .5,
+ .5),
+
+ new Double(0, 0, 0.5, 0.5),
+ new Double(0, 0.5, 0.5, 0.5),
+ new Double(0.5, 0, 0.5, 0.5),
+ new Double(0.5, 0.5, 0.5, 0.5),
+ new Double(0.25, 0.25, 0.5, 0.5),
+ new Double(0, 0.25, 1, 0.5),
+ new Double(0.25, 0, 0.5, 1),
+
+ new Double(.10, .10, .20, .20),
+ new Double(.75, .75, .20, .20),
+ new Double(.75, .10, .20, .20),
+ new Double(.10, .75, .20, .20),};
+
+ public static void main(final String[] args) throws IOException {
+ GraphicsEnvironment ge = GraphicsEnvironment
+ .getLocalGraphicsEnvironment();
+ GraphicsConfiguration gc = ge.getDefaultScreenDevice()
+ .getDefaultConfiguration();
+ AffineTransform at;
+ for (final int size : SIZES) {
+ for (final int scale : SCALES) {
+ final int sw = size * scale;
+ at = AffineTransform.getScaleInstance(sw, sw);
+ for (Shape clip : SHAPES) {
+ clip = at.createTransformedShape(clip);
+ for (Shape to : SHAPES) {
+ to = at.createTransformedShape(to);
+ // Prepare test images
+ VolatileImage vi = getVolatileImage(gc, size);
+ BufferedImage bi = getBufferedImage(sw);
+ // Prepare gold images
+ BufferedImage goldvi = getCompatibleImage(gc, size);
+ BufferedImage goldbi = getBufferedImage(sw);
+ draw(clip, to, vi, bi, scale);
+ draw(clip, to, goldvi, goldbi, scale);
+ validate(bi, goldbi);
+ }
+ }
+ }
+ }
+ }
+
+ private static void draw(Shape clip, Shape to, Image vi, BufferedImage bi,
+ int scale) {
+ Graphics2D big = bi.createGraphics();
+ big.setComposite(AlphaComposite.Src);
+ big.setClip(clip);
+ Rectangle toBounds = to.getBounds();
+ int x1 = toBounds.x;
+
+ int y1 = toBounds.y;
+ int x2 = x1 + toBounds.width;
+ int y2 = y1 + toBounds.height;
+ big.drawImage(vi, x1, y1, x2, y2, 0, 0, toBounds.width / scale,
+ toBounds.height / scale, null);
+ big.dispose();
+ vi.flush();
+ }
+
+ private static BufferedImage getBufferedImage(int sw) {
+ BufferedImage bi = new BufferedImage(sw, sw,
+ BufferedImage.TYPE_INT_ARGB);
+ Graphics2D g2d = bi.createGraphics();
+ g2d.setColor(Color.RED);
+ g2d.fillRect(0, 0, sw, sw);
+ return bi;
+ }
+
+ private static VolatileImage getVolatileImage(GraphicsConfiguration gc,
+ int size) {
+ VolatileImage vi = gc.createCompatibleVolatileImage(size, size);
+ Graphics2D g2d = vi.createGraphics();
+ g2d.setColor(Color.GREEN);
+ g2d.fillRect(0, 0, size, size);
+ return vi;
+ }
+
+ private static BufferedImage getCompatibleImage(GraphicsConfiguration gc,
+ int size) {
+ BufferedImage image = gc.createCompatibleImage(size, size);
+ Graphics2D g2d = image.createGraphics();
+ g2d.setColor(Color.GREEN);
+ g2d.fillRect(0, 0, size, size);
+ return image;
+ }
+
+ private static void validate(BufferedImage bi, BufferedImage goldbi)
+ throws IOException {
+ for (int x = 0; x < bi.getWidth(); ++x) {
+ for (int y = 0; y < bi.getHeight(); ++y) {
+ if (goldbi.getRGB(x, y) != bi.getRGB(x, y)) {
+ ImageIO.write(bi, "png", new File("actual.png"));
+ ImageIO.write(goldbi, "png", new File("expected.png"));
+ throw new RuntimeException("Test failed.");
+ }
+ }
+ }
+ }
+}
diff --git a/test/java/awt/image/DrawImage/IncorrectDestinationOffset.java b/test/java/awt/image/DrawImage/IncorrectDestinationOffset.java
new file mode 100644
index 000000000..66fafdf57
--- /dev/null
+++ b/test/java/awt/image/DrawImage/IncorrectDestinationOffset.java
@@ -0,0 +1,164 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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.
+ */
+
+import java.awt.AlphaComposite;
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.GraphicsConfiguration;
+import java.awt.GraphicsEnvironment;
+import java.awt.image.BufferedImage;
+import java.awt.image.VolatileImage;
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+
+/**
+ * @test
+ * @bug 8041129
+ * @summary Destination offset should be correct in case of Surface->SW blit.
+ * Destination outside of the drawing area should be untouched.
+ * @author Sergey Bylokhov
+ */
+public final class IncorrectDestinationOffset {
+
+ private static final int SIZE = 128;
+ private static final double[] SCALES = {0.25, 0.5, 1, 1.5, 2.0, 4};
+
+ public static void main(final String[] args) throws IOException {
+ GraphicsEnvironment ge = GraphicsEnvironment
+ .getLocalGraphicsEnvironment();
+ GraphicsConfiguration gc = ge.getDefaultScreenDevice()
+ .getDefaultConfiguration();
+ VolatileImage vi = gc.createCompatibleVolatileImage(SIZE, SIZE);
+ BufferedImage bi = new BufferedImage(SIZE, SIZE,
+ BufferedImage.TYPE_INT_ARGB);
+ for (double scale : SCALES) {
+ while (true) {
+ // initialize Volatile Image
+ vi.validate(gc);
+ Graphics2D g2d = vi.createGraphics();
+ g2d.setColor(Color.green);
+ g2d.fillRect(0, 0, SIZE, SIZE);
+ g2d.dispose();
+
+ if (vi.validate(gc) != VolatileImage.IMAGE_OK) {
+ try {
+ Thread.sleep(100);
+ } catch (InterruptedException ignored) {
+ }
+ continue;
+ }
+ // Draw the VolatileImage to BI with scale and offsets
+ Graphics2D g = bi.createGraphics();
+ g.setComposite(AlphaComposite.Src);
+ g.setColor(Color.RED);
+ g.fillRect(0, 0, SIZE / 2, SIZE / 2);
+ g.setColor(Color.BLUE);
+ g.fillRect(SIZE / 2, 0, SIZE / 2, SIZE / 2);
+ g.setColor(Color.ORANGE);
+ g.fillRect(0, SIZE / 2, SIZE / 2, SIZE / 2);
+ g.setColor(Color.MAGENTA);
+ g.fillRect(SIZE / 2, SIZE / 2, SIZE / 2, SIZE / 2);
+
+ int point2draw = (int) (100 * scale);
+ int size2draw = (int) (SIZE * scale);
+ g.drawImage(vi, point2draw, point2draw, size2draw, size2draw,
+ null);
+ g.dispose();
+
+ if (vi.contentsLost()) {
+ try {
+ Thread.sleep(100);
+ } catch (InterruptedException ignored) {
+ }
+ continue;
+ }
+ validate(bi, point2draw, size2draw);
+ break;
+ }
+ }
+ }
+
+ private static void validate(BufferedImage bi, int point2draw,
+ int size2draw)
+ throws IOException {
+ for (int x = 0; x < SIZE; ++x) {
+ for (int y = 0; y < SIZE; ++y) {
+ if (isInsideGreenArea(point2draw, size2draw, x, y)) {
+ if (bi.getRGB(x, y) != Color.green.getRGB()) {
+ ImageIO.write(bi, "png", new File("image.png"));
+ throw new RuntimeException("Test failed.");
+ }
+ } else {
+ if (isRedArea(x, y)) {
+ if (bi.getRGB(x, y) != Color.red.getRGB()) {
+ ImageIO.write(bi, "png", new File("image.png"));
+ throw new RuntimeException("Test failed.");
+ }
+ }
+ if (isBlueArea(x, y)) {
+ if (bi.getRGB(x, y) != Color.blue.getRGB()) {
+ ImageIO.write(bi, "png", new File("image.png"));
+ throw new RuntimeException("Test failed.");
+ }
+ }
+ if (isOrangeArea(x, y)) {
+ if (bi.getRGB(x, y) != Color.orange.getRGB()) {
+ ImageIO.write(bi, "png", new File("image.png"));
+ throw new RuntimeException("Test failed.");
+ }
+ }
+ if (isMagentaArea(x, y)) {
+ if (bi.getRGB(x, y) != Color.magenta.getRGB()) {
+ ImageIO.write(bi, "png", new File("image.png"));
+ throw new RuntimeException("Test failed.");
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private static boolean isRedArea(int x, int y) {
+ return x < SIZE / 2 && y < SIZE / 2;
+ }
+
+ private static boolean isBlueArea(int x, int y) {
+ return x >= SIZE / 2 && y < SIZE / 2;
+ }
+
+ private static boolean isOrangeArea(int x, int y) {
+ return x < SIZE / 2 && y >= SIZE / 2;
+ }
+
+ private static boolean isMagentaArea(int x, int y) {
+ return x >= SIZE / 2 && y >= SIZE / 2;
+ }
+
+ private static boolean isInsideGreenArea(int point2draw, int size2draw,
+ int x, int y) {
+ return x >= point2draw && x < point2draw + size2draw && y >=
+ point2draw && y < point2draw + size2draw;
+ }
+}
diff --git a/test/java/awt/image/DrawImage/IncorrectSourceOffset.java b/test/java/awt/image/DrawImage/IncorrectSourceOffset.java
new file mode 100644
index 000000000..5dd4f490b
--- /dev/null
+++ b/test/java/awt/image/DrawImage/IncorrectSourceOffset.java
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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.
+ */
+
+import java.awt.AlphaComposite;
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.GraphicsConfiguration;
+import java.awt.GraphicsEnvironment;
+import java.awt.Image;
+import java.awt.image.BufferedImage;
+import java.awt.image.VolatileImage;
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+
+/**
+ * @test
+ * @bug 8041129
+ * @summary Tests asymmetric source offsets.
+ * @author Sergey Bylokhov
+ */
+public final class IncorrectSourceOffset {
+
+ public static void main(final String[] args) throws IOException {
+ GraphicsEnvironment ge = GraphicsEnvironment
+ .getLocalGraphicsEnvironment();
+ GraphicsConfiguration gc = ge.getDefaultScreenDevice()
+ .getDefaultConfiguration();
+ VolatileImage vi = gc.createCompatibleVolatileImage(511, 255);
+ BufferedImage bi = new BufferedImage(511, 255,
+ BufferedImage.TYPE_INT_ARGB);
+ BufferedImage gold = new BufferedImage(511, 255,
+ BufferedImage.TYPE_INT_ARGB);
+ fill(gold);
+ while (true) {
+ vi.validate(gc);
+ fill(vi);
+ if (vi.validate(gc) != VolatileImage.IMAGE_OK) {
+ try {
+ Thread.sleep(100);
+ } catch (final InterruptedException ignored) {
+ }
+ continue;
+ }
+
+ Graphics2D big = bi.createGraphics();
+ big.drawImage(vi, 7, 11, 127, 111, 7, 11, 127, 111, null);
+ big.dispose();
+ if (vi.contentsLost()) {
+ try {
+ Thread.sleep(100);
+ } catch (final InterruptedException ignored) {
+ }
+ continue;
+ }
+ break;
+ }
+
+ for (int x = 7; x < 127; ++x) {
+ for (int y = 11; y < 111; ++y) {
+ if (gold.getRGB(x, y) != bi.getRGB(x, y)) {
+ ImageIO.write(gold, "png", new File("gold.png"));
+ ImageIO.write(bi, "png", new File("bi.png"));
+ throw new RuntimeException("Test failed.");
+ }
+ }
+ }
+ }
+
+ private static void fill(Image image) {
+ Graphics2D graphics = (Graphics2D) image.getGraphics();
+ graphics.setComposite(AlphaComposite.Src);
+ for (int i = 0; i < image.getHeight(null); ++i) {
+ graphics.setColor(new Color(i, 0, 0));
+ graphics.fillRect(0, i, image.getWidth(null), 1);
+ }
+ graphics.dispose();
+ }
+}
diff --git a/test/java/awt/image/ImageIconHang.java b/test/java/awt/image/ImageIconHang.java
new file mode 100644
index 000000000..25d6a219d
--- /dev/null
+++ b/test/java/awt/image/ImageIconHang.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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.
+ */
+
+import java.awt.*;
+
+/*
+ * @test
+ * @bug 8032788
+ * @summary Checks that null filename argument is processed correctly
+ *
+ * @run main ImageIconHang
+ */
+public class ImageIconHang {
+ public static void main(String[] args) throws Exception {
+ Image image = Toolkit.getDefaultToolkit().getImage((String) null);
+ MediaTracker mt = new MediaTracker(new Component() {});
+ mt.addImage(image, 1);
+ mt.waitForID(1, 5000);
+
+ int status = mt.statusID(1, false);
+
+ System.out.println("Status: " + status);
+
+ if (status != MediaTracker.ERRORED) {
+ throw new RuntimeException("MediaTracker.waitForID() hung.");
+ }
+ }
+}
diff --git a/test/java/lang/annotation/typeAnnotations/TestExecutableGetAnnotatedType.java b/test/java/lang/annotation/typeAnnotations/TestExecutableGetAnnotatedType.java
new file mode 100644
index 000000000..ad8a87a13
--- /dev/null
+++ b/test/java/lang/annotation/typeAnnotations/TestExecutableGetAnnotatedType.java
@@ -0,0 +1,277 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8039916
+ * @summary Test that a call to getType() on an AnnotatedType returned from an
+ * Executable.getAnnotated* returns the same type as the corresponding
+ * Executable.getGeneric* call.
+ * @run testng TestExecutableGetAnnotatedType
+ */
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import java.lang.annotation.*;
+import java.lang.reflect.*;
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import static org.testng.Assert.*;
+
+public class TestExecutableGetAnnotatedType {
+ @Test(dataProvider = "genericExecutableData")
+ public void testGenericMethodExceptions(Executable e) throws Exception {
+ testExceptions(e);
+ }
+
+ @Test(dataProvider = "executableData")
+ public void testMethodExceptions(Executable e) throws Exception {
+ testExceptions(e);
+ }
+
+ @Test(dataProvider = "genericExecutableData")
+ public void testGenericMethodParameterTypes(Executable e) throws Exception {
+ testMethodParameters(e);
+ }
+
+ @Test(dataProvider = "executableData")
+ public void testMethodParameterTypes(Executable e) throws Exception {
+ testMethodParameters(e);
+ }
+
+ @Test(dataProvider = "genericExecutableData")
+ public void testGenericParameterTypes(Executable e) throws Exception {
+ testParameters(e.getParameters());
+ }
+
+ @Test(dataProvider = "executableData")
+ public void testParameterTypes(Executable e) throws Exception {
+ testParameters(e.getParameters());
+ }
+
+ // should test constructors as well, see JDK-8044629
+ @Test(dataProvider = "genericMethodData")
+ public void testGenericReceiverType(Executable e) throws Exception {
+ testReceiverType0(e);
+ }
+
+ // should test constructors as well, see JDK-8044629
+ @Test(dataProvider = "methodData")
+ public void testReceiverType(Executable e) throws Exception {
+ testReceiverType0(e);
+ }
+
+ @Test(dataProvider = "genericMethodData")
+ public void testGenericMethodReturnType(Object o) throws Exception {
+ // testng gets confused if the param to this method has type Method
+ Method m = (Method)o;
+ testReturnType(m);
+ }
+
+ @Test(dataProvider = "methodData")
+ public void testMethodReturnType(Object o) throws Exception {
+ // testng gets confused if the param to this method has type Method
+ Method m = (Method)o;
+ testReturnType(m);
+ }
+
+ private void testExceptions(Executable e) {
+ Type[] ts = e.getGenericExceptionTypes();
+ AnnotatedType[] ats = e.getAnnotatedExceptionTypes();
+ assertEquals(ts.length, ats.length);
+
+ for (int i = 0; i < ts.length; i++) {
+ Type t = ts[i];
+ AnnotatedType at = ats[i];
+ assertSame(at.getType(), t, e.toString() + ": T: " + t + ", AT: " + at + ", AT.getType(): " + at.getType() + "\n");
+ }
+ }
+
+ private void testMethodParameters(Executable e) {
+ Type[] ts = e.getGenericParameterTypes();
+ AnnotatedType[] ats = e.getAnnotatedParameterTypes();
+ assertEquals(ts.length, ats.length);
+
+ for (int i = 0; i < ts.length; i++) {
+ Type t = ts[i];
+ AnnotatedType at = ats[i];
+ assertSame(at.getType(), t, e.toString() + ": T: " + t + ", AT: " + at + ", AT.getType(): " + at.getType() + "\n");
+ }
+ }
+
+ private void testParameters(Parameter[] params) {
+ for (Parameter p : params) {
+ Type t = p.getParameterizedType();
+ AnnotatedType at = p.getAnnotatedType();
+ assertSame(at.getType(), t, p.toString() + ": T: " + t + ", AT: " + at + ", AT.getType(): " + at.getType() + "\n");
+ }
+ }
+
+ private void testReceiverType0(Executable e) {
+ if (Modifier.isStatic(e.getModifiers()))
+ assertNull(e.getAnnotatedReceiverType());
+ else
+ assertSame(e.getAnnotatedReceiverType().getType(), e.getDeclaringClass());
+ }
+
+ private void testReturnType(Method m) {
+ Type t = m.getGenericReturnType();
+ AnnotatedType at = m.getAnnotatedReturnType();
+ assertSame(at.getType(), t, m.toString() + ": T: " + t + ", AT: " + at + ", AT.getType(): " + at.getType() + "\n");
+ }
+
+ @DataProvider
+ public Object[][] methodData() throws Exception {
+ return filterData(Arrays.stream(Methods1.class.getMethods()), Methods1.class)
+ .toArray(new Object[0][0]);
+ }
+
+ @DataProvider
+ public Object[][] genericMethodData() throws Exception {
+ return filterData(Arrays.stream(GenericMethods1.class.getMethods()), GenericMethods1.class)
+ .toArray(new Object[0][0]);
+ }
+
+ @DataProvider
+ public Object[][] executableData() throws Exception {
+ @SuppressWarnings("raw")
+ List l = filterData(Arrays.stream(Methods1.class.getMethods()), Methods1.class);
+ l.addAll(filterData(Arrays.stream(Methods1.class.getConstructors()), Methods1.class));
+ l.addAll(filterData(Arrays.stream(Ctors1.class.getConstructors()), Ctors1.class));
+ return ((List<Object[][]>)l).toArray(new Object[0][0]);
+ }
+
+ @DataProvider
+ public Object[][] genericExecutableData() throws Exception {
+ @SuppressWarnings("raw")
+ List l = filterData(Arrays.stream(GenericMethods1.class.getMethods()), GenericMethods1.class);
+ l.addAll(filterData(Arrays.stream(GenericMethods1.class.getConstructors()), GenericMethods1.class));
+ l.addAll(filterData(Arrays.stream(GenericCtors1.class.getConstructors()), GenericCtors1.class));
+ return ((List<Object[][]>)l).toArray(new Object[0][0]);
+ }
+
+ private List<?> filterData(Stream<? extends Executable> l, Class<?> c) {
+ return l.filter(m -> (m.getDeclaringClass() == c)) // remove object methods
+ .map(m -> { Object[] o = new Object[1]; o[0] = m; return o; })
+ .collect(Collectors.toList());
+ }
+
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target(ElementType.TYPE_USE)
+ public @interface TA {}
+
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target(ElementType.TYPE_USE)
+ public @interface TB {}
+
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target(ElementType.TYPE_USE)
+ public @interface TC {}
+
+ public static class Methods1 {
+ public static void m1() throws Error, RuntimeException {;}
+ public static long m2(int a, double b) throws Error, RuntimeException { return 0L; }
+ public static Object m3(String s, List l) throws Error, RuntimeException { return null; }
+ public static Object m4(String s, List<String> l) { return null; }
+ public static Object m4(String s, List<String> l, boolean ... b){ return null; }
+
+ public static void m10() throws @TA Error, @TB @TC RuntimeException {;}
+ public static @TB long m20(@TC int a, @TA double b) throws @TA Error, @TB @TC RuntimeException { return 0L; }
+ public static @TC Object m30(@TA String s, @TB List l) throws @TA Error, @TB @TC RuntimeException { return null; }
+ public static @TA Object m40(@TB String s, @TC List<@TA String> l) { return null; }
+ public static @TA Object m40(@TB String s, @TC List<@TA String> l, @TB boolean ... b) { return null; }
+
+ public Methods1(int a, double b) {}
+ public Methods1(String s, List<String> l, boolean ... b) {}
+ public Methods1(@TC long a, @TA float b) {}
+ public Methods1(@TA int i, @TB String s, @TC List<@TA String> l, @TB boolean ... b) {}
+ }
+
+ // test default ctor
+ public static class Ctors1 {
+ }
+
+ public static class GenericMethods1<E> {
+ public E m1(E e, Object o) throws Error, RuntimeException { return null; }
+ public E m2(List<? extends List> e, int i) throws Error, RuntimeException { return null; }
+ public E m3(double d, List<E> e) throws Error, RuntimeException { return null; }
+ public <E extends List> E m4(byte[] b, GenericMethods1<? extends E> e) { return null; }
+ public <E extends List> E m5(GenericMethods1<? super Number> e) { return null; }
+ public <E extends List & Cloneable> E m6(char c, E e) { return null; }
+ public <E extends List & Cloneable> E m7(char c, E e, byte ... b) { return null; }
+
+ public static <M> M n1(M e) { return null; }
+ public static <M> M n2(List<? extends List> e) { return null; }
+ public static <M extends RuntimeException> M n3(List<M> e) throws Error, M { return null; }
+ public static <M extends Number> M n4(GenericMethods1<? extends M> e) throws Error, RuntimeException { return null; }
+ public static <M extends Object> M n5(GenericMethods1<? super Number> e) { return null; }
+ public static <M extends List & Cloneable> M n6(M e) { return null; }
+
+ public <M> E o1(E e) { return null; }
+ public <M> E o2(List<? extends List> e) { return null; }
+ public <M extends Error, N extends RuntimeException> E o3(GenericMethods1<E> this, List<E> e) throws M, N { return null; }
+ public <M extends Number> E o4(GenericMethods1<? extends E> e) throws Error, RuntimeException { return null; }
+ public <M extends Object> E o5(GenericMethods1<? super Number> e) { return null; }
+ public <M extends List & Cloneable> E o6(E e) { return null; }
+
+
+ // with annotations
+ public @TA E m10(E e, @TC Object o) throws @TA Error, @TB @TC RuntimeException { return null; }
+ public @TB E m20(@TA List<@TA ? extends @TA List> e, @TC int i) throws @TA Error, @TB @TC RuntimeException { return null; }
+ public @TB E m30(@TC double d, List<E> e) throws @TA Error, @TB @TC RuntimeException { return null; }
+ public <@TA E extends @TA List> @TA E m40(@TA byte @TB [] b, GenericMethods1<@TA ? extends E> e) { return null; }
+ public <@TB E extends @TB List> E m50(@TA GenericMethods1<? super Number> e) { return null; }
+ public <@TB E extends @TA List & Cloneable> E m60(@TC char c, E e) { return null; }
+ public <@TB E extends @TA List & Cloneable> E m70(@TC char c, E e, @TA @TB byte ... b) { return null; }
+
+ public static <@TA M> @TA M n10(M e) { return null; }
+ public static <@TA @TB @TC M> M n20(List<@TA ? extends List> e) { return null; }
+ @TA @TB @TC public static <M extends RuntimeException> M n30(List<@TB M> e) throws @TA Error, @TB @TC M { return null; }
+ public static <@TC M extends Number> M n40(GenericMethods1<? extends @TA M> e) throws @TA Error, @TB @TC RuntimeException { return null; }
+ @TA public static <M extends @TB Object> M n50(GenericMethods1<? super Number> e) { return null; }
+ public static <@TA M extends @TB List & @TC @TB Cloneable> M n60(M e) { return null; }
+
+ public <@TC M> E o10(@TA E e) { return null; }
+ public <M> @TA E o20(@TB List<@TB ? extends @TB List> e) { return null; }
+ @TC public <M extends Error, N extends RuntimeException> @TB E o30(@TA @TB @TC GenericMethods1<E> this, List<E> e) throws @TA M, @TB @TC N { return null; }
+ public <@TA M extends Number> E o40(GenericMethods1<? extends @TA E> e) throws @TA Error, @TB @TC RuntimeException { return null; }
+ public <M extends @TA Object> E o50(GenericMethods1<@TA ? super Number> e) { return null; }
+ public <@TA M extends @TB List & @TC Cloneable> E o60(@TA E e) { return null; }
+
+
+ // ctors
+ public GenericMethods1(List<? extends List> e, int i) throws Error, RuntimeException { }
+ public <E extends List & Cloneable> GenericMethods1(char c, E e, byte ... b) { }
+ @TC public <M extends Error, N extends RuntimeException> GenericMethods1(List<@TC E> e) throws @TA M, @TB @TC N { }
+ public <@TA M extends @TB List & @TC Cloneable> GenericMethods1(@TA E e, @TB M m) throws @TA Exception { }
+ public <@TA M extends @TB List & @TC Cloneable> GenericMethods1(@TA E e, @TB M m, @TC byte ... b) throws Exception { }
+ }
+
+ // test default ctor
+ public static class GenericCtors1<T> {
+ }
+}
diff --git a/test/java/lang/invoke/VMAnonymousClass.java b/test/java/lang/invoke/VMAnonymousClass.java
new file mode 100644
index 000000000..f67cba8dc
--- /dev/null
+++ b/test/java/lang/invoke/VMAnonymousClass.java
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8046903
+ * @summary VM anonymous class members can't be statically invocable
+ * @run junit test.java.lang.invoke.VMAnonymousClass
+ */
+package test.java.lang.invoke;
+
+import java.lang.invoke.MethodHandle;
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.MethodType;
+import java.lang.reflect.Field;
+import org.junit.Test;
+import sun.misc.Unsafe;
+import jdk.internal.org.objectweb.asm.*;
+import static jdk.internal.org.objectweb.asm.Opcodes.*;
+
+public class VMAnonymousClass {
+ public static void main(String[] args) throws Throwable {
+ VMAnonymousClass test = new VMAnonymousClass();
+ test.testJavaLang();
+ test.testJavaUtil();
+ test.testSunMisc();
+ test.testJavaLangInvoke();
+ System.out.println("TEST PASSED");
+ }
+
+ // Test VM anonymous classes from different packages
+ // (see j.l.i.InvokerBytecodeGenerator::isStaticallyInvocable).
+ @Test public void testJavaLang() throws Throwable { test("java/lang"); }
+ @Test public void testJavaUtil() throws Throwable { test("java/util"); }
+ @Test public void testSunMisc() throws Throwable { test("sun/misc"); }
+ @Test public void testJavaLangInvoke() throws Throwable { test("java/lang/invoke"); }
+
+ private static Unsafe unsafe = getUnsafe();
+
+ private static void test(String pkg) throws Throwable {
+ byte[] bytes = dumpClass(pkg);
+ // Define VM anonymous class in privileged context (on BCP).
+ Class anonClass = unsafe.defineAnonymousClass(Object.class, bytes, null);
+
+ MethodType t = MethodType.methodType(Object.class, int.class);
+ MethodHandle target = MethodHandles.lookup().findStatic(anonClass, "get", t);
+
+ // Wrap target into LF (convert) to get "target" referenced from LF
+ MethodHandle wrappedMH = target.asType(MethodType.methodType(Object.class, Integer.class));
+
+ // Invoke enough times to provoke LF compilation to bytecode.
+ for (int i = 0; i<100; i++) {
+ Object r = wrappedMH.invokeExact((Integer)1);
+ }
+ }
+
+ /*
+ * Constructs bytecode for the following class:
+ * public class pkg.MyClass {
+ * MyClass() {}
+ * public Object get(int i) { return null; }
+ * }
+ */
+ public static byte[] dumpClass(String pkg) {
+ ClassWriter cw = new ClassWriter(0);
+ MethodVisitor mv;
+
+ cw.visit(52, ACC_SUPER | ACC_PUBLIC, pkg+"/MyClass", null, "java/lang/Object", null);
+ {
+ mv = cw.visitMethod(0, "<init>", "()V", null, null);
+ mv.visitCode();
+ mv.visitVarInsn(ALOAD, 0);
+ mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V", false);
+ mv.visitInsn(RETURN);
+ mv.visitMaxs(1, 1);
+ mv.visitEnd();
+ }
+ {
+ mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "get", "(I)Ljava/lang/Object;", null, null);
+ mv.visitCode();
+ mv.visitInsn(ACONST_NULL);
+ mv.visitInsn(ARETURN);
+ mv.visitMaxs(1, 1);
+ mv.visitEnd();
+ }
+ cw.visitEnd();
+ return cw.toByteArray();
+ }
+
+ private static synchronized Unsafe getUnsafe() {
+ try {
+ Field f = Unsafe.class.getDeclaredField("theUnsafe");
+ f.setAccessible(true);
+ return (Unsafe) f.get(null);
+ } catch (NoSuchFieldException | IllegalAccessException e) {
+ throw new RuntimeException("Unable to get Unsafe instance.", e);
+ }
+ }
+}
diff --git a/test/java/lang/invoke/lookup/SpecialStatic.java b/test/java/lang/invoke/lookup/SpecialStatic.java
new file mode 100644
index 000000000..57f555707
--- /dev/null
+++ b/test/java/lang/invoke/lookup/SpecialStatic.java
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8032400
+ * @summary JSR292: invokeSpecial: InternalError attempting to lookup a method
+ * @compile -XDignore.symbol.file SpecialStatic.java
+ * @run junit test.java.lang.invoke.lookup.SpecialStatic
+ */
+package test.java.lang.invoke.lookup;
+
+import java.lang.invoke.MethodHandle;
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.MethodType;
+import jdk.internal.org.objectweb.asm.*;
+import org.junit.Test;
+import static jdk.internal.org.objectweb.asm.Opcodes.*;
+import static org.junit.Assert.*;
+
+/**
+ * Test case:
+ * class T1 { int m() { return 1; }}
+ * class T2 extends T1 { static int m() { return 2; }}
+ * class T3 extends T2 { int m() { return 3; }}
+ *
+ * T3::test { invokespecial T1.m() T3 } ==> T1::m
+ */
+public class SpecialStatic {
+ static class CustomClassLoader extends ClassLoader {
+ public Class<?> loadClass(String name) throws ClassNotFoundException {
+ if (findLoadedClass(name) != null) {
+ return findLoadedClass(name);
+ }
+
+ if ("T1".equals(name)) {
+ byte[] classFile = dumpT1();
+ return defineClass("T1", classFile, 0, classFile.length);
+ }
+ if ("T2".equals(name)) {
+ byte[] classFile = dumpT2();
+ return defineClass("T2", classFile, 0, classFile.length);
+ }
+ if ("T3".equals(name)) {
+ byte[] classFile = dumpT3();
+ return defineClass("T3", classFile, 0, classFile.length);
+ }
+
+ return super.loadClass(name);
+ }
+ }
+
+ private static ClassLoader cl = new CustomClassLoader();
+ private static Class t1, t3;
+ static {
+ try {
+ t1 = cl.loadClass("T1");
+ t3 = cl.loadClass("T3");
+ } catch (ClassNotFoundException e) {
+ throw new Error(e);
+ }
+ }
+
+ public static void main(String[] args) throws Throwable {
+ SpecialStatic test = new SpecialStatic();
+ test.testConstant();
+ test.testFindSpecial();
+ }
+
+ @Test
+ public void testConstant() throws Throwable {
+ MethodHandle mh = (MethodHandle)t3.getDeclaredMethod("getMethodHandle").invoke(null);
+ int result = (int)mh.invoke(t3.newInstance());
+ assertEquals(result, 1); // T1.m should be invoked.
+ }
+
+ @Test
+ public void testFindSpecial() throws Throwable {
+ MethodHandles.Lookup lookup = (MethodHandles.Lookup)t3.getDeclaredMethod("getLookup").invoke(null);
+ MethodHandle mh = lookup.findSpecial(t1, "m", MethodType.methodType(int.class), t3);
+ int result = (int)mh.invoke(t3.newInstance());
+ assertEquals(result, 1); // T1.m should be invoked.
+ }
+
+ public static byte[] dumpT1() {
+ ClassWriter cw = new ClassWriter(0);
+ MethodVisitor mv;
+
+ cw.visit(52, ACC_PUBLIC + ACC_SUPER, "T1", null, "java/lang/Object", null);
+
+ mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
+ mv.visitCode();
+ mv.visitVarInsn(ALOAD, 0);
+ mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V", false);
+ mv.visitInsn(RETURN);
+ mv.visitMaxs(1, 1);
+ mv.visitEnd();
+
+ mv = cw.visitMethod(ACC_PUBLIC, "m", "()I", null, null);
+ mv.visitCode();
+ mv.visitIntInsn(BIPUSH, 1);
+ mv.visitInsn(IRETURN);
+ mv.visitMaxs(1, 1);
+ mv.visitEnd();
+
+ cw.visitEnd();
+ return cw.toByteArray();
+ }
+
+ public static byte[] dumpT2() {
+ ClassWriter cw = new ClassWriter(0);
+ MethodVisitor mv;
+
+ cw.visit(52, ACC_PUBLIC + ACC_SUPER, "T2", null, "T1", null);
+
+ mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
+ mv.visitCode();
+ mv.visitVarInsn(ALOAD, 0);
+ mv.visitMethodInsn(INVOKESPECIAL, "T1", "<init>", "()V", false);
+ mv.visitInsn(RETURN);
+ mv.visitMaxs(1, 1);
+ mv.visitEnd();
+
+ mv = cw.visitMethod(ACC_PUBLIC | ACC_STATIC, "m", "()I", null, null);
+ mv.visitCode();
+ mv.visitIntInsn(BIPUSH, 2);
+ mv.visitInsn(IRETURN);
+ mv.visitMaxs(1, 1);
+ mv.visitEnd();
+
+ cw.visitEnd();
+ return cw.toByteArray();
+ }
+
+ public static byte[] dumpT3() {
+ ClassWriter cw = new ClassWriter(0);
+ MethodVisitor mv;
+
+ cw.visit(52, ACC_PUBLIC + ACC_SUPER, "T3", null, "T2", null);
+
+ mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
+ mv.visitCode();
+ mv.visitVarInsn(ALOAD, 0);
+ mv.visitMethodInsn(INVOKESPECIAL, "T2", "<init>", "()V", false);
+ mv.visitInsn(RETURN);
+ mv.visitMaxs(1, 1);
+ mv.visitEnd();
+
+ mv = cw.visitMethod(ACC_PUBLIC, "m", "()I", null, null);
+ mv.visitCode();
+ mv.visitIntInsn(BIPUSH, 3);
+ mv.visitInsn(IRETURN);
+ mv.visitMaxs(1, 1);
+ mv.visitEnd();
+
+ // getMethodHandle
+ mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "getMethodHandle", "()Ljava/lang/invoke/MethodHandle;", null, null);
+ mv.visitCode();
+ mv.visitLdcInsn(new Handle(H_INVOKESPECIAL, "T1", "m", "()I"));
+ mv.visitInsn(ARETURN);
+ mv.visitMaxs(1, 0);
+ mv.visitEnd();
+
+ // getLookup
+ mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "getLookup", "()Ljava/lang/invoke/MethodHandles$Lookup;", null, null);
+ mv.visitCode();
+ mv.visitMethodInsn(INVOKESTATIC, "java/lang/invoke/MethodHandles", "lookup", "()Ljava/lang/invoke/MethodHandles$Lookup;", false);
+ mv.visitInsn(ARETURN);
+ mv.visitMaxs(1, 0);
+ mv.visitEnd();
+
+ cw.visitEnd();
+ return cw.toByteArray();
+ }
+}
diff --git a/test/java/lang/reflect/DefaultMethodMembers/FilterNotMostSpecific.java b/test/java/lang/reflect/DefaultMethodMembers/FilterNotMostSpecific.java
new file mode 100644
index 000000000..4a3d89836
--- /dev/null
+++ b/test/java/lang/reflect/DefaultMethodMembers/FilterNotMostSpecific.java
@@ -0,0 +1,691 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8029674
+ * @summary Verify that the right interface methods are returned by
+ * Class.getMethod() and Class.getMethods()
+ * @run testng FilterNotMostSpecific
+ */
+
+import java.lang.reflect.*;
+import java.lang.annotation.*;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import static org.testng.Assert.*;
+
+public class FilterNotMostSpecific {
+
+ @Test(dataProvider="getCases")
+ public void testGetMethod(Class<?> iface) {
+ boolean match = false;
+ MethodDesc[] expectedMethods = iface.getAnnotationsByType(MethodDesc.class);
+
+ for (MethodDesc expected : expectedMethods) {
+ if (expected.isGetMethodReturn()) {
+ try {
+ Method m = iface.getMethod(expected.name());
+ if (!assertMatch(expected, m))
+ fail(failMsg(expected, m, iface));
+ else
+ match = true;
+ } catch (NoSuchMethodException e) {
+ fail("expected: " + toMethodString(expected), e);
+ }
+ }
+ }
+ assert(match);
+ }
+
+ @Test(dataProvider="getCases")
+ public void testGetMethods(Class<?> iface) {
+ List<Method> foundMethods = filterObjectMethods(iface.getMethods());
+ MethodDesc[] expectedMethods = iface.getAnnotationsByType(MethodDesc.class);
+ Set<Method> used = new HashSet<>();
+
+ for (MethodDesc expected : expectedMethods) {
+ boolean found = false;
+
+ for (Method m : foundMethods) {
+ if (used.contains(m))
+ continue;
+
+ if(expected.name().equals(m.getName()) &&
+ expected.declaringClass() ==m.getDeclaringClass()) {
+
+ found = true;
+ assertMatch(expected, m);
+ used.add(m);
+ break;
+ }
+ }
+ if (! found)
+ fail("On: "+ iface +"\nDid not find " + toMethodString(expected) + " among " + foundMethods);
+ }
+ assertEquals(foundMethods.size(), expectedMethods.length,
+ "\non: " + iface +
+ "\nexpected: " + toMethodStrings(expectedMethods) +
+ "\nfound: " + foundMethods + "\n");
+ }
+
+ private boolean assertMatch(MethodDesc expected, Method m) {
+ if (!expected.name().equals(m.getName()))
+ return false;
+ if (expected.declaringClass() != m.getDeclaringClass())
+ return false;
+
+ if (expected.kind() == MethodKind.ABSTRACT)
+ assertTrue(Modifier.isAbstract(m.getModifiers()), m + " should be ABSTRACT");
+ else if (expected.kind() == MethodKind.CONCRETE)
+ assertTrue(!Modifier.isAbstract(m.getModifiers()) && !m.isDefault(), m + " should be CONCRETE");
+ else if (expected.kind() == MethodKind.DEFAULT)
+ assertTrue(m.isDefault(), m + " should be DEFAULT");
+
+ return true;
+ }
+
+ private String failMsg(MethodDesc expected, Method m, Class<?> iface) {
+ return "\nOn interface: " + iface +
+ "\nexpected: " + toMethodString(expected) +
+ "\nfound: " + m;
+ }
+
+ private static List<Method> filterObjectMethods(Method[] in) {
+ return Arrays.stream(in).
+ filter(m -> (m.getDeclaringClass() != java.lang.Object.class)).
+ collect(Collectors.toList());
+ }
+
+ private String toMethodString(MethodDesc m) {
+ return m.declaringClass().getSimpleName().toString() + "." +
+ m.name() + "()";
+ }
+
+ private List<String> toMethodStrings(MethodDesc[] m) {
+ return Arrays.stream(m).
+ map(this::toMethodString)
+ .collect(Collectors.toList());
+ }
+
+ @Retention(RetentionPolicy.RUNTIME)
+ @Repeatable(MethodDescs.class)
+ public @interface MethodDesc {
+ String name();
+ Class<?> declaringClass();
+ MethodKind kind() default MethodKind.ABSTRACT;
+ boolean isGetMethodReturn() default false;
+ }
+
+ @Retention(RetentionPolicy.RUNTIME)
+ public @interface MethodDescs {
+ MethodDesc[] value();
+ }
+
+ public static enum MethodKind {
+ ABSTRACT,
+ CONCRETE,
+ DEFAULT,
+ }
+ // base interfaces
+ interface I { void nonDefault(); }
+ interface J extends I { void nonDefault(); }
+
+ interface Jprim extends I {}
+ interface Jbis extends Jprim { void nonDefault(); }
+
+ // interesting cases
+
+ @MethodDesc(name="nonDefault", declaringClass=Jbis.class,
+ isGetMethodReturn=true)
+ interface P1 extends Jbis {}
+
+ @MethodDesc(name="nonDefault", declaringClass=Jbis.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=I.class)
+ interface P2 extends Jbis, Jprim {}
+
+ @MethodDesc(name="nonDefault", declaringClass=Jbis.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=I.class)
+ interface P3 extends Jbis, Jprim, I {}
+
+ @MethodDesc(name="nonDefault", declaringClass=I.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=J.class)
+ interface P4 extends I, J {}
+
+ @MethodDesc(name="nonDefault", declaringClass=J.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=I.class)
+ interface P5 extends J, I {}
+
+ @MethodDesc(name="nonDefault", declaringClass=J.class,
+ isGetMethodReturn=true)
+ interface K1 extends J {}
+
+ @MethodDesc(name="nonDefault", declaringClass=K1M.class,
+ isGetMethodReturn=true)
+ interface K1M extends J { void nonDefault(); }
+
+ @MethodDesc(name="nonDefault", declaringClass=I.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=J.class)
+ interface K2 extends I, J {}
+
+ @MethodDesc(name="nonDefault", declaringClass=J.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=I.class)
+ interface K2O extends J, I {}
+
+ @MethodDesc(name="nonDefault", declaringClass=K2M.class,
+ isGetMethodReturn=true)
+ interface K2M extends J, I { void nonDefault(); }
+
+ // base interfaces default methods
+ interface L { default void isDefault() {} void nonDefault(); }
+ interface M extends L { default void isDefault() {} void nonDefault(); }
+
+ // test cases default methods
+
+ @MethodDesc(name="nonDefault", declaringClass=M.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="isDefault", declaringClass=M.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ interface N1 extends M {}
+
+ @MethodDesc(name="isDefault", declaringClass=N1D.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=M.class,
+ isGetMethodReturn=true)
+ interface N1D extends M { default void isDefault() {}}
+
+ @MethodDesc(name="nonDefault", declaringClass=N1N.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="isDefault", declaringClass=M.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ interface N1N extends M { void nonDefault(); }
+
+ @MethodDesc(name="isDefault", declaringClass=N1DN.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=N1DN.class,
+ isGetMethodReturn=true)
+ interface N1DN extends M { default void isDefault() {} void nonDefault(); }
+
+ @MethodDesc(name="isDefault", declaringClass=M.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=L.class)
+ @MethodDesc(name="nonDefault", declaringClass=M.class,
+ isGetMethodReturn=true)
+ interface N2 extends M, L {}
+
+ @MethodDesc(name="isDefault", declaringClass=M.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=L.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=M.class)
+ interface N22 extends L, M {}
+
+ @MethodDesc(name="isDefault", declaringClass=N2D.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=L.class)
+ @MethodDesc(name="nonDefault", declaringClass=M.class,
+ isGetMethodReturn=true)
+ interface N2D extends M, L { default void isDefault() {}}
+
+ @MethodDesc(name="isDefault", declaringClass=M.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=N2N.class,
+ isGetMethodReturn=true)
+ interface N2N extends M, L { void nonDefault(); }
+
+ @MethodDesc(name="isDefault", declaringClass=N2DN.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=N2DN.class,
+ isGetMethodReturn=true)
+ interface N2DN extends M, L { default void isDefault() {} void nonDefault(); }
+
+ @MethodDesc(name="isDefault", declaringClass=N2DN.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=L.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=M.class)
+ @MethodDesc(name="nonDefault", declaringClass=N2DN.class)
+ interface O1 extends L, M, N2DN {}
+
+ @MethodDesc(name="isDefault", declaringClass=N2DN.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=L.class)
+ @MethodDesc(name="nonDefault", declaringClass=M.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=N2DN.class)
+ interface O2 extends M, N2DN, L {}
+
+ @MethodDesc(name="isDefault", declaringClass=N2DN.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=L.class)
+ @MethodDesc(name="nonDefault", declaringClass=M.class)
+ @MethodDesc(name="nonDefault", declaringClass=N2DN.class,
+ isGetMethodReturn=true)
+ interface O3 extends N2DN, L, M {}
+
+ @MethodDesc(name="isDefault", declaringClass=N2DN.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=L.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=M.class)
+ @MethodDesc(name="nonDefault", declaringClass=N2DN.class)
+ abstract class C1 implements L, M, N2DN {}
+
+ @MethodDesc(name="isDefault", declaringClass=N2DN.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=L.class)
+ @MethodDesc(name="nonDefault", declaringClass=M.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=N2DN.class)
+ abstract class C2 implements M, N2DN, L {}
+
+ @MethodDesc(name="isDefault", declaringClass=N2DN.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=L.class)
+ @MethodDesc(name="nonDefault", declaringClass=M.class)
+ @MethodDesc(name="nonDefault", declaringClass=N2DN.class,
+ isGetMethodReturn=true)
+ abstract class C3 implements N2DN, L, M {}
+
+ @MethodDesc(name="isDefault", declaringClass=N2DN.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=C4.class,
+ kind=MethodKind.CONCRETE, isGetMethodReturn=true)
+ class C4 implements L, M, N2DN { public void nonDefault() {} }
+
+ @MethodDesc(name="isDefault", declaringClass=N2DN.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=C5.class,
+ kind=MethodKind.CONCRETE, isGetMethodReturn=true)
+ class C5 implements M, N2DN, L { public void nonDefault() {} }
+
+ @MethodDesc(name="isDefault", declaringClass=N2DN.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=C6.class,
+ kind=MethodKind.CONCRETE, isGetMethodReturn=true)
+ class C6 implements N2DN, L, M { public void nonDefault() {} }
+
+ // reabstraction
+
+ @MethodDesc(name="isDefault", declaringClass=R1.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=L.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=M.class)
+ @MethodDesc(name="nonDefault", declaringClass=N2DN.class)
+ interface R1 extends L, M, N2DN { void isDefault(); }
+
+ @MethodDesc(name="isDefault", declaringClass=R2.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=L.class)
+ @MethodDesc(name="nonDefault", declaringClass=M.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=N2DN.class)
+ interface R2 extends M, N2DN, L { void isDefault(); }
+
+ @MethodDesc(name="isDefault", declaringClass=R3.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=L.class)
+ @MethodDesc(name="nonDefault", declaringClass=M.class)
+ @MethodDesc(name="nonDefault", declaringClass=N2DN.class,
+ isGetMethodReturn=true)
+ interface R3 extends N2DN, L, M { void isDefault(); }
+
+ // this one is strange but logical, getMethod finds N2DN first, which is
+ // default but not the most specific
+ @MethodDesc(name="isDefault", declaringClass=N2DN.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ @MethodDesc(name="isDefault", declaringClass=R1.class)
+ @MethodDesc(name="nonDefault", declaringClass=L.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=M.class)
+ @MethodDesc(name="nonDefault", declaringClass=N2DN.class)
+ interface R4 extends L, M, N2DN, R1 {}
+
+ // this one is strange but logical, getMethod finds N2DN first, which is
+ // default but not the most specific
+ @MethodDesc(name="isDefault", declaringClass=N2DN.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ @MethodDesc(name="isDefault", declaringClass=R2.class)
+ @MethodDesc(name="nonDefault", declaringClass=L.class)
+ @MethodDesc(name="nonDefault", declaringClass=M.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=N2DN.class)
+ interface R5 extends M, N2DN, R2, L {}
+
+ // this one is strange but logical, getMethod finds N2DN first, which is
+ // default but not the most specific
+ @MethodDesc(name="isDefault", declaringClass=N2DN.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ @MethodDesc(name="isDefault", declaringClass=R3.class)
+ @MethodDesc(name="nonDefault", declaringClass=L.class)
+ @MethodDesc(name="nonDefault", declaringClass=M.class)
+ @MethodDesc(name="nonDefault", declaringClass=N2DN.class,
+ isGetMethodReturn=true)
+ interface R6 extends N2DN, R3, L, M {}
+
+ // the following three finds the "right" one
+ @MethodDesc(name="isDefault", declaringClass=R1.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="isDefault", declaringClass=N2DN.class,
+ kind=MethodKind.DEFAULT)
+ @MethodDesc(name="nonDefault", declaringClass=L.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=M.class)
+ @MethodDesc(name="nonDefault", declaringClass=N2DN.class)
+ interface R7 extends L, M, R1, N2DN {}
+
+ @MethodDesc(name="isDefault", declaringClass=R2.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="isDefault", declaringClass=N2DN.class,
+ kind=MethodKind.DEFAULT)
+ @MethodDesc(name="nonDefault", declaringClass=L.class)
+ @MethodDesc(name="nonDefault", declaringClass=M.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=N2DN.class)
+ interface R8 extends M, R2, N2DN, L {}
+
+ @MethodDesc(name="isDefault", declaringClass=R3.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="isDefault", declaringClass=N2DN.class,
+ kind=MethodKind.DEFAULT)
+ @MethodDesc(name="nonDefault", declaringClass=L.class)
+ @MethodDesc(name="nonDefault", declaringClass=M.class)
+ @MethodDesc(name="nonDefault", declaringClass=N2DN.class,
+ isGetMethodReturn=true)
+ interface R9 extends R3, N2DN, L, M {}
+
+ // More reabstraction
+ interface Z1 { void z(); }
+ interface Z2 extends Z1 { default void z() {} }
+
+ @MethodDesc(name="z", declaringClass=Z2.class,
+ isGetMethodReturn=true, kind=MethodKind.DEFAULT)
+ interface Z31 extends Z1, Z2 {}
+
+ @MethodDesc(name="z", declaringClass=Z2.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ interface Z32 extends Z2, Z1 {}
+
+ interface Z3 extends Z2, Z1 { void z(); }
+
+ @MethodDesc(name="z", declaringClass=Z2.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ @MethodDesc(name="z", declaringClass=Z3.class)
+ interface Z41 extends Z1, Z2, Z3 { }
+
+ @MethodDesc(name="z", declaringClass=Z2.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ @MethodDesc(name="z", declaringClass=Z3.class)
+ interface Z42 extends Z2, Z3, Z1 { }
+
+ @MethodDesc(name="z", declaringClass=Z3.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="z", declaringClass=Z2.class,
+ kind=MethodKind.DEFAULT)
+ interface Z43 extends Z3, Z1, Z2 { }
+
+ @MethodDesc(name="z", declaringClass=Z2.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ @MethodDesc(name="z", declaringClass=Z3.class)
+ abstract class ZC41 implements Z1, Z2, Z3 { }
+
+ @MethodDesc(name="z", declaringClass=Z2.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ @MethodDesc(name="z", declaringClass=Z3.class)
+ abstract class ZC42 implements Z2, Z3, Z1 { }
+
+ @MethodDesc(name="z", declaringClass=Z3.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="z", declaringClass=Z2.class,
+ kind=MethodKind.DEFAULT)
+ abstract class ZC43 implements Z3, Z1, Z2 { }
+
+ // More reabstraction + concretization
+ interface X1 { default void x() {} }
+ interface X2 extends X1 { void x(); }
+
+ @MethodDesc(name="x", declaringClass=X1.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ @MethodDesc(name="x", declaringClass=X2.class)
+ interface X31 extends X1, X2 {}
+
+ @MethodDesc(name="x", declaringClass=X2.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="x", declaringClass=X1.class,
+ kind=MethodKind.DEFAULT)
+ interface X32 extends X2, X1 {}
+
+ @MethodDesc(name="x", declaringClass=X3.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ interface X3 extends X2, X1 { default void x() {} }
+
+ // order shouldn't matter here
+ @MethodDesc(name="x", declaringClass=X3.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ interface X41 extends X1, X2, X3 { }
+
+ @MethodDesc(name="x", declaringClass=X3.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ interface X42 extends X2, X3, X1 { }
+
+ @MethodDesc(name="x", declaringClass=X3.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ interface X43 extends X3, X1, X2 { }
+
+ // order shouldn't matter here
+ @MethodDesc(name="x", declaringClass=X3.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ abstract class XC41 implements X1, X2, X3 { }
+
+ @MethodDesc(name="x", declaringClass=X3.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ abstract class XC42 implements X2, X3, X1 { }
+
+ @MethodDesc(name="x", declaringClass=X3.class,
+ kind=MethodKind.DEFAULT, isGetMethodReturn=true)
+ abstract class XC43 implements X3, X1, X2 { }
+
+ interface K extends I, J { void nonDefault(); }
+
+ @MethodDesc(name="nonDefault", declaringClass=I.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=J.class)
+ @MethodDesc(name="nonDefault", declaringClass=K.class)
+ abstract class ZZ1 implements I, J, K {}
+
+ @MethodDesc(name="nonDefault", declaringClass=I.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=J.class)
+ @MethodDesc(name="nonDefault", declaringClass=K.class)
+ abstract class ZZ2 extends ZZ1 implements K, I, J {}
+
+ @MethodDesc(name="nonDefault", declaringClass=I.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="nonDefault", declaringClass=J.class)
+ @MethodDesc(name="nonDefault", declaringClass=K.class)
+ abstract class ZZ3 extends ZZ2 implements J, K, I {}
+
+ // bridges
+ interface B1A { Object m(); }
+ interface B1B extends B1A { Map m(); }
+
+ @MethodDesc(name="m", declaringClass=B1C.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="m", declaringClass=B1C.class,
+ kind=MethodKind.DEFAULT)
+ @MethodDesc(name="m", declaringClass=B1C.class,
+ kind=MethodKind.DEFAULT)
+ interface B1C extends B1B { HashMap m(); }
+
+ @MethodDesc(name="m", declaringClass=B2.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="m", declaringClass=B2.class,
+ kind=MethodKind.DEFAULT)
+ @MethodDesc(name="m", declaringClass=B2.class,
+ kind=MethodKind.DEFAULT)
+ interface B2 extends B1C { HashMap m(); }
+
+ @MethodDesc(name="m", declaringClass=B2.class, //HahsMap
+ isGetMethodReturn=true)
+ @MethodDesc(name="m", declaringClass=B2.class, //Map
+ kind=MethodKind.DEFAULT)
+ @MethodDesc(name="m", declaringClass=B2.class, //Object
+ kind=MethodKind.DEFAULT)
+ interface B3A extends B2, B1A {}
+
+ // this one is funny since HashMap isn't a bridge thus not a default
+ @MethodDesc(name="m", declaringClass=B2.class, //HashMap
+ isGetMethodReturn=true)
+ @MethodDesc(name="m", declaringClass=B2.class, //Map
+ kind=MethodKind.DEFAULT)
+ @MethodDesc(name="m", declaringClass=B2.class, //Object
+ kind=MethodKind.DEFAULT)
+ @MethodDesc(name="m", declaringClass=B1C.class) //HashMap
+ interface B3B extends B2, B1C {}
+
+ // same name different params type
+ interface A1 { void m(); void m(int i); void m(int i, int j); }
+ interface A2A extends A1 { void m(); void m(int i); void m(int i, int j); }
+ interface A2B extends A1 { void m(); void m(int i); default void m(int i, int j) {} }
+
+ @MethodDesc(name="m", declaringClass=A1.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="m", declaringClass=A1.class)
+ @MethodDesc(name="m", declaringClass=A1.class)
+ @MethodDesc(name="m", declaringClass=A2A.class)
+ @MethodDesc(name="m", declaringClass=A2A.class)
+ @MethodDesc(name="m", declaringClass=A2A.class)
+ interface A3A extends A1, A2A {}
+
+ @MethodDesc(name="m", declaringClass=A1.class,
+ isGetMethodReturn=true)
+ @MethodDesc(name="m", declaringClass=A1.class)
+ @MethodDesc(name="m", declaringClass=A2B.class)
+ @MethodDesc(name="m", declaringClass=A2B.class)
+ @MethodDesc(name="m", declaringClass=A2B.class,
+ kind=MethodKind.DEFAULT)
+ interface A3B extends A1, A2B {}
+
+ @DataProvider
+ public Object[][] getCases() { return CASES; }
+ public static final Class<?>[][] CASES = {
+ { K1.class },
+ { K1M.class },
+ { K2.class },
+ { K2O.class },
+ { K2M.class },
+
+ { N1.class },
+ { N1D.class },
+ { N1N.class },
+ { N1DN.class },
+
+ { N2.class },
+ { N22.class },
+ { N2D.class },
+ { N2N.class },
+ { N2DN.class },
+
+ { P1.class },
+ { P2.class },
+ { P3.class },
+ { P4.class },
+ { P5.class },
+
+ { O1.class },
+ { O2.class },
+ { O3.class },
+
+ { C1.class },
+ { C2.class },
+ { C3.class },
+
+ { C4.class },
+ { C5.class },
+ { C6.class },
+
+ { R1.class },
+ { R2.class },
+ { R3.class },
+
+ { R4.class },
+ { R5.class },
+ { R6.class },
+
+ { R7.class },
+ { R8.class },
+ { R9.class },
+
+ { Z31.class },
+ { Z32.class },
+
+ { Z41.class },
+ { Z42.class },
+ { Z43.class },
+
+ { ZC41.class },
+ { ZC42.class },
+ { ZC43.class },
+
+ { ZZ1.class },
+ { ZZ2.class },
+ { ZZ3.class },
+
+ { X3.class },
+ { X31.class },
+ { X32.class },
+
+ { X41.class },
+ { X42.class },
+ { X43.class },
+
+ { XC41.class },
+ { XC42.class },
+ { XC43.class },
+
+ { B1C.class },
+ { B2.class },
+ { B3A.class },
+ { B3B.class },
+
+ { A3A.class },
+ { A3B.class },
+ };
+}
diff --git a/test/java/time/tck/java/time/format/TCKDateTimeParseResolver.java b/test/java/time/tck/java/time/format/TCKDateTimeParseResolver.java
index 75b51a380..4ff2f66b0 100644
--- a/test/java/time/tck/java/time/format/TCKDateTimeParseResolver.java
+++ b/test/java/time/tck/java/time/format/TCKDateTimeParseResolver.java
@@ -76,6 +76,7 @@ import static java.time.temporal.ChronoField.EPOCH_DAY;
import static java.time.temporal.ChronoField.ERA;
import static java.time.temporal.ChronoField.HOUR_OF_AMPM;
import static java.time.temporal.ChronoField.HOUR_OF_DAY;
+import static java.time.temporal.ChronoField.INSTANT_SECONDS;
import static java.time.temporal.ChronoField.MICRO_OF_DAY;
import static java.time.temporal.ChronoField.MICRO_OF_SECOND;
import static java.time.temporal.ChronoField.MILLI_OF_DAY;
@@ -93,11 +94,13 @@ import static java.time.temporal.ChronoField.YEAR_OF_ERA;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.fail;
+import java.time.Instant;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.Period;
import java.time.ZoneId;
+import java.time.ZoneOffset;
import java.time.ZonedDateTime;
import java.time.chrono.ChronoLocalDate;
import java.time.chrono.ChronoLocalDateTime;
@@ -1159,4 +1162,102 @@ public class TCKDateTimeParseResolver {
}
};
+ //-------------------------------------------------------------------------
+ // SPEC: ChronoField.INSTANT_SECONDS
+ @Test
+ public void test_parse_fromField_InstantSeconds() {
+ DateTimeFormatter fmt = new DateTimeFormatterBuilder()
+ .appendValue(INSTANT_SECONDS).toFormatter();
+ TemporalAccessor acc = fmt.parse("86402");
+ Instant expected = Instant.ofEpochSecond(86402);
+ assertEquals(acc.isSupported(INSTANT_SECONDS), true);
+ assertEquals(acc.isSupported(NANO_OF_SECOND), true);
+ assertEquals(acc.isSupported(MICRO_OF_SECOND), true);
+ assertEquals(acc.isSupported(MILLI_OF_SECOND), true);
+ assertEquals(acc.getLong(INSTANT_SECONDS), 86402L);
+ assertEquals(acc.getLong(NANO_OF_SECOND), 0L);
+ assertEquals(acc.getLong(MICRO_OF_SECOND), 0L);
+ assertEquals(acc.getLong(MILLI_OF_SECOND), 0L);
+ assertEquals(Instant.from(acc), expected);
+ }
+
+ @Test
+ public void test_parse_fromField_InstantSeconds_NanoOfSecond() {
+ DateTimeFormatter fmt = new DateTimeFormatterBuilder()
+ .appendValue(INSTANT_SECONDS).appendLiteral('.').appendValue(NANO_OF_SECOND).toFormatter();
+ TemporalAccessor acc = fmt.parse("86402.123456789");
+ Instant expected = Instant.ofEpochSecond(86402, 123456789);
+ assertEquals(acc.isSupported(INSTANT_SECONDS), true);
+ assertEquals(acc.isSupported(NANO_OF_SECOND), true);
+ assertEquals(acc.isSupported(MICRO_OF_SECOND), true);
+ assertEquals(acc.isSupported(MILLI_OF_SECOND), true);
+ assertEquals(acc.getLong(INSTANT_SECONDS), 86402L);
+ assertEquals(acc.getLong(NANO_OF_SECOND), 123456789L);
+ assertEquals(acc.getLong(MICRO_OF_SECOND), 123456L);
+ assertEquals(acc.getLong(MILLI_OF_SECOND), 123L);
+ assertEquals(Instant.from(acc), expected);
+ }
+
+ // SPEC: ChronoField.SECOND_OF_DAY
+ @Test
+ public void test_parse_fromField_SecondOfDay() {
+ DateTimeFormatter fmt = new DateTimeFormatterBuilder()
+ .appendValue(SECOND_OF_DAY).toFormatter();
+ TemporalAccessor acc = fmt.parse("864");
+ assertEquals(acc.isSupported(SECOND_OF_DAY), true);
+ assertEquals(acc.isSupported(NANO_OF_SECOND), true);
+ assertEquals(acc.isSupported(MICRO_OF_SECOND), true);
+ assertEquals(acc.isSupported(MILLI_OF_SECOND), true);
+ assertEquals(acc.getLong(SECOND_OF_DAY), 864L);
+ assertEquals(acc.getLong(NANO_OF_SECOND), 0L);
+ assertEquals(acc.getLong(MICRO_OF_SECOND), 0L);
+ assertEquals(acc.getLong(MILLI_OF_SECOND), 0L);
+ }
+
+ @Test
+ public void test_parse_fromField_SecondOfDay_NanoOfSecond() {
+ DateTimeFormatter fmt = new DateTimeFormatterBuilder()
+ .appendValue(SECOND_OF_DAY).appendLiteral('.').appendValue(NANO_OF_SECOND).toFormatter();
+ TemporalAccessor acc = fmt.parse("864.123456789");
+ assertEquals(acc.isSupported(SECOND_OF_DAY), true);
+ assertEquals(acc.isSupported(NANO_OF_SECOND), true);
+ assertEquals(acc.isSupported(MICRO_OF_SECOND), true);
+ assertEquals(acc.isSupported(MILLI_OF_SECOND), true);
+ assertEquals(acc.getLong(SECOND_OF_DAY), 864L);
+ assertEquals(acc.getLong(NANO_OF_SECOND), 123456789L);
+ assertEquals(acc.getLong(MICRO_OF_SECOND), 123456L);
+ assertEquals(acc.getLong(MILLI_OF_SECOND), 123L);
+ }
+
+ // SPEC: ChronoField.SECOND_OF_MINUTE
+ @Test
+ public void test_parse_fromField_SecondOfMinute() {
+ DateTimeFormatter fmt = new DateTimeFormatterBuilder()
+ .appendValue(SECOND_OF_MINUTE).toFormatter();
+ TemporalAccessor acc = fmt.parse("32");
+ assertEquals(acc.isSupported(SECOND_OF_MINUTE), true);
+ assertEquals(acc.isSupported(NANO_OF_SECOND), true);
+ assertEquals(acc.isSupported(MICRO_OF_SECOND), true);
+ assertEquals(acc.isSupported(MILLI_OF_SECOND), true);
+ assertEquals(acc.getLong(SECOND_OF_MINUTE), 32L);
+ assertEquals(acc.getLong(NANO_OF_SECOND), 0L);
+ assertEquals(acc.getLong(MICRO_OF_SECOND), 0L);
+ assertEquals(acc.getLong(MILLI_OF_SECOND), 0L);
+ }
+
+ @Test
+ public void test_parse_fromField_SecondOfMinute_NanoOfSecond() {
+ DateTimeFormatter fmt = new DateTimeFormatterBuilder()
+ .appendValue(SECOND_OF_MINUTE).appendLiteral('.').appendValue(NANO_OF_SECOND).toFormatter();
+ TemporalAccessor acc = fmt.parse("32.123456789");
+ assertEquals(acc.isSupported(SECOND_OF_MINUTE), true);
+ assertEquals(acc.isSupported(NANO_OF_SECOND), true);
+ assertEquals(acc.isSupported(MICRO_OF_SECOND), true);
+ assertEquals(acc.isSupported(MILLI_OF_SECOND), true);
+ assertEquals(acc.getLong(SECOND_OF_MINUTE), 32L);
+ assertEquals(acc.getLong(NANO_OF_SECOND), 123456789L);
+ assertEquals(acc.getLong(MICRO_OF_SECOND), 123456L);
+ assertEquals(acc.getLong(MILLI_OF_SECOND), 123L);
+ }
+
}
diff --git a/test/java/time/test/java/time/format/TestDateTimeParsing.java b/test/java/time/test/java/time/format/TestDateTimeParsing.java
new file mode 100644
index 000000000..589ecdd2f
--- /dev/null
+++ b/test/java/time/test/java/time/format/TestDateTimeParsing.java
@@ -0,0 +1,204 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Copyright (c) 2014, Stephen Colebourne & Michael Nascimento Santos
+ *
+ * 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 JSR-310 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 COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package test.java.time.format;
+
+import static java.time.temporal.ChronoField.EPOCH_DAY;
+import static java.time.temporal.ChronoField.INSTANT_SECONDS;
+import static java.time.temporal.ChronoField.MICRO_OF_SECOND;
+import static java.time.temporal.ChronoField.MILLI_OF_SECOND;
+import static java.time.temporal.ChronoField.NANO_OF_SECOND;
+import static java.time.temporal.ChronoField.OFFSET_SECONDS;
+import static java.time.temporal.ChronoField.SECOND_OF_DAY;
+import static org.testng.Assert.assertEquals;
+
+import java.time.DateTimeException;
+import java.time.Instant;
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.time.ZoneOffset;
+import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeFormatterBuilder;
+import java.time.temporal.TemporalAccessor;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+/**
+ * Test parsing of edge cases.
+ */
+@Test
+public class TestDateTimeParsing {
+
+ private static final ZoneId PARIS = ZoneId.of("Europe/Paris");
+ private static final ZoneOffset OFFSET_0230 = ZoneOffset.ofHoursMinutes(2, 30);
+
+ private static final DateTimeFormatter LOCALFIELDS = new DateTimeFormatterBuilder()
+ .appendPattern("yyyy-MM-dd HH:mm:ss").toFormatter();
+ private static final DateTimeFormatter LOCALFIELDS_ZONEID = new DateTimeFormatterBuilder()
+ .appendPattern("yyyy-MM-dd HH:mm:ss ").appendZoneId().toFormatter();
+ private static final DateTimeFormatter LOCALFIELDS_OFFSETID = new DateTimeFormatterBuilder()
+ .appendPattern("yyyy-MM-dd HH:mm:ss ").appendOffsetId().toFormatter();
+ private static final DateTimeFormatter LOCALFIELDS_WITH_PARIS = LOCALFIELDS.withZone(PARIS);
+ private static final DateTimeFormatter LOCALFIELDS_WITH_0230 = LOCALFIELDS.withZone(OFFSET_0230);
+ private static final DateTimeFormatter INSTANT = new DateTimeFormatterBuilder()
+ .appendInstant().toFormatter();
+ private static final DateTimeFormatter INSTANT_WITH_PARIS = INSTANT.withZone(PARIS);
+ private static final DateTimeFormatter INSTANT_WITH_0230 = INSTANT.withZone(OFFSET_0230);
+ private static final DateTimeFormatter INSTANT_OFFSETID = new DateTimeFormatterBuilder()
+ .appendInstant().appendLiteral(' ').appendOffsetId().toFormatter();
+ private static final DateTimeFormatter INSTANT_OFFSETSECONDS = new DateTimeFormatterBuilder()
+ .appendInstant().appendLiteral(' ').appendValue(OFFSET_SECONDS).toFormatter();
+ private static final DateTimeFormatter INSTANTSECONDS = new DateTimeFormatterBuilder()
+ .appendValue(INSTANT_SECONDS).toFormatter();
+ private static final DateTimeFormatter INSTANTSECONDS_WITH_PARIS = INSTANTSECONDS.withZone(PARIS);
+ private static final DateTimeFormatter INSTANTSECONDS_NOS = new DateTimeFormatterBuilder()
+ .appendValue(INSTANT_SECONDS).appendLiteral('.').appendValue(NANO_OF_SECOND).toFormatter();
+ private static final DateTimeFormatter INSTANTSECONDS_NOS_WITH_PARIS = INSTANTSECONDS_NOS.withZone(PARIS);
+ private static final DateTimeFormatter INSTANTSECONDS_OFFSETSECONDS = new DateTimeFormatterBuilder()
+ .appendValue(INSTANT_SECONDS).appendLiteral(' ').appendValue(OFFSET_SECONDS).toFormatter();
+
+ @DataProvider(name = "instantZones")
+ Object[][] data_instantZones() {
+ return new Object[][] {
+ {LOCALFIELDS_ZONEID, "2014-06-30 01:02:03 Europe/Paris", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, PARIS)},
+ {LOCALFIELDS_ZONEID, "2014-06-30 01:02:03 +02:30", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, OFFSET_0230)},
+ {LOCALFIELDS_OFFSETID, "2014-06-30 01:02:03 +02:30", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, OFFSET_0230)},
+ {LOCALFIELDS_WITH_PARIS, "2014-06-30 01:02:03", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, PARIS)},
+ {LOCALFIELDS_WITH_0230, "2014-06-30 01:02:03", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, OFFSET_0230)},
+ {INSTANT_WITH_PARIS, "2014-06-30T01:02:03Z", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, ZoneOffset.UTC).withZoneSameInstant(PARIS)},
+ {INSTANT_WITH_0230, "2014-06-30T01:02:03Z", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, ZoneOffset.UTC).withZoneSameInstant(OFFSET_0230)},
+ {INSTANT_OFFSETID, "2014-06-30T01:02:03Z +02:30", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, ZoneOffset.UTC).withZoneSameInstant(OFFSET_0230)},
+ {INSTANT_OFFSETSECONDS, "2014-06-30T01:02:03Z 9000", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, ZoneOffset.UTC).withZoneSameInstant(OFFSET_0230)},
+ {INSTANTSECONDS_WITH_PARIS, "86402", Instant.ofEpochSecond(86402).atZone(PARIS)},
+ {INSTANTSECONDS_NOS_WITH_PARIS, "86402.123456789", Instant.ofEpochSecond(86402, 123456789).atZone(PARIS)},
+ {INSTANTSECONDS_OFFSETSECONDS, "86402 9000", Instant.ofEpochSecond(86402).atZone(OFFSET_0230)},
+ };
+ }
+
+ @Test(dataProvider = "instantZones")
+ public void test_parse_instantZones_ZDT(DateTimeFormatter formatter, String text, ZonedDateTime expected) {
+ TemporalAccessor actual = formatter.parse(text);
+ assertEquals(ZonedDateTime.from(actual), expected);
+ }
+
+ @Test(dataProvider = "instantZones")
+ public void test_parse_instantZones_LDT(DateTimeFormatter formatter, String text, ZonedDateTime expected) {
+ TemporalAccessor actual = formatter.parse(text);
+ assertEquals(LocalDateTime.from(actual), expected.toLocalDateTime());
+ }
+
+ @Test(dataProvider = "instantZones")
+ public void test_parse_instantZones_Instant(DateTimeFormatter formatter, String text, ZonedDateTime expected) {
+ TemporalAccessor actual = formatter.parse(text);
+ assertEquals(Instant.from(actual), expected.toInstant());
+ }
+
+ @Test(dataProvider = "instantZones")
+ public void test_parse_instantZones_supported(DateTimeFormatter formatter, String text, ZonedDateTime expected) {
+ TemporalAccessor actual = formatter.parse(text);
+ assertEquals(actual.isSupported(INSTANT_SECONDS), true);
+ assertEquals(actual.isSupported(EPOCH_DAY), true);
+ assertEquals(actual.isSupported(SECOND_OF_DAY), true);
+ assertEquals(actual.isSupported(NANO_OF_SECOND), true);
+ assertEquals(actual.isSupported(MICRO_OF_SECOND), true);
+ assertEquals(actual.isSupported(MILLI_OF_SECOND), true);
+ }
+
+ //-----------------------------------------------------------------------
+ @DataProvider(name = "instantNoZone")
+ Object[][] data_instantNoZone() {
+ return new Object[][] {
+ {INSTANT, "2014-06-30T01:02:03Z", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, ZoneOffset.UTC).toInstant()},
+ {INSTANTSECONDS, "86402", Instant.ofEpochSecond(86402)},
+ {INSTANTSECONDS_NOS, "86402.123456789", Instant.ofEpochSecond(86402, 123456789)},
+ };
+ }
+
+ @Test(dataProvider = "instantNoZone", expectedExceptions = DateTimeException.class)
+ public void test_parse_instantNoZone_ZDT(DateTimeFormatter formatter, String text, Instant expected) {
+ TemporalAccessor actual = formatter.parse(text);
+ ZonedDateTime.from(actual);
+ }
+
+ @Test(dataProvider = "instantNoZone", expectedExceptions = DateTimeException.class)
+ public void test_parse_instantNoZone_LDT(DateTimeFormatter formatter, String text, Instant expected) {
+ TemporalAccessor actual = formatter.parse(text);
+ LocalDateTime.from(actual);
+ }
+
+ @Test(dataProvider = "instantNoZone")
+ public void test_parse_instantNoZone_Instant(DateTimeFormatter formatter, String text, Instant expected) {
+ TemporalAccessor actual = formatter.parse(text);
+ assertEquals(Instant.from(actual), expected);
+ }
+
+ @Test(dataProvider = "instantNoZone")
+ public void test_parse_instantNoZone_supported(DateTimeFormatter formatter, String text, Instant expected) {
+ TemporalAccessor actual = formatter.parse(text);
+ assertEquals(actual.isSupported(INSTANT_SECONDS), true);
+ assertEquals(actual.isSupported(EPOCH_DAY), false);
+ assertEquals(actual.isSupported(SECOND_OF_DAY), false);
+ assertEquals(actual.isSupported(NANO_OF_SECOND), true);
+ assertEquals(actual.isSupported(MICRO_OF_SECOND), true);
+ assertEquals(actual.isSupported(MILLI_OF_SECOND), true);
+ }
+
+}
diff --git a/test/java/time/test/java/time/temporal/TestIsoWeekFields.java b/test/java/time/test/java/time/temporal/TestIsoWeekFields.java
new file mode 100644
index 000000000..d79d13f89
--- /dev/null
+++ b/test/java/time/test/java/time/temporal/TestIsoWeekFields.java
@@ -0,0 +1,280 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package test.java.time.temporal;
+
+import static java.time.temporal.ChronoField.DAY_OF_WEEK;
+import static org.testng.Assert.assertEquals;
+
+import java.time.LocalDate;
+import java.time.LocalTime;
+import java.time.MonthDay;
+import java.time.OffsetDateTime;
+import java.time.Year;
+import java.time.chrono.ThaiBuddhistDate;
+import java.time.temporal.ChronoUnit;
+import java.time.temporal.IsoFields;
+import java.time.temporal.TemporalField;
+import java.time.temporal.ValueRange;
+import java.time.temporal.WeekFields;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+/**
+ * Test.
+ */
+@Test
+public class TestIsoWeekFields {
+
+ @DataProvider(name = "fields")
+ Object[][] data_Fields() {
+ return new Object[][] {
+ {IsoFields.WEEK_OF_WEEK_BASED_YEAR, IsoFields.WEEK_BASED_YEAR},
+ {WeekFields.ISO.weekOfWeekBasedYear(), WeekFields.ISO.weekBasedYear()},
+ };
+ }
+
+ //-----------------------------------------------------------------------
+ // WEEK_OF_WEEK_BASED_YEAR
+ //-----------------------------------------------------------------------
+ @Test(dataProvider = "fields")
+ public void test_WOWBY_basics(TemporalField weekField, TemporalField yearField) {
+ assertEquals(weekField.isDateBased(), true);
+ assertEquals(weekField.isTimeBased(), false);
+ assertEquals(weekField.getBaseUnit(), ChronoUnit.WEEKS);
+ assertEquals(weekField.getRangeUnit(), IsoFields.WEEK_BASED_YEARS);
+ }
+
+ @Test(dataProvider = "fields")
+ public void test_WOWBY_isSupportedBy(TemporalField weekField, TemporalField yearField) {
+ assertEquals(weekField.isSupportedBy(LocalTime.NOON), false);
+ assertEquals(weekField.isSupportedBy(MonthDay.of(2, 1)), false);
+ assertEquals(weekField.isSupportedBy(LocalDate.MIN), true);
+ assertEquals(weekField.isSupportedBy(OffsetDateTime.MAX), true);
+ }
+
+ @Test
+ public void test_WOWBY_isSupportedBy_fieldsDiffer() {
+ assertEquals(IsoFields.WEEK_OF_WEEK_BASED_YEAR.isSupportedBy(ThaiBuddhistDate.now()), false);
+ assertEquals(WeekFields.ISO.weekOfWeekBasedYear().isSupportedBy(ThaiBuddhistDate.now()), true);
+ }
+
+ @Test(dataProvider = "fields")
+ public void test_WOWBY_range(TemporalField weekField, TemporalField yearField) {
+ assertEquals(weekField.range(), ValueRange.of(1, 52, 53));
+ }
+
+ @Test(dataProvider = "fields")
+ public void test_WOWBY_rangeRefinedBy(TemporalField weekField, TemporalField yearField) {
+ assertEquals(weekField.rangeRefinedBy(LocalDate.of(2012, 12, 31)), ValueRange.of(1, 52));
+ assertEquals(weekField.rangeRefinedBy(LocalDate.of(2013, 12, 29)), ValueRange.of(1, 52));
+ assertEquals(weekField.rangeRefinedBy(LocalDate.of(2013, 12, 30)), ValueRange.of(1, 52));
+ assertEquals(weekField.rangeRefinedBy(LocalDate.of(2014, 12, 28)), ValueRange.of(1, 52));
+ assertEquals(weekField.rangeRefinedBy(LocalDate.of(2014, 12, 29)), ValueRange.of(1, 53));
+ assertEquals(weekField.rangeRefinedBy(LocalDate.of(2016, 1, 3)), ValueRange.of(1, 53));
+ assertEquals(weekField.rangeRefinedBy(LocalDate.of(2016, 1, 4)), ValueRange.of(1, 52));
+ }
+
+ //-----------------------------------------------------------------------
+ // WEEK_BASED_YEAR
+ //-----------------------------------------------------------------------
+ @Test(dataProvider = "fields")
+ public void test_WBY_basics(TemporalField weekField, TemporalField yearField) {
+ assertEquals(yearField.isDateBased(), true);
+ assertEquals(yearField.isTimeBased(), false);
+ assertEquals(yearField.getBaseUnit(), IsoFields.WEEK_BASED_YEARS);
+ assertEquals(yearField.getRangeUnit(), ChronoUnit.FOREVER);
+ }
+
+ @Test(dataProvider = "fields")
+ public void test_WBY_isSupportedBy(TemporalField weekField, TemporalField yearField) {
+ assertEquals(yearField.isSupportedBy(LocalTime.NOON), false);
+ assertEquals(yearField.isSupportedBy(MonthDay.of(2, 1)), false);
+ assertEquals(yearField.isSupportedBy(LocalDate.MIN), true);
+ assertEquals(yearField.isSupportedBy(OffsetDateTime.MAX), true);
+ }
+
+ @Test
+ public void test_WBY_isSupportedBy_ISO() {
+ assertEquals(IsoFields.WEEK_BASED_YEAR.isSupportedBy(ThaiBuddhistDate.now()), false);
+ }
+
+ @Test(dataProvider = "fields")
+ public void test_WBY_range(TemporalField weekField, TemporalField yearField) {
+ assertEquals(yearField.range(), ValueRange.of(Year.MIN_VALUE, Year.MAX_VALUE));
+ }
+
+ @Test(dataProvider = "fields")
+ public void test_WBY_rangeRefinedBy(TemporalField weekField, TemporalField yearField) {
+ assertEquals(yearField.rangeRefinedBy(LocalDate.of(2012, 12, 31)), ValueRange.of(Year.MIN_VALUE, Year.MAX_VALUE));
+ }
+
+ //-----------------------------------------------------------------------
+ @Test(dataProvider = "fields")
+ public void test_getFrom(TemporalField weekField, TemporalField yearField) {
+ // tests every day from 2011 to 2016 inclusive
+ LocalDate date = LocalDate.of(2011, 1, 3);
+ int wby = 2011;
+ int week = 1;
+ int dow = 1;
+ for (int i = 1; i <= ((52 + 52 + 52 + 52 + 53 + 52) * 7); i++) {
+ assertEquals(yearField.getFrom(date), wby);
+ assertEquals(weekField.getFrom(date), week);
+ assertEquals(DAY_OF_WEEK.getFrom(date), dow);
+ if (dow == 7) {
+ dow = 1;
+ week++;
+ } else {
+ dow++;
+ }
+ if (week > wbyLen(wby)) {
+ week = 1;
+ wby++;
+ }
+ date = date.plusDays(1);
+ }
+ assertEquals(yearField.getFrom(date), 2017);
+ assertEquals(weekField.getFrom(date), 1);
+ assertEquals(DAY_OF_WEEK.getFrom(date), 1);
+ }
+
+ @Test(dataProvider = "fields")
+ public void test_adjustInto_dow(TemporalField weekField, TemporalField yearField) {
+ // tests every day from 2012 to 2016 inclusive
+ LocalDate date = LocalDate.of(2012, 1, 2);
+ int wby = 2012;
+ int week = 1;
+ int dow = 1;
+ for (int i = 1; i <= ((52 + 52 + 52 + 53 + 52) * 7); i++) {
+ for (int j = 1; j <= 7; j++) {
+ LocalDate adjusted = DAY_OF_WEEK.adjustInto(date, j);
+ assertEquals(adjusted.get(DAY_OF_WEEK), j);
+ assertEquals(adjusted.get(weekField), week);
+ assertEquals(adjusted.get(yearField), wby);
+ }
+ if (dow == 7) {
+ dow = 1;
+ week++;
+ } else {
+ dow++;
+ }
+ if (week > wbyLen(wby)) {
+ week = 1;
+ wby++;
+ }
+ date = date.plusDays(1);
+ }
+ }
+
+ @Test(dataProvider = "fields")
+ public void test_adjustInto_week(TemporalField weekField, TemporalField yearField) {
+ // tests every day from 2012 to 2016 inclusive
+ LocalDate date = LocalDate.of(2012, 1, 2);
+ int wby = 2012;
+ int week = 1;
+ int dow = 1;
+ for (int i = 1; i <= ((52 + 52 + 52 + 53 + 52) * 7); i++) {
+ int weeksInYear = (wby == 2015 ? 53 : 52);
+ for (int j = 1; j <= weeksInYear; j++) {
+ LocalDate adjusted = weekField.adjustInto(date, j);
+ assertEquals(adjusted.get(weekField), j);
+ assertEquals(adjusted.get(DAY_OF_WEEK), dow);
+ assertEquals(adjusted.get(yearField), wby);
+ }
+ if (dow == 7) {
+ dow = 1;
+ week++;
+ } else {
+ dow++;
+ }
+ if (week > wbyLen(wby)) {
+ week = 1;
+ wby++;
+ }
+ date = date.plusDays(1);
+ }
+ }
+
+ @Test(dataProvider = "fields")
+ public void test_adjustInto_wby(TemporalField weekField, TemporalField yearField) {
+ // tests every day from 2012 to 2016 inclusive
+ LocalDate date = LocalDate.of(2012, 1, 2);
+ int wby = 2012;
+ int week = 1;
+ int dow = 1;
+ for (int i = 1; i <= ((52 + 52 + 52 + 53 + 52) * 7); i++) {
+ for (int j = 2004; j <= 2015; j++) {
+ LocalDate adjusted = yearField.adjustInto(date, j);
+ assertEquals(adjusted.get(yearField), j);
+ assertEquals(adjusted.get(DAY_OF_WEEK), dow);
+ assertEquals(adjusted.get(weekField), (week == 53 && wbyLen(j) == 52 ? 52 : week), "" + date + " " + adjusted);
+ }
+ if (dow == 7) {
+ dow = 1;
+ week++;
+ } else {
+ dow++;
+ }
+ if (week > wbyLen(wby)) {
+ week = 1;
+ wby++;
+ }
+ date = date.plusDays(1);
+ }
+ }
+
+ @Test(dataProvider = "fields")
+ public void test_addTo_weekBasedYears(TemporalField weekField, TemporalField yearField) {
+ // tests every day from 2012 to 2016 inclusive
+ LocalDate date = LocalDate.of(2012, 1, 2);
+ int wby = 2012;
+ int week = 1;
+ int dow = 1;
+ for (int i = 1; i <= ((52 + 52 + 52 + 53 + 52) * 7); i++) {
+ for (int j = -5; j <= 5; j++) {
+ LocalDate adjusted = IsoFields.WEEK_BASED_YEARS.addTo(date, j);
+ assertEquals(adjusted.get(yearField), wby + j);
+ assertEquals(adjusted.get(DAY_OF_WEEK), dow);
+ assertEquals(adjusted.get(weekField), (week == 53 && wbyLen(wby + j) == 52 ? 52 : week), "" + date + " " + adjusted);
+ }
+ if (dow == 7) {
+ dow = 1;
+ week++;
+ } else {
+ dow++;
+ }
+ if (week > wbyLen(wby)) {
+ week = 1;
+ wby++;
+ }
+ date = date.plusDays(1);
+ }
+ }
+
+ private int wbyLen(int wby) {
+ return (wby == 2004 || wby == 2009 || wby == 2015 || wby == 2020 ? 53 : 52);
+ }
+
+}
diff --git a/test/java/util/HashMap/PutNullKey.java b/test/java/util/HashMap/PutNullKey.java
new file mode 100644
index 000000000..72aade001
--- /dev/null
+++ b/test/java/util/HashMap/PutNullKey.java
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8046085
+ * @summary Ensure that when trees are being used for collisions that null key
+ * insertion still works.
+ */
+
+import java.util.*;
+import java.util.stream.IntStream;
+
+public class PutNullKey {
+
+ // Initial capacity of map
+ // Should be >= the map capacity for treeifying, see HashMap/ConcurrentMap.MIN_TREEIFY_CAPACITY
+ static final int INITIAL_CAPACITY = 64;
+
+ // Maximum size of map
+ // Should be > the treeify threshold, see HashMap/ConcurrentMap.TREEIFY_THRESHOLD
+ static final int SIZE = 256;
+
+ // Load factor of map
+ // A value 1.0 will ensure that a new threshold == capacity
+ static final float LOAD_FACTOR = 1.0f;
+
+ public static class CollidingHash implements Comparable<CollidingHash> {
+
+ private final int value;
+
+ public CollidingHash(int value) {
+ this.value = value;
+ }
+
+ @Override
+ public int hashCode() {
+ // intentionally bad hashcode. Force into first bin.
+ return 0;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (null == o) {
+ return false;
+ }
+
+ if (o.getClass() != CollidingHash.class) {
+ return false;
+ }
+
+ return value == ((CollidingHash) o).value;
+ }
+
+ @Override
+ public int compareTo(CollidingHash o) {
+ return value - o.value;
+ }
+ }
+
+ public static void main(String[] args) throws Exception {
+ Map<Object,Object> m = new HashMap<>(INITIAL_CAPACITY, LOAD_FACTOR);
+ IntStream.range(0, SIZE)
+ .mapToObj(CollidingHash::new)
+ .forEach(e -> { m.put(e, e); });
+
+ // kaboom?
+ m.put(null, null);
+ }
+}
diff --git a/test/javax/swing/JComboBox/8019180/Test8019180.java b/test/javax/swing/JComboBox/8019180/Test8019180.java
new file mode 100644
index 000000000..d089f998e
--- /dev/null
+++ b/test/javax/swing/JComboBox/8019180/Test8019180.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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.
+ */
+
+import java.util.concurrent.CountDownLatch;
+import javax.swing.JComboBox;
+import javax.swing.JFrame;
+import javax.swing.SwingUtilities;
+
+/*
+ * @test
+ * @bug 8019180
+ * @summary Tests that combobox works if it is used as action listener
+ * @author Sergey Malenkov
+ */
+
+public class Test8019180 implements Runnable {
+ private static final CountDownLatch LATCH = new CountDownLatch(1);
+ private static final String[] ITEMS = {"First", "Second", "Third", "Fourth"};
+
+ public static void main(String[] args) throws InterruptedException {
+ SwingUtilities.invokeLater(new Test8019180());
+ LATCH.await();
+ }
+
+ private JComboBox<String> test;
+
+ @Override
+ public void run() {
+ if (this.test == null) {
+ this.test = new JComboBox<>(ITEMS);
+ this.test.addActionListener(this.test);
+ JFrame frame = new JFrame();
+ frame.add(test);
+ frame.pack();
+ frame.setVisible(true);
+ SwingUtilities.invokeLater(this);
+ } else {
+ int index = this.test.getSelectedIndex();
+ this.test.setSelectedIndex(1 + index);
+ if (0 > this.test.getSelectedIndex()) {
+ System.err.println("ERROR: no selection");
+ System.exit(8019180);
+ }
+ SwingUtilities.getWindowAncestor(this.test).dispose();
+ LATCH.countDown();
+ }
+ }
+}
diff --git a/test/javax/swing/JDialog/WrongBackgroundColor/WrongBackgroundColor.java b/test/javax/swing/JDialog/WrongBackgroundColor/WrongBackgroundColor.java
new file mode 100644
index 000000000..63b6e71cb
--- /dev/null
+++ b/test/javax/swing/JDialog/WrongBackgroundColor/WrongBackgroundColor.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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.
+ */
+
+import java.awt.Color;
+import java.lang.reflect.InvocationTargetException;
+
+import javax.swing.JDialog;
+import javax.swing.JFrame;
+import javax.swing.SwingUtilities;
+import javax.swing.UIDefaults;
+import javax.swing.UIManager;
+import javax.swing.plaf.ColorUIResource;
+
+/**
+ * @test
+ * @bug 8033786
+ * @summary JDialog should update background color of the native peer.
+ * @author Sergey Bylokhov
+ */
+public final class WrongBackgroundColor {
+
+ public static void main(final String[] args)
+ throws InvocationTargetException, InterruptedException {
+ SwingUtilities.invokeAndWait(() -> {
+ UIDefaults ui = UIManager.getDefaults();
+ ui.put("control", new ColorUIResource(54, 54, 54));
+ final JDialog dialog = new JDialog();
+ final JFrame frame = new JFrame();
+ frame.pack();
+ dialog.pack();
+ final Color dialogBackground = dialog.getBackground();
+ final Color frameBackground = frame.getBackground();
+ frame.dispose();
+ dialog.dispose();
+ if (!dialogBackground.equals(frameBackground)) {
+ System.err.println("Expected:" + frameBackground);
+ System.err.println("Actual:" + dialogBackground);
+ throw new RuntimeException("Wrong background color");
+ }
+ });
+ }
+}
diff --git a/test/javax/swing/JFrame/HangNonVolatileBuffer/HangNonVolatileBuffer.java b/test/javax/swing/JFrame/HangNonVolatileBuffer/HangNonVolatileBuffer.java
new file mode 100644
index 000000000..c61be1cb0
--- /dev/null
+++ b/test/javax/swing/JFrame/HangNonVolatileBuffer/HangNonVolatileBuffer.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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.
+ */
+
+import java.lang.reflect.InvocationTargetException;
+
+import javax.swing.JFrame;
+import javax.swing.SwingUtilities;
+
+/**
+ * @test
+ * @bug 8029455
+ * @summary Swing should not hang if non-volatile image is used as a backbuffer.
+ * @run main/othervm -Dswing.volatileImageBufferEnabled=false HangNonVolatileBuffer
+ */
+public final class HangNonVolatileBuffer {
+
+ private static JFrame f;
+
+ public static void main(final String[] args)
+ throws InvocationTargetException, InterruptedException {
+ SwingUtilities.invokeAndWait(() -> {
+ f = new JFrame("JFrame");
+ f.setSize(300, 300);
+ f.setLocationRelativeTo(null);
+ f.setVisible(true);
+ });
+ SwingUtilities.invokeAndWait(() -> {
+ // flush the EDT
+ });
+ Thread.sleep(1000);
+ SwingUtilities.invokeAndWait(f::dispose);
+ }
+}
diff --git a/test/javax/swing/JTabbedPane/8007563/Test8007563.java b/test/javax/swing/JTabbedPane/8007563/Test8007563.java
new file mode 100644
index 000000000..5f73173df
--- /dev/null
+++ b/test/javax/swing/JTabbedPane/8007563/Test8007563.java
@@ -0,0 +1,124 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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.
+ */
+
+import java.awt.Color;
+import java.awt.Point;
+import java.awt.Robot;
+import java.util.ArrayList;
+import java.util.concurrent.CountDownLatch;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JTabbedPane;
+
+import static javax.swing.UIManager.*;
+import static javax.swing.SwingUtilities.*;
+
+/*
+ * @test
+ * @bug 8007563
+ * @summary Tests JTabbedPane background
+ * @author Sergey Malenkov
+ */
+
+public class Test8007563 implements Runnable {
+ private static final ArrayList<String> LIST = new ArrayList<>();
+ private static final LookAndFeelInfo[] INFO = getInstalledLookAndFeels();
+ private static final CountDownLatch LATCH = new CountDownLatch(INFO.length);
+ private static Robot ROBOT;
+
+ public static void main(String[] args) throws Exception {
+ ROBOT = new Robot();
+ invokeLater(new Test8007563());
+ LATCH.await();
+ if (!LIST.isEmpty()) {
+ throw new Error(LIST.toString());
+ }
+ }
+
+ private static void addOpaqueError(boolean opaque) {
+ LIST.add(getLookAndFeel().getName() + " opaque=" + opaque);
+ }
+
+ private static boolean updateLookAndFeel() {
+ int index = (int) LATCH.getCount() - 1;
+ if (index >= 0) {
+ try {
+ LookAndFeelInfo info = INFO[index];
+ System.err.println("L&F: " + info.getName());
+ setLookAndFeel(info.getClassName());
+ return true;
+ } catch (Exception exception) {
+ exception.printStackTrace();
+ }
+ }
+ return false;
+ }
+
+ private JFrame frame;
+ private JTabbedPane pane;
+
+ public void run() {
+ if (this.frame == null) {
+ if (!updateLookAndFeel()) {
+ return;
+ }
+ this.pane = new JTabbedPane();
+ this.pane.setOpaque(false);
+ this.pane.setBackground(Color.RED);
+ for (int i = 0; i < 3; i++) {
+ this.pane.addTab("Tab " + i, new JLabel("Content area " + i));
+ }
+ this.frame = new JFrame(getClass().getSimpleName());
+ this.frame.getContentPane().setBackground(Color.BLUE);
+ this.frame.add(this.pane);
+ this.frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
+ this.frame.setSize(400, 200);
+ this.frame.setLocationRelativeTo(null);
+ this.frame.setVisible(true);
+ } else {
+ Point point = new Point(this.pane.getWidth() - 2, 2);
+ convertPointToScreen(point, this.pane);
+ Color actual = ROBOT.getPixelColor(point.x, point.y);
+
+ boolean opaque = this.pane.isOpaque();
+ Color expected = opaque
+ ? this.pane.getBackground()
+ : this.frame.getContentPane().getBackground();
+
+ if (!expected.equals(actual)){
+ addOpaqueError(opaque);
+ }
+ if (!opaque) {
+ this.pane.setOpaque(true);
+ this.pane.repaint();
+ } else {
+ this.frame.dispose();
+ this.frame = null;
+ this.pane = null;
+ LATCH.countDown();
+ }
+
+ }
+ invokeLater(this);
+ }
+}
diff --git a/test/javax/xml/ws/8043129/MailTest.java b/test/javax/xml/ws/8043129/MailTest.java
new file mode 100644
index 000000000..3d32a7d4d
--- /dev/null
+++ b/test/javax/xml/ws/8043129/MailTest.java
@@ -0,0 +1,148 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8043129
+ * @summary JAF initialisation in SAAJ clashing with the one in javax.mail
+ * @author mkos
+ * @library javax.mail.jar
+ * @build MailTest
+ * @run main MailTest
+ */
+
+import javax.activation.CommandMap;
+import javax.activation.MailcapCommandMap;
+import javax.mail.BodyPart;
+import javax.mail.Message;
+import javax.mail.MessagingException;
+import javax.mail.Multipart;
+import javax.mail.Session;
+import javax.mail.internet.InternetAddress;
+import javax.mail.internet.MimeBodyPart;
+import javax.mail.internet.MimeMessage;
+import javax.mail.internet.MimeMultipart;
+import javax.xml.soap.AttachmentPart;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.Properties;
+
+public class MailTest {
+
+ String host = null;
+ String user = "";
+ String password = null;
+ String from = null;
+ String to = null;
+
+ public static void main(String[] args) {
+ MailTest t = new MailTest();
+
+ t.user = "somebody@somewhere.com";
+ t.from = "somebody@somewhere.com";
+ t.to = "somebody@somewhere.com";
+
+ t.user = "somebody@somewhere.com";
+ t.password = "somepassword";
+ t.host = "somehost";
+
+ t.sendMail(); //this works
+
+ t.addSoapAttachement();
+ t.sendMail(); //after addAttachmentPart to soapmessage it do not work
+
+ // workaroundJAFSetup();
+ // t.sendMail(); //after workaround works again
+ }
+
+ void addSoapAttachement() {
+ try {
+ MessageFactory messageFactory = MessageFactory.newInstance();
+ SOAPMessage message = messageFactory.createMessage();
+ AttachmentPart a = message.createAttachmentPart();
+ a.setContentType("binary/octet-stream");
+ message.addAttachmentPart(a);
+ } catch (SOAPException e) {
+ e.printStackTrace();
+ }
+ }
+
+ void sendMail() {
+
+ try {
+ Properties props = new Properties();
+ props.put("mail.smtp.host", host);
+ props.put("mail.smtp.auth", "true");
+
+ Session session = Session.getInstance(props);
+ session.setDebug(true);
+
+ // Define message
+ MimeMessage message = new MimeMessage(session);
+ message.setFrom(new InternetAddress(from));
+ message.addRecipients(Message.RecipientType.TO, to);
+ message.setSubject("this is a multipart test");
+
+ Multipart multipart = new MimeMultipart();
+
+ BodyPart messageBodyPart1 = new MimeBodyPart();
+ messageBodyPart1.setText("please send also this Content\n ciao!");
+ multipart.addBodyPart(messageBodyPart1);
+
+ BodyPart messageBodyPart2 = new MimeBodyPart();
+ messageBodyPart2.setContent("<b>please</b> send also this Content <br>ciao!", "text/html; charset=UTF-8");
+ multipart.addBodyPart(messageBodyPart2);
+
+ message.setContent(multipart);
+
+ /*
+ Transport tr = session.getTransport("smtp");
+ tr.connect(host,user, password);
+ tr.sendMessage(message,InternetAddress.parse(to));
+ tr.close();
+ */
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ message.writeTo(baos);
+ String output = baos.toString();
+ System.out.println("output = " + output);
+ if (output.contains("also this Content")) {
+ System.out.println("Test PASSED.");
+ } else {
+ System.out.println("Test FAILED, missing content.");
+ throw new IllegalStateException("Test FAILED, missing content.");
+ }
+ } catch (MessagingException ignored) {
+ } catch (IOException ignored) {
+ }
+ }
+
+ // this is how the error can be worked around ...
+ static void workaroundJAFSetup() {
+ MailcapCommandMap mailMap = (MailcapCommandMap) CommandMap.getDefaultCommandMap();
+ mailMap.addMailcap("multipart/mixed;;x-java-content-handler=com.sun.mail.handlers.multipart_mixed");
+ }
+}
diff --git a/test/javax/xml/ws/8043129/javax.mail.jar b/test/javax/xml/ws/8043129/javax.mail.jar
new file mode 100644
index 000000000..7da28712d
--- /dev/null
+++ b/test/javax/xml/ws/8043129/javax.mail.jar
Binary files differ
diff --git a/test/jdk/net/Sockets/Test.java b/test/jdk/net/Sockets/Test.java
index 81ed76a95..53adafd8d 100644
--- a/test/jdk/net/Sockets/Test.java
+++ b/test/jdk/net/Sockets/Test.java
@@ -30,8 +30,10 @@
*/
import java.net.*;
+import java.io.IOException;
import java.nio.channels.*;
import java.util.concurrent.*;
+import java.util.Set;
import jdk.net.*;
public class Test {
@@ -75,6 +77,16 @@ public class Test {
DatagramSocket dg = new DatagramSocket(0);
final int udp_port = dg.getLocalPort();
+ // If option not available, end test
+ Set<SocketOption<?>> options = Sockets.supportedOptions(
+ DatagramSocket.class
+ );
+
+ if (!options.contains(ExtendedSocketOptions.SO_FLOW_SLA)) {
+ System.out.println("SO_FLOW_SLA not supported");
+ return;
+ }
+
final Socket s = new Socket("127.0.0.1", tcp_port);
final SocketChannel sc = SocketChannel.open();
sc.connect (new InetSocketAddress("127.0.0.1", tcp_port));
@@ -149,6 +161,13 @@ public class Test {
if (success) {
throw new RuntimeException("Test failed");
}
- } catch (UnsupportedOperationException e) {}
+ } catch (UnsupportedOperationException e) {
+ System.out.println (e);
+ } catch (IOException e) {
+ // Probably a permission error, but we're not
+ // going to check unless a specific permission exception
+ // is defined.
+ System.out.println (e);
+ }
}
}
diff --git a/test/sun/security/krb5/auto/AddressesAndNameType.java b/test/sun/security/krb5/auto/AddressesAndNameType.java
new file mode 100644
index 000000000..de0dc8949
--- /dev/null
+++ b/test/sun/security/krb5/auto/AddressesAndNameType.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 4501327 4868379 8039132
+ * @run main/othervm AddressesAndNameType 1
+ * @run main/othervm AddressesAndNameType 2
+ * @run main/othervm AddressesAndNameType 3
+ * @summary noaddresses settings and server name type
+ */
+
+import java.net.InetAddress;
+import java.util.Set;
+import sun.security.krb5.Config;
+
+import javax.security.auth.kerberos.KerberosPrincipal;
+import javax.security.auth.kerberos.KerberosTicket;
+
+public class AddressesAndNameType {
+
+ public static void main(String[] args)
+ throws Exception {
+
+ OneKDC kdc = new OneKDC(null);
+ kdc.writeJAASConf();
+
+ String extraLine;
+ switch (args[0]) {
+ case "1": extraLine = "noaddresses = false"; break;
+ case "2": extraLine = "noaddresses = true"; break;
+ default: extraLine = ""; break;
+ }
+
+ KDC.saveConfig(OneKDC.KRB5_CONF, kdc,
+ extraLine);
+ Config.refresh();
+
+ Context c = Context.fromUserPass(OneKDC.USER, OneKDC.PASS, false);
+ Set<KerberosTicket> tickets =
+ c.s().getPrivateCredentials(KerberosTicket.class);
+
+ if (tickets.isEmpty()) throw new Exception();
+ KerberosTicket ticket = tickets.iterator().next();
+ InetAddress[] addresses = ticket.getClientAddresses();
+
+ switch (args[0]) {
+ case "1":
+ if (addresses == null || addresses.length == 0) {
+ throw new Exception("No addresses");
+ }
+ if (ticket.getServer().getNameType()
+ != KerberosPrincipal.KRB_NT_SRV_INST) {
+ throw new Exception(
+ "Wrong type: " + ticket.getServer().getNameType());
+ }
+ break;
+ default:
+ if (addresses != null && addresses.length != 0) {
+ throw new Exception("See addresses");
+ }
+ break;
+ }
+ }
+}
diff --git a/test/sun/security/krb5/auto/KDC.java b/test/sun/security/krb5/auto/KDC.java
index 356f84e98..686e23857 100644
--- a/test/sun/security/krb5/auto/KDC.java
+++ b/test/sun/security/krb5/auto/KDC.java
@@ -141,6 +141,8 @@ public class KDC {
private BlockingQueue<Job> q = new ArrayBlockingQueue<>(100);
// Options
private Map<Option,Object> options = new HashMap<>();
+ // Realm-specific krb5.conf settings
+ private List<String> conf = new ArrayList<>();
private Thread thread1, thread2, thread3;
DatagramSocket u1 = null;
@@ -243,7 +245,7 @@ public class KDC {
/**
* Sets an option
* @param key the option name
- * @param obj the value
+ * @param value the value
*/
public void setOption(Option key, Object value) {
if (value == null) {
@@ -373,6 +375,13 @@ public class KDC {
}
/**
+ * Add realm-specific krb5.conf setting
+ */
+ public void addConf(String s) {
+ conf.add(s);
+ }
+
+ /**
* Writes a krb5.conf for one or more KDC that includes KDC locations for
* each realm and the default realm name. You can also add extra strings
* into the file. The method should be called like:
@@ -397,6 +406,7 @@ public class KDC {
* [realms]
* REALM.NAME = {
* kdc = host:port_number
+ * # realm-specific settings
* }
* </pre>
*
@@ -444,10 +454,10 @@ public class KDC {
}
}
sb.append("\n[realms]\n");
- sb.append(realmLineForKDC(kdc));
+ sb.append(kdc.realmLine());
for (Object o: more) {
if (o instanceof KDC) {
- sb.append(realmLineForKDC((KDC)o));
+ sb.append(((KDC)o).realmLine());
}
}
FileOutputStream fos = new FileOutputStream(f);
@@ -1133,14 +1143,16 @@ public class KDC {
/**
* Generates a line for a KDC to put inside [realms] of krb5.conf
- * @param kdc the KDC
- * @return REALM.NAME = { kdc = host:port }
+ * @return REALM.NAME = { kdc = host:port etc }
*/
- private static String realmLineForKDC(KDC kdc) {
- return String.format("%s = {\n kdc = %s:%d\n}\n",
- kdc.realm,
- kdc.kdc,
- kdc.port);
+ private String realmLine() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(realm).append(" = {\n kdc = ")
+ .append(kdc).append(':').append(port).append('\n');
+ for (String s: conf) {
+ sb.append(" ").append(s).append('\n');
+ }
+ return sb.append("}\n").toString();
}
/**
diff --git a/test/sun/security/krb5/auto/UdpTcp.java b/test/sun/security/krb5/auto/UdpTcp.java
new file mode 100644
index 000000000..ae54b7935
--- /dev/null
+++ b/test/sun/security/krb5/auto/UdpTcp.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 4966382 8039132
+ * @run main/othervm UdpTcp UDP
+ * @run main/othervm UdpTcp TCP
+ * @summary udp or tcp
+ */
+
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+import sun.security.krb5.Config;
+
+public class UdpTcp {
+
+ public static void main(String[] args)
+ throws Exception {
+
+ System.setProperty("sun.security.krb5.debug", "true");
+
+ OneKDC kdc = new OneKDC(null);
+ kdc.writeJAASConf();
+
+ // Two styles of kdc_timeout setting. One global, one realm-specific.
+ if (args[0].equals("UDP")) {
+ KDC.saveConfig(OneKDC.KRB5_CONF, kdc,
+ "kdc_timeout = 10s");
+ } else {
+ kdc.addConf("kdc_timeout = 10s");
+ KDC.saveConfig(OneKDC.KRB5_CONF, kdc,
+ "udp_preference_limit = 1");
+ }
+ Config.refresh();
+
+ ByteArrayOutputStream bo = new ByteArrayOutputStream();
+ PrintStream oldout = System.out;
+ System.setOut(new PrintStream(bo));
+ Context.fromUserPass(OneKDC.USER, OneKDC.PASS, false);
+ System.setOut(oldout);
+
+ for (String line: new String(bo.toByteArray()).split("\n")) {
+ if (line.contains(">>> KDCCommunication")) {
+ if (!line.contains(args[0]) || !line.contains("timeout=10000")) {
+ throw new Exception("No " + args[0] + " in: " + line);
+ }
+ }
+ }
+ }
+}
diff --git a/test/sun/security/krb5/etype/UnsupportedKeyType.java b/test/sun/security/krb5/etype/UnsupportedKeyType.java
new file mode 100644
index 000000000..c54a73d95
--- /dev/null
+++ b/test/sun/security/krb5/etype/UnsupportedKeyType.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 5006629
+ * @summary Kerberos library should only select keys of types that it supports
+ */
+
+import javax.security.auth.kerberos.KerberosPrincipal;
+import javax.security.auth.kerberos.KeyTab;
+import java.io.File;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+public class UnsupportedKeyType {
+
+ // Homemade keytab files:
+ //
+ // String KVNO Timestamp Principal (etype)
+ // -------- ---- -------------- -----------------------
+ // camellia 4 4/3/14 9:58 AM u1@K1 (25:camellia128-cts-cmac)
+ // aes 5 4/3/14 9:58 AM u1@K1 (17:aes128-cts-hmac-sha1-96)
+
+ static String aes =
+ "050200000027000100024b310002753100000001533cc04f0500110010e0eab6" +
+ "7f31608df2b2f8fffc6b21cc91";
+ static String camellia =
+ "050200000027000100024b310002753100000001533cc03e0400190010d88678" +
+ "14e478b6b7d2d97375163b971e";
+
+ public static void main(String[] args) throws Exception {
+
+ byte[] data = new byte[aes.length()/2];
+ KerberosPrincipal kp = new KerberosPrincipal("u1@K1");
+
+ // aes128
+ for (int i=0; i<data.length; i++) {
+ data[i] = Integer.valueOf(
+ aes.substring(2*i,2*i+2), 16).byteValue();
+ }
+ Files.write(Paths.get("aes"), data);
+ if(KeyTab.getInstance(kp, new File("aes")).getKeys(kp).length == 0) {
+ throw new Exception("AES key not read");
+ }
+
+ // camellia128
+ for (int i=0; i<data.length; i++) {
+ data[i] = Integer.valueOf(
+ camellia.substring(2*i,2*i+2), 16).byteValue();
+ }
+ Files.write(Paths.get("camellia"), data);
+ if(KeyTab.getInstance(kp, new File("camellia")).getKeys(kp).length != 0) {
+ throw new Exception("Unknown key read");
+ }
+ }
+}
diff --git a/test/sun/security/pkcs11/KeyStore/SecretKeysBasic.java b/test/sun/security/pkcs11/KeyStore/SecretKeysBasic.java
index 42d46555c..4f80a59d2 100644
--- a/test/sun/security/pkcs11/KeyStore/SecretKeysBasic.java
+++ b/test/sun/security/pkcs11/KeyStore/SecretKeysBasic.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -139,6 +139,13 @@ public class SecretKeysBasic extends PKCS11Test {
}
private static void doTest() throws Exception {
+ // Make sure both NSS libraries are the same version.
+ if (isNSS(provider) &&
+ (getLibsoftokn3Version() != getLibnss3Version())) {
+ System.out.println("libsoftokn3 and libnss3 versions do not match. Aborting test...");
+ return;
+ }
+
if (ks == null) {
ks = KeyStore.getInstance(KS_TYPE, provider);
ks.load(null, tokenPwd);
diff --git a/test/sun/security/pkcs11/PKCS11Test.java b/test/sun/security/pkcs11/PKCS11Test.java
index 3699f8804..ca836f032 100644
--- a/test/sun/security/pkcs11/PKCS11Test.java
+++ b/test/sun/security/pkcs11/PKCS11Test.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -66,6 +66,11 @@ public abstract class PKCS11Test {
// The other is "libnss3.so", listed as "nss3".
static String nss_library = "softokn3";
+ // NSS versions of each library. It is simplier to keep nss_version
+ // for quick checking for generic testing than many if-else statements.
+ static double softoken3_version = -1;
+ static double nss3_version = -1;
+
static Provider getSunPKCS11(String config) throws Exception {
Class clazz = Class.forName("sun.security.pkcs11.SunPKCS11");
Constructor cons = clazz.getConstructor(new Class[] {String.class});
@@ -175,6 +180,10 @@ public abstract class PKCS11Test {
}
public static String getNSSLibDir() throws Exception {
+ return getNSSLibDir(nss_library);
+ }
+
+ static String getNSSLibDir(String library) throws Exception {
Properties props = System.getProperties();
String osName = props.getProperty("os.name");
if (osName.startsWith("Win")) {
@@ -195,7 +204,7 @@ public abstract class PKCS11Test {
String nssLibDir = null;
for (String dir : nssLibDirs) {
if (new File(dir).exists() &&
- new File(dir + System.mapLibraryName(nss_library)).exists()) {
+ new File(dir + System.mapLibraryName(library)).exists()) {
nssLibDir = dir;
System.setProperty("pkcs11test.nss.libdir", nssLibDir);
break;
@@ -241,16 +250,37 @@ public abstract class PKCS11Test {
return nss_ecc_status;
}
+ public static double getLibsoftokn3Version() {
+ if (softoken3_version == -1)
+ return getNSSInfo("softokn3");
+ return softoken3_version;
+ }
+
+ public static double getLibnss3Version() {
+ if (nss3_version == -1)
+ return getNSSInfo("nss3");
+ return nss3_version;
+ }
+
/* Read the library to find out the verison */
static void getNSSInfo() {
+ getNSSInfo(nss_library);
+ }
+
+ static double getNSSInfo(String library) {
String nssHeader = "$Header: NSS";
boolean found = false;
String s = null;
int i = 0;
String libfile = "";
+ if (library.compareTo("softokn3") == 0 && softoken3_version > -1)
+ return softoken3_version;
+ if (library.compareTo("nss3") == 0 && nss3_version > -1)
+ return nss3_version;
+
try {
- libfile = getNSSLibDir() + System.mapLibraryName(nss_library);
+ libfile = getNSSLibDir() + System.mapLibraryName(library);
FileInputStream is = new FileInputStream(libfile);
byte[] data = new byte[1000];
int read = 0;
@@ -284,9 +314,10 @@ public abstract class PKCS11Test {
}
if (!found) {
- System.out.println("NSS version not found, set to 0.0: "+libfile);
+ System.out.println("lib" + library +
+ " version not found, set to 0.0: " + libfile);
nss_version = 0.0;
- return;
+ return nss_version;
}
// the index after whitespace after nssHeader
@@ -306,11 +337,12 @@ public abstract class PKCS11Test {
try {
nss_version = Double.parseDouble(version);
} catch (NumberFormatException e) {
- System.out.println("Failed to parse NSS version. Set to 0.0");
+ System.out.println("Failed to parse lib" + library +
+ " version. Set to 0.0");
e.printStackTrace();
}
- System.out.print("NSS version = "+version+". ");
+ System.out.print("lib" + library + " version = "+version+". ");
// Check for ECC
if (s.indexOf("Basic") > 0) {
@@ -319,7 +351,17 @@ public abstract class PKCS11Test {
} else if (s.indexOf("Extended") > 0) {
nss_ecc_status = ECCState.Extended;
System.out.println("ECC Extended.");
+ } else {
+ System.out.println("ECC None.");
}
+
+ if (library.compareTo("softokn3") == 0) {
+ softoken3_version = nss_version;
+ } else if (library.compareTo("nss3") == 0) {
+ nss3_version = nss_version;
+ }
+
+ return nss_version;
}
// Used to set the nss_library file to search for libsoftokn3.so
@@ -457,7 +499,7 @@ public abstract class PKCS11Test {
osMap.put("SunOS-x86-32", new String[]{"/usr/lib/mps/"});
osMap.put("SunOS-amd64-64", new String[]{"/usr/lib/mps/64/"});
osMap.put("Linux-i386-32", new String[]{
- "/usr/lib/i386-linux-gnu/", "/usr/lib/"});
+ "/usr/lib/i386-linux-gnu/", "/usr/lib32/", "/usr/lib/"});
osMap.put("Linux-amd64-64", new String[]{
"/usr/lib/x86_64-linux-gnu/", "/usr/lib/x86_64-linux-gnu/nss/",
"/usr/lib64/"});
diff --git a/test/sun/security/pkcs11/nss/lib/windows-amd64/freebl3.chk b/test/sun/security/pkcs11/nss/lib/windows-amd64/freebl3.chk
index f661c20fe..7ea34d02d 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-amd64/freebl3.chk
+++ b/test/sun/security/pkcs11/nss/lib/windows-amd64/freebl3.chk
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-amd64/freebl3.dll b/test/sun/security/pkcs11/nss/lib/windows-amd64/freebl3.dll
index 0532e8f67..6c03f7d54 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-amd64/freebl3.dll
+++ b/test/sun/security/pkcs11/nss/lib/windows-amd64/freebl3.dll
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-amd64/libnspr4.dll b/test/sun/security/pkcs11/nss/lib/windows-amd64/libnspr4.dll
index b33221e90..fc573be7d 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-amd64/libnspr4.dll
+++ b/test/sun/security/pkcs11/nss/lib/windows-amd64/libnspr4.dll
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-amd64/libnspr4.lib b/test/sun/security/pkcs11/nss/lib/windows-amd64/libnspr4.lib
index 829407c7b..64aa29695 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-amd64/libnspr4.lib
+++ b/test/sun/security/pkcs11/nss/lib/windows-amd64/libnspr4.lib
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-amd64/libplc4.dll b/test/sun/security/pkcs11/nss/lib/windows-amd64/libplc4.dll
index dbf13dafa..519c80e3e 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-amd64/libplc4.dll
+++ b/test/sun/security/pkcs11/nss/lib/windows-amd64/libplc4.dll
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-amd64/libplc4.lib b/test/sun/security/pkcs11/nss/lib/windows-amd64/libplc4.lib
index 145179e60..1df6f28c3 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-amd64/libplc4.lib
+++ b/test/sun/security/pkcs11/nss/lib/windows-amd64/libplc4.lib
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-amd64/libplds4.dll b/test/sun/security/pkcs11/nss/lib/windows-amd64/libplds4.dll
index 6d44edb67..dc56672cb 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-amd64/libplds4.dll
+++ b/test/sun/security/pkcs11/nss/lib/windows-amd64/libplds4.dll
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-amd64/libplds4.lib b/test/sun/security/pkcs11/nss/lib/windows-amd64/libplds4.lib
index 9c552e436..b424eefcc 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-amd64/libplds4.lib
+++ b/test/sun/security/pkcs11/nss/lib/windows-amd64/libplds4.lib
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-amd64/nss3.dll b/test/sun/security/pkcs11/nss/lib/windows-amd64/nss3.dll
index 67423e79c..67f06d47b 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-amd64/nss3.dll
+++ b/test/sun/security/pkcs11/nss/lib/windows-amd64/nss3.dll
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-amd64/nss3.lib b/test/sun/security/pkcs11/nss/lib/windows-amd64/nss3.lib
index a3bb1af1a..c73d3efa1 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-amd64/nss3.lib
+++ b/test/sun/security/pkcs11/nss/lib/windows-amd64/nss3.lib
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-amd64/nssckbi.dll b/test/sun/security/pkcs11/nss/lib/windows-amd64/nssckbi.dll
index 273bee642..28c84743a 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-amd64/nssckbi.dll
+++ b/test/sun/security/pkcs11/nss/lib/windows-amd64/nssckbi.dll
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-amd64/nssdbm3.chk b/test/sun/security/pkcs11/nss/lib/windows-amd64/nssdbm3.chk
index 4c91f8af3..e8e9b94fb 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-amd64/nssdbm3.chk
+++ b/test/sun/security/pkcs11/nss/lib/windows-amd64/nssdbm3.chk
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-amd64/nssdbm3.dll b/test/sun/security/pkcs11/nss/lib/windows-amd64/nssdbm3.dll
index e0e93a79c..f1a722cd9 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-amd64/nssdbm3.dll
+++ b/test/sun/security/pkcs11/nss/lib/windows-amd64/nssdbm3.dll
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-amd64/nssutil3.dll b/test/sun/security/pkcs11/nss/lib/windows-amd64/nssutil3.dll
index 55b12f1f6..3eeca26f2 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-amd64/nssutil3.dll
+++ b/test/sun/security/pkcs11/nss/lib/windows-amd64/nssutil3.dll
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-amd64/nssutil3.lib b/test/sun/security/pkcs11/nss/lib/windows-amd64/nssutil3.lib
index 3fee97a2e..9f6ea2dee 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-amd64/nssutil3.lib
+++ b/test/sun/security/pkcs11/nss/lib/windows-amd64/nssutil3.lib
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-amd64/softokn3.chk b/test/sun/security/pkcs11/nss/lib/windows-amd64/softokn3.chk
index 5e80c45c5..f002c3468 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-amd64/softokn3.chk
+++ b/test/sun/security/pkcs11/nss/lib/windows-amd64/softokn3.chk
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-amd64/softokn3.dll b/test/sun/security/pkcs11/nss/lib/windows-amd64/softokn3.dll
index f489b0109..6293c7d1f 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-amd64/softokn3.dll
+++ b/test/sun/security/pkcs11/nss/lib/windows-amd64/softokn3.dll
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-amd64/sqlite3.dll b/test/sun/security/pkcs11/nss/lib/windows-amd64/sqlite3.dll
index 72e3b2f39..18c8fca90 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-amd64/sqlite3.dll
+++ b/test/sun/security/pkcs11/nss/lib/windows-amd64/sqlite3.dll
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-amd64/ssl3.dll b/test/sun/security/pkcs11/nss/lib/windows-amd64/ssl3.dll
index 372fa2e2c..5e06d337e 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-amd64/ssl3.dll
+++ b/test/sun/security/pkcs11/nss/lib/windows-amd64/ssl3.dll
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-amd64/ssl3.lib b/test/sun/security/pkcs11/nss/lib/windows-amd64/ssl3.lib
index 811f6abca..21e83def6 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-amd64/ssl3.lib
+++ b/test/sun/security/pkcs11/nss/lib/windows-amd64/ssl3.lib
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-i586/freebl3.chk b/test/sun/security/pkcs11/nss/lib/windows-i586/freebl3.chk
index 3059a8e99..7f4e14757 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-i586/freebl3.chk
+++ b/test/sun/security/pkcs11/nss/lib/windows-i586/freebl3.chk
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-i586/freebl3.dll b/test/sun/security/pkcs11/nss/lib/windows-i586/freebl3.dll
index 8b393ac62..eea9e978e 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-i586/freebl3.dll
+++ b/test/sun/security/pkcs11/nss/lib/windows-i586/freebl3.dll
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-i586/libnspr4.dll b/test/sun/security/pkcs11/nss/lib/windows-i586/libnspr4.dll
index 1bbbeb90c..f073dc911 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-i586/libnspr4.dll
+++ b/test/sun/security/pkcs11/nss/lib/windows-i586/libnspr4.dll
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-i586/libnspr4.lib b/test/sun/security/pkcs11/nss/lib/windows-i586/libnspr4.lib
index 912c5cde6..7351a9ebc 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-i586/libnspr4.lib
+++ b/test/sun/security/pkcs11/nss/lib/windows-i586/libnspr4.lib
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-i586/libplc4.dll b/test/sun/security/pkcs11/nss/lib/windows-i586/libplc4.dll
index ca184553e..0e74aec02 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-i586/libplc4.dll
+++ b/test/sun/security/pkcs11/nss/lib/windows-i586/libplc4.dll
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-i586/libplc4.lib b/test/sun/security/pkcs11/nss/lib/windows-i586/libplc4.lib
index 2125d3d32..cff555e38 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-i586/libplc4.lib
+++ b/test/sun/security/pkcs11/nss/lib/windows-i586/libplc4.lib
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-i586/libplds4.dll b/test/sun/security/pkcs11/nss/lib/windows-i586/libplds4.dll
index b529a679d..3247b9297 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-i586/libplds4.dll
+++ b/test/sun/security/pkcs11/nss/lib/windows-i586/libplds4.dll
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-i586/libplds4.lib b/test/sun/security/pkcs11/nss/lib/windows-i586/libplds4.lib
index 33f42622f..876979f64 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-i586/libplds4.lib
+++ b/test/sun/security/pkcs11/nss/lib/windows-i586/libplds4.lib
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-i586/nss3.dll b/test/sun/security/pkcs11/nss/lib/windows-i586/nss3.dll
index a496bd308..0411891b6 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-i586/nss3.dll
+++ b/test/sun/security/pkcs11/nss/lib/windows-i586/nss3.dll
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-i586/nss3.lib b/test/sun/security/pkcs11/nss/lib/windows-i586/nss3.lib
index 602542698..1d8272ff1 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-i586/nss3.lib
+++ b/test/sun/security/pkcs11/nss/lib/windows-i586/nss3.lib
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-i586/nssckbi.dll b/test/sun/security/pkcs11/nss/lib/windows-i586/nssckbi.dll
index 0d42ee245..123a8bf65 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-i586/nssckbi.dll
+++ b/test/sun/security/pkcs11/nss/lib/windows-i586/nssckbi.dll
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-i586/nssdbm3.chk b/test/sun/security/pkcs11/nss/lib/windows-i586/nssdbm3.chk
index 7aaa0c022..bc51e4069 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-i586/nssdbm3.chk
+++ b/test/sun/security/pkcs11/nss/lib/windows-i586/nssdbm3.chk
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-i586/nssdbm3.dll b/test/sun/security/pkcs11/nss/lib/windows-i586/nssdbm3.dll
index 343d8037c..0572b4ecf 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-i586/nssdbm3.dll
+++ b/test/sun/security/pkcs11/nss/lib/windows-i586/nssdbm3.dll
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-i586/nssutil3.dll b/test/sun/security/pkcs11/nss/lib/windows-i586/nssutil3.dll
index 3b73a1811..f4dba08ee 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-i586/nssutil3.dll
+++ b/test/sun/security/pkcs11/nss/lib/windows-i586/nssutil3.dll
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-i586/nssutil3.lib b/test/sun/security/pkcs11/nss/lib/windows-i586/nssutil3.lib
index 397bd3e6c..7cd24f33f 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-i586/nssutil3.lib
+++ b/test/sun/security/pkcs11/nss/lib/windows-i586/nssutil3.lib
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-i586/softokn3.chk b/test/sun/security/pkcs11/nss/lib/windows-i586/softokn3.chk
index ab0a78508..84ea2e2d5 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-i586/softokn3.chk
+++ b/test/sun/security/pkcs11/nss/lib/windows-i586/softokn3.chk
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-i586/softokn3.dll b/test/sun/security/pkcs11/nss/lib/windows-i586/softokn3.dll
index 735b38f1e..615e7c0a1 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-i586/softokn3.dll
+++ b/test/sun/security/pkcs11/nss/lib/windows-i586/softokn3.dll
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-i586/sqlite3.dll b/test/sun/security/pkcs11/nss/lib/windows-i586/sqlite3.dll
index 4530107d3..9a130aa56 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-i586/sqlite3.dll
+++ b/test/sun/security/pkcs11/nss/lib/windows-i586/sqlite3.dll
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-i586/ssl3.dll b/test/sun/security/pkcs11/nss/lib/windows-i586/ssl3.dll
index e9961ca1a..41f962ae8 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-i586/ssl3.dll
+++ b/test/sun/security/pkcs11/nss/lib/windows-i586/ssl3.dll
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/lib/windows-i586/ssl3.lib b/test/sun/security/pkcs11/nss/lib/windows-i586/ssl3.lib
index 7383dee32..72400591d 100644
--- a/test/sun/security/pkcs11/nss/lib/windows-i586/ssl3.lib
+++ b/test/sun/security/pkcs11/nss/lib/windows-i586/ssl3.lib
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/src/MD5SUMS b/test/sun/security/pkcs11/nss/src/MD5SUMS
deleted file mode 100644
index 5ca246935..000000000
--- a/test/sun/security/pkcs11/nss/src/MD5SUMS
+++ /dev/null
@@ -1 +0,0 @@
-1390c8a35c667e05e542 nss-3.13.1.tar.gz
diff --git a/test/sun/security/pkcs11/nss/src/SHA1SUMS b/test/sun/security/pkcs11/nss/src/SHA1SUMS
deleted file mode 100644
index 1381f4e83..000000000
--- a/test/sun/security/pkcs11/nss/src/SHA1SUMS
+++ /dev/null
@@ -1 +0,0 @@
-d8e7ee9f9f1e0bfa2ea8b72d25727634fea130a6 nss-3.13.1.tar.gz
diff --git a/test/sun/security/pkcs11/nss/src/nss-3.13.1.tar.gz b/test/sun/security/pkcs11/nss/src/nss-3.13.1.tar.gz
deleted file mode 100644
index 14ebb669e..000000000
--- a/test/sun/security/pkcs11/nss/src/nss-3.13.1.tar.gz
+++ /dev/null
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/src/nss-3.16_nspr-4.10_src.tar.gz b/test/sun/security/pkcs11/nss/src/nss-3.16_nspr-4.10_src.tar.gz
new file mode 100644
index 000000000..092735474
--- /dev/null
+++ b/test/sun/security/pkcs11/nss/src/nss-3.16_nspr-4.10_src.tar.gz
Binary files differ
diff --git a/test/sun/security/pkcs11/nss/src/nss-3.16_nspr-4.10_src.tar.gz.sha256 b/test/sun/security/pkcs11/nss/src/nss-3.16_nspr-4.10_src.tar.gz.sha256
new file mode 100644
index 000000000..6ea9a98fe
--- /dev/null
+++ b/test/sun/security/pkcs11/nss/src/nss-3.16_nspr-4.10_src.tar.gz.sha256
@@ -0,0 +1 @@
+d2374795528f9cf36de07bf7c77d8c8414bb5b4da12ee7c78a57ec90d68e3706 nss-3.16_nspr-4.10_src.tar.gz
diff --git a/test/sun/security/tools/jarsigner/certpolicy.sh b/test/sun/security/tools/jarsigner/certpolicy.sh
new file mode 100644
index 000000000..20cf92b16
--- /dev/null
+++ b/test/sun/security/tools/jarsigner/certpolicy.sh
@@ -0,0 +1,80 @@
+#
+# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# 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 8036709
+# @summary Java 7 jarsigner displays warning about cert policy tree
+#
+# @run shell certpolicy.sh
+#
+
+if [ "${TESTJAVA}" = "" ] ; then
+ JAVAC_CMD=`which javac`
+ TESTJAVA=`dirname $JAVAC_CMD`/..
+fi
+
+KT="$TESTJAVA/bin/keytool $TESTTOOLVMOPTS \
+ -keypass changeit -storepass changeit -keystore ks -keyalg rsa"
+JS="$TESTJAVA/bin/jarsigner $TESTTOOLVMOPTS -storepass changeit -keystore ks"
+JAR="$TESTJAVA/bin/jar $TESTTOOLVMOPTS"
+
+rm ks 2> /dev/null
+$KT -genkeypair -alias ca -dname CN=CA -ext bc
+$KT -genkeypair -alias int -dname CN=Int
+$KT -genkeypair -alias ee -dname CN=EE
+
+# CertificatePolicies [[PolicyId: [1.2.3]], [PolicyId: [1.2.4]]]
+# PolicyConstraints: [Require: 0; Inhibit: unspecified]
+$KT -certreq -alias int | \
+ $KT -gencert -rfc -alias ca \
+ -ext 2.5.29.32="30 0C 30 04 06 02 2A 03 30 04 06 02 2A 04" \
+ -ext "2.5.29.36=30 03 80 01 00" -ext bc | \
+ $KT -import -alias int
+
+# CertificatePolicies [[PolicyId: [1.2.3]]]
+$KT -certreq -alias ee | \
+ $KT -gencert -rfc -alias int \
+ -ext 2.5.29.32="30 06 30 04 06 02 2A 03" | \
+ $KT -import -alias ee
+
+$KT -export -alias ee -rfc > cc
+$KT -export -alias int -rfc >> cc
+$KT -export -alias ca -rfc >> cc
+
+$KT -delete -alias int
+
+ERR=''
+$JAR cvf a.jar cc
+
+# Make sure the certchain in the signed jar contains all 3 certs
+$JS -strict -certchain cc a.jar ee -debug || ERR="sign"
+$JS -strict -verify a.jar -debug || ERR="$ERR verify"
+
+if [ "$ERR" = "" ]; then
+ echo "Success"
+ exit 0
+else
+ echo "Failed: $ERR"
+ exit 1
+fi
+
diff --git a/test/sun/security/tools/keytool/autotest.sh b/test/sun/security/tools/keytool/autotest.sh
index 0d8e57ce6..7e38ba2bb 100644
--- a/test/sun/security/tools/keytool/autotest.sh
+++ b/test/sun/security/tools/keytool/autotest.sh
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -72,6 +72,8 @@ case "$OS" in
Linux )
if [ $B32 = true ]; then
LIBNAME=`find_one \
+ "/usr/lib32/libsoftokn3.so" \
+ "/usr/lib32/nss/libsoftokn3.so" \
"/usr/lib/libsoftokn3.so" \
"/usr/lib/i386-linux-gnu/nss/libsoftokn3.so" \
"/usr/lib/nss/libsoftokn3.so"`
diff --git a/test/sun/security/tools/policytool/i18n.sh b/test/sun/security/tools/policytool/i18n.sh
index 35dfccfbc..d0a1d0ec6 100644
--- a/test/sun/security/tools/policytool/i18n.sh
+++ b/test/sun/security/tools/policytool/i18n.sh
@@ -77,7 +77,7 @@ echo "HELLO!"
echo "Checking for $HOME/.java.policy"
# 8015274
-if [ -e $HOME/.java.policy ]; then
+if [ -f $HOME/.java.policy ]; then
echo "You have a .java.policy file in your HOME directory"
echo "The file must be removed before running this test"
exit 1
diff --git a/test/sun/text/resources/Format/Bug8037343.java b/test/sun/text/resources/Format/Bug8037343.java
new file mode 100644
index 000000000..80735f742
--- /dev/null
+++ b/test/sun/text/resources/Format/Bug8037343.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8037343
+ * @summary updating dateformat for es_DO
+ */
+
+import java.text.DateFormat;
+import java.util.Calendar;
+import java.util.Locale;
+
+public class Bug8037343
+{
+
+ public static void main(String[] arg)
+ {
+ final Locale esDO = new Locale("es", "DO");
+ final String expectedShort = "31/03/12";
+ final String expectedMedium = "31/03/2012";
+
+ int errors = 0;
+ DateFormat format;
+ String result;
+
+ Calendar cal = Calendar.getInstance(esDO);
+ cal.set(Calendar.DAY_OF_MONTH, 31);
+ cal.set(Calendar.MONTH, Calendar.MARCH);
+ cal.set(Calendar.YEAR, 2012);
+
+ format = DateFormat.getDateInstance(DateFormat.SHORT, esDO);
+ result = format.format(cal.getTime());
+ if (!expectedShort.equals(result)) {
+ System.out.println(String.format("Short Date format for es_DO is not as expected. Expected: [%s] Actual: [%s]", expectedShort, result));
+ errors++;
+ }
+
+ format = DateFormat.getDateInstance(DateFormat.MEDIUM, esDO);
+ result = format.format(cal.getTime());
+ if (!expectedMedium.equals(result)) {
+ System.out.println(String.format("Medium Date format for es_DO is not as expected. Expected: [%s] Actual: [%s]", expectedMedium, result));
+ errors++;
+ }
+
+ if (errors > 0) {
+ throw new RuntimeException();
+ }
+ }
+
+}
diff --git a/test/sun/text/resources/LocaleData b/test/sun/text/resources/LocaleData
index c015be51f..9365989c2 100644
--- a/test/sun/text/resources/LocaleData
+++ b/test/sun/text/resources/LocaleData
@@ -483,8 +483,8 @@ FormatData/es_DO/TimePatterns/2=hh:mm:ss a
FormatData/es_DO/TimePatterns/3=hh:mm a
FormatData/es_DO/DatePatterns/0=EEEE d' de 'MMMM' de 'yyyy
FormatData/es_DO/DatePatterns/1=d' de 'MMMM' de 'yyyy
-FormatData/es_DO/DatePatterns/2=MM/dd/yyyy
-FormatData/es_DO/DatePatterns/3=MM/dd/yy
+# FormatData/es_DO/DatePatterns/2=MM/dd/yyyy # Changed: see bug 8037343
+# FormatData/es_DO/DatePatterns/3=MM/dd/yy # Changed: see bug 8037343
FormatData/es_DO/DateTimePatterns/0={1} {0}
FormatData/es_DO/NumberElements/0=.
FormatData/es_DO/NumberElements/1=,
@@ -7695,3 +7695,7 @@ FormatData/es_EC/TimePatterns/0=HH:mm:ss zzzz
FormatData/es_EC/TimePatterns/1=H:mm:ss z
FormatData/es_EC/TimePatterns/2=H:mm:ss
FormatData/es_EC/TimePatterns/3=H:mm
+
+# bug 8037343
+FormatData/es_DO/DatePatterns/2=dd/MM/yyyy
+FormatData/es_DO/DatePatterns/3=dd/MM/yy
diff --git a/test/sun/text/resources/LocaleDataTest.java b/test/sun/text/resources/LocaleDataTest.java
index 7381bb61d..e7245e655 100644
--- a/test/sun/text/resources/LocaleDataTest.java
+++ b/test/sun/text/resources/LocaleDataTest.java
@@ -36,7 +36,7 @@
* 6919624 6998391 7019267 7020960 7025837 7020583 7036905 7066203 7101495
* 7003124 7085757 7028073 7171028 7189611 8000983 7195759 8004489 8006509
* 7114053 7074882 7040556 8013836 8021121 6192407 6931564 8027695 7090826
- * 8017142
+ * 8017142 8037343
* @summary Verify locale data
*
*/