Close
  • Latest News
  • Artificial Intelligence
  • Video
  • 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
  • Artificial Intelligence
  • Video
  • 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

    Written by

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

      eWEEK content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

      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
      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.

      Get the Free Newsletter!

      Subscribe to Daily Tech Insider for top news, trends & analysis

      Get the Free Newsletter!

      Subscribe to Daily Tech Insider for top news, trends & analysis

      MOST POPULAR ARTICLES

      Artificial Intelligence

      9 Best AI 3D Generators You Need...

      Sam Rinko - June 25, 2024 0
      AI 3D Generators are powerful tools for many different industries. Discover the best AI 3D Generators, and learn which is best for your specific use case.
      Read more
      Cloud

      RingCentral Expands Its Collaboration Platform

      Zeus Kerravala - November 22, 2023 0
      RingCentral adds AI-enabled contact center and hybrid event products to its suite of collaboration services.
      Read more
      Artificial Intelligence

      8 Best AI Data Analytics Software &...

      Aminu Abdullahi - January 18, 2024 0
      Learn the top AI data analytics software to use. Compare AI data analytics solutions & features to make the best choice for your business.
      Read more
      Latest News

      Zeus Kerravala on Networking: Multicloud, 5G, and...

      James Maguire - December 16, 2022 0
      I spoke with Zeus Kerravala, industry analyst at ZK Research, about the rapid changes in enterprise networking, as tech advances and digital transformation prompt...
      Read more
      Video

      Datadog President Amit Agarwal on Trends in...

      James Maguire - November 11, 2022 0
      I spoke with Amit Agarwal, President of Datadog, about infrastructure observability, from current trends to key challenges to the future of this rapidly growing...
      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.
      © 2024 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.

      ×