Jar retrieval

Question:
I have a small question about turning in the labs- my lab uses a couple of other classes contained in a jar file. I put my project and this jar file together in a zip file and put it on the website for downloading. To test it and see if I can run the project, I removed the needed jar file from my computer. Now, the only way I can get it to work is to include the needed jar file in my classpath and then reboot for the changes to take effect. It also worked if I have a generic jar file name in the classpath and change the name of my jar file to match. This seems kinda cumbersome- am I doing something wrong?

Answer
Great question and testing to see if your stuff works on another machine.

For someone else to get the code in the jar file to work, they would need to do one of a couple possibilities (some you mentioned):

  1. include the needed jar file in my classpath and then reboot for the changes to take effect.
  2. a generic jar file name in the classpath and change the name of the jar to match.
  3. once downloaded, unjar the needed jar file
Notice for the last option, that for some submissions you will have jars within the downloaded jar. Specifically, if you have a Bean, you would want to have that .jar with the manifest, etc all packaged nicely and included in the .jar (.zip) that would be downloaded. For client/server code, you would probably have a jar for the client stuff, a jar for the server stuff and then put both jars in a downloadable jar