Hi all, I have just installed the jdk on a windows7 machine 64bit. I run the first test application in the terminal and got the following message: "'java' is not recognized as an internal or external command, operable program or both file". So I had a look online and found this tutorial http://java.com/en/download/help/path.xml which unfortunately it doestn't tell you what to modify the path variable to.
Now, looking on the Environment variables window, under system variables I have lots of variables and then there is a "Path" (not PATH though, not sure whether capitalization here makes a difference) which as a value has

C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Toshiba\Bluetooth Toshiba Stack\sys\;C:\Program Files (x86)\Toshiba\Bluetooth Toshiba Stack\sys\x64\;c:\Program Files (x86)\Common Files\Ulead Systems\MPEG

One important thing to notice is that I have installed the 64bit version of the JDK because my machine has a 64bit version of windows, but for some strange reason the above Path variable seems to have a 32bit...
Now, can anybody kindly tell me what this should be changed to, or if I need to set up a new PATH and how so I can get the windows terminal to work properly
I so hate windows, I installed the jdk in ubuntu and everything worked perfectly...

Add a PATH entry for the bin directory of your JDK installation.

For example if your JDK's bin directory is located at

C:\Program Files\Java\jdk1.7.0_10\bin

Then you'd add that to your PATH like this:

C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;
%SystemRoot%\system32;
%SystemRoot%;
%SystemRoot%\System32\Wbem;
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;
C:\Program Files (x86)\Toshiba\Bluetooth Toshiba Stack\sys\;
C:\Program Files (x86)\Toshiba\Bluetooth Toshiba Stack\sys\x64\;
c:\Program Files (x86)\Common Files\Ulead Systems\MPEG
; <-- semicolon here!
C:\Program Files\Java\jdk1.7.0_10\bin

It doesn't matter if there are references to directories with 32-bit binaries.

The changes will take effect if you open a new console window (that is: they don't take effect automatically for any console window that was opened prior to adjusting the PATH variable's value).

Member Avatar for vishnu.khera.5

Hello! The link you shared

http://www.itcsolutions.eu/2010/11/29/set-environment-variables-in-windows-7-for-java/

is a bit complicated way of setting up environment variables. Environment varibles are nothing but commands available on the command prompt. You are already aware of the simple commands such as dir - for showing directory and cd - to change the directory, from the current directory.

Under environment variables there are user specific variables and system specific variables. System variables are accessible to all users of the computer. You can have multiple user accounts with Windows 7.

The simplest way to set the variable is for a single user - which is you.
Click start menu
Enter the term Environment in the search box
Click 'Edit environment variables for your account' option
Under 'User variables for ....' click 'New' and enter 'Path' in 'Variable name field'.
Next enter JDK's bin folder path in the 'Variable value field'
Click 'Ok' and you are all set!
If you have the command prompt already open you need to re-open the command prompt

This is the easiest way to set up environment variable - if java and javac commands are working for you - please don't make any changes

vishnu.khera.5, tux4life's suggestion helped as said, I am just a bit confused by the number of ways you can set up environment variables

Member Avatar for vishnu.khera.5

Its like this - there are a number of ways to reach the destination but its all about setting up 'environment variables' if you are working in a Windows based environment :)

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.