I am getting my new laptop going and went to install the latest oracle JDK 7u25. I followed the instructions on this site to do it.

Afterwards when I type java --version in the terminal I get the error:

Error: Could not create the Java Virtual Machine

I tried reinstalling it via a different method but the error wont go away. I am running Ubuntu 12.04 64bit.

1 Answer 1



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.

  • @Umair Thus, the upvote... May 31, 2016 at 8:55
  • 1
    Wonder how many pro devs have been brought to their knees by this one. Thanks!! Aug 16, 2016 at 19:53
  • @Dmitriy Sintsov: Just goes a long way towards telling that it is far from the very best software. Just because it is popular, doesn't mean it's good - otherwise JavaScript would be the most awesome language in the world - it isn't ...
    – WitchCraft
    Jan 18, 2017 at 14:28
  • I literally just got the same "cryptic" error when just using java -v Apr 18, 2018 at 19:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.