You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Marcus Habermehl <bm...@yahoo.de> on 2008/02/03 01:59:47 UTC
Broken ant installation
Hi.
I have installed apache-ant 1.7.0 with jdk 1.6.0_04 and junit 4.4 on Linux.
If I want to use ant I get this errors.
$ ant -h
/opt/apache/bin/ant [script options] [options] [target [target2
[target3] ..]]
Script Options:
--help, --h print this message and ant help
--noconfig suppress sourcing of /etc/opt/apache/ant/ant.conf,
$HOME/.ant/ant.conf, and $HOME/.antrc
configuration files
--usejikes enable use of jikes by default, unless
set explicitly in configuration files
--execdebug print ant exec line generated by this
launch script
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/tools/ant/launch/Launcher
Caused by: java.lang.ClassNotFoundException:
org.apache.tools.ant.launch.Launcher
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
$ ant -diagnostics
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/tools/ant/launch/Launcher
Caused by: java.lang.ClassNotFoundException:
org.apache.tools.ant.launch.Launcher
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
Any idea what could be wrong with my installation?
Best regards
Marcus
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Broken ant installation
Posted by Marcus Habermehl <bm...@yahoo.de>.
supareno schrieb:
> Hello
>> Hi.
>>
>> I have installed apache-ant 1.7.0 with jdk 1.6.0_04 and junit 4.4 on
>> Linux.
>>
>> If I want to use ant I get this errors.
>>
>> $ ant -h
>> /opt/apache/bin/ant [script options] [options] [target [target2
>> [target3] ..]]
>> Script Options:
>> --help, --h print this message and ant help
>> --noconfig suppress sourcing of
>> /etc/opt/apache/ant/ant.conf,
>> $HOME/.ant/ant.conf, and $HOME/.antrc
>> configuration files
>> --usejikes enable use of jikes by default, unless
>> set explicitly in configuration files
>> --execdebug print ant exec line generated by this
>> launch script
>>
>> Exception in thread "main" java.lang.NoClassDefFoundError:
>> org/apache/tools/ant/launch/Launcher
>> Caused by: java.lang.ClassNotFoundException:
>> org.apache.tools.ant.launch.Launcher
>> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>>
>> $ ant -diagnostics
>> Exception in thread "main" java.lang.NoClassDefFoundError:
>> org/apache/tools/ant/launch/Launcher
>> Caused by: java.lang.ClassNotFoundException:
>> org.apache.tools.ant.launch.Launcher
>> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>>
>> Any idea what could be wrong with my installation?
> what is the results of:
>
> echo $ANT_HOME ?
> echo $JAVA_HOME ?
>
> you could try this
> (in your .bashrc)
>
> PATH=/path/to/apache-ant-1.7.0/bin:$PATH
> ANT_HOME=/path/to/apache-ant-1.7.0
>
> export PATH
> export ANT_HOME
>
> after editing your bashrc, reload it:
> $ source .bashrc
>
> hope this help!
$ANT_HOME and $JAVA_HOME are correct.
But now I have found the problem. The .cmd files in $ANT_HOME/bin was
missing.
Best regards
Marcus
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Broken ant installation
Posted by supareno <re...@free.fr>.
Hello
> Hi.
>
> I have installed apache-ant 1.7.0 with jdk 1.6.0_04 and junit 4.4 on
> Linux.
>
> If I want to use ant I get this errors.
>
> $ ant -h
> /opt/apache/bin/ant [script options] [options] [target [target2
> [target3] ..]]
> Script Options:
> --help, --h print this message and ant help
> --noconfig suppress sourcing of
> /etc/opt/apache/ant/ant.conf,
> $HOME/.ant/ant.conf, and $HOME/.antrc
> configuration files
> --usejikes enable use of jikes by default, unless
> set explicitly in configuration files
> --execdebug print ant exec line generated by this
> launch script
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/tools/ant/launch/Launcher
> Caused by: java.lang.ClassNotFoundException:
> org.apache.tools.ant.launch.Launcher
> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>
> $ ant -diagnostics
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/tools/ant/launch/Launcher
> Caused by: java.lang.ClassNotFoundException:
> org.apache.tools.ant.launch.Launcher
> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>
> Any idea what could be wrong with my installation?
what is the results of:
echo $ANT_HOME ?
echo $JAVA_HOME ?
you could try this
(in your .bashrc)
PATH=/path/to/apache-ant-1.7.0/bin:$PATH
ANT_HOME=/path/to/apache-ant-1.7.0
export PATH
export ANT_HOME
after editing your bashrc, reload it:
$ source .bashrc
hope this help!
regards
supareno
>
> Best regards
> Marcus
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org