Google releases tool to bridge back-ends for iOS and Android apps

Summary:The J2ObjC tool converts Android-friendly Java source code to Objective C, which is used to build iPhone and iPad apps. It can't be used as a shortcut to building iOS app user interfaces, though.

Google has released J2ObjC, a tool to make it easier for developers to write a common back-end for an app that can then be deployed across iOS, Android and the web.

The open-source tool, which automatically converts Java source code into the Objective-C language that is used in native iPhone and iPad apps, was announced in a blog post on Friday. The J2ObjC project page explains that it is "currently between alpha and beta quality", and versioned at 0.5 to reflect its readiness.

The command-line tool does not tackle the user interface for apps — in the case of iOS apps, the UI still needs to be written using Objective-C or Objective-C++.

"J2ObjC enables Java code to be part of an iOS application's build, as no editing of the generated files is necessary," Google engineer Tom Ball said in the blog post. "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."

Ball explained that J2ObjC supported Java 6 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", as well as JUnit test translation and execution.

The project page noted that some Google projects already relied on J2ObjC, but it was still buggy — partly because "every Java developer has a slightly different way of using Java".

Developers wanting to use the tool will need a Mac OS X system with Xcode 4 or higher, Java for OS X and Apache Maven.

Topics: iOS, Android, Smartphones

About

David Meyer is a freelance technology journalist. He fell into journalism when he realised his musical career wouldn't be paying many bills. His early journalistic career was spent in general news, working behind the scenes for BBC radio and on-air as a newsreader for independent stations. David's main focus is on communications, of both... Full Bio

Kick off your day with ZDNet's daily email newsletter. It's the freshest tech news and opinion, served hot. Get it.

Related Stories

The best of ZDNet, delivered

You have been successfully signed up. To sign up for more newsletters or to manage your account, visit the Newsletter Subscription Center.
Subscription failed.