From: Sascha H. <sa...@xm...> - 2010-06-04 09:30:29
|
Hi Damian, to answer your questions from your first e-mail: 1) Yes this is the right place :) 2) In theory yes. I don't know Scala at all, but as it's being compiled down to JVM instructions, it's in theory possible to use XMLVM to cross-compile it. Now on to your error: I don't know what is all contained in scala-library.jar. Trying to cross-compile the whole API library of course sounds reasonable, but you might run into a lot of problems with unsupported functionality. E.g., one of the reasons we don't just cross-compile the whole Java Runtime libraries is because eventually you hit e.g. native methods that do something low level, and we don't support that yet. Now I don't know how the scala-library.jar looks like and what's in there, so I cannot say whether it's reasonable to try to cross-compile it. Your error seems like a bug in XMLVM to be, as there seems to be some infinite recursion going on. I will try to see whether I can reproduce this later. But again, it might not be reasonable to try and compile the whole library. What you could do, however, is the same thing we did with the Java side: You could implement compatibility classes of the the APIs you are using from Scala. This way you only need to cross-compile your actual application, and link it against the xmlvm compat lib. // Sascha On Fri, Jun 4, 2010 at 1:34 AM, Damian <dam...@gm...> wrote: > So I would have to crosscompile the scala standard libraries > (scala-library.jar), right? Because I've tried to do so, but I get an > exception while compiling: > > Exception in thread "main" java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at com.simontuffs.onejar.Boot.run(Boot.java:306) > at com.simontuffs.onejar.Boot.main(Boot.java:159) > Caused by: java.lang.OutOfMemoryError: Java heap space at > java.util.Arrays.copyOf(Arrays.java:2882) > at > java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100) > at > java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390) > ................ more > > On Thu, Jun 3, 2010 at 8:27 PM, <len...@gm...> wrote: > >> Hi yes this is the right place. U will b able to access the Java classes >> for the iphone from Scala, compile to Java byte code and then via xmlvm to >> objective c. >> >> Sent via my BlackBerry from Vodacom - let your email find you! >> >> >> -----Original Message----- >> From: Damian <dam...@gm...> >> Date: Thu, 3 Jun 2010 20:15:27 >> To: <xml...@li...> >> Subject: [xmlvm-users] Getting started >> >> >> ------------------------------------------------------------------------------ >> ThinkGeek and WIRED's GeekDad team up for the Ultimate >> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the >> lucky parental unit. See the prize list and enter to win: >> http://p.sf.net/sfu/thinkgeek-promo >> >> > > > ------------------------------------------------------------------------------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > xmlvm-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmlvm-users > > |