This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have a groovy program that needs to know the number of args:
Here is the bat file I use to call it and it is not working.
Here is the bash file I use to call it and it is not working.
The problem is that args.size() always returns the same value regardless of how many arguments I pass to main. The solution is to manually set up the class path each time and abandon the bat and bash scripts.
Is there a way to write my bash and bat files so they are sensitive to the number of arguments? I am posting this here in the java forum because I don't believe this problem is specific to groovy.