Java 8 reserves minimum 1G for Metaspace despite (Max)MetaspaceSize

The reason why Java reserves 1G for Classes hides in the way how it manages compressed class pointers. The long answer: read this doc https://docs.oracle.com/javase/8/docs/technotes/guides/vm/gctuning/considerations.html The short answer: setup the correct size in ‘CompressedClassSpaceSize’ property -XX:CompressedClassSpaceSize=300m

Java VM tuning – Xbatch and -Xcomp

Generally speaking, it’s always preferable to let HotSpot compiler tune itself. Even using Server VM (-server) is default for 64bits and some ‘server-class’ machines. -Xbatch was intended mostly for debugging as described in Steve Goldman’s blog you pointed: So the -Xbatch switch is not a particularly useful switch even in the pre-mustang days. It is … Read more

How do I add default JVM arguments with Gradle

From the top of my head I can think of 2 options: Option1: Do what @Ethan said, it’ll likely work: package placeholder; //your imports public class Application{ static { System.getProperties().set(“javafx.embed.singleThread”, “true”); } // your code public static void main(String… args){ //your code } } Option 2: Use the application plugin + default jvm values build.gradle: … Read more

tech