installed jdk by and have Error: Could not create the Java Virtual Machine
Solution 1:
Use:
java -version
instead of:
java --version
However, it's still not excusable that such cryptic error message is produced for the extra dash sign. Especially because java is not an amateur software but a kind of the very best software.