DEV.co
Open-Source Databases · realm

realm-java

Realm Java is a mobile-first embedded database for Android that replaces SQLite and traditional ORMs. However, MongoDB deprecated the Realm SDKs and Device Sync in September 2024, signaling end-of-life for this product line.

Source: GitHub — github.com/realm/realm-java
11.5k
GitHub stars
1.7k
Forks
Java
Primary language
Apache-2.0
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositoryrealm/realm-java
Ownerrealm
Primary languageJava
LicenseApache-2.0 — OSI-approved
Stars11.5k
Forks1.7k
Open issues395
Latest releaseUnknown
Last updated2025-09-15
Sourcehttps://github.com/realm/realm-java

What realm-java is

Realm Java provides object-oriented data persistence with thread-safety, encryption, and real-time sync capabilities via Realm Core (C++). It runs on Android 5.0+ and integrates via Gradle plugin; the codebase remains on GitHub but is no longer actively developed per deprecation notice.

Quickstart

Get the realm-java source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/realm/realm-java.gitcd realm-java# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Legacy Android projects requiring minimal ORM boilerplate

Existing codebases already using Realm Java for local data storage can continue to operate. Simple queries and object relationships without SQL scaffolding remain functional.

Offline-first mobile apps with local-only persistence

Apps that do not require cloud sync and only need embedded data storage can use Realm's encryption and thread-safe queries without depending on the deprecated Device Sync layer.

Prototyping or educational Android database projects

Small-scale projects or learning exercises where Realm's intuitive API reduces setup friction compared to Room/SQLite, though production use is not recommended.

Implementation considerations

  • Realm Java requires Android SDK Build-Tools 29.0.3, NDK 21.0.6113669, CMake 3.18.4, and JDK 8; build from source is possible but time-intensive (1+ hour full build).
  • 395 open issues remain unresolved; assess whether any block your use case, as issue triage will be minimal post-deprecation.
  • Migration path required if you later need cloud sync or upgrade to Kotlin Multiplatform; plan data export/transformation early.
  • Encryption and thread-safety are built-in; configure carefully for production, but expect no vendor guidance on hardening.
  • API surface is small (~few classes), lowering learning curve but also limiting flexibility for complex query patterns.

When to avoid it — and what to weigh

  • You need active vendor support and security patches — Realm Java is deprecated. MongoDB will not issue new feature releases or security updates. Critical bugs in older Android versions or JVM compatibility will go unaddressed.
  • You plan to use Device Sync or real-time cloud backend — Device Sync is also deprecated and will be shut down. Attempting to build new real-time sync features on this SDK will fail or become stranded.
  • You are starting a new Android project — MongoDB explicitly recommends Realm Kotlin for new projects. For new Java/Android codebases, use Room (Google's first-party solution) or alternative ORMs with active maintenance.
  • You require long-term stability and security compliance — Deprecation status means no guaranteed SLA for security fixes, compliance updates, or compatibility with future Android/Java versions.

License & commercial use

Realm Java is licensed under Apache License 2.0, a permissive OSI-approved license allowing commercial use, modification, and distribution with attribution and liability disclaimers.

Apache 2.0 permits commercial use without royalties. However, deprecation status means MongoDB provides no warranty, SLA, or vendor support for production systems. Use at own risk; do not rely on this in systems where uptime or security incidents require rapid vendor response.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceStale
DocumentationAdequate
License clarityClear
Deployment complexityHigh
DEV.co fitPossible
Assessment confidenceHigh
Security considerations

Realm supports at-rest encryption via native C++ core. No public security audit data provided in repo. Deprecation means no response to newly discovered vulnerabilities; if you use this in production, apply independent threat modeling and expect to patch security gaps in-house.

Alternatives to consider

Room (Google Architecture Components)

Official Google-backed Android persistence library with active maintenance, SQLite backend, LiveData/Flow integration, and guaranteed long-term support.

Realm Kotlin

MongoDB's recommended successor; now GA, supports Android and Kotlin Multiplatform, actively maintained, and designed as a drop-in modern replacement.

SQLite + ORM (e.g., Hibernate, Exposed)

Mature, widely adopted, multiple vendor options and community forks ensure long-term viability; trade-off is more boilerplate than Realm.

Software development agency

Build on realm-java with DEV.co software developers

If you're maintaining legacy Realm Java code or evaluating alternatives for a new Android app, our experts can help plan a smooth migration to Room, Realm Kotlin, or other modern persistence layers. Contact us for a technical review.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

realm-java FAQ

Can I still use Realm Java in production?
Technically yes, but not recommended. The library is deprecated with no security patches or vendor support. Use only for maintenance of existing stable codebases; do not start new projects.
What happens if I try to upgrade to a future Android version?
Unknown. Build tools and Android compatibility are not being updated. You may face compilation errors, runtime crashes, or loss of features without a vendor fix path.
Is Device Sync still usable?
Device Sync is separately deprecated. Cloud backend services will be shut down; the feature will become non-functional. Migrate away if you depend on sync.
Can I build from source if the precompiled version breaks?
Possibly, if you have environment and skill to patch C++ Realm Core. Likely not sustainable long-term; consider this an exit strategy only.

Software development & web development with DEV.co

Need help beyond evaluating realm-java? DEV.co is a software development agency offering software development services and web development for teams of every size. Our software developers and web developers build custom software, web applications, APIs, and open-source databases integrations — and maintain them long-term.

Migrating Away from Realm Java?

If you're maintaining legacy Realm Java code or evaluating alternatives for a new Android app, our experts can help plan a smooth migration to Room, Realm Kotlin, or other modern persistence layers. Contact us for a technical review.