Reputation: 11
Recently I downloaded Java SE 8 as Java SE 14 was causing me some issues on my mac. I had downloaded it and tried to change the coding in terminal to change my version of java from 14 to 8 by following along to a website, and when I had completed I double-checked to see if the coding had worked by typing java -version and it stated I was still on 14. So I attempted redoing the whole coding process over again but when I typed /usr/libexec/java_home -v instead of telling me what java options are available, instead it states "java_home: option requires an argument -- v" pls anyone help.
Upvotes: 1
Views: 845
Reputation: 10673
You're getting that message because you have to indicate a Java version number when you use the -v
flag.
On MacOS, to find all versions of Java installed on your machine, type:
/usr/libexec/java_home -V
Note capitalization. This argument will show you the path of all JVMs installed on your Mac.
For the lowercase flag, you can see the install path of specific versions of Java. For example:
/usr/libexec/java_home -v 1.8
will show you all versions of Java 1.8 installed. You got the error message because you were indeed missing an argument: the Java version number.
Upvotes: 2