TCLUG Development Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG-DEVEL:186] java -jar ?



Bob Tanner wrote:
> 
> I thought I could just do this:
> 
> java -jar blah.jar
> 
> And things would work, not messing with my classpath, etc.

Sort of.

What version of Java are you using?  This only works for JDK 1.2 and
above.
Do you have more than one class that has a main(String[] args) method?
It can only have one.
Is it depending on any classes not defined on your current classpath? 
You would have to add them on the -classpath option

java -classpath neededclasses.jar:$CLASSPATH -jar blah.jar

-- 
Perry Hoekstra
Talent Software Services
dutchman@mn.uswest.net

"I don't see much sense in that," said Rabbit.
"No," said Pooh humbly, "there isn't. But there was going to be when I
began it. It's just that something happened to it along the way."