如何在android模拟器上安装并运行java应用程序
我写了一个java程序,可以截取桌面... 我可以在android模拟器上安装这个java应用程序并通过单击启动它..在安装到模拟器之前我应该对java代码进行哪些更改以及稍后如何将其移植到模拟器...
谢谢Manju
I have written a java program that takes screenshot of desktop...
can i install this java app on android emulator and launch it by clicking on that..before installing on to emulator what all changes i should make to the java code and how to port it to the emulator later...
Thanks Manju
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是,如果您使用 JavaSE(普通桌面 Java)编写应用程序,那么让它在 Android 上运行会很复杂。 Android 公开的 Java 变体有自己的 API 用于访问桌面。更糟糕的是,我很确定你所提出的内容在 Android 上是不可能的,除非你有 root 访问权限。
我建议下载 ADT 并在模拟器中运行您的应用程序,以尽快查看它的功能。正如我所说,Android 和 JavaSE 之间的差异很大,越早尝试代码越好。
Unfortunately, if you wrote your application in JavaSE (ordinary desktop Java), there will be complications on getting it to work on Android. The variant of Java that Android exposes has its own API for getting access to the Desktop. And worse, I'm pretty sure what you're positing is impossible on Android unless you have root access.
I suggest downloading ADT and running your application in an emulator to see what it does as soon as you can. As I said, the differences between Android and JavaSE are substantial and the sooner you try your code, the better.