Two Laptop Bag
The moose likes Java Micro Edition and the fly likes Executing jar ....... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Executing jar ......." Watch "Executing jar ......." New topic

Executing jar .......

Giorgos gapgaps

Joined: Dec 11, 2003
Posts: 3
The problem stated as following:
I have a implemented a Main.class file that prints the "Hello World" string.
If i try to run this by issuing the command
cvm Main
then all goes well,
BUT if using the Main.class produce the Main.jar file (jar -cf Main.jar Main) and then try to run it :
cvm -Djava.class.path=Main.jar Main
I get the java.lang.OutOfMemoryError
at[BII)I(Native Method)
at java.util.jar.JarFile.getBytes(Ljava/util/zip/ZipEntry [B(
at java.util.jar.JarFile.getManifest()Ljava/util/jar/Manifest;(
at sun.misc.Launcher$AppClassLoader.defineClassPrivate(Ljava/lang/String;Lsun/misc/Launcher$ClassContainer Ljava/lang/Class;(
at sun.misc.Launcher$AppClassLoader.access$500(Lsun/misc/Launcher$AppClassLoader;Ljava/lang/String;Lsun/misc/Launcher$ClassContainer Ljava/lang/Class;(
at sun.misc.Launcher$;(
at;Ljava/security/AccessControlContext Ljava/lang/Object;(
at Ljava/lang/Object;(
at sun.misc.Launcher$AppClassLoader.doClassFind(Ljava/lang/String Ljava/lang/Class;(
at sun.misc.Launcher$AppClassLoader.findClass(Ljava/lang/String Ljava/lang/Class;(
at java.lang.ClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;(
at sun.misc.Launcher$AppClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;(
at java.lang.ClassLoader.loadClass(Ljava/lang/String Ljava/lang/Class;(
at java.lang.ClassLoader.loadClassInternal(Ljava/lang/String Ljava/lang/Class;(
Any ideas ??
I agree. Here's the link:
subject: Executing jar .......
It's not a secret anymore!