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
emulador java para android  (no root)
emulador java para android (no root)
::2013/12/18::
Play Video
4
AnDevCon: Android for Java Developers - Marko Gargenta, Pt. 1
AnDevCon: Android for Java Developers - Marko Gargenta, Pt. 1
::2011/03/09::
Play Video
5
Java for Android Development (Level: Beginning) 12/8/12
Java for Android Development (Level: Beginning) 12/8/12
::2012/12/09::
Play Video
6
Java For Android Lesson 2
Java For Android Lesson 2
::2014/05/17::
Play Video
7
DEFCON 20: Hellaphone: Replacing the Java in Android
DEFCON 20: Hellaphone: Replacing the Java in Android
::2012/11/19::
Play Video
8
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/15::
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
Make your First Android App!
Make your First Android App!
::2011/10/03::
Play Video
11
How to record user voice in android app
How to record user voice in android app
::2013/09/16::
Play Video
12
Differences between c++ and java?
Differences between c++ and java?
::2013/10/27::
Play Video
13
Java vs C++
Java vs C++
::2014/04/28::
Play Video
14
AnDevCon: Android for Java Developers - Marko Gargenta, Pt. 4
AnDevCon: Android for Java Developers - Marko Gargenta, Pt. 4
::2011/03/09::
Play Video
15
Java For Android Lesson 3
Java For Android Lesson 3
::2014/05/17::
Play Video
16
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
17
Public Private Protected difference in Java
Public Private Protected difference in Java
::2014/02/11::
Play Video
18
Replica Sansung Galaxy S3 dual chip Perfeito ( plataforma Java ) Não tem android
Replica Sansung Galaxy S3 dual chip Perfeito ( plataforma Java ) Não tem android
::2012/12/18::
Play Video
19
Chrome & Java on Android-overview of AlwaysOnPC (on Galaxy Tab)
Chrome & Java on Android-overview of AlwaysOnPC (on Galaxy Tab)
::2011/03/18::
Play Video
20
AIDE android Java/C++ IDE Premium Features Enabled
AIDE android Java/C++ IDE Premium Features Enabled
::2014/04/05::
Play Video
21
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
22
Performance Comparison; Java, Python and Go on App Engine
Performance Comparison; Java, Python and Go on App Engine
::2013/06/01::
Play Video
23
AnDevCon: Android for Java Developers - Marko Gargenta, Pt. 2
AnDevCon: Android for Java Developers - Marko Gargenta, Pt. 2
::2011/03/09::
Play Video
24
Android Apps Tutorial: how to Download and Install the Java JDK
Android Apps Tutorial: how to Download and Install the Java JDK
::2014/03/31::
Play Video
25
Java (Playlist 4) Android - ITA 6: cenni all
Java (Playlist 4) Android - ITA 6: cenni all'architettura, Android Runtime
::2013/12/15::
Play Video
26
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
27
what is the difference between c++ and java
what is the difference between c++ and java
::2012/06/26::
Play Video
28
59.Java Certification-Chapter07.Language Fundamentals-Lesson10.Comparing Objects.
59.Java Certification-Chapter07.Language Fundamentals-Lesson10.Comparing Objects.
::2013/02/08::
Play Video
29
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
30
Making A List And Checking It Twice in Java on Android
Making A List And Checking It Twice in Java on Android
::2013/04/26::
Play Video
31
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
32
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
33
Java Android Development - Swapping Screens and Activities
Java Android Development - Swapping Screens and Activities
::2012/10/20::
Play Video
34
JDroidLib - A new Java to Android Communications Library.
JDroidLib - A new Java to Android Communications Library.
::2014/03/04::
Play Video
35
AnDevCon: Android for Java Developers - Marko Gargenta, Pt. 3
AnDevCon: Android for Java Developers - Marko Gargenta, Pt. 3
::2011/03/09::
Play Video
36
Should I Learn Java or JavaScript?
Should I Learn Java or JavaScript?
::2014/03/11::
Play Video
37
C++ vs. Java : Code to Executable
C++ vs. Java : Code to Executable
::2012/02/14::
Play Video
38
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
39
Should I Learn Java or Python?
Should I Learn Java or Python?
::2013/09/29::
Play Video
40
Difference between comparable and comparator interface in java
Difference between comparable and comparator interface in java
::2013/06/20::
Play Video
41
Java Game Development (LibGDX) | Episode 1 - General information and setting up our project
Java Game Development (LibGDX) | Episode 1 - General information and setting up our project
::2013/04/21::
Play Video
42
Difference between == and equals method in JAVA
Difference between == and equals method in JAVA
::2013/06/15::
Play Video
43
Android App Development in Java - 4: EditTexts
Android App Development in Java - 4: EditTexts
::2014/06/16::
Play Video
44
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
45
What
What's New In Java 5, 6, & 7 Webinar 6 13 13 3 02 PM
::2013/06/21::
Play Video
46
Cómo abrir imágenes de Java en Android
Cómo abrir imágenes de Java en Android
::2014/01/02::
Play Video
47
How to Build an Android App Part 1: Setting up Eclipse and Android SDK
How to Build an Android App Part 1: Setting up Eclipse and Android SDK
::2012/04/18::
Play Video
48
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
49
Ubuntu for Phones vs Android Jelly Bean Comparison
Ubuntu for Phones vs Android Jelly Bean Comparison
::2013/02/23::
Play Video
50
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::
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