Stay organized with collections
Save and categorize content based on your preferences.
What J2ObjC is
J2ObjC is an open-source command-line tool from Google that translates
Java source code to Objective-C for the iOS (iPhone/iPad) platform. This tool
enables Java source to be part of an iOS application's build, as no editing
of the generated files is necessary. The goal is to write an app's non-UI
code (such as application logic and data models) in Java, which is then
shared by web apps (using J2CL), Android apps,
and iOS apps.
Get Started
J2ObjC supports most Java language and runtime features required by
client-side application developers, including exceptions, inner and
anonymous classes, generic types, threads and reflection. JUnit test
translation and execution is also supported.
What J2ObjC isn't
J2ObjC does not provide any sort of platform-independent UI toolkit, nor are
there any plans to do so in the future. We believe that iOS UI code needs to
be written in Objective-C, Objective-C++ or Swift using Apple's iOS SDK.
J2ObjC cannot convert Android binary applications. Developers must have source
code for their Android app, which they either own or are licensed to use.
Requirements
- Mac workstation or laptop
- Mac OS X 13.5 or higher
- Xcode 15 or higher
- JDK 11 or higher
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-16 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-16 UTC."],[[["J2ObjC is a tool that translates Java source code to Objective-C for iOS app development, allowing shared code across web, Android, and iOS platforms."],["It supports most Java language features but does not offer a platform-independent UI toolkit and requires source code for Android app conversion."],["Developers need a Mac running macOS 13.5 or higher, Xcode 15 or higher, and JDK 11 or higher to utilize J2ObjC."]]],[]]