cancel
Showing results for 
Search instead for 
Did you mean: 

How to get installed Java (JRE) version details and post it to the log?

AlexKaras
Community Hero

RE: How to get installed Java (JRE) version details and post it to the log?

Tony,



Yes!! Exactly! How could I forgot about this when I mentioned a similar thing in another thread?

This is definitely the way to go but with small enhancement to improve Java process recognition if more than one Java process is running in the system:

a) (Optionally, though I would do this) Remove Index from Java process recognition parameters;

b) With the tested application running, in the NameMapping Editor, select mapped Java process, switch to the Required Children panel and check (select) your tested application as a required child.
Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Ryan_Moran
Valued Contributor

RE: How to get installed Java (JRE) version details and post it to the log?

Just threw this together real quick to provide an example so I'm sure it could be improved upon, but this should return the file version of any process. Enjoy.





wshell = new ActiveXObject('WScript.Shell');

wshell.popup(getProcessVersion('chrome'));




function getProcessVersion(processname){


var myProc = (new VBArray(Sys.FindAll('Name','*' + processname + '*',1,true))).toArray()[0];


if (aqObject.IsSupported(myProc,'FileVersionInfo')){


 return myProc.FileVersionInfo


 }


}


''-Praise the sun and Give Kudos.''
New Here?
Join us and watch the welcome video:
Top Kudoed Authors