Page 308 - CITS - Computer Software Application -TT
P. 308

COMPUTER SOFTWARE APPLICATION - CITS



           Java is interpreted
           Java supports cross-platform code through the Java bytecode. use of Bytecode can be interpreted on any platform
           by JVM.
           Java is distributed
           Java was designed with the distributed environment. Java can be transmit, run over the internet.


            JVM, Byte codes and Class path


           JDK, JRE, and JVM are essential components in the world of Java programming, each serving a specific role in
           the development and execution of Java applications:
           JDK (Java Development Kit)
           The JDK is a software package provided by Oracle (and other vendors) that includes all the tools and libraries
           necessary for Java application development. It contains the following key components:
           •  Java Compiler (javac): This tool is used to compile Java source code (.java files) into bytecode (.class files),
              which can be executed by the Java Virtual Machine (JVM).

           •  Java  Runtime Environment (JRE):  The JRE is also  included  in  the JDK. It is needed  for running  Java
              applications but not for developing them. The JRE consists of the JVM and essential libraries.
           •  Development Tools: The JDK includes various development tools like   debugging tools, JavaDoc for generating
              documentation, and more.
                Developers use the JDK to write, compile, and package Java applications.
           JRE (Java Runtime Environment)
           The JRE is a subset of the JDK and is required to run Java applications. It includes the following components:

           •  Java Virtual Machine (JVM):  The JVM  is the  runtime engine responsible  for  executing Java bytecode.
              It interprets and translates bytecode into machine-specific code that the underlying operating system can
              understand. Each platform (e.g., Windows, Linux, macOS) has its own JVM implementation,
           •  Java Standard Library: The JRE includes a set of core libraries and classes that provide essential functionality
              to Java applications. These libraries offer features like input/output operations, networking, and more.

           End-users who want to run Java applications need the JRE installed on their system. It allows them to execute
           Java programs without the need for development tools.
           JVM (Java Virtual Machine)

           The JVM is the runtime environment in which Java bytecode is executed. It is an integral part of both the JDK and
           the JRE. The JVM performs several crucial tasks:
           •  Loading: It loads compiled Java bytecode (class files) into memory.
           •  Verification: The JVM checks the bytecode for security and integrity to prevent potential security vulnerabilities.

           •  Execution:  The  bytecode  is  executed  by  the  JVM,  which  translates  it  into  machine  code  specific  to  the
              underlying hardware and operating system.
           •  Memory Management: The  JVM  manages  memory  allocation  and  garbage  collection  to  ensure  efficient
              memory usage.
           •  Security: The JVM enforces Java’s security model, including access control, class-loading restrictions, and
              more.

           JVM Architecture
           Java applications are often referred to as WORA, which stands for “Write Once Run Anywhere.” This concept
           signifies that a programmer can write Java code on one system and anticipate it to run on any other Java-enabled
           system without the need for modifications. This seamless portability is made possible due to the presence of the
           Java Virtual Machine (JVM).



                                                           295
                               CITS : IT&ITES - Computer Software Application - Lesson 78 - 84





  78
   303   304   305   306   307   308   309   310   311   312   313