Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Sep 2009 15:54:17 +0200
From:      Stefan Walter <stefan@freebsd.org>
To:        freebsd-java@freebsd.org
Subject:   Re: java jar invocation
Message-ID:  <20090922135417.GA65778@kyuzo.dunkelkammer.void>
In-Reply-To: <op.u0mm35uh8527sy@82-170-177-25.ip.telfort.nl>
References:  <d2e731a10909202352g2b13f2e7q73e5a249022fd129@mail.gmail.com> <200909211306.31039.pieter@degoeje.nl> <d2e731a10909211409y61963fe6mb00df6c2a1a8c57@mail.gmail.com> <op.u0mm35uh8527sy@82-170-177-25.ip.telfort.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
Ronald Klop, 21.09.09, 23:53h CEST:

> You have to add all jars to the classpath explicitly. You can't specify a  
> directory with jars or use *.
> This is the easiest way I know.
> 
> for i in /usr/local/jarz/*.jar; do
>    CLASSPATH="$CLASSPATH:$i"
> done
> java -cp "$CLASSPATH" -jar foo.jar

Actually, I recently found out that you can use wildcards, but only since
1.6. See [1], section "Understanding class path wildcards".

Best regards,
Stefan

[1]: http://java.sun.com/javase/6/docs/technotes/tools/windows/classpath.html



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090922135417.GA65778>