Aug 11 2011

JAVA 7 第一次装

Category: 技术ssmax @ 17:12:25

Oracle 收购java以后貌似一直都没啥大动作,今天帮服务器装jdk,上去发现java 7已经是推荐版本了,下载了一个试试看

rpm包就一个 jdk-7-linux-i586.rpm



>java -version
java version “1.7.0”
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) Client VM (build 21.0-b17, mixed mode, sharing)

>javac -version
javac 1.7.0




release notes:


看了一下G1 GC仍然是试验阶段,啥时候能转正啊。。。

Using G1

G1 is still considered experimental and can be enabled with the following two

-XX:+UnlockExperimentalVMOptions -XX:+UseG1GC

To set a GC pause time goal, use the following parameter:

-XX:MaxGCPauseMillis =50 (for a pause time target of 50ms)

With G1, a time interval can be specified during which a GC pause should last
no longer than the time given above:

-XX:GCPauseIntervalMillis =200 (for a pause interval target of

Note that the above two options represent goals, not promises or guarantees.
They might work well in some situations but not in others, and the GC might not
always be able to obey them.

Alternatively, the size of the young generation can be specified explicitly
to impact evacuation pause times:

-XX:+G1YoungGenSize=512m (for a 512 megabyte young generation)

G1 also uses the equivalent of survivor spaces, which are, naturally, a set
of (potentially non-contiguous) regions. Their size can be specified with the
usual parameters (e.g., -XX:SurvivorRatio=6).

Finally, to run G1 at its full potential, try setting these two parameters
which are currently disabled by default because they may uncover a rare race


One more thing to note is that G1 is very verbose compared to other HotSpot
GCs when -XX:+PrintGCDetails is set. This is because it prints per-GC-thread timings and other information very helpful in profiling and trouble-shooting. If you want a more concise GC log, please switch to using -verbosegc (though it is recommended that the more detailed GC log
be obtained).