I have a java file on my android emulator and I need to compile it on the emulator terminal. Whenever I write "javac filename.java" I get an error message saying: "Permission denied".
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can not do this. When you compile a java source file it is first complied into a .class file which is Java byte code. After that the class files are then compiled again into a .dex file which is the Dalvik byte code which the Dalvik virtual machine can run. This .dex file is then compressed into an .apk file which is the archive which contain all your application's data. You can read more about it here.
回答2:
I'd start by looking at Terminal IDE, although on the emulator, I can't imagine it will be much fun.
In theory, it should work, if slowly. It's java/javac/apkbuilder/etc. with vim, and doesn't require rooting.