First of all, there is no -v command in the java command.
(Link: http://docs.oracle.com/javase/6/docs/technotes/tools/windows/java.html ... Java version 6 ... 'Because this is what you use. Try java -help for a short list of options.)
Thus, it is expected that java -v will fail.
As an experiment, I tried this (from the OpenJDK Java 8 JDK on Fedora 22):
$ java -foop Unrecognized option: -foop Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. $
As you can see, the message “unrecognized option” tells me which option he does not understand. Looking at the message in your question, we see that he says that it is "-". This does not look like the command line in your question, but on the other hand, there are no invalid parameters on the command line of your question.
Another possibility, I think, is that you have a java shell alias. This will take precedence over any commands in the shell path.
Another thing is that you are using an ancient version of Java. Java 6 has passed the end of its life, and the latest publicly released version is update 45. You have launched update 30, released in December 2011. Since then there have been many security settings. I would recommend switching to Java 8 ... and making sure you are updating it.
source share