Are you in the same directory when executing right from the command line as you are when you're calling this from the script?
As a side note, the :lib/* might not be doing what you think it is.
A 'lib' directory, by convention holds jar files and jar files need to be added to the classpath explicitly and individually.
from java 1.5 it is possible to use the lib-expander *, which includes all jars from a folder.
Have you verified that the jar file is OK?
jar tvf jarfile.jar
Are you using the same shell to execute your script that you are using when you have an interactive prompt?
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton