Java iPhone Development

So I know we’ve talked a bit before about iPhone and the fact that it sucks that it doesn’t support Java…

My brother’s company, Javaground, thought that sucked, too, so as part of their internal cross-phone porting engine (which starts with Java code using their wrapper API and pushes out specialized builds for tons of different mobile phones, both Java and C, if I understand correctly) they added an iPhone output layer. I can only imagine how nasty it is to get something like that working, but apparently it is, and it generates working Objective C code from plain old Java (using their API for graphics, sound, networking, and all that).

I’ve never worked with these tools before, so I can’t comment on how easy the API is, but if you want to see the results, the Wheel Of Fortune game recently released into the iPhone App store was coded 100% in Java, then run through their automated system to produce the Objective C project and code.

Now, is there much interest in this type of thing from people here? From what my brother has told me, this stuff has not been released publicly, but I get the sense that if there was a decent amount of interest expressed he might be able to speed that up a bit and let at least some external developers use the tools, probably (hopefully?) under some sort of profit-sharing deal and NDA or something (a large part of their business is doing these ports for bigger studios, so I doubt they can freely give the tools away). They also do builds for all sorts of other devices, and though distribution is sometimes tougher for independent J2ME devs they are working on a distribution system, too, so if you’re interested in that, I’d imagine they’d consider making that stuff available, too (see http://www.xpressed.com/ for the game portal/shop site they are running).

Keep in mind I don’t actually have any direct connection to the company, and I don’t know that this will ever actually be released or not, so I don’t mean to get hopes up prematurely; but I think it’s a possibility, so please let me know if you think you or your team would likely get games to the iPhone using a system like this (as in, the likelihood of your releasing a game is decent as long as the tools work right), if there’s a good amount of interest I’ll point my bro to the thread and we can see about getting access…

Also let me know if you have pre-existing games you’d like to see on the iPhone but don’t have the time/energy/Mac to do it yourself; if the game is right (i.e. feasible, not too dependent on graphics or game libraries, and likely to sell) I might be able to see about getting a team together to handle a few ports (again, probably for a percentage of sales).

Re: the obvious technical questions, I have no idea on any of them, I don’t know how these tools handle OpenGL, UI, etc. Sorry!

XMLVM already allows to translate Java into Objective C, doesn’t it?

We are always interested in ports to other platforms. Titan Attacks might do well on iPhone.

Cas :slight_smile:

I think the tool would be really useful. I’ve always been tempted to write an iPhone app, but I’ve heard bad things about Objective C. Knowing that I can program in a more comfortable language seems like a boon for creativity.

Kind of, sort of. I don’t know if anyone has actually tried to do it, but it’s not as easy as it seems it might be.

The problem is that while XMLVM can handle language-level translation, it still needs hookups for all the graphical, sound, and UI stuff. Which means you’re still going to be mucking around with Objective C code (and worse, learning the iPhone SDK and coding your Java to conform to it) in order to get stuff out the door.

To be fair, Javaground’s system would still require learning and coding to their API (which is basically a full game engine, I’m told, so there’s certainly some learning curve), but from what I hear, it’s pretty easy and you get a lot from it: you code to a real Java API using standard Java tools and eventually end up with iPhone, Android (I don’t know if the Android target it live yet), Brew, and J2ME builds if you want them.

  1. You’re truly sadistic. I finally bought the full version the about a week ago, and the difficulty curve is nasty, I love it!
  2. You’re totally right, practically the moment I started playing it I was thinking about how well that would play on iPhone using the tilt sensor for control.

In any case, I’ll talk to my brother once he’s back from GDC, and see if he can try to get some people access to this stuff, even if it’s on a person-by-person basis and not a general open-to-the-public thing.

Yeah, I would definitely be interested in that. I’ve already ported my sprite / entity / physics / world / pathfinding / etc. library to Objective-C, but there are still other things that could be ported.

AAHHHEEEMMM!!!

http://www.computerworld.com/action/article.do?command=viewArticleBasic&articleId=9067358

Uh, didn’t you say yourself that this was just a pipe dream because of Apple’s licensing agreements? Like you’re not allowed to run any software in order to run other software.

An iPhone JVM would be awesome! Sun are cool, Apple are not: http://www.intomobile.com/2008/05/03/sun-were-still-gunning-for-java-jvm-on-the-apple-iphone.html

If Sun does something to allow us to static compile, then it would work. But that would be a whole lot of work…
but, fwiw - its much more likely that they got a deal with apple. We’ll see soon enough: “Many more details of the iPhone JVM should be discussed on Sun blogs at the Jave One conference in San Francisco on May 6 to 9”

Alas, the date in question came and went - that article was from March 7, 2008.

Since back then I haven’t heard much of anything on the matter. To my knowledge the way it all settled out was that Apple stubbornly refused to allow a JVM even if Sun got one working (and took the same stance against Flash), which is why I’ve now essentially given up hope of having any such straightforward and sensible solution.

I sure did, but I don’t know everything and their efforts do not fall under my purview. Things change and I am not sitting in all of the Apple meetings. That is just the latest and, as VP of Java Marketing, Eric must know things :slight_smile:

i hijacked my ipod 2g (shortly after christmas eve - i found it was a pretty boring device so i tried to do something interesting with it) and installed JamVM + classpath java stack + jikes compiler a console and some linux utils. Works pretty well, i can start apps in background connect with ssh to the touchpod and deploy by simply drag and drop copy.

I pimped a little sample app which basically connects the mysql contacts db and displays the contacts in a list and played a little bit with it. Startup time is around 2x slower compared to the native contacts app so it was even faster than i thought.

JamVM has no jit but it is also around 200k (uncompressed) which i found pretty cool :wink:

Mission accomplished it works.

It’s gotta be fast enough to run Titan Attacks though :slight_smile:

Cas :slight_smile:

Very interesting topic. Anything new? Is your brother interested in releasing the API? If anyone has actual experience porting Java to iPhone I think it could be very interesting to hear about!