error when increasing heap size and launching jar from command line.
I was at first at a loss for how to increase the heap size, but between the api and the posts in this forum, i was able to figure it out. thank you for all the helpful posts. but now when i attempt to launch the jar in question, i get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: gametable
when i launch the jar file via double-click in the gui, no problems. do i need to define where inside the jar the main class is somehow? i'm using the following format for the command:
java -Xms512m -Xmx1024m gametable
i even tried:
java -Xms512m -Xmx1024m gametable.jar
and received the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: gametable/jar
the fact that it read the "." as a "/" made me think that maybe it needs to be pointed to the main class inside the jar.... would this be a correct guess? if not how do i get this to work, please?
[956 byte] By [
nijinekoa] at [2007-10-3 8:29:29]

You need a manifest included in your jar.
http://java.sun.com/j2se/1.5.0/runtime.html#jar
http://java.sun.com/j2se/1.5.0/runtime.html#example
http://java.sun.com/docs/books/tutorial/deployment/jar/manifestindex.html
Example existing manifest.mf file
Name: ca/wim/test/
Main-Class: ca.wim.test.startup
Class-Path: . images/ jars/commons-collections.jar jars/commons-digester.jar jars/commons-logging.jar jars/commons-logging-api.jar jars/commons-beanutils.jar jars/jasperreports.jar jars/dnsns.jar jars/kunststoff.jar jars/ldapsec.jar jars/localedata.jar jars/mysql-connector-java-3.0.6-stable-bin.jar
Name: ca/wim/test/
Specification-Title: "Test Program"
Specification-Version: "1.0"
Specification-Vendor: "Me"
Implementation-Title: "Test"
Implementation-Version: "build40.3"
Implementation-Vendor: "Me"
Note the Class-Path would include the directories and jars you need.
rykk
thank you for the links. it was very helpful, and i now understand manifest files better.
well, in uncompacting the jar file, i discover that it does have a manifest with the following:
Manifest-Version: 1.0
Main-Class: com.galactanet.gametable.GametableApp
and nothing else. does this need to have all the directory paths in it? such as:
/decks
/assets
/com/galactanet/gametable
etc.? it does not need to refer to jar files outside of itself, all the app files are contained within the one jar.
and i still receive the error mentioned above.