WJ-3141A Lab Question
I am trying to compile Exercise 2 using Apache Ant as instructed in the course. I am having problems w/ javac versioning and I know nothing about Ant or how it decides which javac version to use, etc. I would really like some help w/o having to read the entire Ant manual and become an expert in Ant just to get through this one simple exercise. Please help. I've downloaded Apache TomCat Webserver 5.0, Apache Ant 1.7, and I already had Java JDK 1.5.0_06 w/ JRE update 1.5.0_10.
I do have a Java SDK1.3.1_02 installed for another app but my JAVA_HOME is set to JDK1.5.0_06. The command I execute is "ant compileWebapp". The error I get is below:
_
staticWebapp:
compileWebapp:
[javac] Compiling 2 source files to C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\dvd\WEB-INF\classes
[javac] C:\Documents and Settings\jcwaters\My Documents\Personal\programming\java\SunWLC\labs\SL314\exercises\project\src\model\DVDItem.java:3: cannot access java.lang.Object
[javac] bad class file: C:\Program Files\Java\jdk1.5.0_06\jre\lib\rt.jar(java/lang/Object.class)
[javac] class file has wrong version 49.0, should be 47.0
[javac] Please remove or make sure it appears in the correct subdirectory of the classpath.
[javac] public class DVDItem implements java.io.Serializable {
[javac] ^
[javac] 1 error
BUILD FAILED
C:\Documents and Settings\jcwaters\My Documents\Personal\programming\java\SunWLC\labs\SL314\exercises\project\build.xml:51: Compile failed; see the compiler error output for details.
Total time: 2 seconds
__

