Java Get Started

Java Get Started


Java Get Started

NO previous experience is needed to learn JAVA

Java Installation

If you have already installed any version of java in your computer system you can check the existing version using Command Prompt  type the following in Command Prompt (cmd.exe)

C:\Users\Your Name>java -version

 

If any java version is installed in your system you will see message like this

 

java version "1.8.0_271"
Java(TM) SE Runtime Environment (build 1.8.0_271-b09)
Java HotSpot(TM) 64-Bit
Server VM (build 25.271-b09, mixed mode)

 

 

If java is not yet installed in your computer you can install it from - oracle.com

 

Note - One can write java code in any IDE(Integrated development environment ) like IntelliJ IDEA, Netbeans or Eclipse, which are particularly useful when managing larger collections of Java files.

 

Setting Up Java in windows

  1. Go to System Properties (for system properties go to- Control Panel > System and Security > System > Advanced System Settings)
  2. Click on the “Environment variables” button under the “Advanced” tab
  3. Then, select the “Path” variable in System variables and click on the “Edit” button
  4. Click on the "New" button and add the path where Java is installed, followed by \bin. By default, Java is installed in C:\Program Files\Java\jdk- "1.8.0_271" (If nothing else was specified when you installed it). In that case, You will have to add a new path with: C:\Program Files\Java\jdk- "1.8.0_271"\bin then click ok.
  5.  And you are good to go, Now once again check the version.
  6. Setting permanent path of JDK in windows-
  • Go to MyComputer properties -> advanced tab -> environment variables -> new tab of user variable -> write path in variable name -> write path of bin folder in variable value -> ok -> ok -> ok

 

Step1 : Go to my computer properties and click on advanced tab

 

 

Step2: click on Environment variables

 

 

Step3: Edit Environmental variables

 

 

Step4: Click on the new tab of user variables

 

 

Step5: Write the path in the variable name

 

 

Step6: Copy the path of bin folder

 

 

Step7: Paste the bin folder path in variable value

 

 

Step8: Now click ok to finish the opening tabs and you are done.

 

public class T{
 
public
static void main(String[] args) {
    System.
out.println("Hello World");
  }
}

 

Note: lang package automatically added by compiler in your program