Java Why Choose Java for Android Development Over Other Languages?

  • Thread starter Thread starter Alex_Sanders
  • Start date Start date
  • Tags Tags
    Java
AI Thread Summary
The discussion centers on the use of Java in the Android operating system, highlighting its advantages and limitations. Java was originally designed to allow code to run on any hardware via a virtual machine, making it appealing for applications where runtime efficiency is less critical due to the increasing speed of hardware. However, the conversation also points out that Android is primarily built on Linux, using C and C++ for its core, while the Software Development Kit (SDK) utilizes Java. It clarifies that Android does not use a traditional Java Virtual Machine but instead employs Dalvik, which is more efficient for its environment. The topic shifts briefly to the performance issues associated with Flash Player, particularly regarding resource consumption and the challenges of maintaining software across diverse hardware platforms. Overall, the discussion emphasizes the balance between cross-platform compatibility and performance in software development.
Alex_Sanders
Messages
73
Reaction score
0
The Android system is an OS by java for java, but why? What significant advantage does java posses over other languages? Is it because high-end hardware are so cheap and numerous, that no one need to think about the runtime efficiency anymore? Or because google want to make money, and somehow consider java is somehow more developer-friendly comparing to others?
 
Technology news on Phys.org
The original reason for Java was to have a language where you could run the exact same code on any hardware. This is accomplished by having a 'virtual machine' on each hardware that runs the Java code. In answer to your question, there are many, many applications where run-time efficiency is irrelevant because the hardware is so fast. If I want to run a little piece of code on some web page, it doesn't matter whether the code takes 1 microsecond or 100 milliseconds to run, because in either case it happens instantaneously as far as the user is concerned. The important thing is that the code runs on whatever machine the user has and and doesn't crash.
 
phyzguy said:
The original reason for Java was to have a language where you could run the exact same code on any hardware. This is accomplished by having a 'virtual machine' on each hardware that runs the Java code. In answer to your question, there are many, many applications where run-time efficiency is irrelevant because the hardware is so fast. If I want to run a little piece of code on some web page, it doesn't matter whether the code takes 1 microsecond or 100 milliseconds to run, because in either case it happens instantaneously as far as the user is concerned. The important thing is that the code runs on whatever machine the user has and and doesn't crash.


How about flash player? Flv video stream? It's a nightmare even on desktop comps. Flash player, Plugin-container for Firefox especially, eats up tons of my hardware resources and yield no satisfying results. And they have been updating it every week or so.
 
I think video streaming needs to be fast so using Java is not an option. Getting software to run cleanly on the huge number of hardware platforms that are out there is not easy, which is why they keep updating it. I don't know the details.
 
Alex_Sanders said:
The Android system is an OS by java for java, but why?

No, it's not. Android is Linux - i.e. it's written mostly in C & C++.

The SDK is in Java. However, Android doesn't have a Java Virtual Machine. And it doesn't execute byte-code. It runs something called Dalvik - which I think is more like an executable than something regular java stuff.

Anyway, a good programmer can architect a Java based application which runs faster than a C++ one made by a bad programmer - Check out mailinator - http://mailinator.blogspot.in/2007/01/architecture-of-mailinator.html
 
Last edited:
Alex_Sanders said:
How about flash player? Flv video stream? It's a nightmare even on desktop comps. Flash player, Plugin-container for Firefox especially, eats up tons of my hardware resources and yield no satisfying results. And they have been updating it every week or so.

For exactly that reason I have disabled the plugin-container in about:config of my firefox. sorry for going off topic but i just cannot resist it. The plugin-container is really kind of slow for video.
 
Thread 'Star maps using Blender'
Blender just recently dropped a new version, 4.5(with 5.0 on the horizon), and within it was a new feature for which I immediately thought of a use for. The new feature was a .csv importer for Geometry nodes. Geometry nodes are a method of modelling that uses a node tree to create 3D models which offers more flexibility than straight modeling does. The .csv importer node allows you to bring in a .csv file and use the data in it to control aspects of your model. So for example, if you...
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...
Back
Top