HELLO SUNNY!
ITS NATURAL THAT EVERYONE NEW TO JAVA FIND IT DIFFICULT AT THEIR BEGINING STAGE.BUT DONT LOSE CONFIDENCE.IAM GIVING U A SERIES OF STEPS & U JUS GO ACCORDING TO THAT.
1.OPEN THE NOTEPAD
2.TYPE THE PGM as follows
class HellloWorld
{
public static void main(String s[])
{
System.out.println("Hello WORLD");
}
}
3.go to file..click,,Save As....
[ Save in-c
u can save in any dir u wish or create a new dir named java)
File Name:"HelloWorld.java"
Save As Type:text document]
click Save.
4.GOTO MSDOS PROMPT
u'll get like this...C:\WINDOWS\DESKTOP
COZ U HAVE SAVED THE PGM IN C:,U NEED TO COMPILE FROM THAT DIR.SO...TO COME TO DOS PROMPT,
TYPE AS FOLLOWS.....
C:\WINDOWS\DESKTOP\CD..(PRESS<ENT>)
C:\WINDOWS\CD..(PRESS<ENT>)
now u get the c:\ prompt...now, set path & classpath
c:\>set path=%path%;c:\jdk1.2\bin;
c:\>set classpath=%classpath%;c:\jdk1.2\lib;
now u'r class path is set. compile the pgm as follows.
c:\>javac HelloWorld.java
if there is no error, u'll get c:\>,now run the pgm
c:\>java HelloWorld(press<ent>)
u'll getthe output as:::::::
Hello World.
try this out.if u still have any problem mail me.
all the best.
bye.
anu.
------------------