A Java to iOS Objective-C translation tool and runtime.
Java Objective-C C C++ Makefile Objective-C++ Other
Latest commit 29d581d Oct 13, 2016 @tomball tomball committed with tomball Updated requirements on j2objc.org's README.md.
	Change on 2016/10/13 by tball <tball@google.com>

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136060418
Permalink
Failed to load latest commit information.
annotations Fix javadoc errors reported by Maven and update annotations version i… Jul 26, 2016
cycle_finder Only create capture fields when the captured variable is used outside… Oct 13, 2016
doc Fixed translator execution report, added total execution time. Sep 7, 2016
examples/Hello Added xctests to hello example, to get presubmit build times. Mar 8, 2016
guava Fixed nullability warnings in public build, JreEmulation test starting. Oct 11, 2016
inject/javax_inject Merged compiler warnings build refs, added -Wmissing-field-initialize… Dec 14, 2015
java_deps Declared JARJAR_HOME in public build, removed jarjar-1.3.jar from pom… Sep 29, 2016
jre_emul Added Class.toGenericString(). Oct 13, 2016
jsr305 Issue #708: fixed jsr305/Makefile to build with python3. Feb 17, 2016
junit Fixed nullability warnings in public build, JreEmulation test starting. Oct 11, 2016
make Fixed nullability warnings in public build, JreEmulation test starting. Oct 11, 2016
protobuf Fixed nullability warnings in public build, JreEmulation test starting. Oct 11, 2016
scripts Add metadata updating scripts to public repo. Jun 24, 2016
testing Fix for "J2Objc's JUnitTestRunner attempts to instantiate abstract cl… Sep 8, 2016
translator Only create capture fields when the captured variable is used outside… Oct 13, 2016
xalan Fixed nullability warnings in public build, JreEmulation test starting. Oct 11, 2016
.gitignore Added ignore for Mac filesystem .DS_Store files Apr 20, 2016
.travis.yml Only have Travis CI build one arch, due to its maximum time constraint. Sep 19, 2016
AUTHORS Deleted plain-text README. Feb 5, 2014
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 Makefile cleanup, make common IS_CLEAN_GOAL and IS_TEST_GOAL variables. Apr 28, 2016
README.md Updated requirements on j2objc.org's README.md. Oct 13, 2016

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.