Java Assignment
Java Assignment
Java Assignment
-Java was developed by James Gosling at Sun Microsystems Inc in May 1995 and later
acquired by Oracle Corporation. Java is a class-based, object-oriented programming language
that is designed to have as few implementation dependencies as possible. It is intended to let
application developers write once, and run anywhere (WORA), meaning that compiled Java
code can run on all platforms that support Java without the need for recompilation. Java was
first released in 1995 and is widely used for developing applications for desktop, web, and
mobile devices. Java is known for its simplicity, robustness, and security features, making it a
popular choice for enterprise-level applications.
-The story of Java begins in June 1991, when a small team of engineers at Sun Microsystems,
led by James Gosling, started a project called Green. The goal of the project was to develop a
programming language for consumer electronic devices, such as smart TVs, set-top boxes, and
handheld controllers. These devices needed a language that was simple, robust, portable, and
secure, as they had limited memory and processing power, and had to communicate with each
other over different networks.
The team initially named the language Greentalk, with the file extension .gt. Later, they renamed
it to Oak, after an oak tree that stood outside Gosling’s office. Oak was influenced by several
other languages, such as C, C++, Smalltalk, Lisp, and Ada. However, Oak was not designed for
the web, which was emerging as a new platform for distributed computing and information
sharing.They also decided to rename Oak to Java, as there was already another language
called Oak. The name Java was chosen because it was simple, unique, fun to say, and evoked
the idea of coffee, which the team consumed a lot during their long working hours. Java is not
an acronym; it is just a name.
— Java is object-oriented.
This allows you to create modular programs and reusable code.
— Java is platform-independent.
One of the most significant advantages of Java is its ability to move easily from
one computer system to another. The ability to run the same program on many
different systems is crucial to World Wide Web software, and Java succeeds at
this by being platform-independent at both the source and binary levels.
jConsole
jar
javap
jarSigner
jstack
javaws
keytool
policytool
Java applications are primarily called Write once Run Anywhere (WORA) because of
their ability to run on any platform. Amid this, JVM offers a runtime environment for
executing Java Code or applications, further converting Java bytecode into machine
language. Usually, in other programming languages, the compiler produces machine
code for a specific system, but the Java compiler initiates for JVM.
ClassLoader Subsystem
Loading
Initialization
Linking
Stack
Runtime Data Area, which includes heap area, method area, etc.
– Equipped with loader class, class libraries, and JVM, JRE helps in running other
software. To explain in basic terminology, JRE is responsible to run a Java program.
All-in-all, JRE is installed on the computer system that takes hold of Java code, blends it
with the desired libraries, and allows JVM to execute it. A programmer needs JDK, and
if you are one, then you will need JDK. However, JRE’s role is limited to running Java
programs as it doesn’t flaunt tools related to development like compiler or debugger. But
if you wish to run Java applets, it is imperative to have JRE installed in your system. As
it is platform-dependent, you have to download and install JRE that is compatible with
your operating system.
DLL files
When it comes to extension, Java component example includes files related to locale
specification like localedata.jar
Security management files like java. security
–The Java Virtual Machine is a virtual “machine” that provides a runtime environment for
Java applications and programs. Its role is simple: interpret and execute Java bytecode,
which a low-level representation of the compiled form of a piece of Java code. When
applications written in Java are compiled, they produce bytecode, which can be executed
(or run) by any JVM implementation, regardless of the underlying architecture, hardware, or
operating system.
Java’s JVM is platform-independent, meaning Java programs can be written once and run
on any JVM implementation – a principle known as WORA or write once, run anywhere.
This concept of WORA is achieved courtesy of a layer of abstraction residing between the
Java code and the underlying OS and hardware. At runtime, the JVM interprets the
resultant bytecode and translates it into native machine code, accounting for the
characteristics of the underlying system it will run on.
– Like all APIs, Java API acts as an intermediary between different elements of an
information system or systems. However, Java API is different from most APIs in that its
functionality is largely internal in nature. It sits in between the JVM and the Java
program.
In practical terms, the Java API is integrated into the Java Development Kit (JDK). It
delivers a connection interface between different Java “classes,” as pre-created Java
code components are known, as well as between Java user interfaces and the
underlying JVM. The Java API explains the function of each class or interface. Using
Java API, a Java developer can utilize the various pre-written Java components.