user2757520
user2757520

Reputation: 11

Using Java-Insipired Language in Android App

Here is my situation. I am using a custom programming language thats syntax is based on Java. In order to compile this *.custom file I use the java classpath to locate the .jar that contains the .class files. This converts the .custom to .java from there I compile down to Java Byte Code and run on JVM. Now I am looking to use this custom language on Android. Is there a way that I can incorporate a .custom file into android and compile into .java and then to Dalvik Byte Code to run? Looking for any suggestions to run .custom on Android Thanks

Upvotes: 1

Views: 89

Answers (2)

Jesse Wilson
Jesse Wilson

Reputation: 40585

You can either compile to .class and then convert that to .dex using the dx tool. Or you can use DexMaker to go right to .dex from source.

Upvotes: 0

The Android dev tools are ultimately operating on Java .class files. If you can compile your code into something that will run on the JVM with the class-library restrictions of Android, you can compile the .class into a .dex. Keep in mind that you'll need to be referring to the Android API in your programs so the Android installer can link them to the Android runtime.

Upvotes: 1

Related Questions