基于JVM的语言没有语言运行库 [英] JVM based language without language runtime

查看:241
本文介绍了基于JVM的语言没有语言运行库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道一些替代的JVM语言,但是掩盖它可能是,它可以编译成普通Java字节code,没有语言运行库的需要。

Does anyone know of some alternative JVM language, however obscure it might be, which can compile to plain old java bytecode, without the need of a language runtime.

我需要这一点是为了尝试开发不启动或大小点球Android应用程序。 Scala中,Clojure的和Groovy都需要分发与应用程序自身的运行时库,让他们出了这个问题的范围。

I need this in order to try to develop android applications without startup or size penalty. Scala, Clojure and Groovy all require its own runtime library distributed with the application, so they are out of the scope of this question.

只有一种语言,声称为了满足这一目标是查尔斯·纳特的米拉的,但我不能让它工作在Windows上。

The only one language which claims to satisfy this goal is Charles Nutter's Mirah, but I couldn't make it to work on windows.

编辑:澄清一下,我知道,任何语言都必须有运行时库。很显然,我所寻找的是具有除了JRE不需要额外的运行时间,或至少非常有限的。语言

To clarify a bit, I know any language has to have runtime library. Obviously, what I am looking for is a language that has no additional runtime required besides JRE, or at least very limited one.

推荐答案

有没有我能想到的(也许米拉,这是实验性的,并至少需要的部分的其他类我猜)。每一种语言需要一个运行时你想要做的任务。

There is none I can think of (maybe Mirah, which is experimental and will need at least some additional classes I guess). Every language needs a runtime for the task you want to do.

唯一的区别是非常有用的类如何已经在您的设备上。 如果你开发Java,并且只使用它们已经在设备上的库,您的应用程序将是非常小的。

The only difference is how much usable classes are already on your device. If you develop Java and only use the libraries which are already on the device, your application will be quite small.

虽然它可能不是你的问题,最好的办法,你已经使用ProGuard的考虑? ProGuard的可以删除这是不是在你的特定程序中使用运行时的部分。

While it may not be the best approach to your problem, do you have considered using ProGuard? ProGuard can remove parts of a runtime which are not used in your specific program.

另一种方法,如果速度和时间的真正的批判会去用NDK(C / C ++)来代替。

Another approach if speed and time is really critical would be going with the NDK (C/C++) instead.

这篇关于基于JVM的语言没有语言运行库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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