I was just trying to run scala on my machine and failed to do so with an error message “…..\java.exe unexpected at this time.” Look at the screenshot shown below.
Well, the problem was that environment variables for JAVA was set up using JAVA_HOME variable. The JAVA_HOME environment variable was pointing to the JDK directory and the Path was modified to include the “%JAVA_HOME%\bin” directory.
I removed the JAVA_HOME and then modified the path to specify the complete path to the JDK bin folder and it works now. :)
I might be talking more about Scala in the future, the concurrency scala supports appears to be interesting.