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.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top