A Java to iOS Objective-C translation tool and runtime.
Clone or download
Failed to load latest commit information.
annotations Add strong attribute to properties when needed. Jul 31, 2018
cycle_finder Fix a couple of relative paths in iml files. Oct 9, 2018
doc Removed j2objc batch limit (obsolete), cleaned up options. Aug 24, 2018
examples HelloSwift example: point J2OBJC_HOME to the location expected when t… Sep 7, 2018
guava Reorganize Guava Makefile to allow parallel execution. Oct 9, 2018
inject/javax_inject Merged compiler warnings build refs, added -Wmissing-field-initialize… Dec 14, 2015
java_deps Add Android version of Guava library. Oct 9, 2018
jre_emul Fixed last change so that JRE subset library separation is preserved. Oct 9, 2018
jsr305 Removed j2objc flags specifying what is now default. Mar 13, 2017
junit Removes test_junit_cycles from the top-level "make test". Apr 11, 2017
make Suppress libtool warnings about .o files without symbols. Sep 7, 2018
protobuf Add `void` keyword explicitly specifying an absence of parameters. Oct 9, 2018
scripts Updated sysroot_path.sh to use current xcodebuild flags. Sep 5, 2018
testing Stop using class name heuristics to filter out non-tests. Apr 23, 2018
translator Work around a change in the JDK 11 JCFunctionalExpression Oct 9, 2018
tree_shaker Fix a couple of relative paths in iml files. Oct 9, 2018
xalan Issue #978: add fallback Xalan properties, to support apps that don't… May 16, 2018
.gitattributes Include git config files in public source. Jun 23, 2017
.gitignore Ignore IntelliJ IDEA files Dec 29, 2016
AUTHORS Deleted plain-text README. Feb 5, 2014
BUILD.dist Fixes the protobuf tests. Aug 16, 2017
CONTRIBUTING.md Updated README, added CONTRIBUTING page. Feb 5, 2014
INSTALL Update build requirements and tool links Dec 7, 2015
LICENSE Updated project files. Feb 4, 2014
Makefile Fixed race condition in public distribution build. Apr 18, 2018
README.md Fixed broken links flagged by g3doc health ([] Aug 24, 2018
WORKSPACE.dist Adds a WORKSPACE and BUILD file to our distribution for Bazel support. Aug 16, 2017


J2ObjC: Java to Objective-C Translator and Runtime

Project site: https://j2objc.org
J2ObjC blog: https://j2objc.blogspot.com
Questions and discussion: https://groups.google.com/group/j2objc-discuss

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 GWT), Android apps, and iOS apps.

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.

J2ObjC is currently beta quality. Several Google projects rely on it, but when new projects first start working with it, they usually find new bugs to be fixed. If you run into issues with your project, please report them!

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 (Android UIs using Android's API, web app UIs using GWT, etc.).

J2ObjC cannot convert Android binary applications. Developers must have source code for their Android app, which they either own or are licensed to use.


  • JDK 1.8 or higher
  • Mac workstation or laptop
  • OS X 10.12 or higher
  • Xcode 8 or higher


This library is distributed under the Apache 2.0 license found in the LICENSE file. The protocol buffers library is distributed under the same BSD license as Google's protocol buffers. See its README and LICENSE.