How to import and use com.sun.jdi.VirtualMachine
Asked Answered
U

1

17

I found some classes designed for debugging in package com.sun.jdi like VirtualMachine, but I can't use this because package seems not exist in Sun JDK7.

How to use this package?

BTW. lib/sa-jdi.jar isn't the same I want

Understandable answered 19/6, 2012 at 10:44 Comment(1)
according to his link, VirtualMachine is pat of JDK7Detestation
M
18

According to this page, the VirtualMachine class that you linked to is part of the tools.jar file which is only distributed in a JDK (not a JRE). It says ...

"Update Note 2: The Attach API is in tools.jar, so you will need to add /lib/tools.jar in your CLASSPATH to compile and run the example on JDK 6."

... and the same advice would apply on (at least) JDK 7 as well.

Mylander answered 19/6, 2012 at 11:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.