You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Diana Steffen <st...@clt-st.de> on 2005/06/27 18:26:18 UTC

problem with ant under linux

Hi,

I just installed ant under linux and I set
$PATH and $ANT_HOME like they say in the manual.
$JAVA_HOME was already set.

Unfortunately it does not seem to work,
even with an empty CLASPPATH.

ant -version
Unknown argument: -cp
ant [options] [target [target2 [target3] ...]]
Options:
   -help, -h              print this message
    .......

ant -help
/home/steffen/Java/apache-ant-1.6.5/bin/ant [script options] [options] 
[target [target2 [target3] ..]]
Script Options:
   --help, --h            print this message and ant help
   --noconfig             suppress sourcing of /etc/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

Unknown argument: -cp
ant [options] [target [target2 [target3] ...]]
Options:
   -help, -h              print this message
......................

I don't know what this "Unknown argument: -cp" exactly means.
Can someone give me a hint?

Thank you,
Diana




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: problem with ant under linux

Posted by Ivan Ivanov <ra...@yahoo.com>.

--- Diana Steffen <st...@clt-st.de> wrote:
> 
> /etc/ant.conf says
> ANT_HOME=/usr/share/ant
This is the location of Ant that comes with FC3
distibution...

> > rpm -qa | grep ant.
> 
> ant-1.6.2-3jpp
... and this is the rpm package it came from. And it
is made by jpackage.org AFAIK.

> 
> Now I'm confused, is it now 1.6.2  or 1.6.5
> (--noconfig -version)?
You manually installed 1.6.5 and you have 1.6.2
preinstalled by FC3.

> 
> Should I delete my installation or should I ask the
> root
> to delete older versions?
As you can see it is tricky to control the Ant version
that comes with FC3 and the version that you manually
installed. So I would favor deleting the older
version.  It perhaps can be done with the command
rpm -ev ant-1.6.2-3jpp
but it is not tested and I take no responsibility :))

HTH
Ivan

> 
> Diana
> 
> >>
> >>Peter
> >>
> >>Ivan Ivanov wrote:
> >>
> >>
> >>>--- Diana Steffen <st...@clt-st.de> wrote:
> >>>
> >>> 
> >>>
> >>>
> >>>>Hi Ivan,
> >>>>
> >>>> > What linux distribution are you using?
> >>>>
> >>>>Fedora Core 3.
> >>>>   
> >>>>
> >>>
> >>>I really thought it was FC3.
> >>>
> >>> 
> >>>
> >>>
> >>>>>Can you check the value of JAVA_HOME (echo
> >>>>>     
> >>>>>
> >>>>
> >>>>$JAVA_HOME)
> >>>>
> >>>>/usr/java/jdk
> >>>>   
> >>>>
> >>>
> >>>This is where you have installed your own jdk.
> >>>
> >>> 
> >>>
> >>>
> >>>>>and the location of java executables:
> >>>>>     
> >>>>>
> >>>>
> >>>>/usr/bin/java
> >>>>/usr/bin/javac
> >>>>   
> >>>>
> >>>
> >>>And these are GCJ executable.
> >>>
> >>>Now you can fix that problem by setting PATH
> >>
> >>variable
> >>
> >>>in this way:
> >>>export PATH=$JAVA_HOME\bin:$PATH
> >>>Thus Sun JDK executables will be found before GCJ
> >>>executables are found.
> >>>
> >>>HTH
> >>>Ivan
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: problem with ant under linux

Posted by Diana Steffen <st...@clt-st.de>.
>>The java stuff in Ivan's comment is correct.

I changed $PATH like Ivan suggested, but I get the same error.

>>However, the ant needs a little work!
>>The -cp not been reconized is due to an
>>older version of ant being installed.

/etc/ant.conf says
ANT_HOME=/usr/share/ant


ant --noconfig -version
Apache Ant version 1.6.5 compiled on June 2 2005

> It did not occur to me there is another ant version. I
> then suppose that it is the real culprit. So we should
> not blame GCJ for not supporting the same arguments.
> 
> What Diana can do now is too check what ant is
> preinstalled with a command like this:
> rpm -qa | grep ant.

