Develop iOS Apps in Java with RoboVM
robovm.org
Develop iOS Apps in Java with RoboVM
1–10 of 19 posts
Re: Develop iOS Apps in Java with RoboVM
#2Re: Develop iOS Apps in Java with RoboVM
#3Here's an interesting blog post on RoboVM: "JavaFX On IOS Using RoboVM And Maven" http://www.zenjava.com/2013/08/01/javafx-on-ios-using-robovm...
Re: Develop iOS Apps in Java with RoboVM
#4There are currently two open source AOT compilers RoboVM and avian that can be used for cross-platform iOS/Android development. Both seem to be in pre-alpha state. Seems like a better option would be to use apportable and go the other way from iOS to android. Anyone here have any experience with these? http://oss.readytalk.com/avian/ http://www.apportable.com/
Re: Develop iOS Apps in Java with RoboVM
#5Found my answer: Note! When you compile a program using RoboVM it will translate not only the main class into native code but also the transitive dependencies of that main class. So the first time you compile a program for a particular CPU and OS RoboVM also compiles many of the standard runtime classes such as java.lang.Object, java.lang.String, etc. A simple class like HelloWorld references about 1500 classes directly or indirectly. RoboVM keeps a cache of compiled classes and only recompiles a class when it or any of its direct dependencies have changed.
Wow
Re: Develop iOS Apps in Java with RoboVM
#6It compiles the Java but what about the big VM needed? Found my answer: Note! When you compile a program using RoboVM it will translate not only the main class into native code but also the transitive dependencies of that main class. So the first time you compile a program for a particular CPU and OS RoboVM also compiles many of the standard runtime classes such as java.lang.Object, java.lang.String, etc. A simple cl…
Re: Develop iOS Apps in Java with RoboVM
#7There are currently two open source AOT compilers RoboVM and avian that can be used for cross-platform iOS/Android development. Both seem to be in pre-alpha state. Seems like a better option would be to use apportable and go the other way from iOS to android. Anyone here have any experience with these? http://oss.readytalk.com/avian/ http://www.apportable.com/
I rememberer long time ago when i was still in the land of Java I researched the topic there were GCJ as well. Dont know what happened to it And Something called ExcelsiorJET as well.
Besides ExcelsiorJET, Aonix and IBM Webpshere Real Time VM do also offer AOT compilation.
Re: Develop iOS Apps in Java with RoboVM
#8It compiles the Java but what about the big VM needed? Found my answer: Note! When you compile a program using RoboVM it will translate not only the main class into native code but also the transitive dependencies of that main class. So the first time you compile a program for a particular CPU and OS RoboVM also compiles many of the standard runtime classes such as java.lang.Object, java.lang.String, etc. A simple cl…
This is exciting. But wouldn't this result in very large final binary sizes?
This can happen even in languages like C when you do static linking.
The solution is to have the linker remove all code that is not being called. The consequence of it, it that you are restricted in doing reflection, for example.
Some Java native compilers allow you to provide a list of methods to leave alone, to avoid them being removed from the final executable.
Re: Develop iOS Apps in Java with RoboVM
#9It compiles the Java but what about the big VM needed? Found my answer: Note! When you compile a program using RoboVM it will translate not only the main class into native code but also the transitive dependencies of that main class. So the first time you compile a program for a particular CPU and OS RoboVM also compiles many of the standard runtime classes such as java.lang.Object, java.lang.String, etc. A simple cl…
This is basic compiler design 101.
The Java VM is just a possible implementation for the Java language.
The fact that many mix "Java the language", with "Java the Virtual Machine", is a consequence of the lack of knowledge in compiler design that seems so common nowadays.
Re: Develop iOS Apps in Java with RoboVM
#10It compiles the Java but what about the big VM needed? Found my answer: Note! When you compile a program using RoboVM it will translate not only the main class into native code but also the transitive dependencies of that main class. So the first time you compile a program for a particular CPU and OS RoboVM also compiles many of the standard runtime classes such as java.lang.Object, java.lang.String, etc. A simple cl…
This is exciting. But wouldn't this result in very large final binary sizes?
Although, from my experience doing Android with Scala, the process is slow.