LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Installation of ANT 1.7.0 & 1.6.5 (https://www.linuxquestions.org/questions/linux-software-2/installation-of-ant-1-7-0-and-1-6-5-a-615104/)

parani86 01-21-2008 12:57 AM

Installation of ANT 1.7.0 & 1.6.5
 
I got a problem on installing ant 1.7.0 & 1.6.5 on rh linux (version 4)
would u give me the instructions regarding tat.

jay73 01-21-2008 01:04 AM

Go to jpackage.org for all java related applications. Their packages install easily through yum. Don't forget to read the instructions first.

gilead 01-21-2008 01:05 AM

The installation docs on the Ant home page are pretty good. Have you tried them yet?

parani86 01-21-2008 03:17 AM

Sorry We Tried Out That !!!
 
Thanks for ur reply,we hav tried out the installing manual at ANT home page but while
defining JAVA_HOME we got an error


Error: JAVA_HOME is not defined correctly.
We cannot execute /usr/local/jdk-1.5.0_14/bin/java

so sujest me anyother way to install it

parani86 01-21-2008 03:31 AM

while installing the JPACKAGE rpm file

we got following error


unlocatable packages required by

jaxp_parser_impl ('ant','1.6.5','4jpp')
xml-commons-apis ('ant','1.6.5','4jpp')

so plz help on this

jay73 01-21-2008 04:30 AM

Did you save the correct yum files? And are you installing through yum or are you just downloading the rpms and installing them manually? I recommend the first approach as it will automatically fetch any dependencies (providing, of course, that you are using the proper config files as already suggested). If you are installing manually, you have to download the dependencies yourself and install those first - but they may have their own dependencies so you'd need to get those too, etc. - that can go on for a while until you have all that is needed and it can get pretty annoying. So if you can, use the yum approach, then you'll have none of that.

Note that you should also read the remarks on setting up your jdk the proper way. An unmodified jdk straight from Sun is no good. Getting this right is vital if you are to install any of the other packages without any issues.

parani86 01-21-2008 05:15 AM

PLZ tell me abt the command
 
we are manually installing by using the RPM files,so tell me how to use
the YUM command in red hat linux,or plz tell me corresponding command...

jay73 01-21-2008 05:34 AM

http://www.jpackage.org/yum.php

Just select the generic item as well as the one for rhel4. Do not forget to replace "mirror" with the address of an actual mirror and to replace "version" with the version of jpackage you would like to use (1.6, 1.7 or 5.0). The most convenient is to click on the MIRROR link and to follow through to the appropriate directory on the mirror, then copy the address to your yum config file.

If you need software from more than one version, you'll need to make extra entries: same mirror but different version.

And remember to read this on configuring jdk:
http://www.jpackage.org/installation.php
I use the compat method, it's faster though not the recommended method.

gilead 01-21-2008 12:24 PM

Hopefully the info at jpackage helped you. If you're still having problems, can you post the command you ran to set JAVA_HOME and what is the output of echo $JAVA_HOME ?

parani86 01-21-2008 10:56 PM

The Result Is This....!!!
 
Mr.gilead

I Will tell all abt tat wat we had done..

based on the instructions from the ANT manual page i.e

{Only the bin and lib directories are required to run Ant. To install Ant, choose a directory and copy the distribution files there. This directory will be known as ANT_HOME.}


we had extracted the ant file to the path /usr/local

Then the path is /usr/local/apache-ant-1.7.0

Then following the commands found in the manual i.e

{export ANT_HOME=/usr/local/ant
export JAVA_HOME=/usr/local/jdk-1.5.0.05
export PATH=${PATH}:${ANT_HOME}/bin}

we set the paths
the result is

[root@localhost ~]# export ANT_HOME=/usr/local/apache-ant-1.7.0
[root@localhost ~]# echo $ANT_HOME
/usr/local/apache-ant-1.7.0

we set the java home to be,

[root@localhost ~]# export JAVA_HOME=/usr/local/jdk-1.5.0_14
[root@localhost ~]# echo $JAVA_HOME
/usr/local/jdk-1.5.0_14


finally,

[root@localhost ~]# export PATH=${PATH}:${ANT_HOME}/bin
[root@localhost ~]# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/
usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin:/usr/local/apache-ant-1.7.0/bin


after doing all these,if we run ant command from the path
/usr/local/apache-ant-1.7.0/bin

we got the error,

[root@localhost bin]# ant
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher
[root@localhost bin]# ant -v
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher

help on this....!!

gilead 01-21-2008 11:06 PM

According to the info at http://ant.apache.org/faq.html#NoClassDefFoundError, the following commands will show whether the problems is with your CLASSPATH variable:
Code:

unset CLASSPATH
ant -version


jay73 01-22-2008 12:19 AM

Are you sure that jdk5 is compatible with ant7? I vaguely recall getting a similar error message some time ago when I was trying to run tomcat on jdk5.

By the way, what was wrong with the jpackage approach? Why mess with manual installs and paths when the system can do it?

parani86 01-22-2008 03:07 AM

we tried as u said.but we get the same error ie noclassDefFound

jay73 01-22-2008 10:17 AM

Is ant 1.6.5 still installed? I imagine there could be a conflict between 1.6.5. and 1.7. Or maye I should say that your system may be mixed-up by using part of the one and part of the other. I think you should be able to determine whether there is by setting your ant_home and your path in /etc/profile or your bash_profile rather than from the command line. Always make sure that the new ant is added to the beginning of the path, something that does not happen if you use the command line. Thus, if 1.6.5 is in, say, /usr/local, your system would never get to use 1.7 since it finds 1.6.5 before it gets to the other one.

parani86 01-23-2008 01:49 AM

Up2date ERROR..
 
while updating the system using the Up2date we got the following error,



Problem registering system:

Error Class Code: 70
Error Class Info:
All available subscriptions for the requested channel have been exhausted.
Please contact a Red Hat Network Sales associate.
Explanation:
An error has occurred while processing your request. If this problem
persists please enter a bug report at bugzilla.redhat.com.
If you choose to submit the bug report, please be sure to include
details of what you were trying to do when this error occurred and
details on how to reproduce this problem.


All times are GMT -5. The time now is 10:52 PM.