Wrong Java version
So the situation is like this: We have an application that relies on a jar file. This jar file is our customization to the W3C flute project. Let's call this jar flute1.jar. Our app has a bug that necessitates fiddling with flute1.jar.
So I located the bug. I rebuilt the flute1 project. I installed the newly built flute1.jar into our app. And then I committed the newly built jar (replacing the old jar) into the svn repo.
Our Hudson threw this message:
[javac] bad class
[javac] class file has wrong version 50.0, should be 48.0
[javac] Please remove or make sure it appears in the correct subdirectory of the classpath.
[javac] import org.w3c.flute.parser.Parser;
[javac] ^
[javac] 1 error
What has gone wrong? It turned out that I built the flute1.jar to conform to Java 1.5 while our app conformed to Java 1.4 only. So I added the target="1.4" switch to the javac task in my ant build file. And it worked.
So I located the bug. I rebuilt the flute1 project. I installed the newly built flute1.jar into our app. And then I committed the newly built jar (replacing the old jar) into the svn repo.
Our Hudson threw this message:
[javac] bad class
[javac] class file has wrong version 50.0, should be 48.0
[javac] Please remove or make sure it appears in the correct subdirectory of the classpath.
[javac] import org.w3c.flute.parser.Parser;
[javac] ^
[javac] 1 error
What has gone wrong? It turned out that I built the flute1.jar to conform to Java 1.5 while our app conformed to Java 1.4 only. So I added the target="1.4" switch to the javac task in my ant build file. And it worked.
0 komentar:
Posting Komentar