Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED.99-92-208-198.lightspeed.sntcca.sbcglobal.net!not-for-mail From: markspace Newsgroups: comp.lang.java.programmer Subject: Re: Exception in thread =?windows-1252?Q?=93main=94_java=2Elan?= =?windows-1252?Q?g=2ENoClassDefFoundError_Caused_by=3A_java=2Elang?= =?windows-1252?Q?=2EClassNotFoundException=3A_org=2Eapache=2Etools=2Ea?= =?windows-1252?Q?nt=2ETask?= Date: Mon, 01 Jul 2013 09:03:27 -0700 Organization: A noiseless patient Spider Lines: 22 Message-ID: References: <1c9087e2-3652-4d73-8ef8-f5d3e8c4445f@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 1 Jul 2013 15:58:01 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="99-92-208-198.lightspeed.sntcca.sbcglobal.net:99.92.208.198"; logging-data="31746"; mail-complaints-to="abuse@eternal-september.org"; posting-account="markspace" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 In-Reply-To: <1c9087e2-3652-4d73-8ef8-f5d3e8c4445f@googlegroups.com> Xref: csiph.com comp.lang.java.programmer:24551 On 7/1/2013 12:14 AM, morpheous.sigma@gmail.com wrote: > export CLASSPATH=$CLASSPATH:/usr/local/apache-ant-1.9.1/etc:/usr/local/apache-ant-1.9.1/lib This is probably your mistake here. Despite the similar names, CLASSPATH does not work like the PATH environment variables in Unix. You have to set the classpath to the actual name of the Jar file you want to use, or use a '*' as the final element of the class path to use all Jar files in a directory. Doing neither of those, like you have, actually looks for 'lose' .class files in the file hierarchy. export CLASSPATH=$CLASSPATH:/usr/local/apache-ant-1.9.1/etc/*:/usr/local/apache-ant-1.9.1/lib/* or export CLASSPATH=$CLASSPATH:/usr/local/apache-ant-1.9.1/etc/some-ant.jar:/usr/local/apache-ant-1.9.1/lib/another.jar