Beginning Programming
Creating and Running Java Application
Creating and Running Java Application
We have been learning the basic concepts of Java and running code fragments from the text area. However, to actually develop and run a Java application, we need do something more. We must install the necessary software
- JDK or Java Development Kit, which is software that can be used to develop Java based software. The JDK consists of software including Java Runtime Environment (JRE), Java compiler (javac), debugger, additional support software needed to write Java applications.
- The Java Runtime Environment (JRE) is required to execute Java code. It consists of the Java Virtual Machine (JVM) plus standard classes and libraries needed to execute the code. The emulation capability of the JVM allows execution of Java code in a platform independent way using the java command.
The typical execution cycle for a Java application, say to print Hello World is pictured below
A Java application must have the extension .java - this is a language rule. Upon compiling, it gets converted to a class file also known as bytecode. The JVM executes the class file using the java command.
No comments:
Post a Comment