Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Command to give a list of JREs installed on the system

Tags:

java

Is there any command which would list down all the JRE versions and releases installed on a system?

like image 307
Vicky Avatar asked Oct 28 '25 03:10

Vicky


2 Answers

To list all the registered JRE (in a file called "jre.txt") on a Windows machine :

start /w regedit /e jre.txt 
   "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment"
like image 166
RealHowTo Avatar answered Oct 29 '25 18:10

RealHowTo


On ubuntu and some other linuxes they're mostly in /usr/lib/jvm. You can also check with

for x in $(echo $PATH | tr ':' ' '); do ls -asl $x | grep java; done

which will also show you all the pretty softlinks. There's probably a nicer way to do this that hopefully some kind person will post :)

like image 36
Steve B. Avatar answered Oct 29 '25 18:10

Steve B.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!