From: Nikolai P. <ni...@np...> - 2012-09-05 17:06:07
|
Hi John, You should put un argument to let java use more memory. Try executing the same command, but with "-Xmx2G" argument: java -Xmx2G -jar xmlvm.jar --in=/HelloWorld.class --target=iphone --iphone-app=TheApplication Regards, Nick On Sep 5, 2012, at 5:47 PM, John Tan <joh...@ho...> wrote: > Dear Arno, > I am having problems trying to compile a my HelloWorld.class file to Objective C code. > > The Java code that I generate my class file with is as shown below: > > public class HelloWorld { > > public void HelloWorld() { > System.out.println ("Hello World!"); > } > } > > In my Mac OS Terminal, I type: > > java -jar xmlvm.jar --in=/HelloWorld.class --target=iphone --iphone-app=TheApplication > > (xmlvm.jar file has been generated.) > > However I get this compilation error message: > > Exception in thread "main" java.lang.OutOfMemoryError: Java heap space > at java.util.Arrays.copyOf(Arrays.java:2786) > at java.io.ByteArrayOutputStream.toByteArray(ByteArrayOutputStream.java:133) > at com.simontuffs.onejar.JarClassLoader.alreadyCached(JarClassLoader.java:796) > at com.simontuffs.onejar.JarClassLoader.loadBytes(JarClassLoader.java:509) > at com.simontuffs.onejar.JarClassLoader.loadByteCode(JarClassLoader.java:455) > at com.simontuffs.onejar.JarClassLoader.loadByteCode(JarClassLoader.java:446) > at com.simontuffs.onejar.JarClassLoader.load(JarClassLoader.java:386) > at com.simontuffs.onejar.JarClassLoader.load(JarClassLoader.java:276) > at com.simontuffs.onejar.Boot.run(Boot.java:282) > at com.simontuffs.onejar.Boot.main(Boot.java:159) > > Please advise. > > Thank you very much for your kind efforts, > > Cheers, > John > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats.http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________ > xmlvm-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmlvm-users |