Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recommended way to embed JVM in C program with NO library?

Tags:

c

jvm

embedding

dsl

What's the recommended way to embed JVM in C program with NO library. This means JVM as a eDSL execution engine. (Not whole Java platform environment) I'm trying to use another JVM based language instead of Java itself.

like image 422
eonil Avatar asked Jun 15 '11 05:06

eonil


1 Answers

This may sound insane, but I would suggest embedding Mono and using IKVM to run your Java code. Mono is a relatively small and portable VM, which is suitable for embedding (you may even link it statically to your application) and IKVM is a faithful implementation of Java 1.6, which is capable of running even such monstrosities as Eclipse.

Using a combination of Mono/IKVM you can even compile your application Ahead-of-Time into x86 machine code (see Compiling Java Code to x86 Code).

like image 83
Max Mouratov Avatar answered Sep 22 '22 01:09

Max Mouratov