J2ObjC Tool Lets Developers Convert Java Code For iOS Platform
Android App developers can now port the apps to iOS platform via J2ObC tool. Google has created a new tool, J2ObjC, that will convert Java classes to Objective-C classes. The new Google-authored translator will convert the Java source code for iPhone/iPad applications, according to a post on the Google Open Source blog.
Basically, the tool reportedly allows the Java source code to be a part of an iOS application's build. According to the blog, it provides support to six languages and its runtime features which are necessary for the app developers on the client-side that include exceptions, inner and anonymous classes, generic types, threads and reflection. The tool is expected to support JUnit test translation and execution.
"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," explains the post.
"J2ObjC is not a Java emulator, but instead converts Java classes to Objective-C classes that directly use the iOS Foundation Framework," claims the post.
The J2ObjC tool can also be employed using build tools such as Xcode and Make. According to the tool's project page, J2ObjC is still between alpha and beta phase. It will not offer any kind of platform-independent user interface toolkit. According to reports, there are no plans to implement the service in the future. A post on the XDA Developers' forum claims that it could be a great step for developers who are looking into making cross-platform applications.
The iOS user interface will have to be written in Objective-C or Objective -C++ via the company's iOS Software Development Kit (SDK).
In order to use the tool, developers must keep in mind that the package has to be built on a Mac OS X system with Xcode4 (or higher), Java for OS X and Apache Maven. The tool's initial version number is 0.5 which is said to represent the release status appropriately.
© Copyright IBTimes 2024. All rights reserved.