Java solution (framework / library / API) for real cross-platform applications / applications

I don’t know, but it seems that for Java (Java SE, ME ...) there are several solutions for different platforms, so you need 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 only one application that works on all devices without problems? Or do we need to rewrite the application for different devices?

+4
source share
3 answers

I think the future of cross-portable applications is HTM5, CSS3, and Javascript. Java (or DART ) can be used as a high-level language for generating Javascript.

I suggest you take a look at phonegap and mobilegwt for mobile devices and the Adobe Air desktop.

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

Your application can be launched from a web server (loading html and everything) or it can be a javascript application fully launched from the device; or be a mixture of two things: a javascript application, deployed to its own application and launched from the device, makes AJAX calls to the server.

These applications are often referred to as hybrid applications .

In the end, you can skip the java part and develop the html5 + css3 application with the phonegap package for different platforms. But I find that mobilegwt is capable of creating hybrid applications that look like native applications (with "appearance" and animation, they are very well implemented). And GWT helps in ensuring the scalability of the Java language (reusable components, tools, and OO) for Javascript.

For desktop, you can pack the html5 application with Adobe Air .

For video games, I think playn deserves some attention, being able to cross compile games for Desktop Java, HTML5 Browsers, Android, iOS, Flash (etc.) and create impressive results like Angry Birds for Chrome (cross-compiled with Java in Javascript).

+2
source

I know only one solution that allows you to use Java on Android / iOs - codenameone . Unfortunately, I have not practiced this in practice yet, but I read a few articles and got a very good idea about it.

+3
source

Java code is compiled into byte code, which is guaranteed to be cross-platform, that is, it can run on any JVM.

Different environments may provide different platform-specific APIs and require additional requirements. For example, Java EE provides container maintenance and requires the creation of container-managed components (EJBs, Servlets, etc.). But the code itself remains a cross platform.

Although J2ME is dead, he dictates to write midlets. This is really special: it does not provide regular JDK, so do not let it be discussed.

iOS running on "large" Mac computers can run regular java. The same java that works on Windows or Linux. Thus, the code remains cross-platform.

0
source

All Articles