Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I run a "standard", non-Android, Java app on Android?

Tags:

android

In my case I want to write an app which is totally symetrical (not client-server) with identical functionality at two PCs, one a 'standard' Windows or Linux box and the other an Android slate.

Can I run the same program on both or do I nneed to wrap it in an Android package for persmissioons, etc?

The two PCs will communciate by TCP/IP, sort of peer-to-peer, but I suspect that as a generic question this might be of interest to many.

like image 224
Mawg says reinstate Monica Avatar asked Dec 29 '22 09:12

Mawg says reinstate Monica


1 Answers

Well you cannot run an independent java application on Android. Android applications are compiled to dalvik bytecode and really are just written in java but not run on the java vm (Android does not have a java vm). However you can create a jar library that can be consumed by both a desktop and android application and that should provide reuse of platform independent code.

like image 79
Quintin Robinson Avatar answered Feb 12 '23 03:02

Quintin Robinson