alicjasalamon alicjasalamon -4 years ago 186
Java Question

Missing Library

I've tried to follow this tutorial, but I have problem with imports.

I got:

The import cannot be resolved

in line


I've tried to look for some info on Sun/Oracle website, but I have not found anything helpful.

I am developing on JDK 1.6.0_31.

Answer Source

tools.jar needs to be added to the IDE's library path and the program's classpath. The tools.jar file is found in the JDK's lib directory.

For example, if the JDK were installed into C:\Program Files\Java\jdk1.7.0_11 then the tools.jar file will be found at C:\Program Files\Java\jdk1.7.0_11\lib\tools.jar.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download