server.system.properties.java.version
server.system.properties.java.home
You could of course use CFOUTPUT, CFDUMP, CFLOG or their cfscript equivalents. And if you wonder about still other JVM characteristics, you could use:
<cfdump var="#server.system.properties.java#">
or its cfscript equivalent, writedump, which will show ALL the variables that CF holds in that java struct.
In CF2016 and earlier, that system struct is not available in the Server scope, so instead you could use this code or a variation:
<cfscript>
system=createObject("java", "java.lang.System");
writeoutput(system.getproperty("java.version"));
writeoutput(system.getproperty("java.home"));
</cfscript>
For more on what all this can mean, how the JVM version you find may differ from your expectations, how to change the JVM version, as well as a Lucee variation of the first code above, and more, see the longer post on my own site, carehart.org.
For more blog posts from Charlie Arehart, see his posts here as well as his posts at carehart.org. And follow him on Twitter and other social media as carehart.
You must be logged in to post a comment.