Saturday, September 15, 2012

Google tool translates Java code to Objective-C

Google Developers Tool
J2ObjC is an open-source command-line tool from Google that translates Java code to Objective-C for the iOS (iPhone/iPad) platform. This tool 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 app's non-UI code (such as data access, or application logic) 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 not a Java emulator," writes Google's Tom Ball in a post announcing the tool, "but instead converts Java classes to Objective-C classes that directly use the iOS Foundation Framework."

What J2ObjC is not about?

J2ObjC does not provide any sort of platform-independent UI toolkit, nor are there any plans to do so in the future. iOS UI code needs to be written in Objective-C or Objective-C++ using Apple's iOS SDK (Android UIs using Android's API, web app UIs using GWT, etc.

Project page and full description is at [https://code.google.com/p/j2objc/]

No comments:

Post a Comment