Java -version does not work on the command line

I tried java --version on the command line and get:

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

Everything worked fine until I installed jre 7 (I had jdk 1.6 pre-installed) So I uninstalled previous versions, restarted, and then installed fresh jdk 7u5 windows i586.

However, I get the same problem. Can anyone help me with this?
For this reason, I cannot install and run maven.

+8
java jvm
source share
1 answer

You used two tags - . Try with one: java -version

+25
source share

All Articles