A Java to iOS Objective-C translation tool and runtime.
Java Objective-C C C++ Makefile Objective-C++ Other
Latest commit 0aeb781 Oct 19, 2017 @tomball tomball Simplified previous GeneratedAnnotationMirror change.
	Change on 2017/10/19 by tball <tball@google.com>

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172789402
Permalink
Failed to load latest commit information.
annotations Fixed typo "Alternativesly" -> "Alternatively" Sep 28, 2017
cycle_finder Changed "-source 9" use from error to warning in j2objc, cycle_finder. Oct 18, 2017
doc Adds --no-wrapper-methods option to help users reduce code size. Jul 14, 2017
examples Adds the Contacts example app to the Github repo. Aug 16, 2017
guava Removed j2objc flags specifying what is now default. Mar 13, 2017
inject/javax_inject Merged compiler warnings build refs, added -Wmissing-field-initialize… Dec 14, 2015
java_deps Remove remaining references to JDT artifacts. Sep 22, 2017
jre_emul Issue #896: fixed public/private jre_net source lists. Oct 18, 2017
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 Issue #886: require Java 8 for java and javac commands. Sep 28, 2017
protobuf Converts nil_chk to a macro so that NPE's in crash reports might have… Sep 25, 2017
scripts Updated build_distribution script to only use Java 8. Oct 4, 2017
testing Removed modified Mockito sources that now match public repository. Oct 18, 2017
translator Simplified previous GeneratedAnnotationMirror change. Oct 19, 2017
tree_shaker Issue #886: require Java 8 for java and javac commands. Sep 28, 2017
xalan Removed j2objc flags specifying what is now default. Mar 13, 2017
.gitattributes Include git config files in public source. Jun 23, 2017
.gitignore Ignore IntelliJ IDEA files Dec 29, 2016
.travis.yml Enable Java runtime updating in Travis-CI Mar 17, 2017
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 Adds a WORKSPACE and BUILD file to our distribution for Bazel support. Aug 16, 2017
README.md Updated requirements on j2objc.org's README.md. Oct 13, 2016
WORKSPACE.dist Adds a WORKSPACE and BUILD file to our distribution for Bazel support. Aug 16, 2017

README.md

J2ObjC: Java to Objective-C Translator and Runtime

Build Status

Project site: http://j2objc.org
J2ObjC blog: http://j2objc.blogspot.com
Questions and discussion: http://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.

Requirements

  • JDK 1.8 or higher
  • Mac workstation or laptop
  • OS X 10.11 or higher
  • Xcode 7 or higher

License

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