September 14, 2012, 11:23 AM — Google on Thursday made accommodations for Java and Python developers by offering a Java-to-Objective-C translator and advancing its Python client library for Google APIs.
With the open source release of J2ObjC, Google has authored a translator to convert Java source code into Objective-C source for iPhone and iPad applications. The intent is to enable developers to write an application's non-UI code, such as data access code or application logic, in Java. Apple has not permitted Java to run on its iOS systems (though Java code can be part of an iOS application build), while Objective-C is Apple's development language of choice for the devices.
[ Despite recent troubles, don't look for the community to abandon Java. | Think you know Java? Test your programming smarts in InfoWorld's Java IQ test. | For tutorials and news on Java, subscribe to InfoWorld's Enterprise Java newsletter. ]
"J2ObjC is not a Java emulator but instead converts Java classes to Objective-C classes that directly use the iOS Foundation Framework," Google engineer Tom Ball said in a blog post. "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."
Developers can go to the J2ObjC project page for instructions on using the tool. Described as being between alpha and beta quality, J2ObjC does not provide a platform-independent UI toolkit.