badge icon

This article was automatically translated from the original Turkish version.

Article

Java Programming Language

Quote
java.jpeg

Java Programming Language

Area/Type

Computing Platform and Programming Language

Fundamental Component

Java Plugin

JDK

JVM

JRE

Date

1995

Associated Structures

Oracle Corporation (Current)

Sun Microsystems (Initial Publisher)

Name

Java

Applications of Java(Generated with Visual Artificial Intelligence)

Java is a multi-platform, object-oriented programming language developed by James Gosling at Sun Microsystems in 1995. It runs on billions of devices across a wide range of applications, from smartphone operating systems to enterprise software. It is widely used in developing mobile applications such as Spotify and Signal, Internet of Things (IoT) devices, and scalable enterprise systems. Unlike JavaScript, Java is a general-purpose, compiled and interpreted language designed for building large-scale, multi-platform applications (Gosling et al., 2014).

Use Cases and Enterprise Solutions

Java is used in the development of mobile applications such as Spotify and Signal, web applications such as Twitter and LinkedIn, games such as Minecraft and RuneScape, Internet of Things (IoT) devices, and scalable enterprise software.


The Java SE platform developed for enterprise applications includes tools such as the Enterprise Performance Pack (EPP) and Java Management Service under the Oracle Java SE Universal Subscription. Additionally, the Oracle Cloud Infrastructure (OCI) cloud platform provides various infrastructure services including the OCI SDK for monitoring, optimizing Java distributions and managing OCI resources.

History

Java's development began in 1991 at Sun Microsystems. Originally designed as "Oak" for interactive television, the project was retooled as a programming language when it was deemed too advanced for the digital cable technology of the time, and renamed "Java". Designed with a syntax similar to C++ to ease adoption by developers, its first public release, Java 1.0, was launched in 1996 (Arnold et al., 2005).

Versions

Since its initial release in 1996, the Java platform has continuously evolved. Initially progressing through minor versions such as 1.0 and 1.1, the language underwent a major structural shift with Java 2 (J2SE 1.2). Today, the Java ecosystem managed by Oracle follows a Long-Term Support (LTS) versioning strategy. Java 8, Java 11, Java 17, and Java 21 stand out as the most widely adopted LTS versions in the enterprise world, receiving security patches over many years (Schildt, 2018).

Working Principle

Java operates on the principle of "Write Once, Run Anywhere" (WORA). Source code is not compiled directly into machine code but into bytecode (with a .class extension), which can be interpreted by the Java Virtual Machine (JVM). This allows code to be easily ported across different operating systems (Windows, Linux, macOS) without requiring complete rewrites (Lindholm et al., 2014).

Key Concepts

  • Binary Compatibility: The Java platform offers a flexible structure in which the linker verifies the integrity of binary files to be linked. Adding new fields or methods to a class is considered a binary-compatible change and does not require recompilation of other components (Drossopoulou et al., 1998).
  • Java Business Integration (JBI): A standard based on Service-Oriented Architecture (SOA) principles designed to integrate disparate applications within heterogeneous enterprise networks (Vinoski, 2005).
  • Java Runtime Environment (JRE): Composed of the Java Virtual Machine (JVM), core classes, and supporting libraries, the JRE provides the environment required for running Java applications.

Just-In-Time (JIT) Compilation

In software systems, Just-In-Time (JIT) compilation techniques encompass all dynamic translation operations performed after a program begins execution. JIT compilation combines the execution speed advantages of static compilation with the flexibility of interpreters. Thanks to this technique, compiled programs run faster while interpreted programs typically offer smaller size and higher portability.


Java API

Java API (Application Programming Interface) is a comprehensive standard library that provides developers with ready-to-use functions for network connections, database operations, mathematical calculations, and file input/output (I/O) operations. Developers can quickly and safely generate code using core packages such as java.lang, java.util, and java.io without reinventing the wheel (Schildt, 2018).

Garbage Collector

Memory management in Java is handled automatically by the garbage collector, eliminating the need for manual memory deallocation via pointers as in C/C++. In advanced compiler architectures, the compiler gathers and exposes information necessary for accurate garbage collection. This process includes recording the precise locations of all live object pointers at specific safe points to enable the garbage collector to safely examine objects.


Jar (Java Archive)

JAR (Java Archive) is a packaging format that compresses multiple Java class files, associated metadata, and resources such as images and audio into a single file. Based on the ZIP format, this structure greatly simplifies the distribution and execution of Java applications for end users (Schildt, 2018).

AWT and Swing

AWT (Abstract Window Toolkit) is a graphical user interface (GUI) library developed in the early years of Java that uses native operating system UI components. To overcome AWT's platform-dependent limitations, Swing was developed as a fully Java-based, more flexible, rich, and lightweight component library (Loy et al., 2002).

SWT (Standard Widget Toolkit)

SWT is an alternative open-source graphical user interface toolkit developed by IBM and forming the foundation of the Eclipse integrated development environment (IDE). Unlike Swing, SWT works by invoking the native UI widgets of the underlying operating system, providing applications with a more "natural" appearance and, in some scenarios, higher performance (Warner & Harris, 2004).

