This discussion is archived
1 Reply Latest reply: Oct 3, 2009 10:43 PM by 843798 RSS

Unable to attach Java agent

843798 Newbie
Currently Being Moderated
I am using the [Attach API|http://java.sun.com/javase/6/docs/technotes/guides/attach/index.html] to attach and manipulate other JVMs.

When I attach and load an agent to a JVM that was started through the main method no errors occur. Then, when I do the same exact procedure on an Applet JVM that is embedded in a browser, I get this weird error:
Exception in thread "main" com.sun.tools.attach.AgentLoadException: Agent JAR not found or no Agent-Class atribute
    at sun.tools.attach.HotSpotVirtualMachine.loadAgent(HotSpotVirtualMachine.java:99)
    at com.sun.tools.attach.VirtualMachine.loadAgent(VirtualMachine.java:508)
    at Attachment.main(Attachment.java:9)
The agent JAR does exists and it does have an Agent-Class attribute.

What could be the cause of this?