Can I run a “standard” application other than Android, Java on Android?

In my case, I want to write an application that is completely symmetrical (and not a client server) with identical functionality on two PCs, one is “standard” Windows or Linux, and the other is an Android slider.

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

Two computers will be transmitted over TCP / IP, for example, peer-to-peer, but I suspect that as a general issue this may be of interest to many.

+4
source share
2 answers

Well, you cannot run an independent Java application on Android. Android applications are compiled into dalvik bytecode and are actually just written in java but not running on java vm (Android does not have java vm). However, you can create a jar library that can be used by both desktop and android applications, and which should allow for reuse of platform-independent code.

+10
source

You can run command line Java programs on your Android device. An example of a simple hello world program is described here .

As noted earlier, you cannot use the Android platform for the user interface, and if you do not have a root phone, you will not be able to install it in / data or gain access to "secure" functions, for example, talking to the Internet.

0
source

All Articles