20

We have a client who are switching away from Windows Mobile (and IE Mobile) to Android based devices.

We have some specific software that we deploy to their WM workforce by an ActiveX applet that loads in IE Mobile, but obviously Android will have no support for ActiveX. So we will need to re-do our application to an Android-specific platform, and Java is the obvious choice for this.

Are there any Android browsers that support loading a Java Applet in-browser, in much the same way an ActiveX applet loads in IE (i.e. it fully integrates into the browsing experience).

samthebrand
  • 295
  • 6
  • 15

5 Answers5

9

Similar questions have been asked here before, the short version, JAVA applets are not supported on Android. The version of JAVA used on Android is not just your run of the mill JAVA so you would need to get a JAVA compiler on the phone first to run any applets. Which I don't think is possible or at least feasible.

Why not just download the Android SDK and make your own app? You don't have to sell it in the marketplace, but if your app could be used by others you could do that which might help recover some money spent on development.

3

The only two options I can think of, is to make a HTML5 cross-platform mobile app that will work across the spectrum, having said that, I can understand corporate environments wanting to cling on to IE to support ActiveX apps within the browser, which is leading you to think that the Java on the desktop is the same as on Android, which is not true.

For the most part, and the second option, the SDK covers a subset of Java 5, collections, apache, etc, syntax wise, are identical, so maybe a recompile on the business logic and a new User Interface for the front-end for Android platform. (Yes you can recompile that targetting the Android SDK...)

In short, no can do unless there is a motive and drive to re-build it to be compatible with devices now and in the future.

Edit

After comments left below, to recap:

  • The browser does not support the running of Java applets within in itself. JRE != Android's Java Runtime aka DalvikVM. Desktop Java uses JavaVM/JRE as endorsed by Sun/Oracle and the OpenJava JDK which is sanctioned by Oracle. JRE = Java Runtime Environment

  • Terminal IDE which does contain "a java compiler", chances are (I will install it and report feedback on this btw) it is a extremely limited cut down version of OpenJDK, it is the only one available natively for ARM, according to this blog which cannot do native Java Windowing apps such as Swing or JavaBeans due to the simple reason that the version of the Java Runtime Environment is very different for Android, and highly optimized for the native processor.

Also, DalvikVM knows zero about Swing, JavaBeans, etc hence why it goes some way in explaining that the Java on the desktop is not the same as the Java on Android.

As for having the view that Android is very much like Linux, that view I stand by, is this, it is not Linux, the kernel is linux itself, but user-land tools are supplied by busybox, furthermore, the native C run-time library under Android is called bionic, and is limited due to those wee processors like ARM. When compared to the desktop Linux version, there's the run-time library supplied by gcc - GNU C Library or more commonly known as glibc - which supports vast more C/C++ idiosyncratics such as STL, Boost, full exception handling. That is my view and is separate from the topic and straying off the beaten path here. :)

t0mm13b
  • 13,476
  • 1
  • 50
  • 59
2

The closest I've found is http://www.apogee.com/products/cjre-a

Unfortunately as stated on that page:

Note that Apogee temporarily suspended further development of CJREs+A in June, 2012, because of insufficient demand for them. Please, contact Apogee if you are interested in a CJRE+A targeted at a an Android-running device of your choice for "volume" distribution to your customers and/or other third parties.

...and a download/demo is nowhere to be found.

Taken from their products page http://www.apogee.com/products it does sound like it would have been a great thing to have:

CJRE+A - The “CJRE for Android” is suitable for devices running Android v4.x or higher, which need to execute the Java SE 5 and SE 6 applications in addition to executing the Android applications.

We can still dream. I have not contacted them. I am aware of many companies that are looking for this functionality. I can't imagine it will dwindle all too fast (or let's say slower than flash)?

I have not reached out to Apogee, might be worth a try...If anyone ever finds a solution, please keep us updated! Thanks.

TryTryAgain
  • 151
  • 1
  • 9
1

Android still does not support Java applets, nor will it, without major work.

The Java in Android isn't 'real' Java - it is a custom written version by Google. Android apps may be written in Java, but they are converted to Dalvik at compile time.

As such, it would be nigh on impossible to develop a browser that has compatibility for Java Applets.

ale
  • 19,737
  • 34
  • 111
  • 161
Liam W
  • 8,476
  • 11
  • 41
  • 68
0

There is a post entitled "Is there a possibility to run applets on Android or Blackberry" over on Stack Overflow which will provide you more insight, it can be found here:

https://stackoverflow.com/questions/2433338/is-there-a-possibility-to-run-applets-on-android-or-blackberry

I have looked elsewhere however there appears to be no conclusive evidence that java applets are supported.

Simon
  • 1,360
  • 1
  • 19
  • 28