Download Latest Java
- Download and install the latest version of the Java Platform, Standard Edition Development Kit (Java SE 6 Update 27). Note the installation directory for later—probably something like C:\Program Files\Java\jdk1.6.0_27\bin.
Config Java path in Computer Properties>Environment Variables
- Select Start -> Computer -> System Properties -> Advanced system settings -> Environment Variables -> System variables -> PATH.
- Prepend C:\Program Files\Java\jdk1.6.0_27\bin; to the beginning of the PATH variable.
- Click OK three times.
- check java version
- C:\Users\username>java -version
C:\Users\username>javac -version
Customize CMD
- Set Layout -> Screen Buffer Size to 80 x 500.
- Select Options -> Edit Options -> QuickEdit Mode.
- Select Options -> Edit Options -> Insert Mode.
Compile and Execute
C:\Users\username>cd c:\introcs\hello
C:\introcs\hello\>
C:\introcs\hello\>javac HelloWorld.java
C:\introcs\hello\>
C:\introcs\hello\>java HelloWorld
No comments:
Post a Comment