Labels

Learn the powerful enterprise adaptable database:

Getting Started With ADABAS & Natural

Monday, May 6, 2013

Create Java Hello World using Notepad via Command Console in Windows

Note: This method works for both 32-bit and 64-bit version of Windows 7.



1) Run Cmd.

2) Type: cd \

3) Type: mkdir learnjava

4) Type: cd learnjava

5) Type: mkdir 102

6) Type: cd 102

7) Type: notepad Hello.java




1) Note pad will prompt for permission to create new file, Hello.java



1) Edit Hello.java
/*
* First Java program to say Hello
*/
public class Hello { //save as "Hello.java"
        public static void main(String[] args) {
                System.out.println("Hello, world!");
        }
}

2) Save and Exit.




1) Type: javac Hello.java

2) Type: java Hello





No comments:

Post a Comment