This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using a Jar File in Dos/Batch Script

 
Paul Wam
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a jar file that I successfully run from the windows command line below:


Mathprog.jar invokes a computeXYZ method using 3000 as a argument and outputs a value when finished. That works perfectly.

The problem that I'm having is that mathprog has more than one method and I want to find a way to invoke more methods than computeXYZ from the command line. I'm certain that this is not the proper syntax but what I envision is being able to say something like:
c:\>mathprog.computeABC.jar 8000
c:\>mathprog.computeMNO.jar 500

What's the correct way of doing this? I'm new to jars.
 
John de Michele
Rancher
Posts: 600
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul:

Sorry, that won't work. You can set a main() method in a class that will run when the jar is executed. In order to do what you want, you'd need to a create a new .jar file for each of the methods.

John.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic