Live data from Hacker News

Develop iOS Apps in Java with RoboVM

robovm.org

1–10 of 19 posts

Re: Develop iOS Apps in Java with RoboVM

#2
There 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

#3
Let's not forget that RoboVM is still alpha, and on Sept 09th version 0.0.4 was released: http://blog.robovm.org/2013/09/robovm-004-released.html

Here'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

#4
post #2

There 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.

Re: Develop iOS Apps in Java with RoboVM

#5
It 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 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

#6
post #5

It 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?

Re: Develop iOS Apps in Java with RoboVM

#7
post #4
post #2

There 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.

GCJ is dead, as most developers went away to OpenJDK or just lost interest.

Besides ExcelsiorJET, Aonix and IBM Webpshere Real Time VM do also offer AOT compilation.

Re: Develop iOS Apps in Java with RoboVM

#8
post #6
post #5

It 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?

Yes and no.

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

#9
post #5

It 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…

Why is this so special?

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

#10
post #6
post #5

It 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?

Should be able to use ProGuard, a code obfusticator+trimmer for Java. http://proguard.sourceforge.net/

Although, from my experience doing Android with Scala, the process is slow.

Post reply on HN