ant eclipse java

Ant and Eclipse

Hi I am a beginner java programmer and recently I’ve started reading Thinking in Java 4th edition to consolidate my knoledge of java after I read Head first Java.Problem is that this book has it’s own library and I can’t seem to make it work in eclipse even after I did everything it said on the website guide.I instaled ant acordinly with this video guide and i’m getting this error:

“Unable to locate tools.jar.Expected to find it in C:\Program files\Java\jre7\lib\tools.jar


C:\TIJ4\code\build.xml:59:J2SE5 required

Total time:0 seconds

I tried reinstaling JDK witch was suggested on a forum but it still dident work so I don’t really know what to do.

Can anyone tell me how can I solve this problem? Also, more importantly, can’t this be done with Eclipse alone without installing Ant(I’ve only used eclipse for code writing and compiling so I’m not very familiar with it)Thant you.