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

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 2013-07-01 09:03 -0700
Organization A noiseless patient Spider
Message-ID <kqs8u8$v02$1@dont-email.me> (permalink)
References <1c9087e2-3652-4d73-8ef8-f5d3e8c4445f@googlegroups.com>

Show all headers | 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