Java checking installation
In previous tutorial we have learned , how to install jdk. In this tutorial we are going to check whether java is installed correctly or not.
How to Check whether (Jdk) java is Installed or not ?
Step 1 : Checking Directory Structure
- After installing JDK , Restart system.
- Open My Computer and Check Java Installation Directory.
- These two folders gets created inside “My Computer => C Drive => Program File => Java“.
- Check Inside JDK folder and look for “java” , “javac” application files.
- If these files are present then 75% we are on right track. Now Let’s Check whether “javac” is working properly or not.
Step 2 : Writing Sample Hello.java Program
- Create “code” folder inside C Drive. (call it as - hello.java)
- Copy paste following code snippet and paste into notepad. (Dont forgot to save File using .java extenstion) .
class hello { public static void main(String args[]) { System.out.println("Welcome to Java"); } }
- Note : Select File Type as All files.
- Now open Command Prompt.
- Type following Commands.
C:Usersp.abhiman.taral>cd
C:>cd code
C:code>javac hello.java
C:code>java hello Welcome to Java
C:code>
If you are successful in getting “Welcome to Java” then you have installed java Correctly.