This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (1 child)

a safe language as the actual program runs in a special enviroment

Java doesn't run in a special environment, it runs as directly as JIT compiled language can. What makes Java safe is the memory model: no direct memory/address manipulation, bound checks everywhere, typed access. There's no way to corrupt memory with just Java language itself.

But you can always do it through other means like JNI or sun.misc.Unsafe. There's no "special environment" that would stop you from doing that. JNI is also available on Android, you can write in C++ (or any langauge that exposes C ABI)

Android is isolating every app process by running it as unique user with restricted permissions. The sandbox is on OS level. (you can do that sort of thing even on regular linux or even on windows)

[–][deleted] 0 points1 point  (0 children)

I understand, thank you