• Uncategorized

About java : Installed-latest-JDK-180-but-my-Javac–version-still-shows-an-older-version-Windows-7—64

Question Detail

I’ve been attempting to install NativeScript with Angular with this tutorial for the past two days, and I keep running into problems surrounding the Android SDK not installing correctly and freezing, and finally re-installing the latest JDK and JVE before attempting to install Android Studio. As I researched the problem I think I found the culprit:

When I run Javac -version I keep getting an older version of JDK, it states: javac 1.6.0_45 However I have the latest version of Jdk 1.8.0_102.

I researched the problem, but only found either complex solutions invilving the variable path, or MAC solutions. What can I do to update the JDK when I run Javac -version?

User Variables: PATH

cmd> set PATH=%PATH%;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;%NVM_HOME%;%NVM_SYMLINK%

System Variables: PATH

JAVA_HOME%/bin;C:\Python27\;C:\Python27\Scripts;C:\Ruby22-x64\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Java\jdk1.6.0_45\bin;C:\Program Files (x86)\Beyond Compare 3;C:\Program Files (x86)\Brackets\command;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Git\cmd;C:\Program Files\dotnet\;C:\ProgramData\chocolatey\bin;C:\Program Files\Java\jdk1.8.0_102\bin;C:\Users\Godsnake\AppData\Local\Android\android-sdk\tools;C:\Users\Godsnake\AppData\Local\Android\android-sdk\platform-tools;%NVM_HOME%;%NVM_SYMLINK%;C:\Program Files\nodejs

Note:, I’m a complete noob at playing around with the Windows path, and I don’t really know anything about the environment variable, but I see that the paths of certain applications that I have installed all appear in the system variables: Python, Node, Ruby, AngularJS2, AndroidSDK.. That being said if anyone can me some guidance on the uses, best practice, and differences between user variable and system variable that will be an added bonus. And please give me instructions like I’m a complete beginner when it comes to messing around with the path. Thanks!

Question Answer

Your system path still contains 1.6.

C:\Program Files\Java\jdk1.6.0_45\bin;

It has both, try removing this and just having 1.8. (already in there)

I removed the PATH entry which pointed to java JRE in Oracle client directory, leaving just 1 in PATH pointing to correct java JDK/JRE , and Kaboom it worked.

Use where java in cmd. You will find different versions of java. Leave the one you want to use and uninstall others.

You may also like...

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.