The Java Tutorials have been written for JDK 8.Java教程是为JDK 8编写的。Examples and practices described in this page don't take advantage of improvements introduced in later releases and might use technology no longer available.本页中描述的示例和实践没有利用后续版本中引入的改进,并且可能使用不再可用的技术。See Java Language Changes for a summary of updated language features in Java SE 9 and subsequent releases.有关Java SE 9及其后续版本中更新的语言特性的摘要,请参阅Java语言更改。
See JDK Release Notes for information about new features, enhancements, and removed or deprecated options for all JDK releases.有关所有JDK版本的新功能、增强功能以及已删除或不推荐的选项的信息,请参阅JDK发行说明。
Internet Protocol version 4 (IPv4) has long been the industry standard version of the Internet Protocol (IP) for delivering data over the Internet. Internet Protocol version 6 (IPv6) is the next generation Internet layer protocol. Both versions of IP are in use today.
IPv4 addresses are 32-bits long, written in decimal format, and separated by periods. IPv6 addresses are 128-bits long, written in hexadecimal format, and separated by colons. IPv4 addresses cannot be used as is in IPv6, but IPv6 does support a special class of addresses: the IPv4-mapped address. In an IPv4-mapped address, the first 80 bits are set to zero, the next 16 bits are set to 1, and the last 32 bits represent the IPv4 address.
For example, here is the same IP address expressed in both formats:
IPv4 address IPv4-mapped address (for use in IPv6) 192.0.2.1 ::ffff:192.0.2.1
By default, if IPv6 is enabled on any of the IB adaptors, the Java platform uses IPv6. However, IPv4-mapped addresses are not currently available in the Solaris OS or under Linux. For this reason, if you want to use the IPv4 address format under JDK 7, you must specify the java.net.preferIPv4Stack
property, as shown in this example:
% java -Dcom.sun.sdp.conf=sdp.conf -Djava.net.preferIPv4Stack=true MyApplication
A few bugs were found in the early InfiniBand implementation. These bugs are fixed in the Solaris 10 10/09 release. Make sure that you are using at least this release.