Use the “Java” command to run CentOS Jar file
•
Java
I'm trying to run on my CentOS box Jar file, but it says "Java: command not found"
What is the best or simplest way to solve this problem? I want a Yum command, but I'm not sure if Java exists?
Solution
You can use this command to check whether Java is present in the repository:
yum list | grep java
It should return something similar:
java-1.6.0-openjdk java-1.6.0-sun
If such a package exists, you can use this command to install it (run as root):
yum install java-1.6.0-openjdk
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码