The book Java Head First tells me I need Java 2 SDK?
That looks correct as part of the PATH, yes. Try the following commands and see whether you get a sensible response, with version numbers:-Ken Logan wrote:. . . C:\Program Files\Java\jdk1.8.0_102\bin . . .
Please don't use screenshots, which can be difficult to read.Ken Logan wrote:It looks like path is correct as it returned proper version. See screen shot. . . .
Java and Javac are different do they need to be matching?
All things are lawful, but not all things are profitable.
I would only remove a PATH component if I am sure there is nothing wanted in it. It safer to move the PATH with 1.8.0_102 earlier in the whole PATH environment variable.Knute Snortum wrote:. . . This means the other path (in this case, "C:\ProgramData\Oracle\Java\javapath") needs to be removed from your PATH environment variable.
There is no “might” about it. The .class files have a number towards their start which records their version number and the Java7 JVM will throw an Exception if presented with Java8 .class files.Mat Falk wrote:. . . the order of the entries in PATH is important (see the screenshot). Your prefered JDK should be above the entry "Oracle\Java\javapath" and above all other Java versions . . .
Right now you are using Java 7 to run code that you prepared with Java 8. That might cause problems because Java 7 lacks quite a few features from Java 8.
Probably quicker to writeSomeone mentioned you could post us your PATH environment variable. That might help. . . .
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\java\64\jdk1.8.0_112\bin;C:\Program Files\Docker\Docker\Resources\bin;C:\python\64\python3.5.2\Scripts\;C:\python\64\python3.5.2\;C:\ProgramData\Oracle\Java\javapath;C:\cygwin32\bin;C:\Program Files\Git\cmd;C:\Program Files\dotnet\;C:\php\7.0.11\;C:\lua\32\5.1.5;C:\lua\32\5.1.5\clibs;C:\nodejs\64\node-6\;C:\ProgramData\ComposerSetup\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\OpenVPN\bin;C:\Program Files (x86)\GNU\GnuPG\pub;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\AMD\ATI.ACE\Core-Static;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\wbin;C:\Program Files (x86)\Common Files\Acronis\VirtualFile\;C:\Program Files (x86)\Common Files\Acronis\VirtualFile64\;C:\Program Files (x86)\Paragon Software\Paragon ExtFS for Windows;C:\Program Files (x86)\Skype\Phone\;C:\ruby\64\ruby2.3.1\bin;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\Mat\AppData\Local\Microsoft\WindowsApps;C:\Users\Mat\AppData\Roaming\Composer\vendor\bin;C:\Users\Mat\AppData\Roaming\npm
Ken Logan wrote:C:\Users\Ken>echo %PATH%
C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows
Live;C:\Program Files (x86)\HP SimplePass 2011\;C:\Program Files\Broadcom\Broadcom 802.11\Driver;;C:\Windows\system32;C
:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Share
d;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files\Bro
adcom\WHL\;C:\Program Files\Broadcom\WHL\syswow64;C:\Program Files\Broadcom\WHL\SysWow64\;C:\Program Files\Broadcom\WHL\
SysWow64\syswow64;C:\Program Files (x86)\Intel\Services\IPT\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files
(x86)\Skype\Phone\
I am guessing these are all the programs set to use java?
I did not delete the Oracle path that comes with the computer it still exists, C:\ProgramData\Oracle\Java\.oracle_jre_usage, when I installed IDE it said gp get the latest JDK install that and then add the path to that bin, so when I went to Environment Variables for the first time this is what was in the USER variables:
C:\ProgramData\Oracle\Java\.oracle_jre_usage
C:\ProgramData\Oracle\Java\.oracle_jre_usage, woah nellly.... this is so confusing,
I have been looking for the Oracle jre path and it does not appear in the window. What I see in the window is this. The lines say %USERPROFILE%..... I didn't know this was the Oracle jre path untill just now when I copied and pasted it,
now it says C:\Program.... and I can see that is the path you have been talking about. Ok so this is what was in the window before I added my path which was C:\Program Files\Java\jdk1.8.0_102\bin. If I go to CONTROL PANNEL and open the java Icon and then select the java tab and then view, this path will be there and there is a check box on right telling the computer use this path, when I add my path it never appears here. If it did all I would have to do is check my path and uncheck the current path and it would use the jre from my new 8.0 jdk..... I am guessing at all this because I don't know but that is the way it appears. When I try to add my path in the EV it never makes the APPLY button available.
All things are lawful, but not all things are profitable.