Check out example codes for "i have AdoptOpenJDK 8 but java --version gettinbg Unrecognized option: --version Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.". It will help you in understanding the concepts better.

Code Example 1

java -version

Code Example 2

java -version and not java --version.

Learn ReactJs, React Native from