aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Issue  with Ant when switched from JRE5 to JRE1.4 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Issue  with Ant when switched from JRE5 to JRE1.4" Watch "Issue  with Ant when switched from JRE5 to JRE1.4" New topic
Author

Issue with Ant when switched from JRE5 to JRE1.4

Niranjan Prasad
Ranch Hand

Joined: Aug 13, 2005
Posts: 62
I am deploying applications using Ant build.xml.
All is working fine when initially I use JRE1.4.I run build.xml by right clicking on build.xml and Runs>Ant build.These are my setting when it is working fine.
JRE Tab>Sperate JRE:jre1.4(One of Ant tabs)
I have to test my application in JRE5 also,I changed by Project setting to use Java5.Everything is fine,all worked.These are my setting when it is working fine.
JRE Tab>Sperate JRE:jre5(One of Ant tabs)
But now i came to back to jre1.4 for jre5,when try to access the applications I am getting unsupported version 49.That means all java classes are getting compiled in java5 and running in java1.4 as classpath is set like that.
Even though I have removed all the jre5 references I am still getting this error.Could anyone help me on this.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Did you do a complete rebuild?
Niranjan Prasad
Ranch Hand

Joined: Aug 13, 2005
Posts: 62
Yes completely rebuild.Removed class files and ran build.xml
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5842
    
    7

Either some of your .java files are not getting recompiled, or your have a JAR file (possibly third-party, or from another project) that has .class files built with JDK 5. Your best bet is to look at the expection you got - it will tell you which class is at the wrong compile level. Then hunt that class down and recompile it (and probably all of the other classes related to it).


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Issue with Ant when switched from JRE5 to JRE1.4