移植的javac和DX到Android [英] porting javac and dx to android

查看:358
本文介绍了移植的javac和DX到Android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是打算移植javac编译器和DX转换器android..Is这将是一个重要的任务还是有什么重大的路障?

Hi i'm planning on porting the javac compiler and dx converter to android..Is this going to be a trivial Task or are there any major Roadblocks?

我的想法是创建一个应用程序,使人们可以在Android设备编译java源$ C ​​$ C,甚至在同一个Android设备使Android应用...

My idea is to create an app so that people can compile java source code in the android devices and maybe even make android apps in the same android devices...

这可能吗?

推荐答案

大多数人不会认为这是小事。

Most people would not consider it trivial.

您列出的javac DX 为需要移植的事情。这些肯定是要求。您需要创建的javac (和所有的系统,它可能使用不上的Andr​​oid库)的ARM端口。您还需要尝试创建一个版本 DX 中,将在Dalvik虚拟机上运行,​​因为它是Java虚拟机编写的。

You list javac and dx as things that need to be ported. Those are certainly requirements. You would need to create an ARM port of javac (and all the system libraries that it might use that are not on Android). You would also need to attempt to create a version of dx that would run on Dalvik VM, as it is written for the Java VM.

除此之外,你需要的端口,以最小的:

Beyond that, you would need to port, at minimum:


  • AAPT 和所有它可能使用不上的Andr​​oid系统库

  • AIDL 和所有它可能使用不上的Andr​​oid系统库

  • 的LLVM编译器

  • 蚂蚁(用Java编写的,但对于Java虚拟机,并​​很可能将没有修改的Dalvik虚拟机上运行)

  • 整个进口一套Ant任务的编译过程(也写作为Java VM)使用

  • 使用这些Ant任务作为构建过程的一部分,其他的Java SDK工具(例如,的jarsigner 密钥工具

  • aapt and all the system libraries that it might use that are not on Android
  • aidl and all the system libraries that it might use that are not on Android
  • the LLVM compiler
  • Ant (written in Java, but for the Java VM and very likely will not run on the Dalvik VM without modifications)
  • the entire imported set of Ant tasks used by the build process (also written for the Java VM)
  • other Java SDK tools used by those Ant tasks as part of the build process (e.g., jarsigner, keytool)

然后你需要创建一个Android应用程序,可以调用Ant任务来完成构建,同时考虑到Android的壳是相当有限的,可以把它放进自己的阻碍这一进程。这样的应用程序将需要捕获标准输出标准错误,并将结果报告给用户(例如,编译错误)。你可能会还需要推出自己的小型的IDE,除非有一个现有的文本编辑器,足以满足您的需求。

And then you would need to create an Android app that could invoke the Ant task to do the build, bearing in mind that the Android shell is rather limited and could conceivably place its own impediments on this process. Such an app would need to capture stdout and stderr and report the results to the user (e.g., compile errors). You would likely also need to roll your own miniature IDE, unless there is an existing text editor sufficient for your needs.

我估计这是超过100工程师个月服用好。所以,如果你的公司已责成一个不错的大小团队的项目,你可能在一个一年左右的时间完成。

I would estimate this as taking well in excess of 100 engineer-months. So, if your firm has tasked a nice-sized team for the project, you might have it done in a year or so.

这篇关于移植的javac和DX到Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