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!
Latest posts by Mark Stephens (see all)
- How we are improving our code quality with IDEA in 2018 - March 7, 2018
- How we are improving our code quality with NetBeans in 2018 - March 1, 2018
- 3 ways that the European Union is changing the way Companies write software in 2018 - January 31, 2018
- IDRsolutions product range update for 2018 - January 22, 2018
- 4 ways Companies can make remote working successful - December 21, 2017