Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JVM based language without language runtime

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.

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.

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.

EDIT: 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.

like image 818
Marko Avatar asked Sep 08 '10 11:09

Marko


People also ask

What are JVM based language?

Java Virtual Machine or JVM, has been a notable revolution in the world of development. This helps in the development and deployment of software. It was initially designed for powering applications that were written using Java language.

What is an alternative JVM language?

The languages we'll look at in this first category are Scala, Groovy, Xtend, Ceylon, Kotlin, and Fantom. The second category is existing languages that were ported to the JVM. Many languages, such as Python and Ruby, can interact with Java APIs and are popular for scripting and quick prototyping.

Which one is not JVM language?

Jython & JRuby -- language interoperability. Jython and JRuby are two of the earliest non-Java JVM languages, first released in 1997 and 2001, respectively. These languages are designed to offer interoperability between Java and Python, and Java and Ruby, respectfully.


1 Answers

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.

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.

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.

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

like image 116
soc Avatar answered Sep 28 '22 05:09

soc