Unrecognized option: --version Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.

Java
java -version and not java --version.java -version
Source

Also in Java: