Results 1 to 8 of 8
  1. #1
    monthana is offline Member
    Join Date
    May 2012
    Posts
    4
    Rep Power
    0

    Default Disable Attach API in Sun JVM

    Is it possible to disable the support for the Attach API in Sun Java, if so, how?
    I know it is possible to disable it in IBM's JVM by setting the property com.ibm.tools.attach.enable to false.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,559
    Rep Power
    25

    Default Re: Disable Attach API in Sun JVM

    Can you explain what framework, packages and classes you are talking about?
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    monthana is offline Member
    Join Date
    May 2012
    Posts
    4
    Rep Power
    0

    Default Re: Disable Attach API in Sun JVM

    The attach API is enabled by all applications that are written in Sun Java 6, and above (Attach API). This is not connected to any specific framework. In order to attach to a JVM the tools.jar archive from the Sun JDK is needed (com.sun.tools.attach). The default configuration of Java applications that are written will support that other Java application can connect to it with the use of Attach API from the Sun JDK.

    Is there any way to remove the support for Attach API in a normal application, in order to disable this functionality?

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,651
    Blog Entries
    7
    Rep Power
    21

    Default Re: Disable Attach API in Sun JVM

    Doesn't a JVM flag -Dcom.sun.management.jmxremote=false help?

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  5. #5
    monthana is offline Member
    Join Date
    May 2012
    Posts
    4
    Rep Power
    0

    Default Re: Disable Attach API in Sun JVM

    Thanks everyone for their help. By setting -XX:+DisableAttachMechanism, it is possible to disable the support for the AttachAPI. The DisableAttachMechanism is set to false as default, for all Sun JVM processes.

  6. #6
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,651
    Blog Entries
    7
    Rep Power
    21

    Default Re: Disable Attach API in Sun JVM

    Quote Originally Posted by monthana View Post
    Thanks everyone for their help. By setting -XX:+DisableAttachMechanism, it is possible to disable the support for the AttachAPI. The DisableAttachMechanism is set to false as default, for all Sun JVM processes.
    Ah, good for letting us know; I didn't know that. Where did you find it?

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  7. #7
    monthana is offline Member
    Join Date
    May 2012
    Posts
    4
    Rep Power
    0

    Default Re: Disable Attach API in Sun JVM

    I found it here.

  8. #8
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,651
    Blog Entries
    7
    Rep Power
    21

    Default Re: Disable Attach API in Sun JVM

    Great; thanks for sharing; consider it bookmarked.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Attach XML content in UDP socket
    By irsalina in forum New To Java
    Replies: 7
    Last Post: 06-22-2011, 10:18 AM
  2. How to attach a listener to a folder
    By bayan in forum New To Java
    Replies: 1
    Last Post: 10-21-2010, 11:03 AM
  3. Attach Photos in SWT to database
    By ashin in forum SWT / JFace
    Replies: 0
    Last Post: 08-09-2010, 06:48 AM
  4. Replies: 4
    Last Post: 03-23-2010, 03:46 PM
  5. how can i attach a worg/image file
    By sniffer139 in forum AWT / Swing
    Replies: 4
    Last Post: 03-12-2010, 06:49 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •