TMCnet - World's Largest Communications and Technology Community



September 19, 2012

Google's Translator Tool Converts Java Source Code to Objective-C

By Ashok Bindra, TMCnet Contributor

Search engine giant Google (News - Alert) has released a new source code translator tool for Java. Called J2ObjC, the open-source command-line tool translates Java code to Objective-C for the iOS platform, enabling Java developers to easily build apps for Apple’s (News - Alert) iPhones and iPads.

In a recent post on the Google Open Source blog, Google engineer Tom Ball wrote, “The goal of the J2ObjC tool is to enable developers to write an appication’s non-UI code -such as data access or application logic- in Java, which can then be shared by Android (News - Alert) apps, Web apps (using GWT, the Google Web Toolkit) and iOS.”

Image via Shutterstock

Ball added, "J2ObjC enables Java code to be part of an iOS application's build, as no editing of the generated files is necessary. J2ObjC is not a Java emulator, but instead converts Java classes to Objective-C classes that directly use the iOS Foundation Framework."

The Google engineer indicated that the new tool supports the full Java 6 language and provides runtime features that are required by client-side application developers, including exceptions, inner and anonymous classes, generic types, threads and reflection. Furthermore, as per Ball’s explanation, JUnit test translation and execution is also supported by the tool. Also, the J2ObjC tool can be used with most build tools, including Xcode and Make.

Based on information from J2ObjC project page, the tool is currently between alpha and beta quality and that several Google projects rely on it. However, when new projects first start working, the developers usually find new bugs to be fixed, said Google.

Since every Java developer has a slightly different way of using Java, the tool has not translated all possible paths yet. The report indicates that the tool has been released as J2ObjC version 0.5. Consequently, said reports, “developers must use the tool on a Mac OS X system, with Xcode4 or higher, Java for OS X, and Apache Maven.”

Want to learn more about the latest in communications and technology? Then be sure to attend ITEXPO West 2012, taking place Oct. 2-5, in Austin, TX. Stay in touch with everything happening at ITEXPO (News - Alert). Follow us on Twitter.

Edited by Brooke Neuman
» More TMCnet Feature Articles



» More TMCnet Feature Articles

Technology Marketing Corporation

35 Nutmeg Drive Suite 340, Trumbull, Connecticut 06611 USA
Ph: 800-243-6002, 203-852-6800
Fx: 203-866-3326

General comments:
Comments about this site:


© 2018 Technology Marketing Corporation. All rights reserved | Privacy Policy