I’ve installed ubunut 15.04 recently and I’ve tried to install java JDK 8 but I can not, and I don’t know why.
I have fallow all that commands:
sudo apt-get install python-software-properties sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer
And after that I checked my java version and I’ve got a error:
root@vlad-X550JX:/usr# java --version Unrecognized option: --version Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.
Please help me anyone, how I can make it work?
Answer
In order to see if Java is installed you need to check the version with a single hyphen.
java -version
The fact that this is throwing an error at all indicates that java is installed. 🙂
Attribution
Source : Link , Question Author : Vildnex , Answer Author : levlaz