Play Video
1
Android 1.5 speed comparing C++, C# (mono) and Java (using Roozz plugin)
Android 1.5 speed comparing C++, C# (mono) and Java (using Roozz plugin)
::2009/09/02::
Play Video
2
Should an Android dev learn anything other than Java?
Should an Android dev learn anything other than Java?
::2013/09/27::
Play Video
3
AnDevCon: Android for Java Developers - Marko Gargenta, Pt. 1
AnDevCon: Android for Java Developers - Marko Gargenta, Pt. 1
::2011/03/08::
Play Video
4
Java For Android Lesson 2
Java For Android Lesson 2
::2014/05/17::
Play Video
5
Java for Android Development (Level: Beginning) 12/8/12
Java for Android Development (Level: Beginning) 12/8/12
::2012/12/08::
Play Video
6
Sand IDE JAVA for Android
Sand IDE JAVA for Android
::2013/08/21::
Play Video
7
Make your First Android App!
Make your First Android App!
::2011/10/03::
Play Video
8
Java vs C++
Java vs C++
::2014/04/28::
Play Video
9
Android Eclipse Tutorial #1 - Building an App From Scratch
Android Eclipse Tutorial #1 - Building an App From Scratch
::2013/08/19::
Play Video
10
DEFCON 20: Hellaphone: Replacing the Java in Android
DEFCON 20: Hellaphone: Replacing the Java in Android
::2012/11/18::
Play Video
11
Android Development Tutorial #329 - AddressBook.java- Updated Activity methods onCreate
Android Development Tutorial #329 - AddressBook.java- Updated Activity methods onCreate
::2014/04/27::
Play Video
12
Java For Android Lesson 3
Java For Android Lesson 3
::2014/05/17::
Play Video
13
Android Development Tutorial #284 - Pizza.java- Overriding Activity method onPause
Android Development Tutorial #284 - Pizza.java- Overriding Activity method onPause
::2014/04/26::
Play Video
14
Java String Comparison == vs .equals(): Java Tutorial For Beginners [HD 1080p]
Java String Comparison == vs .equals(): Java Tutorial For Beginners [HD 1080p]
::2013/03/19::
Play Video
15
Meet the Two Giants Face to Face (Java & C# Comparison)
Meet the Two Giants Face to Face (Java & C# Comparison)
::2012/05/20::
Play Video
16
41 learn java for android development book   level 2   Conclusion of CHAPTER 6 Exploring the Basic APIs Part 1
41 learn java for android development book level 2 Conclusion of CHAPTER 6 Exploring the Basic APIs Part 1
::2012/09/14::
Play Video
17
Learning Java: Part 4: Creating custom methods and comparing Strings
Learning Java: Part 4: Creating custom methods and comparing Strings
::2011/08/19::
Play Video
18
Java , OOP, Android Lecture 5(In Bengali)(বাংলা)
Java , OOP, Android Lecture 5(In Bengali)(বাংলা)
::2013/11/03::
Play Video
19
59.Java Certification-Chapter07.Language Fundamentals-Lesson10.Comparing Objects.
59.Java Certification-Chapter07.Language Fundamentals-Lesson10.Comparing Objects.
::2013/02/08::
Play Video
20
How to record user voice in android app
How to record user voice in android app
::2013/09/15::
Play Video
21
Android Java IDE [AIDE] with OTG USB
Android Java IDE [AIDE] with OTG USB
::2012/09/25::
Play Video
22
IST297D - Why comparing primitive data and object data is different in Java
IST297D - Why comparing primitive data and object data is different in Java
::2013/09/14::
Play Video
23
Android Application Development Tutorial   01   Download and Install the Java JDK
Android Application Development Tutorial 01 Download and Install the Java JDK
::2014/03/29::
Play Video
24
AnDevCon: Android for Java Developers - Marko Gargenta, Pt. 2
AnDevCon: Android for Java Developers - Marko Gargenta, Pt. 2
::2011/03/08::
Play Video
25
JavaFX Everywhere
JavaFX Everywhere
::2014/01/05::
Play Video
26
Java Android Development - Swapping Screens and Activities
Java Android Development - Swapping Screens and Activities
::2012/10/20::
Play Video
27
Should I Learn Java or Python?
Should I Learn Java or Python?
::2013/09/29::
Play Video
28
Java , OOP, Android Lecture 2(In Bengali)(বাংলা)
Java , OOP, Android Lecture 2(In Bengali)(বাংলা)
::2013/10/17::
Play Video
29
the difference; "CreateGUID ()" and "java.randomUUID.toString" Android. -haruyuk Mohri- Delphi XE6
the difference; "CreateGUID ()" and "java.randomUUID.toString" Android. -haruyuk Mohri- Delphi XE6
::2014/08/15::
Play Video
30
Android Apps Tutorial: how to Download and Install the Java JDK
Android Apps Tutorial: how to Download and Install the Java JDK
::2014/03/30::
Play Video
31
Should I Learn Java or JavaScript?
Should I Learn Java or JavaScript?
::2014/03/11::
Play Video
32
Java (Playlist 4) Android - ITA 25: App Geo Genius/15: completiamo la action bar
Java (Playlist 4) Android - ITA 25: App Geo Genius/15: completiamo la action bar
::2014/03/15::
Play Video
33
JDroidLib - A new Java to Android Communications Library.
JDroidLib - A new Java to Android Communications Library.
::2014/03/04::
Play Video
34
A Comparison between Java Vs Python - SLIIT - 3rd Year PLDC Video Presentation
A Comparison between Java Vs Python - SLIIT - 3rd Year PLDC Video Presentation
::2013/07/17::
Play Video
35
Java on Android
Java on Android
::2013/04/26::
Play Video
36
AnDevCon: Android for Java Developers - Marko Gargenta, Pt. 4
AnDevCon: Android for Java Developers - Marko Gargenta, Pt. 4
::2011/03/09::
Play Video
37
Ruboto - Ruby on Java on Android - JavaZone
Ruboto - Ruby on Java on Android - JavaZone
::2013/06/24::
Play Video
38
Java (Playlist 4) Android - ITA 29: touch prolungato,  più View per lo stesso evento
Java (Playlist 4) Android - ITA 29: touch prolungato, più View per lo stesso evento
::2014/04/01::
Play Video
39
AnDevCon: Android for Java Developers - Marko Gargenta, Pt. 3
AnDevCon: Android for Java Developers - Marko Gargenta, Pt. 3
::2011/03/09::
Play Video
40
#6 Adding Fragments in Java Part 1: Android Tutorial For Beginners [HD 1080p]
#6 Adding Fragments in Java Part 1: Android Tutorial For Beginners [HD 1080p]
::2013/09/26::
Play Video
41
Comparing Eclipse to Visual Studio
Comparing Eclipse to Visual Studio
::2013/06/21::
Play Video
42
Java Configuration Tutorial for Using the Record/Compare Feature in the Real English
Java Configuration Tutorial for Using the Record/Compare Feature in the Real English
::2014/02/18::
Play Video
43
Java Project With Source Code - 3 - Project On OCR Technology Extracting Text From Image
Java Project With Source Code - 3 - Project On OCR Technology Extracting Text From Image
::2013/08/08::
Play Video
44
Public Private Protected difference in Java
Public Private Protected difference in Java
::2014/02/10::
Play Video
45
26 learn java for android development book   level 2   Recursive Methods and Argument Passing and Chained Instance Method Calls
26 learn java for android development book level 2 Recursive Methods and Argument Passing and Chained Instance Method Calls
::2012/07/31::
Play Video
46
32 learn java for android development book   level 2   Anonymous and Local Class   Interfaces within Class
32 learn java for android development book level 2 Anonymous and Local Class Interfaces within Class
::2012/09/06::
Play Video
47
24 learn java for android development book   level 2   Constructor, Class Initializer, Instance Initializer Access Control
24 learn java for android development book level 2 Constructor, Class Initializer, Instance Initializer Access Control
::2012/07/30::
Play Video
48
Difference between == and equals method in JAVA
Difference between == and equals method in JAVA
::2013/06/15::
Play Video
49
Java vs Python Platforms Comparison
Java vs Python Platforms Comparison
::2014/06/18::
Play Video
50
Ubuntu for Phones vs Android Jelly Bean Comparison
Ubuntu for Phones vs Android Jelly Bean Comparison
::2013/02/22::
NEXT >>
RESULTS [51 .. 101]
From Wikipedia, the free encyclopedia
Jump to: navigation, search

This article compares the Java and Android API and virtual machines.

While most Android applications are written in Java, there are many differences between the Java API and the Android API, and Android does not use a Java Virtual Machine but another one called Dalvik.


There is no Java Virtual Machine in the Android platform. Java bytecode is not executed. Instead Java classes are compiled into a proprietary bytecode format and run on Dalvik, a specialized virtual machine (VM) designed specifically for Android. Unlike Java VMs, which are stack machines, the Dalvik VM is a register-based architecture.

Dalvik has some specific characteristics that differentiate it from other standard VMs:[1]

  • The VM was designed to use less space.
  • The constant pool has been modified to use only 32-bit indexes to simplify the interpreter.
  • Standard Java bytecode executes 8-bit stack instructions. Local variables must be copied to or from the operand stack by separate instructions. Dalvik instead uses its own 16-bit instruction set that works directly on local variables. The local variable is commonly picked by a 4-bit 'virtual register' field.

Because the bytecode loaded by the Dalvik virtual machine is not Java bytecode, and of the specific way Dalvik load classes, it is not possible to load libraries packages as jar files, and even a specific logic must be used to load Android libraries (specifically the content of the underlying dex file must be copied in the application private internal storage area, before being able to be loaded).[2]

System properties[edit]

As is the case for the Java SE class System, the Android System class allows the retrieval of system properties. However, some mandatory properties defined with the Java Virtual Machine have no meaning or a different meaning on Android. For example:

  • "java.version" property returns 0 because it is not used on Android,
  • "java.specification.version" invariably returns 0.9 independently of the version of Android used,
  • "java.class.version" invariably returns 50 independently of the version of Android used,
  • "user.dir" has a different meaning on Android,
  • "user.home" and "user.name" properties do not exist on Android

Class library[edit]

Dalvik does not align to Java SE nor Java ME class library profiles[3][4] (e.g., Java ME classes, AWT or Swing are not supported). Instead it uses its own library[5] built on a subset of the Apache Harmony Java implementation.

java.lang package[edit]

By default, the default output stream System.out and System.err do not output anything,[6] and developers are encouraged to use the Log class, which logs Strings on the LogCat tool.[7] (this has changed at least from HoneyComb, and they now output to the log console as well)

Graphics and Widget library[edit]

Android does not use the Abstract Window Toolkit nor the Swing library. User Interface is built using View objects. Android uses a framework similar to Swing based around Views rather than JComponents. However, Android widgets are not JavaBeans: the Android application Context must be provided to the widget at creation.

Look and feel[edit]

Android widget library does not support a Pluggable look and feel architecture; The Look and Feel of Android widgets must be embedded in the widgets themselves. There is, however, a limited capability to set styles and themes for an application.[8]

Layout manager[edit]

Contrary to Swing where Layout managers can be applied to any container widget, Android layout behavior is encoded in the containers.[9]

See also[edit]

References[edit]

  1. ^ Rose, John (2008-05-31). "with Android and Dalvik at Google I/O". Retrieved 2008-06-08. 
  2. ^ Fred Chung (2011-07-28). "Custom Class Loading in Dalvik". Google. Retrieved 2011-11-27. 
  3. ^ "Google's Android SDK Bypasses Java ME in Favor of Java Lite and Apache Harmony". infoq.com. 2007-11-12. Retrieved 2009-05-31. "Instead of providing a full version of the Java SE or Java ME Google has diverged on two fronts. First, a limited subset of the core Java packages is provided. (...) By going this route Android is following in the footsteps of another Google project GWT which uses Java as its development language but does not support the full JDK" 
  4. ^ "Alternative to Point2D". Droid Tutorials. 2010-02-12. Retrieved 2010-02-17. "Given that AWT is not supported in Android API, the Point2D class, which is useful for writing 2D graphics, is missing either" 
  5. ^ "Package Index". Google. Retrieved 2011-11-27. 
  6. ^ "Android Debug Bridge". Google. Retrieved 2009-05-31. "By default, the Android system sends stdout and stderr (System.out and System.err) output to /dev/null." 
  7. ^ "Reading and Writing Logs". Google. Retrieved 2011-11-27. 
  8. ^ "Applying Styles and Themes". Google. Retrieved 2011-09-03. 
  9. ^ "Common Layout Objects". Google. Retrieved 2011-09-03. 
Wikipedia content is licensed under the GFDL License
Powered by YouTube
LEGAL
  • Mashpedia © 2014