Agreed, if javac runs okay from the command line, you have the JDK installed. Now it sounds like the issue is the Eclipse configuration. I use Netbeans and
Tomcat so I'm not going to be much help there.
I suggest you try our Eclipse forum where the experts on that
IDE hang out. Sorry I can't be more help.