Setting the path:-
Go to My Computer's properties by right clicking on Start -> Explore all users
On the left, you will see "My Computer". Right-Click on it, and go to Properties.
Go to the "Advanced" tab, and click on Environment Variables. Navigate to the path variable,
and change it to:-
JDK_root/bin where JDK_root signifies wherever your JDK has been installed.
Then, create a new variable, and type the name as "classpath".
Fill in it's value as JDK_root/lib. You know what JDK_root signifies, we expect.
That's it, your JDK paths have been set!!
With this, you can create programs in Notepad, and save them as .JAVA, and then compile them as follows:-
javac filename.java
Run them as follows:-
java filename
(.java not required over here)
All in the command-prompt, again on Windows only.
(For other users, on other Operating Systems, and for people who don't want to work with Notepad, download NetBeans IDE for your platform, or Eclipse IDE, or NaviCoder IDE for Java.
All three are equally good. )
Coming up...
NOW: Identifiers, Keywords, and Types
No comments:
Post a Comment