If you tried running java with -version argument, and even though the problem could not be solved by any means, then you might have installed many java versions, like JDK 1.8 and JDK 1.7 at the same time. Notice that we use global to set the change globally. Now we change the version to 14.0 using the below command. That's worked for me, I have two JDK (version 8 & 11) installed on my local mac, that causes the issue, for uninstalling, I followed these two steps: Here, 1.8 is the current default Java version. So try uninstalling all other versions other than the one you need, then set the JAVA_HOMEpath variable for that JDK remaining, and you're done. In this case, there is no option such as v. So to double check you can always do java -help, and see if the option exists. ![]() In this case it should be the version option. ![]() Normally this error occurs when you invoke java by supplying the wrong arguments/options.
0 Comments
Leave a Reply. |