Compile and Run Java Program

Advertisements

Java First Program JDK JVM JRE

Compile and Run Java Program

In the Java programming language, all source code is first written in plain text files and save with the .java extension. After compilation, .class files are generated by javac compiler. A .class file does not contain code that is native to your processor; it instead contains bytecodes (it is machine language of the Java Virtual Machine1 (JVM)).

compile and java code

The java launcher tool then runs your application with an instance of the Java Virtual Machine (JVM).

run java program

Steps For compile Java Program

  • First Save Java program with same as class name with .java extension.
    Example: Sum.java
  • Compile: javac Filename.java
    Example, javac Sum.java

Note: Here javac is tools or application programs or exe files which is used for Compile the Java program.

Steps For Run Java Program

  • For run java program use java tool.
  • Run by: java Filename
    Example: java sum

Note: Here java is tools or application programs or exe files which is used for run the Java program.

Steps For compiling and executing the java program

The following sequence of steps represented in the diagram use compiling the java program and executing the java programs.

Compile and run java

In the above diagram javac and java are called tools or application programs or exe files developed by sun micro system and supply as a part of jdk 1.5/1.6/1.7 in bin folder (starting directory of java is called java home directory).


Java First Program JDK JVM JRE

Advertisements

Buy This Ad Space @$20 per Month, Ad Size 600X200 Contact on: hitesh.xc@gmail.com or 9999595223

Pure VPN Privide Lowest Price VPN Just @ $1.65. Per Month with Non Detected IP Lowest Price Non Detected IP VPN

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

For Projects 9999595223

Google Advertisements


Buy Websites 9999595223

Buy College Projects with Documentation Contact on whatsapp 9999595223. Contact on: hitesh.xc@gmail.com or 9999595223 Try this Keyword C++ Programs

Advertisements