File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes Compile error with ANT in eclipse... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Compile error with ANT in eclipse..." Watch "Compile error with ANT in eclipse..." New topic
Author

Compile error with ANT in eclipse...

Pat Peg
Ranch Hand

Joined: Feb 04, 2005
Posts: 194
First, I wasn't sure where to post this but I'll try here. here is the result of running my ant file...


here is the ant file...


Here is some other possibly useful/useless information. My JAVA_HOME points to c:/jdk1.3.1_01 but my java -version is 1.4.1. I am getting no compile errors when I build clean in eclipse (just some warnings about deprecated calls).
Please help-that "class file version" is driving me crazy...and use small words when talking, i'm new with ant..hehe

Thanks
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
Looks like it's trying to compile your jsps using jdk 1.3 but it is finding jdk 1.4 jar.

(47 refers to jdk 1.3 compiled classes, 48 refers to jdk 1.4 compiled classes)

Try changing your java_home to 1.4. Or if you really wanted 1.3, then change so path and java_home to point to 1.3.
Pat Peg
Ranch Hand

Joined: Feb 04, 2005
Posts: 194
I'm pointing to 1.3
In fact, I can't find a 1.4 jdk folder anywhere (however I do get 1.4.1 when I do java -version)
JAVA_HOME and everything else I can think of is pointing to the folder jdk1.3.1_01
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
OK, let's see if we can find the stealth java reference.

1. Check your PATH, look specifically for something like c:\h\COTS\J2JRE_1.4.1. If you find that and change and it doesn't help (re-start eclipse) or don't find it in path, continue...

2. What version of eclipse are you using?

3. Not sure if true for all versions of eclipse, but I read that 2.1 used the same java for ant that's used to start eclipse. So, check how you're starting eclipse...

If you're using a shortcut, the java version may be specified using -vm. Otherwise eclipse uses the first java it finds in the path.

e.g., my eclipse 3.1 shortcut includes -vm ( right click on the shortcut - Properties: command to start eclipse is the value in "Target" field):

C:\_tools\eclipse-3.1M5a\eclipse\eclipse.exe -vm C:\_tools\jdk1.5.0_01\bin\javaw
Pat Peg
Ranch Hand

Joined: Feb 04, 2005
Posts: 194
Fixed-Thanks
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Compile error with ANT in eclipse...
 
Similar Threads
BUILD FAILED in Build.xml
ANT Complilation Issue
Question on Ant script error in my build.xml file in the Eclipse IDE
Building Seam projects in Eclipse
errors generated when running Ant build file in Eclipse