From owner-freebsd-java@FreeBSD.ORG Tue Sep 22 14:44:12 2009 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC27E1065670 for ; Tue, 22 Sep 2009 14:44:12 +0000 (UTC) (envelope-from stefan@freebsd.org) Received: from mail.hamcom.de (mail.hamcom.de [212.37.37.213]) by mx1.freebsd.org (Postfix) with ESMTP id 8E5B58FC14 for ; Tue, 22 Sep 2009 14:44:12 +0000 (UTC) Received: from adsl-dyn-88-208-151-24.heliweb.de ([88.208.151.24] helo=kyuzo.dunkelkammer.void) by mail.hamcom.de with esmtpa (Exim 4.68) (envelope-from ) id 1Mq5p8-0000oL-Ua for freebsd-java@freebsd.org; Tue, 22 Sep 2009 15:54:31 +0200 Received: by kyuzo.dunkelkammer.void (Postfix, from userid 1002) id D416C416A; Tue, 22 Sep 2009 15:54:17 +0200 (CEST) X-HeLi-id: cfcd208495d565ef66e7dff9f98764da Date: Tue, 22 Sep 2009 15:54:17 +0200 From: Stefan Walter To: freebsd-java@freebsd.org Message-ID: <20090922135417.GA65778@kyuzo.dunkelkammer.void> Mail-Followup-To: freebsd-java@freebsd.org References: <200909211306.31039.pieter@degoeje.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: java jar invocation X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2009 14:44:12 -0000 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