vscode-tlaplus
vscode-tlaplus copied to clipboard
Are the details for Java installation comprehensive/current?
My system: Windows 10, Visual Studio Code, Java 8 installed
I am following the instructions for setup, which indicates that Java 8 should work although 11 is recommended.
I was unsure whether I had Java 8 or 11 installed, so I used the command suggested in the guide. However, it appears that Java 8 does not respond to the '--version' flag, and java responds with:
Unrecognized option: --version
Error: Could not create the Java Virtual Machine
Error: A fatal exception has occurred. Program will exit.
From a quick Google, it seems that one hyphen (-version) is the appropriate method for checking the version:
java -version
java version "1.8.0_333"
Additionally, I have pasted the Java home path into the Java Home configuration field for this extension but it seems that the extension is still unable to find the executable. In the configuration field, I have:
C:\Program Files (x86)\Common Files\Oracle\Java\javapath
Yet, when I try to perform Source Action -> Parse Module, I get:
Java executable not found. Check the Java Home settings.
I have manually confirmed that java.exe is located in the path pointed to by the Java Home setting. Is there something I am doing wrong here?
Ok, I have solved the path issue, it seems that I get the expected behavior (at least so far) after installing Java 18 and putting the following into my path:
C:\Program Files\Java\jdk-18.0.1.1
So it seems that Java Home is not expected to directly contain the java executable.
I don't have any immediate questions but this issue may be helpful for anyone running into the same problems.