Google Makes it Easier to Port Java Code to Objective-C

Google Makes it Easier to Port Java Code to Objective-C

By | September 15th, 2012
2 Comments on Google Makes it Easier to Port Java Code to Objective-C

Google has just released J2ObjC, an open-source tool that can convert Java

code to Objective-C code.


														               
							 	 						

\related stories

Google has just released J2ObjC, an open-source tool that can convert Java code to Objective-C code.

For those who are not aware of this fact, Java is the native language in which Android applications are—usually—written. Likewise Objective-C is the language of choice for Apple’s platforms, iOS and OS X.

This open source software simplifies porting code written for Android, or otherwise written in Java, to Apple’s iOS platform. While on Android the Java code runs on a virtual machine—the Dalvik Virtual Machine—this tool does not simply generate Java bytecode and run it on a Java VM in iOS. Rather it converts Java code to Objective-C code which can then be used as part of a larger Objective-C application.

The purpose of this tool is to make it easy to share non-UI code between application for iOS and Android, or simply to use Java code as part of an iOS application. It supports a majority of Java 6 features including “exceptions, inner and anonymous classes, generic types, threads and reflection.”

You can find out more about J2ObjC from its Google Code page.

Topics: , , , , , ,
Google
Kshitij Sobti
Inserted into Kshitij's motivation banks is a particularly strong desire for justice. It's sad then, that he wastes his skills gaming, watching TV, and for the mundane task of writing prose. He tweets
@xitij2000