Skip to the content
Know your tech before you buy it. Makers: get listed from $49/mo

J2ObjC

developers.google.com

  • Free plan
  • macOS
  • Linux
  • iPhone and iPad

What J2ObjC is

J2ObjC is a free, open-source command-line tool from Google that translates Java source code into Objective-C for iOS. It is intended to let developers share non-UI code, such as application logic and data models, across web, Android, and iOS apps. Supported Java features include exceptions, inner and anonymous classes, generics, threads, and reflection; the tool can also translate and execute JUnit tests. Its distribution includes static libraries for Guava, JUnit, Mockito, Protocol Buffers, and other Java libraries or Android utility classes. J2ObjC does not provide a platform-independent UI toolkit, so the documentation directs developers to use Objective-C, Objective-C++, or Swift with Apple's iOS SDK for iOS interfaces. Developers must have source code they own or are licensed to use; Android binary applications cannot be converted. Requirements include a Mac workstation or laptop, macOS 15 or higher, Xcode 16 or higher, and JDK 21 or higher. The j2objcc script wraps clang and uses the iOS SDK, while Xcode projects need J2ObjC-specific linker settings. It uses Objective-C reference counting, leaving memory management to developers, who can introduce leaks.

Who it suits

J2ObjC suits developers who want to reuse eligible Java non-UI code in iOS apps and can work with the listed Mac, macOS, Xcode, and JDK requirements. It is not a route for converting Android binaries or sharing an iOS UI toolkit.

Good to know, and what to watch

  • Free and open source under Apache 2.0.
  • Translates several Java language features.
  • Can translate and execute JUnit tests.
  • Includes libraries such as Guava and Mockito.
  • Provides command-line access.
  • Requires a Mac workstation or laptop.
  • Does not supply a shared UI toolkit.
  • Cannot convert Android binary applications.
  • Developers remain responsible for memory management.

Free and open source

Free

Free plan

The verdict

J2ObjC addresses Java-to-Objective-C translation for reusable non-UI code, with test support and included libraries. Its Mac requirements, source-code constraint, and lack of a shared UI toolkit define the limits of its use.

What the maker publishes

Artifact signing
The project says some Maven Central artifacts under groupId com.google.j2objc are signed with a published PGP/GPG key. source
Build integration
The j2objcc command-line script wraps clang and uses the iOS SDK, while Xcode projects need J2ObjC-specific linker settings. source
Java support
It supports Java features including exceptions, inner and anonymous classes, generics, threads, and reflection. source
Libraries
The distribution includes static libraries for Guava, JUnit, Mockito, Protocol Buffers, and other Java libraries or Android utility classes. source
Linux limitation
The project states that J2ObjC is supported only on iOS and macOS, while GNU/Linux use requires the Darling project. source
Memory management
J2ObjC uses Objective-C reference counting, and its documentation says developers are responsible for memory management and can introduce leaks. source
Requirements
The listed requirements are a Mac workstation or laptop, macOS 15 or higher, Xcode 16 or higher, and JDK 21 or higher. source
Shared code
It is intended to let developers write non-UI code such as application logic and data models in Java for use across web, Android, and iOS apps. source
Source code required
J2ObjC cannot convert Android binary applications; developers need source code they own or are licensed to use. source
Support
The project points users to its issue tracker, Stack Overflow j2objc tag, and Google Groups discussions for help. source
Test support
J2ObjC supports translating and executing JUnit tests. source
UI limit
It does not provide a platform-independent UI toolkit, and its documentation says iOS UI should use Objective-C, Objective-C++, or Swift with Apple's iOS SDK. source
What it does
J2ObjC is an open-source command-line tool from Google that translates Java source code to Objective-C for iOS. source

Checked against the maker's pages on 7 Oct 2026.