4

I dont know but it seems there are several solutoins for Java (Java SE, ME ...) for different platforms so you have to write different versions of the same application for all devices (iOS, Android, Windows, Linux ...).

(Is it even possible to use Java ME on devices running Android and iOS?)

Is there a solution for Java to create just one application which runs seamless on all devices? Or do we have to rewrite the application for different devices?

  • Why is IOS tagged? You can't run Java applications on it. – Perception Dec 30 '12 at 15:56
  • sure, you can http://www.zdnet.com/oracle-puts-java-apps-on-ipads-and-iphones-7000006209/ –  Dec 30 '12 at 15:57
  • ADF datasheet is confusing? The most that I can take away from it is that *possibly* they have embedded a JVM within their framework (doubtful)? You can't include any such framework in an app you intend to sell through the app store as it violates Apples TOS. Looks to me more like a PhoneGap inspired framework that converts Java into native code. – Perception Dec 30 '12 at 16:05
  • Selling through the app store is not planned at all. The customer gets the app diectly from us. It seems they have a "light" JVM included, are there any experiences with ADF? –  Dec 30 '12 at 16:14

3 Answers3

2

I know only one solution that allows to use Java on Android/iOs - codenameone. Unfortunatly I haven't tryed it in practice yet but I had read several articals and got a very good impression of it.

Leonidos
  • 10,482
  • 2
  • 28
  • 37
1

I guess, the future of cross portable apps is HTM5, CSS3 and Javascript. Java (or DART) can be used as high level language to generate the Javascript.

I suggest you to have a look at phonegap and mobilegwt for the mobile, and for the desktop Adobe Air.

You can write a mobile/desktop application in Java using mobilegwt. Then you cross compile the application for the different browsers (iphone, ipad, android, blackberry, desktop), and package the javascript+html+css+images inside a native app for all the platforms.

Your application can run from a web server (downloading html, and everything) or be a javascript application running completely from the device; or being a mixture of the two things: a javascript application deployed into the native app and running from the device, doing AJAX calls to a server.

Those application are frequently called hybrid applications.

Eventually you can skip the java part and develop an html5+css3 app and package with phonegap for the different platforms. But I find mobilegwt being able to produce hybrid apps who look like native apps (with "look and feel" and animation very well implemented). And GWT helps in bringing the scalability of the Java language (reusable components, tools, and OO) to Javascript.

For the desktop you can package an html5 app with Adobe Air.

For videogames, I think playn deserve some attention, being able to cross compile games for Desktop Java, HTML5 Browsers, Android, iOS, Flash (and more), and producing impressive results like Angry Birds for Chrome (cross compiled from Java to Javascript).

Luigi R. Viggiano
  • 8,659
  • 7
  • 53
  • 66
  • I dont like Adobe at all also dont like Adobe air. I think we will keep building the mainapp with normal JavaSE for desktop clients and second custom build with less features for mobile devices using phonegap –  Dec 30 '12 at 16:30
  • @DanielRuf with PhoneGap you can create native plugins (or "drivers") to expose native APIs to be used from JavaScript. So, it's not really posing restrictions, you need to implement some "drivers" to use particular features of the devices, if they aren't already available. – Luigi R. Viggiano Dec 30 '12 at 16:33
0

Java code is compiled to byte code that is guaranteed to be cross platform, i.e. can be executed on any JVM.

Different environments can provide different platform dependent APIs and require additional requirements. For example Java EE provides service of container and requires writing container managemed components (EJB, Servlets etc). But code itself remains cross platform.

Although J2ME died it dictates writing MIDlets. It is indeed special: it does not provide regular JDK, so let's avoid to discuss it.

iOS running on "big" Mac computers can run regular java. The same java that is running on windows or linux. So, the code remains cross platform.

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
AlexR
  • 114,158
  • 16
  • 130
  • 208