Page 324 - Computer_Science_F5
P. 324

Setting up the development               (b) Java Archive tool (jar): This tool
              environment (IDE and JDK                     packages your compiled class files
              installation)                                (bytecode) and additional resources
                                                           into a single archive file (JAR file)
              When you need to write Java programs,        for easier distribution.                Chapter Five: Object oriented programming with Java
              it is important to make sure Java Runtime   (c) Java debugger (jdb): This tool helps
          FOR ONLINE READING ONLY
              Environment  (JRE),  Java  Virtual           you identify and fix errors (bugs) in
              Machine (JVM) and Java Development           your code during development.
              Kit (JDK) are already installed in your   (d) Documentation: This tool provides
              computer.                                    extensive documentation on the Java
                                                           language, APIs, and libraries.
              The Java Runtime Environment (JRE)
              is a collection of software tools used to   Java Runtime Environment (JRE): The
              develop  Java applications. It includes   JRE is a software package that provides
              supporting  libraries,  platform  core   the necessary runtime  environment
              classes, and the Java  Virtual Machine   for executing Java applications.  It
              (JVM).  While  JRE  is  available  for   includes the JVM, which is responsible
              standalone download, it is a component  for executing Java bytecode.  The JRE
              of the Java Development Kit (JDK).       also contains  Java  class libraries  and
                                                       other components required to run Java
              Java Development Kit (JDK): The  programs. If you only need to run
              JDK is a software development kit that   Java  programs and  not  develop  them,
              provides the necessary tools, libraries,   installing the JRE is sufficient.
              and documentation  for developing
              Java applications.  It includes the Java   Java Virtual Machine (JVM): The JVM
              compiler, which converts Java source     is the runtime engine that executes
                                                       Java  bytecode.  It  is responsible  for
              code into bytecode that can be executed   loading,  verifying,  and  executing  Java
              by the JVM.                              programs. The JVM converts bytecode

                                                       into  machine-specific  code,  allowing
              The JDK also includes other development   Java programs to run on different
              tools  like  debuggers,  profilers,  and   platforms  without  modification.  It
              application  servers. It is essential for  also provides memory management,
              writing, compiling, and packaging Java  garbage collection, and other runtime
              programs. Some  components of JDK  services.  Therefore,  in short, JDK  is
              includes:                                used to develop and compile Java OOP
                                                       programs. JRE is used to run compiled
              (a) Java compiler (javac): This converts   Java OOP programs (bytecode) on any
                  your human-readable Java code        platform  installed  with  a  JRE.  JVM
                  (source code) into bytecode, a       is used to interpret  and execute  the
                  machine-independent intermediate     bytecode instructions in Java  OOP
                  representation.                      program.


                                                    315
               Student’s Book  Form Five



     Computer Science Form 5.indd   315                                                     23/07/2024   12:34
   319   320   321   322   323   324   325   326   327   328   329