Wednesday, April 5, 2017

Run your first java program

ØSet up/Install Java
1. Make sure the JDK is installed and that the jdk/bin directory is on the executable path.



2. Updating the PATH Environment Variable



3.Verify Java Installed Correctly

Windows + R = Open Run







Simple Program of Java
In this page, we will learn how to write the simple program of java. We can write a simple hello java program easily after installing the JDK.
To create a simple java program, you need to create a class that contains main method.
Let's understand the requirement first

Requirement for Hello Java Example

For executing any java program, you need to
●        Install the JDK if you don't have installed it, download the JDK and install it.
●        Set path of the jdk/bin directory.
●        create the java program
●        compile and run the java program


Creating hello java example


To compile:      javac HelloWorld.java

To execute:     java HelloWorld


Output: HELLO WORLD

No comments:

Post a Comment

Socket Programming in Java

Source Code: client Side: package learning; import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event....