HotSpot Technology

The Java HotSpot Virtual Machine is an architecture designed to improve performance by optimizing frequently executed application code (hot spots). The runtime environment uses an adaptive optimization strategy to focus compilation efforts on methods critical to performance. These optimizations include class-hierarchy-sensitive inlining, fast-path/slow-path structures, global value-numbering, graph-coloring register allocation, and optimistic constant propagation. If runtime changes such as dynamic class loading invalidate the compiler's optimization decisions, the system deoptimizes dependent methods and safely reverts execution to the interpreter.


Applet

Java Applets were small-scale Java applications designed to run within web browsers. Although popular in the early days of the web for delivering interactive content, they have been deprecated and entirely removed from the Java ecosystem due to security vulnerabilities and the rise of modern web technologies such as HTML5 and JavaScript.

WebStart

Java Web Start (JWST) was a technology that allowed users to download and launch Java desktop applications with a single click via a web browser. This technology ensured that applications always ran the latest version over the network but has since been rendered obsolete by modern deployment tools and was officially removed as of Java 11.

Java Syntax

Java is a general-purpose, strongly typed language with a verbose syntax based on C and C++. Every variable must have its data type explicitly declared, and all code must be enclosed within a class block.

Hello World!

The traditional "Hello World" program, illustrating Java's strict object-oriented structure, is written as follows:


public class MerhabaDunya {

public static void main(String[] args)

{ System.out.println("Merhaba, Dünya!");

} }

Comprehensive Example

A simple example in Java summarizing object-oriented programming (OOP) principles with inheritance and class structure:

// Superclass

class Arac {

String marka; public void calistir() {

System.out.println("Araç çalışıyor."); }

}

// Subclass

class Araba extends Arac {

int kapiSayisi;

public Araba(String marka, int kapiSayisi) {

this.marka = marka; this.kapiSayisi = kapiSayisi;

} }

public class AnaSinif {

public static void main(String[] args) {

Araba benimArabam = new Araba("Volkswagen", 4);

benimArabam.calistir();

System.out.println("Marka: " + benimArabam.marka);

} }

Documentation

Java includes Javadoc, a tool that automatically generates HTML-formatted technical documentation from special comment blocks within the code. Developers can effortlessly convert their comments into a standardized format using /** ... */ blocks (Gosling et al., 2014).

Use Cases and Enterprise Solutions

Java is used in the development of mobile applications such as Spotify and Signal, web applications such as Twitter and LinkedIn, games such as Minecraft and RuneScape, Internet of Things (IoT) devices, and scalable enterprise software.


The Java SE platform developed for enterprise applications includes tools such as the Enterprise Performance Pack (EPP) and Java Management Service under the Oracle Java SE Universal Subscription. Additionally, the Oracle Cloud Infrastructure (OCI) cloud platform provides various infrastructure services including the OCI SDK for monitoring, optimizing Java distributions and managing OCI resources.

Binary Compatibility

In traditional separate compilation processes, when the signature of a unit is modified, all units importing it must be recompiled. However, the Java platform offers a flexible structure in which the linker verifies the integrity of binary files to be linked. Binary compatibility refers to the ability of a modified type (class or interface) to continue linking and executing without errors with previously compiled binaries, without requiring recompilation.

Safe Changes and Limitations

Adding new fields or methods to an existing class is considered a binary-compatible change. Such modifications do not require recompilation of other parts of the application. However, not all binary-compatible changes specified in the language specification guarantee safe execution; for example, adding methods to interfaces is listed as compatible in the specification but may not always result in successful linking or error-free execution.

Difference from JavaScript

Java is a general-purpose language designed for building large-scale, multi-platform applications. JavaScript, by contrast, is a different technology used to create scripts that enable browser-based functionalities such as page animations, pop-up ads, or user behavior logging without requiring a page reload.

Java Business Integration (JBI) and Enterprise Integration

Java Business Integration (JBI), also known as JSR 208, is a standard developed to integrate disparate applications and operating systems within heterogeneous enterprise networks. Traditional Enterprise Application Integration (EAI) systems were considered low-performance and costly due to their reliance on proprietary protocols and multiple format conversions. To overcome these issues, JBI abstracts inter-system communication by leveraging Service-Oriented Architecture (SOA) and Web services principles.


JBI Architecture and Components

JBI features a pluggable architecture consisting of a container and plug-ins, all running within a single Java Virtual Machine (JVM). Components in the system interact via an abstract service model defined using WSDL (Web Services Description Language), independent of any specific protocol. The architecture primarily consists of the following components:

Binding Components (BC)

Adapters that enable external services outside the JBI environment to communicate with the system.

Service Engines (SE): Sub-containers hosted directly within the JBI environment; they can execute various message processors such as XSLT engines, BPEL systems, or POJOs (Plain Old Java Objects).

Normalized Message Router (NMR): The central component that mediates message exchange between service consumers and providers. The NMR treats messages as opaque data, eliminating the need to convert them into canonical formats and thereby improving performance.

Management and Monitoring

