How to get JRE root path for java 17 using "java -verbose -version"

2k Views Asked by At

I have a problem that with my automation script where it needs to get the JRE Root path for java versions. I managed to get the path for java 8 and java 11 using java -verbose -version

enter image description here

but i cant get anything for java 17 using the same command

enter image description here

Below is the Jython script that i used to configure the JRE Root Path START SHELL COMMAND "java -verbose -version | findstr /I "[Opened opened:"" WAIT RETURNSTDOUT enter image description here

It's working for java 8 and java 11 and i wanna be able to use the same script for java 17. Can anybody help me?

I tried with 'where javac' but it's not working with my Jython script

2

There are 2 best solutions below

0
On

I tried with 'where javac' but it's not working

javac is the compiler (part of JDK). You can try just 'where java' to get the path to JRE currently in use.

0
On

if you are using QF-Test and want fetch this Information via a Groovy or Jython Script, you may check the Variable Groups descibed under "External data and special groups" in the Manual. Perhaps something will help you.

Cheers, Plamen