惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Stack Overflow Blog
Stack Overflow Blog
量子位
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
美团技术团队
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏
Recent Announcements
Recent Announcements
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Microsoft Security Blog
Microsoft Security Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
酷 壳 – CoolShell
酷 壳 – CoolShell
J
Java Code Geeks
V
V2EX
大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
博客园 - Franky
爱范儿
爱范儿
T
Tailwind CSS Blog
A
About on SuperTechFans
Google DeepMind News
Google DeepMind News
博客园_首页
B
Blog RSS Feed
博客园 - 司徒正美
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Why Java Was Created — The Platform Independence Story
Sakshi Hanwat · 2026-06-17 · via DEV Community
Cover image for Why Java Was Created — The Platform Independence Story

Sakshi Hanwat

I started learning Core Java today. Most tutorials just throw syntax at you, but I wanted to understand why Java even exists. Here's what I found.

The World Before Java

Before Java, C and C++ were ruling the programming world. They were fast, relatively simple, and got the job done. So why did we need something new?
One word: portability.
When you write C++ code, a compiler converts it into machine code — the 0s and 1s your computer actually understands. But here's the catch: that machine code is tied to a specific platform.
A platform = OS + Processor
For example:

Windows + Intel x86 = one platform
macOS + ARM = a completely different platform

The machine code generated for one platform cannot run on another. Why? Two reasons:

Every OS has different system libraries — even something as simple as printing to console works differently on Windows vs macOS
Every processor has a different ISA (Instruction Set Architecture) — basically the grammar that CPU understands. Intel speaks differently than ARM at the hardware level.

So if you had a C++ app and wanted it to run on 3 different platforms, you had to compile it 3 separate times. In the 1990s when new devices were exploding — TVs, set-top boxes, embedded systems — this became a massive problem.

What Java Did Differently — Bytecode + JVM

Java introduced a two-step process instead of compiling directly to machine code.
Step 1: Your .java source file is compiled by javac into bytecode — a .class file. Bytecode is not machine code. It's an intermediate code that no specific machine understands directly.
Step 2: The bytecode is given to the JVM (Java Virtual Machine). JVM reads it and converts it into the native machine code of that platform and runs it.
The magic here: bytecode is the same everywhere. Only JVM changes per platform.
JVM itself is platform-dependent — there's a separate JVM for Windows, one for macOS, one for Linux. But once you compile your Java code to bytecode, that single .class file runs on all of them.
This is Java's famous promise: WORA — Write Once, Run Anywhere.
Inside JVM, there's also a JIT (Just-In-Time) compiler that makes things faster — instead of interpreting bytecode line by line every time, it compiles frequently used code into native machine code at runtime and caches it.

Java Also Solved Two More Problems

Simplicity — C++ had pointers, multiple inheritance, and manual memory management. Java removed all of these. It added garbage collection so memory is managed automatically.
Security — When Java applets (small Java programs) ran inside browsers downloaded from the internet, there was a risk of malicious code. JVM solved this with a sandbox model — it runs bytecode in a restricted environment where the code cannot access your file system, memory, or network without explicit permission. Even if someone puts harmful code in a Java program, the JVM sandbox blocks unauthorized actions before they reach your actual system.
Interestingly, JVM alone solves both portability and security. That's why it's the heart of Java.

One-Line Summary

Java compiles your code to bytecode once. JVM on each platform converts that bytecode to machine code. That's how Java became platform independent — and changed programming forever.

What I'm Using to Learn

Java Full Course 2026 by Coder Army on YouTube — highly recommend, explains internals not just syntax.

This is Day 1 of my Java learning series. I'm sharing everything I learn, in my own words, as I go.