Java is not Android

Let’s repeat that ‘Java is not Android‘.

Many people think that because Android uses the same syntax as Java that it will run Java code. The problem is that a language consists just not of the syntax but what is built into the language. Simple Java programs will run in Android but lots of libraries are missing, especially the Swing and the Graphics2D libraries. So you would need to rewrite all your graphical code to make Java code run on Android. As rendering a PDF involves a lot of Graphics2D code, that makes converting a Java PDF viewer to Android a major task.

And that is why most Java code can not run on Android.

This post is part of our “Android Articles Index” series. In these articles, we aim to explore android in different ways. Have a look!

Related Posts:

The following two tabs change content below.

Mark Stephens

System Architect and Lead Developer at IDRSolutions
Mark Stephens has been working with Java and PDF since 1999 and has diversified into HTML5, SVG and JavaFX. He also enjoys speaking at conferences and has been a Speaker at user groups, Business of Software, Seybold and JavaOne conferences. He has a very dry sense of humor and an MA in Medieval History for which he has not yet found a practical use.
Markee174

About Mark Stephens

Mark Stephens has been working with Java and PDF since 1999 and has diversified into HTML5, SVG and JavaFX.

He also enjoys speaking at conferences and has been a Speaker at user groups, Business of Software, Seybold and JavaOne conferences. He has a very dry sense of humor and an MA in Medieval History for which he has not yet found a practical use.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>