What I usually do is, in Eclipse preferences, I define an Installed JRE called "JDK X.Y.Z" and include tools.jar as part of it libraries. Then I change the project preferences to use that JRE "JDK X.Y.Z".
K. Ehrig, C. Ermel, S. Hansgen, and G. Taentzer. International Conference on Automated Software Engineering, page 134--143. Long Beach, CA, ACM Press, (November 2005)