Govardhan, I have seen this error when you have different versions of ant in your path/classpath (I´ve seen this happenning on linux workstations with ant preinstalled). I'd do the following things, to track down the possible problems:
- Unset $CLASSPATH variable - Set $PATH variable with $JAVA_HOME/bin and $ANT_HOME/bin at the begining of the variable - Type on your command prompt the following: $ ant -version If the version corresponds to the ant you think you are using, try again your build. If not, it is possible your system is forcing you to use the preinstalled version of ant. At this point, I do not recall how to fix this, but I believe this has been discussed previously in this same list. You might want to check the archives at http://marc.theaimsgroup.com/?l=ant-user&r=1&w=2 Hope this helps -Luis >-----Original Message----- >From: Govardhan Babu [mailto:[EMAIL PROTECTED] >Sent: Wednesday, June 01, 2005 8:37 AM >To: user@ant.apache.org >Subject: UnsupportedClassVersionError > > >Hi, >I am getting this 'UnsupportedClassVersionError' when trying to run >'ant compile' command. For this compile task, the build.xml >file contains: > ><target name="compile"> ><mkdir dir="build/classes"/> ><javac srcdir="src" destdir="build/classes"/> ></target> > >'scr' directory having small HelloWOrld.java. >Initially I thought the problem is because of PATH settings to various >versiond of JRE, so I checked that and its fine. When am trying to >compile & run that HelloWorld.java with javac & java its working fine. > >I am getting error only with 'ant compile' command. > >I am pretty new to this ANT. Please give me any suggestions or >solutions... > >Thnx. > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]