Hi,

I formatted my pc and restored everything back and now I forgot how to install jdk and set the path. I am using windows vista.....

I created a CLASSPATH in system variables as follows
.;C:\Program Files\Java\jre1.6.0_02\bin

and path in system variables as
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Java\jdk1.6.0_12\bin

and again a new path in temp variables as

variable name:path
variable value:C:\jdk\bin;.;

when I go into the command prompt and type
C:Program Files\Java\jdk1.6.0_12\bin javac
I am getting a long list of info as expected but when I try to compile a java program from a different directory I get 'javac' error
'javac' is not recognized as an internal or external command

can anybody help me???

Hi guys!

Its working now........ I read somewhere that we have to restart the system to make it pick the path.......

this has caused me frustration to no end....so don't forget to RESTART......
bye!

Hi guys!

Its working now........ I read somewhere that we have to restart the system to make it pick the path.......

this has caused me frustration to no end....so don't forget to RESTART......
bye!

I'm not sure you have to restart. You just have to make sure that you open a NEW command window. If you open a command window, THEN change the System Variables, then type your commands into the original command window, the System Variables change will not have an effect, so you have to open up a new command window (and possibly close the old command window, not sure on that), but at least on XP, I don't believe you need to restart the computer.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.