Close
  • Latest News
  • Big Data and Analytics
  • Cloud
  • Networking
  • Cybersecurity
  • Applications
  • IT Management
  • Storage
  • Sponsored
  • Mobile
  • Small Business
  • Development
  • Database
  • Servers
  • Android
  • Apple
  • Innovation
  • Blogs
  • PC Hardware
  • Reviews
  • Search Engines
  • Virtualization
Read Down
Sign in
Close
Welcome!Log into your account
Forgot your password?
Read Down
Password recovery
Recover your password
Close
Search
Logo
Logo
  • Latest News
  • Big Data and Analytics
  • Cloud
  • Networking
  • Cybersecurity
  • Applications
  • IT Management
  • Storage
  • Sponsored
  • Mobile
  • Small Business
  • Development
  • Database
  • Servers
  • Android
  • Apple
  • Innovation
  • Blogs
  • PC Hardware
  • Reviews
  • Search Engines
  • Virtualization
More
    Home Development
    • Development
    • Mobile
    • Networking
    • Servers

    Google Translates Java to Objective-C With J2ObjC Tool

    By
    Darryl K. Taft
    -
    September 18, 2012
    Share
    Facebook
    Twitter
    Linkedin

      Google has announced the release of J2ObjC, an open-source command-line tool that translates Java code to Objective-C for the iOS platform so that Java developers can more easily build apps for the iPhone and iPad.

      The goal of the J2ObjC tool is to enable developers 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, the Google Web Toolkit) and iOS, said Google engineer Tom Ball in a recent post on the Google Open Source Blog.

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

      The new Google tool 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. And J2ObjC can be used with most build tools, including Xcode and Make, Ball said.

      According to the J2ObjC project page, the tool is currently between alpha and beta quality. However, several Google projects rely on it, though when new projects first start working with it they usually find new bugs to be fixed, Google said. As nearly every Java developer has a slightly different way of using Java, the tool has not translated all possible paths yet. It is released as J2ObjC version 0.5. Developers must use the tool on a Mac OS X system, with Xcode 4 or higher, Java for OS X and Apache Maven.

      J2ObjC does not provide any sort of platform-independent UI toolkit, nor are there any plans to do so in the future, Google said. iOS UI code needs to be written in Objective-C or Objective-C++ using Apple’s iOS SDK, just as Android UIs need to be written using Android’s API and Web app UIs using GWT or other tools.

      With a debate raging over whether to develop native, Web or hybrid apps for mobile platforms, Google’s J2ObjC tool gives developers another choice for building apps for the popular iOS platform. Facebook CEO Mark Zuckerberg recently noted that one of Facebook’s biggest strategic mistakes was to base its mobile app development strategy on HTML5 rather than going native.

      Nat Friedman, CEO of Xamarin, a maker of tools for creating fully native apps with device-specific experiences, said, “Two years ago you might choose to do an iOS app as a first choice because the iPhone was the leading platform, but now with Android there’s a challenge to that. And developers need tools to support building apps for these platforms.” Xamarin’s tools do that for C# developers, and now Java developers can use Google’s J2ObjC.

      Darryl K. Taft
      Darryl K. Taft covers the development tools and developer-related issues beat from his office in Baltimore. He has more than 10 years of experience in the business and is always looking for the next scoop. Taft is a member of the Association for Computing Machinery (ACM) and was named 'one of the most active middleware reporters in the world' by The Middleware Co. He also has his own card in the 'Who's Who in Enterprise Java' deck.

      MOST POPULAR ARTICLES

      Big Data and Analytics

      Alteryx’s Suresh Vittal on the Democratization of...

      James Maguire - May 31, 2022 0
      I spoke with Suresh Vittal, Chief Product Officer at Alteryx, about the industry mega-shift toward making data analytics tools accessible to a company’s complete...
      Read more
      Cybersecurity

      Visa’s Michael Jabbara on Cybersecurity and Digital...

      James Maguire - May 17, 2022 0
      I spoke with Michael Jabbara, VP and Global Head of Fraud Services at Visa, about the cybersecurity technology used to ensure the safe transfer...
      Read more
      Big Data and Analytics

      GoodData CEO Roman Stanek on Business Intelligence...

      James Maguire - May 4, 2022 0
      I spoke with Roman Stanek, CEO of GoodData, about business intelligence, data as a service, and the frustration that many executives have with data...
      Read more
      Applications

      Cisco’s Thimaya Subaiya on Customer Experience in...

      James Maguire - May 10, 2022 0
      I spoke with Thimaya Subaiya, SVP and GM of Global Customer Experience at Cisco, about the factors that create good customer experience – and...
      Read more
      Cloud

      Yotascale CEO Asim Razzaq on Controlling Multicloud...

      James Maguire - May 5, 2022 0
      Asim Razzaq, CEO of Yotascale, provides guidance on understanding—and containing—the complex cost structure of multicloud computing. Among the topics we covered:  As you survey the...
      Read more
      Logo

      eWeek has the latest technology news and analysis, buying guides, and product reviews for IT professionals and technology buyers. The site’s focus is on innovative solutions and covering in-depth technical content. eWeek stays on the cutting edge of technology news and IT trends through interviews and expert analysis. Gain insight from top innovators and thought leaders in the fields of IT, business, enterprise software, startups, and more.

      Facebook
      Linkedin
      RSS
      Twitter
      Youtube

      Advertisers

      Advertise with TechnologyAdvice on eWeek and our other IT-focused platforms.

      Advertise with Us

      Menu

      • About eWeek
      • Subscribe to our Newsletter
      • Latest News

      Our Brands

      • Privacy Policy
      • Terms
      • About
      • Contact
      • Advertise
      • Sitemap
      • California – Do Not Sell My Information

      Property of TechnologyAdvice.
      © 2021 TechnologyAdvice. All Rights Reserved

      Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.

      ×