Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Issue with Ant when switched from JRE5 to JRE1.4

 
Niranjan Prasad
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you do a complete rebuild?
 
Niranjan Prasad
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes completely rebuild.Removed class files and ran build.xml
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic