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 Lesson 2
Java For Android Lesson 2
::2014/05/17::
Play Video
6
Java for Android Development (Level: Beginning) 12/8/12
Java for Android Development (Level: Beginning) 12/8/12
::2012/12/09::
Play Video
7
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
8
Android Graphics Programming Tutorial using Java and Android SDK |Graphics Programming
Android Graphics Programming Tutorial using Java and Android SDK |Graphics Programming
::2012/10/14::
Play Video
9
Make your First Android App!
Make your First Android App!
::2011/10/03::
Play Video
10
DEFCON 20: Hellaphone: Replacing the Java in Android
DEFCON 20: Hellaphone: Replacing the Java in Android
::2012/11/19::
Play Video
11
Android Eclipse Tutorial #1 - Building an App From Scratch
Android Eclipse Tutorial #1 - Building an App From Scratch
::2013/08/19::
Play Video
12
Java vs C++
Java vs C++
::2014/04/28::
Play Video
13
Java For Android Lesson 3
Java For Android Lesson 3
::2014/05/17::
Play Video
14
Differences between c++ and java?
Differences between c++ and java?
::2013/10/27::
Play Video
15
Android Development Tutorial #255 - ReadLocationTask.java- Method doInBackground
Android Development Tutorial #255 - ReadLocationTask.java- Method doInBackground
::2014/04/26::
Play Video
16
How to record user voice in android app
How to record user voice in android app
::2013/09/16::
Play Video
17
AnDevCon: Android for Java Developers - Marko Gargenta, Pt. 4
AnDevCon: Android for Java Developers - Marko Gargenta, Pt. 4
::2011/03/09::
Play Video
18
Android Development Tutorial #315 - SavedRecordings.java- Activity methods onCreate
Android Development Tutorial #315 - SavedRecordings.java- Activity methods onCreate
::2014/04/28::
Play Video
19
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
20
Performance Comparison; Java, Python and Go on App Engine
Performance Comparison; Java, Python and Go on App Engine
::2013/06/01::
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
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
23
Android Development Tutorial #238 - WeatherViewerActivity.java- Implementing TabListene
Android Development Tutorial #238 - WeatherViewerActivity.java- Implementing TabListene
::2014/04/26::
Play Video
24
Java (Playlist 4) Android - ITA 6: cenni all
Java (Playlist 4) Android - ITA 6: cenni all'architettura, Android Runtime
::2013/12/15::
Play Video
25
AnDevCon: Android for Java Developers - Marko Gargenta, Pt. 2
AnDevCon: Android for Java Developers - Marko Gargenta, Pt. 2
::2011/03/09::
Play Video
26
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
27
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
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
what is the difference between c++ and java
what is the difference between c++ and java
::2012/06/26::
Play Video
30
AIDE android Java/C++ IDE Premium Features Enabled
AIDE android Java/C++ IDE Premium Features Enabled
::2014/04/05::
Play Video
31
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
32
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
33
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
34
JavaFX Everywhere
JavaFX Everywhere
::2014/01/05::
Play Video
35
JDroidLib - A new Java to Android Communications Library.
JDroidLib - A new Java to Android Communications Library.
::2014/03/04::
Play Video
36
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
37
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
38
AnDevCon: Android for Java Developers - Marko Gargenta, Pt. 3
AnDevCon: Android for Java Developers - Marko Gargenta, Pt. 3
::2011/03/09::
Play Video
39
Should I Learn Java or JavaScript?
Should I Learn Java or JavaScript?
::2014/03/11::
Play Video
40
Java Android Development - Swapping Screens and Activities
Java Android Development - Swapping Screens and Activities
::2012/10/20::
Play Video
41
Intro to REST
Intro to REST
::2008/10/08::
Play Video
42
Should I Learn Java or Python?
Should I Learn Java or Python?
::2013/09/29::
Play Video
43
C++ vs. Java : Code to Executable
C++ vs. Java : Code to Executable
::2012/02/14::
Play Video
44
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
45
Comparing Eclipse to Visual Studio
Comparing Eclipse to Visual Studio
::2013/06/22::
Play Video
46
Public Private Protected difference in Java
Public Private Protected difference in Java
::2014/02/11::
Play Video
47
Android Tutorial & Lessons 28: Google Maps API-set up signing and MD5 fingerprint
Android Tutorial & Lessons 28: Google Maps API-set up signing and MD5 fingerprint
::2011/03/05::
Play Video
48
Difference between comparable and comparator interface in java
Difference between comparable and comparator interface in java
::2013/06/20::
Play Video
49
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
50
Difference between == and equals method in JAVA
Difference between == and equals method in JAVA
::2013/06/15::
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