Command to provide a list of JREs installed on the system

Is there any command that will list all versions and releases of JRE installed on the system?

+3
source share
5 answers

To list all registered JREs (in a file named "jre.txt") on a Windows computer:

start /w regedit /e jre.txt 
   "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment"
+4
source

Um ...

find / -name "java" -print

on * nix.

No other relaxations are given, this is the only way (and yes, it is ugly).

+1
source

ubuntu Linux /usr/lib/jvm.

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

. , , , , - :)

+1

On Windows, it looks like all the settings are written in the registry key HKEY_LOCAL_MACHINE / Software / JavaSoft / Java Runtime Environment.

0
source

If you are running Linux, you can investigate the command alternativesif your distribution uses it. Alternatives to java (I think available by typing alternatives javabut check the man page for details) will list all installed JREs and indicate which one is the current system default value. It also makes it easy to switch between different versions.

0
source

Source: https://habr.com/ru/post/1702157/


All Articles