is there a way of having the default manifest (that is - the empty one) , and still be able to run the main function which is located in a class inside the jar, by applying these values by the command line?
i tried building a jar manually , and even creating a manifest file with an entry point just for the practice (rather then using the eclipse tool) , but it keep on giving me the NoClassDefFoundError exception.
I have only looked at those pages for a very short time, but it appears the answer is, no.
Joined: Oct 13, 2005
Are you using Eclipse? It is very easy to add a main class when you create a .jar in Eclipse. Altering the classpath is harder; last time I tried I ended up doing it by hand.
Joined: Nov 20, 2008
Well , i am using eclipse, but i solved the problem.
it appears that there is an option of creating a simple jar by console - so it's manifest is actually empty, but apply it the classpath for external jars i am using, and parameters for location of main function and input params as well.
much to my surprise it all worked out well.
my team leader sorted it out for me after about two days of me being all .