There seems to be some great confusion among some Android users about how Java works on their devices. Apparently there are users who would like to run Java Applets within a web browser on their Android. I thought I might write a post to clear up some of the confusion. Here are a few questions I’ve seen asked in various forums along with some answers.
Why can’t I load a Java Applet on my Android?
Java Applets are built to run within web browsers. Java Applets will not work within a browser in Android as they do not make a plug-in like the ones you’d find for a desktop computer. There are no plans for creating one since the resources required would not suffice on a mobile device and the technology is considered obsolete.
But doesn’t Android run on Java?
Yes. Apps are written in Java and the kernel of the Android OS includes Java compatible libraries. This doesn’t have anything to do with Java Applets running in the web browser though. It’s kind of like asking “My application was written in C++, why can’t it run another C++ application?”. It just doesn’t work that way.
Hopefully this answers many questions for Android users confused about Java. If you have anything to add to this post or a question, feel free to leave comments below.
MAyuri Kudalkar says
As java is platform independent and java can be run on linux OS also… android is developed by using linux (ubuntu) and also Large parts of Android are written in Java and its APIs are designed to be called primarily from Java. Then why should java programs especially applet cannot be run on android smartphone…???
robert scott says
Mitch since there is a java VM and the libraries and JARS to support it in the droid OS and any browser app gets to access these in the android SDK and I assuming using something akin to JWT or swing then a plugin or browser for applets is NOT a resource problem. It is an Oracle(who bought Sun and therefore got JAVA and closed it when way back when in 94 Sun promised it would always be open and deployed to an platform with a large enough userbase )fighting with Google problem that has kept this fro happening. Granted with JSON and JS and Javafaces etc etc you don’t need a browser to be able to embed objects through plugins as much anymore it would be a great thing to haven but Oracle does not want fat clients it want everything to be JEEE technology so the reason is Larry Ellison.
But there are few games which runs in both Computers as well as Andriod devices. Are those games developed in Java Script?
at least on rooted phones there is possibility to install a desktop linux on android (there are apps like linux deploy to help with that). This way i was able to run java-applets on my phone (using debian and iceweasel-browser). But this is only a workaround for experienced users and far from being comfortable.
Unbelievable Java doesn’t have a competitor ! Seems it’s a way past time for someone to find a way to inform existing & future android users of this doctorial approach . While we’re still on the subject Flash is doing the same thing – can’t get it as a stand alone & they don’t care !!
Java applets can run in standalone. No need of Web browser. Just a jvm to make it run.
That was just for precision.
People who say Applets are not dead, could you please tell me when did the last enhancement happen. Especially the UI design. It is as ugly as ever
Microsoft keeps VB safe by adding enhancement with its Presentation Foundation, which java failed to do.
Who ll keep seeing the Zombie screen for ever, in this world which has been ruled by jazzy CSS and HTML5
alot of people still need java applets on a daily basis..
even if it might take alot of overhead it should be the users choice to enable its use or not
I honestly can’t believe there’s still no method for this yet
in my sector, industrial automation we use java applets for simple visualisation of small projects, we can visualize them on a touchpanel.
Even on Ipad there is an app (microbrowser) that enables us to show these industrial webpages.
Why can’t I show my pages on an android device?
Mad Dog says
This post is actually quite ignorant about Java applets. They are not a “dead technology.” They are not supported _yet_ by mobile touchscreen devices, but that has more to do with the manufacturers’ desire to get as much money as possible through their app store and less to do with Java’s capabilities. Hence, Flash is not supported on iPad, even though it is still used on millions of devices. Mobile touchscreen devices are basically content _consumption_ devices. They are built for things like Facebook and movies or video services like YouTube. There are MANY other uses of computers that require the use of applets. To say it is a dead technology reveals a fundamental misunderstanding of client side applications, their use, and their necessity.
Time to find and pay someone to make it happen.
Why there are no alternatives for java applets?
Linux is one of the oldest OS in world and android is based on it, so why no alternative for java?
Never said Java was obsolete. Java applets are. Big difference between the two.
Java obsolete? Really? Sounds like a lame justification for yet another Android-app weakness… these weaknesses are even more glaring on tablets
Mitch seems like he knows what he’s talking about just fine. I think you’re the one who is misunderstanding. Dalvik is not a jre, it is dalvik. Obviously there is still a possibility of running a jre, since you can run anything you can program/port for android, but there isn’t one built into android or the standard browser, which I believe was the point of mitch’s article.
Christian, I never said it wasn’t possible. Only that applets are probably never going to be able to run on Android because of the overhead and the fact that it’s old technology. One shouldn’t expect a Java applet to run just because the OS was written in Java just like a program written in C++ may not run on an OS written on C++. Your comment about a C++ program running another C++ program as long as they are on the same platform reinforces my points expressed in the post so I’m not sure exactly what you disagree with or why you’d think the post was not reliable.
Christian Sciberras says
Your post, honestly, makes me think you know nothing about what you are talking about.
A C++ programmer can run another (compiled) C++ program, assuming both of them are on the same platform. Java does not compile into platform-specific code; a java jar can run on any platform with a JRE, including Android.
Whether the capability of actually running Java inside Android browser is ALLOWED or not (as opposed to if it actually COULD), I still need to figure it out, since I don’t deem this article reliable enough, unfortunately.
But is there any way around to run java applets or any support plugin made for android to run it?