Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 336
  • Last Modified:

Java versions on Linux

I have a RHEL 6.5 machine, and I typed in the java versions as follows

java -version
java version "1.7.0_65"
OpenJDK Runtime Environment (rhel-2.5.1.2.el6_5-x86_64 u65-b17)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)

Open in new window


So I have a 64 bit Java on a 64 bit Linux

My question is, could there be any other java versions out there currently installed

If so, how do I discover which other versions are installed

Thanks
0
Anthony Lucia
Asked:
Anthony Lucia
2 Solutions
 
woolmilkporcCommented:
Check the subdirectories of /usr/lib/jvm.

Additionally, run: rpm -qa | grep -i java

With /usr/sbin/alternatives --display java

you'll see all the links to the currently active version and what other alternatives are available.
0
 
Gerwin Jansen, EE MVETopic Advisor Commented:
As a last resort you can search the file system:

# find / -type f -name java 2>/dev/null | xargs file | grep -v ASCII
0
 
SandyCommented:
/usr/sbin/alternatives --display java

and in case you found multiple instances then you can choose anyone by using below

 /usr/sbin/alternatives --config java


TY/SA
0
 
Anthony LuciaAuthor Commented:
The best answers were

rpm -qa | grep -i java

and

/usr/sbin/alternatives --config java
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now