Administrative tasks such as installation, deployment, starting, stopping, and lifecycle monitoring of components within the JBI environment are performed via the Java Management Extensions (JMX) architecture.


Message Exchange Patterns (MEP)

Communication within the JBI environment occurs over delivery channels. Consumers and providers use the following four standard WSDL Message Exchange Patterns:

Advantages of Java

  • Multi-Platform Support (Portability): Thanks to the "Write Once, Run Anywhere" (WORA) principle, code written for one operating system (e.g., Windows) can be easily ported to another platform such as a smartphone, provided it has a Java Virtual Machine (JVM), without requiring complete rewrites.
  • Object-Oriented Structure: Java is among the first languages to organize code around classes and objects rather than functions and commands. This structure forms the foundation of modern languages such as C++ and Python and provides developers with a more organized coding approach.
  • Versatility: Java is a flexible and robust platform usable across a broad spectrum, from smartphones and smart TVs to mobile and web applications and Internet of Things (IoT) devices.
  • High Scalability: Its high scalability, especially designed for serving large groups or organizations, makes Java highly attractive to developers for enterprise software such as billing systems and supply chain management.
  • Ease of Learning and Support Network: Java is widely regarded as an excellent first language for learning programming fundamentals. Its relatively easy learning curve is supported by continuous access to online tutorials, bootcamps, and extensive online communities.

Disadvantages of Java

  • Performance and Execution Speed: Java applications typically run slower than natively compiled languages such as C or C++ because their code is compiled into bytecode and interpreted by the Java Virtual Machine (JVM). Additionally, Java applications have a longer startup time compared to some other languages.
  • Memory Consumption: Java consumes more memory (RAM) than other native programming languages due to the JVM maintaining class metadata and running background virtual machine processes.
  • Garbage Collection Overhead: Memory management in Java is handled automatically by the garbage collector. While this reduces memory leaks, it removes direct control from the developer over memory deallocation. CPU usage during garbage collection and occasional application pauses can cause performance issues in systems requiring low latency.
  • Lack of Low-Level Programming Support: Java does not support pointer-based direct memory access for security and robustness reasons. As a result, it is inadequate for low-level programming tasks such as operating system or device driver development that require pointer arithmetic and direct hardware manipulation.
  • Verbose Syntax: Java is a verbose language, requiring more lines of code than languages like Python to perform simple tasks. This can affect code organization and readability in large projects.
  • Graphical User Interface (GUI) Development: Although Java provides tools like Swing and JavaFX, its GUI development framework is considered more cumbersome compared to native platform-specific tools for building complex desktop user interfaces.

Bibliographies

Arnold, K., Gosling, J., & Holmes, D. (2005). *The Java Programming Language* (4th ed.). Addison-Wesley Professional.https://www.acs.ase.ro/Media/Default/documents/java/ClaudiuVinte/books/ArnoldGoslingHolmes06.pdf

Drossopoulou, S., Wragg, D., & Eisenbach, S. (1998). "What Is Java Binary Compatibility?". *OOPSLA '98: Proceedings of the 13th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications*, 341-358.https://doi.org/10.1145/286936.286974

Gosling, J., Joy, B., Steele, G., Bracha, G., and Buckley, A. (2014). *The Java Language Specification* (Java SE 8 ed.). Addison-Wesley.

Lindholm, T., Yellin, F., Bracha, G., & Buckley, A. (2014). *The Java Virtual Machine Specification* (Java SE 8 ed.). Pearson Education.

Loy, M., Eckstein, R., Wood, D., Elliott, J., & Cole, B. (2002). *Java Swing* (2nd ed.). O'Reilly Media.https://books.google.com.tr/books/about/Java_Swing.html?id=oJA_AQAAIAAJ&redir_esc=y

Schildt, H. (2018). *Java: The Complete Reference* (11th ed.). McGraw-Hill Education.

Vinoski, S. (2005). "Java Business Integration." *IEEE Internet Computing*, 9(4), 89–91.https://dl.acm.org/doi/abs/10.1109/MIC.2005.86

Warner, R., & Harris, R. (2004). *The Definitive Guide to SWT and JFace*. Apress.

Author Information

Avatar
AuthorMuhammed NAZLIERJuly 14, 2026 at 2:23 PM

Discussions

No Discussion Added Yet

Start discussion for "Java Programming Language" article

View Discussions

Contents

  • Use Cases and Enterprise Solutions

  • History

  • Versions

  • Working Principle

    • Key Concepts

  • Just-In-Time (JIT) Compilation

  • Java API

  • Garbage Collector

  • Jar (Java Archive)

  • AWT and Swing

  • SWT (Standard Widget Toolkit)

  • HotSpot Technology

  • Applet

  • WebStart

  • Java Syntax

    • Hello World!

    • Comprehensive Example

  • Documentation

  • Use Cases and Enterprise Solutions

  • Binary Compatibility

  • Difference from JavaScript

  • JBI Architecture and Components

    • Binding Components (BC)

    • Management and Monitoring

    • Message Exchange Patterns (MEP)

  • Advantages of Java

  • Disadvantages of Java