PDA

View Full Version : HelloRC.java


masterof_none
21-05-2003, 10:58 PM
OK, so, I hope you;ve already installed the latest version of Java package (get the java 2 runtime environment, standard edition ,j2se)

for windows user, don;t forget to set path and class path. (post here if it doesn;t work)

for those who have unix/mac os x, they've already installed it for you.
I guess it's because , apple and sun are friends, microsoft is not.hah

then, using text editor, such as notepad(don;t use MS Word!!!), vi or emacs , copy and paste this:

public class HelloRC {
public static void main(String args[])
{
System.out.println("Hello RC, Hello Malaysia!");

}
}

save it as HelloRC.java (no other name.)

then, open your console, (windows user, command prompt and mac user, terminal) compile,

javac HelloRC.java

it would produce bytecode called HelloRC.class.

executing this code, type

java HelloRC

it will print

Hello RC, Hello Malaysia!

at the console.

if you can;t get it to work on windows, and/or if you have Unix/Mac os x,
try on Unix/Mac platform first.they;re programmer friendly platform.

That;s it!. any difficulty, please post it here.
Tomorrow, we'll discuss what;s going on inside the code.