PATH and CLASSPATH.

I'm sure this has been asked a number of times before, but I cannot find the solution to my problem for the sake of me and rather actually stress on for a few more days delaying my "startup" of this language a bit longer, I've decided to come for help.

I have JDK 6 installed into "C:\JDK" -- I've tried setting my PATH variable to the following:

1. C:\JDK\j2se\src\windows\bin;

2. C:\JDK\j2se\src\windows\bin\amd64;

(With and without the semi-colons)

I'm still getting the error "'java' is not recognized as an internal or external command, operable program or batch file." whenever I try to execute Welcome1.class (made by Bluej).

With the CLASSPATH variable I have no idea what to put.

Also, and this may not be worth mentioning, in the command line I've hit a few "path" 's which always give me:

PATH = C:\JDK\j2se\src\windows\bin\amd64;C:\JDK\j2se\src\windows\bin\amd64;

With or without the semi-colon at the end of the line depending on the PATH I've setup. Also corresponds with or without the amd64 folder.

(I've an AMD 65 x2 4200 CPU)

[1130 byte] By [iamblizzya] at [2007-11-26 16:00:28]
# 1

Read the JDK Installation Instructions - they have instructions on setting the PATH environment variable.

Do not set a CLASSPATH environment variable unless you know why you want to, and what you're doing. Read the documentation here for more information:

http://java.sun.com/javase/6/docs/technotes/tools/index.html#general

ChuckBinga at 2007-7-8 22:21:53 > top of Java-index,Java Essentials,New To Java...
# 2
Unless I'm mistaken, all I can find about paths is that I need Cygwin. Nothing more. I see nothing in the nature of "set your path to this directory."(looking at build-windows.html and README.html)Message was edited by: iamblizzy
iamblizzya at 2007-7-8 22:21:53 > top of Java-index,Java Essentials,New To Java...
# 3

PATH is used by command shells such as cmd.exe and cygwin's and unix's bash, zsh, etc., to find exectuables. When you type java, PATH is used to determine where java.exe is found. You do NOT need cygwin to useit.

This link has a section on how to set your PATH in windows:

http://java.sun.com/javase/6/webnotes/install/jdk/install-windows.html

CLASSPATH is for where the VM finds your Java classes. Do not set that env var.

jverda at 2007-7-8 22:21:53 > top of Java-index,Java Essentials,New To Java...