Answer» A jar FILE has many METHODS in it. When I run the following: java -jar TheProgram.jar T the main method in TheProgram is executed with a parameter of T.
Is there a way to execute one of the other methods in TheProgram.jar, say otherMethod(), by saying something like java -jar TheProgram.jar /otherMethod T?
Thank you.Is this a homework assignment? Basically a JAR is a compressed file that can have java applets. Have you ALREADY read this page? http://java.sun.com/developer/Books/javaprogramming/JAR/basics/ If you had, I don't understand your question. If a method is manifest yopur COULD use it, otherwise no. But if the jar file is not locked, you can MODIFY or extract what you want and put it into a new jar or some other form.No this is not a homework assignment, No I Had not read the page. I can use the java -cp theprogram.jar form.
|