Writing iPad/iPhone/iPod applications with Java and SWT?

The prototype described in this blog became real. Take a look at http://rapmobile.eclipsesource.com for more infromation.

Over the last couple of days, Jordi and I played a little with the Eclipse RAP protocol. We decided to develop a Cocoa Touch client for RAP using the iAd JavaScript library. You can see how it looks in this YouTube video.

Here’s a brief explanation of what’s in the video. We developed a new bundle which contains the iAd JavaScript library. Basically, iAd brings Cocoa Touch widgets into the browser, and we’ve written handlers that create widgets based on this JavaScript library. We could then start a simple RAP application with the iAd bundle and access it with Safari.

The result is just awesome. You can write your UI completely with SWT on the server side and access it with the iPad/iPhone/iPod or with just a webkit based browser. The UI experience feels just like native Cocoa Touch. Eclipse RAP and the RAP protocol makes it possible ;). Please note that this is just a prototype and not yet available for download. But you can check out the RAP protocol using git and develop your own client representation.

You may also like...

Share this Post

Twitter18
Google+2
LinkedIn
Facebook

Tags

18 Responses to “Writing iPad/iPhone/iPod applications with Java and SWT?”

  1. Wow just wow this look great, Im hoping this will be the way to go with Rap 1.4 :). I am also guessing that the communication between the clients is less intensive then the normal situation?

  2. ekke says:

    wow – this is really cool
    ekke

  3. sharad says:

    WOW :) really good technology for product based companies

  4. Tom Bauwens says:

    Very nice indeed! With Eclipse RCP/RAP, desktop app? no problem. RIA? no prob. iPhone? no prob. Oh, and from single source :-)

  5. Dimitris says:

    I am a *big* eclipse (and SWT) fan! However this is 2010, 21 century. Are we still getting excited with buttons, check-boxes and yet-another cross platform toolkit, framework, whatever? I started practicing Objective-C sometime ago IMHO it is way more exciting than this. Moreover I think that there is no way to avoid it if you are serious about developing iphone apps.

  6. Michael says:

    I thought steve banned this?

  7. Thanks for your feedback.

    @Michael: This is the point why this is so cool. The official programming languages to write apps are C, C++, Objective-C and JavaScript. But the app you see in the video is not a common app. It’s running completely on a server and just renders the UI into a web browser with JavaScript. So, with this technique you are able to write web applications that runs on a server with SWT and looks and feels just like native apps. The cool thing about this is, that existing SWT code will run unmodified. So, you don’t have to pass the app store submission process to publish your app.

  8. Luís Carlos Moreira da Costa says:

    @Excellent!

  9. Ivan says:

    means…. we can’t use this to write an offline apps, right ?…

  10. Ivan Maidanski says:

    Another way to develop in Java for iPhone/iPad is to translate Java application to C by some tool (e.g., JCGO). But the question is: SWT supports Cocoa on Mac OS X, is it hard to port SWT to iPhone/iPad?

  11. But translating Code into IPhone code it’s against Apples License politics. So, with this you can’t put your app in the AppStore.

  12. Jeff Klamer says:

    Hello. I am looking for someone who can take a digital game written using Java and make it playable on the iPad.
    Please email me at: jklamer@att.net if you might be of assistance. Thank you.

  13. I tried to download the source. I copied the plug-ins from the runtime.rwt folder into my workspace and removed the original ones from my run configuration. There were around 4 compile errors but i tried to fix them by adding a few methods to the ITreeAdapter interface and implement them (without understanding the logic in them completely though).
    Sadly i end up with something like this:
    “Could not evaluate javascript response:

    SyntaxError: illegal character

    ###BEGIN_JSON###
    {
    …;org.eclipse.swt.Request.getInstance().setTimeoutPage( ”

    The server session timed out.

    Please click here to restart the session.
    ” );var wm….”

    Have you got any ideas on what could be missing?

  14. Amar says:

    Awesome. Can’t wait to port my SWT APP to smartphone and tablets.

  15. Xingxiao.lu says:

    I tried to download the source, and got the exception too:

    SyntaxError: illegal character

    ###BEGIN_JSON###
    {
    …;org.eclipse.swt.Request.getInstance().setTimeoutPage( ”

    The server session timed out.

    Please click here to restart the session.
    ” );var wm….”

  16. Dave Henderson says:

    Does this have an advantage over using the GWT to generate HTML etc. from java?

  17. I try that few months back but not succesful. Now after reading this i have a hope again.

  18. anonymous coward says:

    Java or JavaScript? They are two very different things.

18 responses so far

Written by . Published in Categories: Planet Eclipse

Published:
Jun 11th, 2010
Follow:

Twitter Google+ GitHub Facebook