ant-1.6.2-3jpp

Now I'm confused, is it now 1.6.2  or 1.6.5 (--noconfig -version)?

Should I delete my installation or should I ask the root
to delete older versions?

Diana

>>
>>Peter
>>
>>Ivan Ivanov wrote:
>>
>>
>>>--- Diana Steffen <st...@clt-st.de> wrote:
>>>
>>> 
>>>
>>>
>>>>Hi Ivan,
>>>>
>>>> > What linux distribution are you using?
>>>>
>>>>Fedora Core 3.
>>>>   
>>>>
>>>
>>>I really thought it was FC3.
>>>
>>> 
>>>
>>>
>>>>>Can you check the value of JAVA_HOME (echo
>>>>>     
>>>>>
>>>>
>>>>$JAVA_HOME)
>>>>
>>>>/usr/java/jdk
>>>>   
>>>>
>>>
>>>This is where you have installed your own jdk.
>>>
>>> 
>>>
>>>
>>>>>and the location of java executables:
>>>>>     
>>>>>
>>>>
>>>>/usr/bin/java
>>>>/usr/bin/javac
>>>>   
>>>>
>>>
>>>And these are GCJ executable.
>>>
>>>Now you can fix that problem by setting PATH
>>
>>variable
>>
>>>in this way:
>>>export PATH=$JAVA_HOME\bin:$PATH
>>>Thus Sun JDK executables will be found before GCJ
>>>executables are found.
>>>
>>>HTH
>>>Ivan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: problem with ant under linux

Posted by Peter Reilly <pe...@apache.org>.
Ivan Ivanov wrote:

>--- Peter Reilly <pe...@apache.org> wrote:
>
>  
>
>>The java stuff in Ivan's comment is correct.
>>However, the ant needs a little work!
>>The -cp not been reconized is due to an
>>older version of ant being installed.
>>    
>>
>It did not occur to me there is another ant version. I
>then suppose that it is the real culprit. So we should
>not blame GCJ for not supporting the same arguments.
>  
>
But using (by mistake) gcj may cause other problems, so
it is good to avoid it if it is not necessary.

>What Diana can do now is too check what ant is
>preinstalled with a command like this:
>rpm -qa | grep ant.
>
>  
>
>>This can be seen by looking at the file
>>/etc/ant.conf
>>It (re)sets the ANT_HOME env variable.
>>    
>>
>Or the pre-installed ant can be installed completely
>with rpm -e. I prefer this way to prevent another
>problem with mixed versions of ant.
>  
>
This would be better. I am still (after ~10 years)
getting used to the idea of personal unix compters!

>  
>
>>To test this please
>>do
>>ant --noconfig -version
>>    
>>
>This is the first time I see --noconfig option and I
>haven't noticed it in the ant manual. Could you please
>give more light on it?
>  
>
I do not think that it is desribed in the 1.6.* manual.
There is a mention in the install.html in 1.7 cvs head.
The option simply causes the ant script to igore /etc/ant.conf.


Peter

