After installing Java in Windows 10, I registered JAVA_HOME variable with value C:\Java\jdk.1.8.0_301
which is the version I found from running java -version
. However, the command produces \Common was unexpected at this time.
I ran where java
to find other value C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe
but it gives the same error. Java was originally installed in Program Files (x86) but I moved out to C:\ after reading that a space in directory might cause an error. After all, I am trying to run Spark after Java is correctly configured.
CodePudding user response:
During the installation of Java, relevant information has been written into the windows registry,Moving the installation directory directly will cause the program to be unusable.
It is recommended to uninstall and reinstall in the control panel, and specify a directory without spaces.
Thank you!