Forums Register Login

Packaging assignment jar...

+Pie Number of slices to send: Send
I have a set of rules concerning the structure of files in my jar file, the only thing i'm not certain about is the root class folder containing my compiled classes. In my case it is called suncertify (again per given instructions) but my packaging instructions do not say that suncertify must be one of the root folders in runme.jar. The only phrase that gives indirect hint is "The JAR file must have the following layout and contents in its root: The executable JAR containing the programs..."

Could someone clarify on that, I just want to make sure I'm doing everything correctly,

Thanks,

BTW Here is the contents of my JAR, does it look fine?

META-INF/
META-INF/MANIFEST.MF
code/
code/Application.java
code/db/DB.java
code/db/Data.java
docs/
docs/javadoc/
docs/choices.txt
docs/instructions.html
docs/userguide.txt
suncertify/
suncertify/Application.class
db-2x3.db
version.txt



I'm not sure if META-INF/ folder is fine and would not result if automatic failure, but as far as I understand there is no other way to define main class other then specify it in manifest.mf file which automatically moved to META-INF/ folder
+Pie Number of slices to send: Send
Hi Roman!

Originally posted by Roman Yankin:
In my case it is called suncertify (again per given instructions) but my packaging instructions do not say that suncertify must be one of the root folders in runme.jar. The only phrase that gives indirect hint is "The JAR file must have the following layout and contents in its root: The executable JAR containing the programs..."



Your compiled classes should be packaged in a jar called "runme.jar". Then, runme.jar along with all the files you listed (except the classes) must be packaged in another jar called something like "YourPrometricID.jar". This second jar is the file you'll be submitting.


I'm not sure if META-INF/ folder is fine and would not result if automatic failure, but as far as I understand there is no other way to define main class other then specify it in manifest.mf file which automatically moved to META-INF/ folder



The manifest file is always in the META-INF folder at the root of the jar. You don't have to have this folder&file, but (if I recall correctly) it is part of SUN's standards/recommandations. Definitly, both your jar should have this folder&file.

- Your runme.jar's manifest could provide the main class + version number, author...
- Your "outer" jar's manifest could provide other info such as description, version, author...

About the main class, you are right. If you don't have a manifest, then you would have to specify the main class in the launch command (which would go against one of your requirement).

With all I've just said, try to read again the packaging section!

good luck,
Alex
[ September 16, 2008: Message edited by: Alex Belisle Turcot ]
+Pie Number of slices to send: Send
Thanks a lot Alex! I bet you've saved me from automatic failure, no kidding! I have not realized that "runme.jar" has to be packaged into another jar. BTW, my assignment instructions does not even mention the way I should name global jar file that contains everything they simply say

All elements of your submission must be packaged in a single JAR file.

Wow, I'm really happy to find this out now and not after the submission!
A wop bop a lu bob a womp bam boom. Tutti frutti ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1129 times.
Similar Threads
Creepy classpath?
URLyBird: runme.jar
getResource always returns null
problem executing executable jar file
wrongly automatic failure
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 00:30:40.