-1

OS - Windows 7 64 Bit

I am getting "Exception in thread main", when I type scala in command prompt

UnsupportedClassVersionError

In Stackoverflow (already asked question) someone suggested to use same JRE and JDK version. So I uninstalled all the java (JRE and JDK) and installed JRE and JDK 8.

But when I check the java -version it says "1.4" and the I still get the exception(Exception in thread)

java -version

In Path, there is no java 1.4:

C:\Users\AppData\Roaming\cabal\bin;C:\Users\AppData\Local\atom\bin;C:\Program Files\Java\jdk1.8.0_66\bin;C:\Program Files\Java\jre1.8.0_66\bin;C:\Program Files\Java\jdk1.8.0_65\bin;C:\Program Files (x86)\scala\bin;C:\Program Files (x86)\Java\jre1.8.0_66\bin\client

In Control Panel -> Java -> Java tab -> view still says 1.8

enter image description here

How can I make scala work?

6
  • This isn't the class path, this is where the executables are. Try simple search for java.exe on your drive(s). There should be a 1.4 installation anywhere. And consider special installations of Java on Windows platforms. You may find a java.exe in the Windows folder (stackoverflow.com/questions/11063831/…).
    – PeterMmm
    Jan 16, 2016 at 11:40
  • @learningKid , instead of adding photos, you can right click in cmd > Mark > select with the mouse what you want > right click (to copy) ... then paste it here > select the block and press Ctrl + K. This is how those who have the same problem will easily find your question. Jan 16, 2016 at 11:42
  • 1
    Did you open a new console when you tried to run java -version? Jan 16, 2016 at 11:44
  • that's the trick :) @engineer. I am stupid ... opened in a new console. it Worked Sorry Friends..
    – F0cus
    Jan 16, 2016 at 11:46
  • 1
    Ok, you can post the solution for your own answer and then accept it. But, please, use a nice formatting. Make it readable. Jan 16, 2016 at 11:48

1 Answer 1

0

"open a new console" then try java -version .

Worked for me . Scala issue also resolved :) Thanks... @engineer

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.