Hi, I'm fairly new to programming, and i've been reading JavaRanch's page on how to install Java (here). I have successfully downloaded "jdk1.7.0_21". I think something is wrong with the path settings, I am using Windows 7 and have gone to advanced system settings and added a system variable "JAVA_HOME" with value "C:\Program Files (x86)\Java\jdk1.7.0_21" and edited the "Path" variable as it tells me to. Then it tells me to open a command prompt and type in "javac-version" to get the version of the SDK, but I get the error: "'javac-version' is not recognised as an internal or external command, operable program or batch file."
I hope you added space between javac and -version. Otherwise just try Javac. Also try to print echo %path% and echo %classpath% see if its correct. I hope you added full path till bin folder in your Path varibale
bin contains all the binary files like java, javac, and jar which are used by jdk during program compilation and execution.
lib contains all the library functions like API and all packages that are used by either jdk or user. These are the implicit functions or classes that need not be defined before using.