setting stage


getting java

first, you need to download java development kit, also known as jdk. also, i was learning java on windows platform - for those of you on mac or linux, only the first few steps should be different, the rest should follow smoothly.

putting 'download jdk in your favorite search engine does the trick.
then, just follow the links and click accept (after reading if you have time) all the legalities.

installing java

if you are lucky like me, an installer will start and i recommend instead of a default location choosing a folder called java on your favorite drive, in my case the location was c:\java

setting environment variables

for your operating system to see java, you need to add it to what is called a 'path environment variable'. this is done as follows:


1. go to the folder you have installed JDK and creat a new folder
in the root called "Programs".

2. right-click on 'My Computer' icon in your 'Windows Desktop'.

3. go to Properties/Advanced/Environment Variables/

4. locate an environment variable called 'path' (Path, or PATH, Windows is case insensitive by the way). Add c:\java\bin to to the end of the environment variable as in:

[previous path entreis];c:\java\bin

note the semicolon. again, it is case insensitive

5. set the Variable Value to bin folder on the path you've installed
JDK.

6. press ok

running java

1. to see if you got java installed correclty, go to 'Start' -> 'Run' and enter 'cmd'

this should launch a command window

2. in command window, you should see something as follows (anywhere on your c drive):

c:\>java
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)

....

if you see this, you are all set. if you see something like 'java' is not a recognized program it means that you did not set your path correctly. go back to 'setting environment variables' above

we're done now setting up java!



chapters