# java-sdk **Repository Path**: alamhubb/java-sdk ## Basic Information - **Project Name**: java-sdk - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-06-08 - **Last Updated**: 2026-06-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Qin Java SDK JS `@qin/java-sdk-js` is Qin's Java standard-library runtime for Java code lowered to JavaScript. This package is intentionally a **Java 8 web subset**, not a full JDK clone. The goal is to support Java APIs that can run correctly inside JavaScript engines used by browsers, Node, and Vite-compatible tooling. ## Scope Supported APIs should be: - Deterministic in a JavaScript runtime. - Implementable without JVM threads, native files, processes, class loaders, or OS-specific services. - Needed by Qin Java-to-JS lowering or frontend Java experiments. - Covered by focused smoke tests before being treated as supported. ## In Scope Current and planned web-friendly areas: - `java.lang`: strings, boxed primitives, enum, throwable hierarchy, `System` time/property subset, `StringBuilder`. - `java.io.IOException`: exception type shape only, not filesystem behavior. - `java.util`: `ArrayList`, `List`, `HashSet`, `Set`, `HashMap`, `Map`, `Arrays`, `Collections`, `Objects`, `Optional`, stream subset, atomic value helpers. - `java.util.regex`: `Pattern` and `Matcher` backed by JavaScript `RegExp`, with documented semantic gaps where JS cannot match Java exactly. - `java.time`: browser-safe date/time formatting subset. ## Out Of Scope These are not frontend/web SDK promises: - JVM threads, monitors, executors, and blocking concurrency. - `java.io` and `java.nio.file` filesystem APIs, including virtual path shims. Qin tooling may use a separate runtime entry for those, but they are not part of the web SDK. - Native filesystem mutation as real disk IO in browsers. - Processes, shells, native libraries, JNI, `Unsafe`, class loaders, security manager APIs. - Raw sockets or JVM networking APIs that cannot be faithfully represented in browser JavaScript. - Full reflection. Qin may provide generated metadata only for classes it lowers. ## Rule When generated JavaScript needs a missing Java API, add the smallest correct web-compatible implementation here and add a smoke test in Qin. Do not silently fake unsupported JVM/OS behavior as if it were a complete JDK implementation.