0% found this document useful (0 votes)
349 views11 pages

Java Setup and Hello World Guide

Utav Soni is a student in the IT branch with enrollment number 194510316051. The aim of the document is to provide steps to install JDK, write a simple Hello World Java program, compile, debug and execute it using the Java compiler and interpreter. It outlines downloading and installing the JDK, setting environment variables like PATH and CLASSPATH, writing a Hello World program in Java, and checking the command prompt output to confirm a successful installation and run.

Uploaded by

Utsav Soni
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
349 views11 pages

Java Setup and Hello World Guide

Utav Soni is a student in the IT branch with enrollment number 194510316051. The aim of the document is to provide steps to install JDK, write a simple Hello World Java program, compile, debug and execute it using the Java compiler and interpreter. It outlines downloading and installing the JDK, setting environment variables like PATH and CLASSPATH, writing a Hello World program in Java, and checking the command prompt output to confirm a successful installation and run.

Uploaded by

Utsav Soni
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
  • Practical Overview
  • Java JDK Installation
  • Setting Environment Variables
  • Hello World Program

PRACTICAL=1

NAME: UTSAV SONI


BRANCH: IT (INFORMATION TECHNOLOGY)
ENROLLMENT NO:-194510316051

AIM:-INSTALL JDK,Write a Simple “Hello World” OR Similar


Java Program,Compilation,debugging,executing using Java
Compiler and interpreter.
Install JDK, write a simple Hello World java program,
compilation, debugging, executing using java compiler and
interpreter.

Lab 1
AIM: Install JDK, write a simple "Hello World" java program, compilation,
debugging, executing using java compiler and interpreter.

Step 1: Go to link. Click on Download JDK. For java latest version.
Step 2: Next,

1. Accept License Agreement


Download latest Java JDK for your version(32 or 64 bit) of java for Windows.
Download latest Java JDK for your version(32 or 64 bit) of java for Windows.

Step 3: Once the download is complete, run the exe for install JDK. Click Next
Step 4: Once the installation is complete click Close
How to set Environment Variables in Java: Path and
Classpath
The PATH variable gives the location of executables like javac, java etc. It is
possible to run a program without specifying the PATH but you will need to give
full path of executable like C:\Program Files\Java\jdk1.8.0_131\bin\javac
[Link] instead of simple javac [Link]
The CLASSPATH variable gives the location of the Library Files.
Let's look into the steps to set the PATH and CLASSPATH
Step 1: Right Click on the My Computer and Select the properties

Step 2: Click on advanced system settings


Step 3: Click on Environment Variables

Step 4: Click on new Button of User variables

Step 5: Type PATH in the Variable name.


Step 6: Copy the path of bin folder which is installed in JDK folder.

Step 7: Paste Path of bin folder in Variable value and click on OK Button.

Note: In case you already have a PATH variable created in your PC, then paste
your path separated with a semi-comma (;), edit the PATH variable to

PATH = <JDK installation directory>\bin;%PATH%;

Here, %PATH% appends the existing path variable to our new value

Step 8: You can follow a similar process to set CLASSPATH.


Note: In case you java installation does not work after installation, change
classpath to

CLASSPATH = <JDK installation directory>\lib\[Link];

Step 9: Click on OK button


Step 10) Go to command prompt and type javac commands.
If you see a screen like below, Java is installed.
Now Here your Hello World Program
[Link]
class HelloWorld
{
public static void main(String arg[])
{
[Link]("HelloWorld!!");
}
}

Output

PATH = \bin;%PATH%;
[Link]

PRACTICAL=1
NAME: UTSAV SONI
BRANCH:  IT (INFORMATION TECHNOLOGY)
ENROLLMENT NO:-194510316051
AIM:-INSTALL JDK,Write a Simple
Step 2: Next,
1. Accept License Agreement
Download latest Java JDK for your version(32 or 64 bit) of java for Windows.
Download latest Java JDK for your version(32 or
Step 4: Once the installation is complete click Close
How to set Environment Variables in Java: Path and 
Classpath
The PATH variable gives the location of executables like javac,
Step 3: Click on Environment Variables
Step 4: Click on new Button of User variables
Step 5: Type PATH in the Variable name.
Step 6: Copy the path of bin folder which is installed in JDK folder.
Step 7: Paste Path of bin folder in Variable value and
Note: In case you java installation does not work after installation, change 
classpath to
 CLASSPATH = <JDK installation dir
Step 10) Go to command prompt and type javac commands.
If you see a screen like below, Java is installed.
Now Here your Hello World Program
HelloWorld.java
    class HelloWorld
    {
        public static void main(String arg[])

You might also like