Create First Program in JAVA

0
Software Tool For Java:-
........................................................................
1 JDK + JRE

 JDK (Java Development Kit)

it is used to compile java program code to byte code.

.JAVA ----> .Class

JRE  (JAVA Runtime Environment)

it is used to execute byte code(class file) to machine code using JVM(Java Virtual Machine).

JVM is the virtual executor for java program code but JVM is operating System dependent.

but .class file is common for all JVM.


note:- 


for developer or learner machine  :-  JDK+JRE

for client machine :-   JRE (Java runtime environment)

................................................................................................................................................

How we check Java is installed in machine?

go on program files and check Java (JDK+JRE)


How we check that Java path is set or not?

command prompt and type javac.
if javac describes then the path is set.

internal or external command problem then the path is not set.


How we set the path?

1 temp path:-

 without admin permission, we can set this path .simple copy default path of java

c:/program files/java/jdk/bin

set path=C:\Program Files\Java\jdk1.8.0_161\bin


2 permanent path:-

  right click on mycomputer----> properties---> advance system setting--->environment variable----> new

variable name    path

variable value    C:\Program Files\Java\jdk1.8.0_161\bin


press ok ,ok and ok

restart command prompt



3  Open notepad and write code


class Classname
{
   public static void main(String args[])
   {
          System.out.println("statement");
   }

}


4 Save this program using .java file

  Classname.java

5  Compile this program

     javac Classname.java

6  Execute this program
   
    java Classname   



blog

shivaconceptsolution.blogspot.com

youtube

youtube.com/shivaconceptsolution

github

github.com/shivaconceptsolution



































Post a Comment

0Comments

POST Answer of Questions and ASK to Doubt

Post a Comment (0)