>Ivan
>  
>
>>(NOTE: the double dash and the single dash).
>>
>>Peter
>>
>>Ivan Ivanov wrote:
>>
>>    
>>
>>>--- Diana Steffen <st...@clt-st.de> wrote:
>>>
>>> 
>>>
>>>      
>>>
>>>>Hi Ivan,
>>>>
>>>> > What linux distribution are you using?
>>>>
>>>>Fedora Core 3.
>>>>   
>>>>
>>>>        
>>>>
>>>I really thought it was FC3.
>>>
>>> 
>>>
>>>      
>>>
>>>>>Can you check the value of JAVA_HOME (echo
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>$JAVA_HOME)
>>>>
>>>>/usr/java/jdk
>>>>   
>>>>
>>>>        
>>>>
>>>This is where you have installed your own jdk.
>>>
>>> 
>>>
>>>      
>>>
>>>>>and the location of java executables:
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>/usr/bin/java
>>>>/usr/bin/javac
>>>>   
>>>>
>>>>        
>>>>
>>>And these are GCJ executable.
>>>
>>>Now you can fix that problem by setting PATH
>>>      
>>>
>>variable
>>    
>>
>>>in this way:
>>>export PATH=$JAVA_HOME\bin:$PATH
>>>Thus Sun JDK executables will be found before GCJ
>>>executables are found.
>>>
>>>HTH
>>>Ivan
>>>
>>> 
>>>
>>>      
>>>
>>>>>Command line argument -cp is used (at least with
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>Sun
>>>>   
>>>>
>>>>        
>>>>
>>>>>JDK) to specify the classpath.
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>I know, I just don't know how to interpret this in
>>>>ant context. :-(
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>HTH
>>>>>Ivan
>>>>>
>>>>>
>>>>>--- Diana Steffen <st...@clt-st.de> wrote:
>>>>>
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>>>Hi,
>>>>>>
>>>>>>I just installed ant under linux and I set
>>>>>>$PATH and $ANT_HOME like they say in the manual.
>>>>>>$JAVA_HOME was already set.
>>>>>>
>>>>>>Unfortunately it does not seem to work,
>>>>>>even with an empty CLASPPATH.
>>>>>>       
>>>>>>
>>>>>>            
>>>>>>
>>>>   
>>>>
>>>>        
>>>>
>>---------------------------------------------------------------------
>>    
>>
>>> 
>>>
>>>      
>>>
>>>>To unsubscribe, e-mail:
>>>>user-unsubscribe@ant.apache.org
>>>>For additional commands, e-mail:
>>>>user-help@ant.apache.org
>>>>
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>__________________________________________________
>>>Do You Yahoo!?
>>>Tired of spam?  Yahoo! Mail has the best spam
>>>      
>>>
>>protection around 
>>    
>>
>>>http://mail.yahoo.com 
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>    
>>
>>>To unsubscribe, e-mail:
>>>      
>>>
>>user-unsubscribe@ant.apache.org
>>    
>>
>>>For additional commands, e-mail:
>>>      
>>>
>>user-help@ant.apache.org
>>    
>>
>>>
>>> 
>>>
>>>      
>>>
>>
>>    
>>
>---------------------------------------------------------------------
>  
>
>>To unsubscribe, e-mail:
>>user-unsubscribe@ant.apache.org
>>For additional commands, e-mail:
>>user-help@ant.apache.org
>>
>>
>>    
>>
>
>
>
>		
>____________________________________________________ 
>Yahoo! Sports 
>Rekindle the Rivalries. Sign up for Fantasy Football 
>http://football.fantasysports.yahoo.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: problem with ant under linux

Posted by Ivan Ivanov <ra...@yahoo.com>.

--- Peter Reilly <pe...@apache.org> wrote:

> The java stuff in Ivan's comment is correct.
> However, the ant needs a little work!
> The -cp not been reconized is due to an
> older version of ant being installed.
It did not occur to me there is another ant version. I
then suppose that it is the real culprit. So we should
not blame GCJ for not supporting the same arguments.

What Diana can do now is too check what ant is
preinstalled with a command like this:
rpm -qa | grep ant.

> 
> This can be seen by looking at the file
> /etc/ant.conf
> It (re)sets the ANT_HOME env variable.
Or the pre-installed ant can be installed completely
with rpm -e. I prefer this way to prevent another
problem with mixed versions of ant.

> 
> To test this please
> do
> ant --noconfig -version
This is the first time I see --noconfig option and I
haven't noticed it in the ant manual. Could you please
give more light on it?

Ivan
> 
> (NOTE: the double dash and the single dash).
> 
> Peter
> 
> Ivan Ivanov wrote:
> 
> >--- Diana Steffen <st...@clt-st.de> wrote:
> >
> >  
> >
> >>Hi Ivan,
> >>
> >>  > What linux distribution are you using?
> >>
> >>Fedora Core 3.
> >>    
> >>
> >I really thought it was FC3.
> >
> >  
> >
> >>>Can you check the value of JAVA_HOME (echo
> >>>      
> >>>
> >>$JAVA_HOME)
> >>
> >>/usr/java/jdk
> >>    
> >>
> >This is where you have installed your own jdk.
> >
> >  
> >
> >>>and the location of java executables:
> >>>      
> >>>
> >>/usr/bin/java
> >>/usr/bin/javac
> >>    
> >>
> >And these are GCJ executable.
> >
> >Now you can fix that problem by setting PATH
> variable
> >in this way:
> >export PATH=$JAVA_HOME\bin:$PATH
> >Thus Sun JDK executables will be found before GCJ
> >executables are found.
> >
> >HTH
> >Ivan
> >
> >  
> >
> >>>Command line argument -cp is used (at least with
> >>>      
> >>>
> >>Sun
> >>    
> >>
> >>>JDK) to specify the classpath.
> >>>      
> >>>
> >>I know, I just don't know how to interpret this in
> >>ant context. :-(
> >>
> >>    
> >>
> >>>HTH
> >>>Ivan
> >>>
> >>>
> >>>--- Diana Steffen <st...@clt-st.de> wrote:
> >>>
> >>>
> >>>      
> >>>
> >>>>Hi,
> >>>>
> >>>>I just installed ant under linux and I set
> >>>>$PATH and $ANT_HOME like they say in the manual.
> >>>>$JAVA_HOME was already set.
> >>>>
> >>>>Unfortunately it does not seem to work,
> >>>>even with an empty CLASPPATH.
> >>>>        
> >>>>
> >>
> >>    
> >>
>
>---------------------------------------------------------------------
> >  
> >
> >>To unsubscribe, e-mail:
> >>user-unsubscribe@ant.apache.org
> >>For additional commands, e-mail:
> >>user-help@ant.apache.org
> >>
> >>
> >>    
> >>
> >
> >
> >__________________________________________________
> >Do You Yahoo!?
> >Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> >http://mail.yahoo.com 
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> >For additional commands, e-mail:
> user-help@ant.apache.org
> >
> >
> >
> >  
> >
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 



		
____________________________________________________ 
Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football 
http://football.fantasysports.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: problem with ant under linux

Posted by Peter Reilly <pe...@apache.org>.
The java stuff in Ivan's comment is correct.
However, the ant needs a little work!
The -cp not been reconized is due to an
older version of ant being installed.

This can be seen by looking at the file
/etc/ant.conf
It (re)sets the ANT_HOME env variable.

To test this please
do
ant --noconfig -version

(NOTE: the double dash and the single dash).

Peter

Ivan Ivanov wrote:

>--- Diana Steffen <st...@clt-st.de> wrote:
>
>  
>
>>Hi Ivan,
>>
>>  > What linux distribution are you using?
>>
>>Fedora Core 3.
>>    
>>
>I really thought it was FC3.
>
>  
>
>>>Can you check the value of JAVA_HOME (echo
>>>      
>>>
>>$JAVA_HOME)
>>
>>/usr/java/jdk
>>    
>>
>This is where you have installed your own jdk.
>
>  
>
>>>and the location of java executables:
>>>      
>>>
>>/usr/bin/java
>>/usr/bin/javac
>>    
>>
>And these are GCJ executable.
>
>Now you can fix that problem by setting PATH variable
>in this way:
>export PATH=$JAVA_HOME\bin:$PATH
>Thus Sun JDK executables will be found before GCJ
>executables are found.
>
>HTH
>Ivan
>
>  
>
>>>Command line argument -cp is used (at least with
>>>      
>>>
>>Sun
>>    
>>
>>>JDK) to specify the classpath.
>>>      
>>>
>>I know, I just don't know how to interpret this in
>>ant context. :-(
>>
>>    
>>
>>>HTH
>>>Ivan
>>>
>>>
>>>--- Diana Steffen <st...@clt-st.de> wrote:
>>>
>>>
>>>      
>>>
>>>>Hi,
>>>>
>>>>I just installed ant under linux and I set
>>>>$PATH and $ANT_HOME like they say in the manual.
>>>>$JAVA_HOME was already set.
>>>>
>>>>Unfortunately it does not seem to work,
>>>>even with an empty CLASPPATH.
>>>>        
>>>>
>>
>>    
>>
>---------------------------------------------------------------------
>  
>
>>To unsubscribe, e-mail:
>>user-unsubscribe@ant.apache.org
>>For additional commands, e-mail:
>>user-help@ant.apache.org
>>
>>
>>    
>>
>
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around 
>http://mail.yahoo.com 
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: problem with ant under linux

Posted by Ivan Ivanov <ra...@yahoo.com>.

--- Diana Steffen <st...@clt-st.de> wrote:

> Hi Ivan,
> 
>   > What linux distribution are you using?
> 
> Fedora Core 3.
I really thought it was FC3.

> > Can you check the value of JAVA_HOME (echo
> $JAVA_HOME)
> 
> /usr/java/jdk
This is where you have installed your own jdk.

> 
> > and the location of java executables:
> 
> /usr/bin/java
> /usr/bin/javac
And these are GCJ executable.

Now you can fix that problem by setting PATH variable
in this way:
export PATH=$JAVA_HOME\bin:$PATH
Thus Sun JDK executables will be found before GCJ
executables are found.

HTH
Ivan

> 
> > Command line argument -cp is used (at least with
> Sun
> > JDK) to specify the classpath.
> 
> I know, I just don't know how to interpret this in
> ant context. :-(
> 
> > 
> > HTH
> > Ivan
> > 
> > 
> > --- Diana Steffen <st...@clt-st.de> wrote:
> > 
> > 
> >>Hi,
> >>
> >>I just installed ant under linux and I set
> >>$PATH and $ANT_HOME like they say in the manual.
> >>$JAVA_HOME was already set.
> >>
> >>Unfortunately it does not seem to work,
> >>even with an empty CLASPPATH.
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: problem with ant under linux

Posted by Diana Steffen <st...@clt-st.de>.
Hi Ivan,

  > What linux distribution are you using?

Fedora Core 3.

> Some distributions come with preinstalled JDKs. Some
> like Fedora Core 3 come with GCJ (GNU compiler for
> java) and GCJ executables have the same names as Sun
> JDK.
> Can you check the value of JAVA_HOME (echo $JAVA_HOME)

/usr/java/jdk

> and the location of java executables:

/usr/bin/java
/usr/bin/javac

> Command line argument -cp is used (at least with Sun
> JDK) to specify the classpath.

I know, I just don't know how to interpret this in ant context. :-(

> 
> HTH
> Ivan
> 
> 
> --- Diana Steffen <st...@clt-st.de> wrote:
> 
> 
>>Hi,
>>
>>I just installed ant under linux and I set
>>$PATH and $ANT_HOME like they say in the manual.
>>$JAVA_HOME was already set.
>>
>>Unfortunately it does not seem to work,
>>even with an empty CLASPPATH.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: problem with ant under linux

Posted by Ivan Ivanov <ra...@yahoo.com>.
Diana,

What linux distribution are you using?
Some distributions come with preinstalled JDKs. Some
like Fedora Core 3 come with GCJ (GNU compiler for
java) and GCJ executables have the same names as Sun
JDK.
Can you check the value of JAVA_HOME (echo $JAVA_HOME)
and the location of java executables:
Command line argument -cp is used (at least with Sun
JDK) to specify the classpath.

HTH
Ivan


--- Diana Steffen <st...@clt-st.de> wrote:

> Hi,
> 
> I just installed ant under linux and I set
> $PATH and $ANT_HOME like they say in the manual.
> $JAVA_HOME was already set.
> 
> Unfortunately it does not seem to work,
> even with an empty CLASPPATH.
> 
> ant -version
> Unknown argument: -cp
> ant [options] [target [target2 [target3] ...]]
> Options:
>    -help, -h              print this message
>     .......
> 
> ant -help
> /home/steffen/Java/apache-ant-1.6.5/bin/ant [script
> options] [options] 
> [target [target2 [target3] ..]]
> Script Options:
>    --help, --h            print this message and ant
> help
>    --noconfig             suppress sourcing of
> /etc/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
> 
> Unknown argument: -cp
> ant [options] [target [target2 [target3] ...]]
> Options:
>    -help, -h              print this message
> ......................
> 
> I don't know what this "Unknown argument: -cp"
> exactly means.
> Can someone give me a hint?
> 
> Thank you,
> Diana
> 
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org