Skip to Main Content

Path / Classpath

user11440683Mar 29 2018 — edited Apr 6 2018

Hi,

I recently started with java, though I have a fairly long career with programming, so I am more than a hobbyist but less than a java pro.

On a p.c. I added the JDK bin location to the system path variable, with my JDK set up in the fairly conventional location C:\Program Files\Java\jdk1.8.0_144

After a reboot I then found that from my c:\java\WorkInProgress directory and others under it I could just javac (etc) without pointing at the jdk bin in any other way - in short I was happy that I had understood enough to get it to work

Recently I bought a new laptop and replicated what I had done before, if it works once it should work again, right?!

Wrong....

I can echo path and see my entry, fine.

But, trying to use the basic java commands in my parallel set up c:\java\WorkInProgress directory does not work.

So two questions; one, am I setting the path correctly, is it more fluke that it worked on the original p.c. is there likely another setting that I am missing.

I was originally following; - https://www.javatpoint.com/how-to-set-path-in-java

Which I have found a very good site for basic examples.

I have tried with user variable and system variable.

I have restarted my laptop after changing before retesting.

It is Windows 10 - which I already dislike intensely

I have googled this but no two pieces of advice seem to be the same on this, so if anyone can point me at the definitive correct way to do it I would appreciate it greatly!!

This post has been answered by Srini+K on Mar 29 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked due to inactivity on May 4 2018
Added on Mar 29 2018
6 comments
382 views