Java and Android

  • Thread starter Dirk Bruere at NeoPax
  • Start date

D

Dirk Bruere at NeoPax

Does Java run on Android?
I know that Android code contains a lot of Java code, but how easy is it
to port Java apps that are already written to Android? Anyone done it?
 
Ad

Advertisements

J

Joshua Cranmer

Does Java run on Android?
I know that Android code contains a lot of Java code, but how easy is it
to port Java apps that are already written to Android? Anyone done it?

<http://developer.android.com/guide/topics/fundamentals.html>

Perusing the documentation leads me to believe that your UI code would
probably have to change.

The java packages it lists in the Javadoc are:
java.awt.font
java.beans
java.io
java.lang{.annotation,.ref,.reflect}
java.math
java.net
java.nio (with its subpackages)
java.security (with some if not all subpackages)
java.sql
java.text
java.util (with subpackages)

So it seems that, outside UI, most stuff could probably stay the same.
 
D

Dirk Bruere at NeoPax

<http://developer.android.com/guide/topics/fundamentals.html>

Perusing the documentation leads me to believe that your UI code would
probably have to change.

The java packages it lists in the Javadoc are:
java.awt.font
java.beans
java.io
java.lang{.annotation,.ref,.reflect}
java.math
java.net
java.nio (with its subpackages)
java.security (with some if not all subpackages)
java.sql
java.text
java.util (with subpackages)

So it seems that, outside UI, most stuff could probably stay the same.

A bit of a pain since most of my apps are mostly graphics i/o.
How about the reverse - will an Android Java app run on a PC?
 
Ad

Advertisements

R

Robert Kochem

Dirk said:
A bit of a pain since most of my apps are mostly graphics i/o.
How about the reverse - will an Android Java app run on a PC?

Only in the Android emulator.
If you want to develop a multi platform application you should separate
your application into at least a davice independant back-end and a device
dependant front-end. Or even more just use the Model View Controller (MVC)
[1] concept.

Robert

[1] http://en.wikipedia.org/wiki/Model–View–Controller
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top