Interesting new tool from Google:

We are proud to announce the open source release of J2ObjC, a Google-authored translator that converts Java source code into Objective-C source for iPhone/iPad applications.

J2ObjC enables Java code to be part of an iOS application’s build, as no editing of the generated files is necessary. The goal is to write an application’s non-UI code (such as data access, or application logic) in Java, which can then be shared by Android apps, web apps (using GWT), and iOS.

J2ObjC is not a Java emulator, but instead converts Java classes to Objective-C classes that directly use the iOS Foundation Framework.  It supports the full Java 6 language and most of its runtime features that are 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 can be used with most build tools, including Xcode and Make.

You can go to the J2ObjC project page for instructions on how to use the tool, check out the source code and view the list of reported issues.  The site also has detailed design docs for anyone interested in how the translator works.

Android apps are in Java, while iOS is in Objective C, but this tool allows those who develop in Java an easier way to convert their apps to iOS. Interesting move.

Related articles

FTC: We use income earning auto affiliate links. More.


Check out 9to5Mac on YouTube for more Apple news:

You’re reading 9to5Mac — experts who break news about Apple and its surrounding ecosystem, day after day. Be sure to check out our homepage for all the latest news, and follow 9to5Mac on Twitter, Facebook, and LinkedIn to stay in the loop. Don’t know where to start? Check out our exclusive stories, reviews, how-tos, and subscribe to our YouTube channel

About the Author

Seth Weintraub's favorite gear