Gabriel9999

Member
Joined
Mar 12, 2019
Messages
38
Reaction score
4
Credits
130
I have a Java installation and I have only access via bash. How can I check the Java version from command line.
 


you can do a few things:

bash-5.0$ java -version
java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)
bash-5.0$
bash-5.0$
bash-5.0$ which java
/usr/lib64/java/bin/java
bash-5.0$ echo $JAVA_HOME
/usr/lib64/java
bash-5.0$


also slackware:

ls /var/log/packages | grep jdk
jdk-8u231-x86_64-1_SBo
bash-5.0$

so i have 8u231 installed
 
issues that come up with java usually involve setting java_home in my experience.

if you have an issue with a package try just launching from a command line and see what it complains about.

for instance if i want to launch firefox from a linux trminak i just type:

bash-5.0$ firefox
// then hit return/enter button
bash-5.0$ // just shows the bash prompt don't type that
 

Members online


Top