kurikintoki
kurikintoki

Reputation: 859

Does UseG1GC option work in the system installed only JRE?

I added -XX:+UseG1GC option JAVA_OPTS but it didn't seem to work.

I installed only JRE 7 in this server so I'm just wondering if I need to install JDK 7.

JRE which is installed in the server is the following.

java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

Do I have to install JDK?

Upvotes: 0

Views: 2159

Answers (1)

Mircea Vutcovici
Mircea Vutcovici

Reputation: 2384

If your application does not need to compile java code, you do not need a JDK.

The garbage collector options are specific to Java virtual machine (JVM). JRE is a distribution of the JVM. The -XX:+UseG1GC is valid as an option for recent versions of Java7 and all Java8. G1 GC is supported since Java 7u4. Do not use anything older.

You might be interested to install the JDK as it comes with tools like:

  • jmc
  • jvisualvm
  • jconsole
  • jstat
  • jmap/jhat
  • jinfo
  • jcmd

Upvotes: 2

Related Questions