Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Executing jar .......  RSS feed

Giorgos gapgaps
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ??
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!