Possible values for the "java.compiler" system property
Asked Answered
G

3

9

(I know this is probably a duplicate, but is it almost impossible to search this topic on Google or on SO.)

I know the java.compiler system property can take "NONE" which disables the JIT compiler, but I am interested in what other values are there and what are their performance characteristics.

Grisaille answered 26/11, 2013 at 21:52 Comment(0)
M
5

In the early days I believe it was intended that there be competition among external vendors to supply an external .dll/.so named by this property. symcjit.dll was the only one I ever encountered. SInce the advent of Hotspot I believe it's obsolete.

Meneau answered 26/11, 2013 at 22:5 Comment(1)
is there somewhere this is documented to be obsolete? The latest current (at this time, JDK 1.8) API documentation for java.lang.Compiler is still worded such that I expect to be able to plug in my own JIT using the java.compiler property, but so-far, no amount of coaxing seems to be working. I can believe it's obsolete, but I'd like to see something from Sun/Oracle that I can rely upon, before giving up on my project.Headstrong
R
3

java.compiler property is the name of the library to support java native compilers:

The Compiler class is provided to support Java-to-native-code compilers and related services. By design, the Compiler class does nothing; it serves as a placeholder for a JIT compiler implementation. When the Java Virtual Machine first starts, it determines if the system property java.compiler exists. (System properties are accessible through System.getProperty(String) and System.getProperty(String, String). If so, it is assumed to be the name of a library (with a platform-dependent exact location and type); System.loadLibrary(java.lang.String) is called to load that library. If this loading succeeds, the function named java_lang_Compiler_start() in that library is called.

Reifel answered 26/11, 2013 at 22:0 Comment(0)
U
2

If you are using Oracle published JVM, you should check the property sun.management.compiler. A possible value is HotSpot 64-Bit Tiered Compilers.

You can get this through typing the following command

java -server -XshowSettings -version 2>&1 | grep sun.management.compiler

If you are using J9 VM published by IBM, a possible value is jitc. See this document.

Unsheathe answered 15/5, 2021 at 3:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.