Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #24551

Re: Exception in thread “main” java.lang.NoClassDefFoundError Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.Task

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 <markspace@nospam.nospam>
Newsgroups comp.lang.java.programmer
Subject Re: Exception in thread “main” java.lang.NoClassDefFoundError Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.Task
Date Mon, 01 Jul 2013 09:03:27 -0700
Organization A noiseless patient Spider
Lines 22
Message-ID <kqs8u8$v02$1@dont-email.me> (permalink)
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

Show key headers only | View raw


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



Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Exception in thread “main” java.lang.NoClassDefFoundError Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.Task morpheous.sigma@gmail.com - 2013-07-01 00:14 -0700
  Re: Exception in thread “main” java.lang.NoClassDefFoundError Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.Task lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-07-01 09:36 +0100
  Re: Exception in thread “main” java.lang.NoClassDefFoundError Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.Task markspace <markspace@nospam.nospam> - 2013-07-01 09:03 -0700
    Re: Exception in thread “main” java.lang.NoClassDefFoundError Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.Task Lew <lewbloch@gmail.com> - 2013-07-01 17:25 -0700

csiph-web