Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-27525

Stop messing with java.net.preferIPv4Stack settinig (or at least provide a way to disable that unhelpful behavior) when defining a server configuration

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 4.23.0.AM1
    • None
    • server
    • None
    • Undefined
    • -
    • ---

    Description

      https://docs.oracle.com/javase/8/docs/api/java/net/doc-files/net-properties.html says the following  (emphasis mine):

      java.net.preferIPv4Stack (default: false)
      If IPv6 is available on the operating system the underlying native socket will be, by default, an IPv6 socket which lets applications connect to, and accept connections from, both IPv4 and IPv6 hosts. However, in the case an application would rather use IPv4 only sockets, then this property can be set to true. The implication is that it will not be possible for the application to communicate with IPv6 only hosts.

      If I define a server with the help of (I assume?) "JBoss AS, WildFly & EAP Server Tools", the JVM options can change depending on what I type in "host name". If I put "localhost" there, I get -Djava.net.preferIPv4Stack=true option added to the VM arguments.

      Yes, I know that if I put ::1 I get -Djava.net.preferIPv4Stack=false added to the VM arguments.

      But I want to be able to control this option myself regardless what is in the "host name", thank you very much.You can validate, you can warn me that hostname "::1" and -Djava.net.preferIPv4Stack=false will not work together, whatever.

      Eclipse shows that I have "JBoss AS, WildFly & EAP Server Tools" version 3.9.101.v20200403-1526.

      Attachments

        Activity

          People

            rob.stryker Rob Stryker (Inactive)
            l.eonid.kosmylev@gmail.com L K (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: