# swiftlang/swift-java

Java interopability support for Swift

Repository: https://github.com/swiftlang/swift-java
Canonical: https://ross.abutalabs.com/products/swift-java
Homepage: https://swiftpackageindex.com/swiftlang/swift-java/main/documentation/swiftjavadocumentation
Language: Swift
License: Apache-2.0
License Family: permissive
Last push: 2026-09-03T01:20:44+00:00

## Health v2 (maintenance only)
Score: 89/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 100, release rhythm 96, longevity 50
- inputs: {"age_days": 708, "days_push": 0, "days_rel": 24, "gap_med": 12, "n_releases_24m": 10}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1247, forks 122 (observed 2026-09-03T02:15:18.279116+00:00)

## What it is
A set of tools and libraries from Apple's swiftlang org enabling Swift and Java interoperability. It includes the SwiftJava library with macros for calling Java from Swift via JNI, and the swift-java tool for generating bindings in either language.

## Use cases
- call Java libraries from a Swift program
- generate Swift bindings for Java classes
- generate Java bindings for Swift code
- write JNI code without manual boilerplate
- integrate Swift and Java in the same project

## When to choose
- you need to mix Swift and Java code in one application
- you want automated binding generation between Swift and Java
- you're on Swift 6.2+ with JDK 17+ and need language interop

## When to avoid
- you need a stable, published Maven dependency - supporting libraries must be self-published locally
- you're on Swift versions older than 6.2
- you need interop with other JVM languages like Kotlin beyond Java APIs

## Facets
- artifact type: library
- maturity: active
- function: sdk, parser, developer-tools
- domain: programming-languages, developer-tools, cross-platform
- platform: jvm, windows, cross-platform
- tags: swift-java-interop, jni, bindings-generator, language-interop, swift, macos, linux

## Member repositories
- swiftlang/swift-java (main) score 89

## Provenance
- Observed fields: from GitHub, fetched 2026-09-03T02:15:18.279116+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T05:08:21.328866+00:00, confidence not recorded.
  - readme: https://github.com/swiftlang/swift-java (fetched 2026-09-03T02:15:18.279116+00:00, sha e0014a354b8f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
