Missing Library com.sun.tools.attach
Asked Answered
A

3

17

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

I got:

The import com.sun.tools cannot be resolved

in line

import com.sun.tools.attach.VirtualMachine;

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.

Alimony answered 10/8, 2012 at 11:56 Comment(0)
A
21

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.

Acquaintance answered 17/1, 2013 at 20:28 Comment(0)
A
4

You should add tools.jar to your classpath.

Attemper answered 10/8, 2012 at 12:3 Comment(0)
E
4

Refer this tutorial to include tools.jar .

http://hobione.wordpress.com/2009/03/11/missing-comsuntoolsjar142/

Eiffel answered 10/8, 2012 at 12:11 Comment(1)
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.Frasquito

© 2022 - 2024 — McMap. All rights reserved.