title: Can not find out WHY jmxRemoteURL contains non-ASCII character
body: <p>I am trying to use Tomcat (v: 9.0.12) with Intellij Idea (v: 2018.3) for deploying an Artifact (A simple hello world javaEE web application project).</p>
  <p>This is some of my outputs after Building and Starting the project (I am gonna put these outputs for some useful information. also you can find the FULL outputs at the end of my question) :</p>
  <pre>"C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin\catalina.bat" run
  [2019-09-07 10:58:59,049] Artifact test:war exploded: Waiting for server connection to start artifact deployment...
  Using CATALINA_BASE:   "C:\Users\pcs\.IntelliJIdea2018.3\system\tomcat\Tomcat_9_0_12_test"
  Using CATALINA_HOME:   "C:\Program Files\Apache Software Foundation\Tomcat 9.0"
  Using CATALINA_TMPDIR: "C:\Program Files\Apache Software Foundation\Tomcat 9.0\temp"
  Using JRE_HOME:        "C:\Program Files\Java\jdk-10.0.1"
  Using CLASSPATH:       "C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin\bootstrap.jar;C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin\tomcat-juli.jar"
  Error: Exception thrown by the agent : java.net.MalformedURLException: Service URL contains non-ASCII character 0x6f1</pre>
  <p>After that I have an error with <i>JMX</i> and if I'll be right it occurs at : &quot;jdk.management.agent/sun.management.jmxremote.ConnectorBootstrap.startRemoteConnectorServer&quot; (<b>ConnectorBootstrap.java:491</b>).</p>
  <h3>I've put the full output at the end.</h3>
  <p>Before asking my question would you please take look at some parts of <b>C:\Program Files\Java\jdk-10.0.1\lib\src.zip!\java.management\javax\management\remote\JMXServiceURL.java</b>
  and as you will see it's making sure that there are no non-ASCII characters in the URL and there is a part of my answer in it :</p>
  <pre><code>public class JMXServiceURL implements Serializable {
  
      private static final long serialVersionUID = 8173364409860779292L;
  
      /**
       * Constructs a JMXServiceURL by parsing a Service URL
       * string.
       *
       * @param serviceURL the URL string to be parsed.
       *
       * @exception NullPointerException if  serviceURL is
       * null.
       *
       *  @exception MalformedURLException if serviceURL
       * does not conform to the syntax for an Abstract Service URL or
       * if it is not a valid name for a JMX Remote API service.  A
       * JMXServiceURL must begin with the string
       * &quot;service:jmx:&quot; (case-insensitive).  It must not
       * contain any characters that are not printable ASCII characters.
       */
      public JMXServiceURL(String serviceURL) throws MalformedURLException {
          final int serviceURLLength = serviceURL.length();
  
          /* Check that there are no non-ASCII characters in the URL,
             following RFC 2609.  */
          for (int i = 0; i &lt; serviceURLLength; i++) {
              char c = serviceURL.charAt(i);
              if (c &lt; 32 || c &gt;= 127) {
                  throw new MalformedURLException(&quot;Service URL contains &quot; +
                                                  &quot;non-ASCII character 0x&quot; +
                                                  Integer.toHexString(c));
              }
          }
  </code></pre>
  <p>You can find <em><strong>@exception MalformedURLException</strong></em> in comment and the <em>interesting part</em> is I can see my Exception message is being ready for me :)</p>
  <h2>My Question is : How can I find out about my jmxRemoteURL value which contains non-ASCII character?</h2>
  <p>Here's what I have already tested :</p>
  <ul>
  <li><p>I have tried adding &quot;127.0.0.1 localhost hostname&quot; to the end of hosts file which wasn't useful and I can't see any relations between my problem and that.</p>
  </li>
  <li><p>I have tried running Intellij Idea as Administrator which also didn't work.</p>
  </li>
  </ul>
  <p>*FINALLY This is my FULL output in Intellij Idea Console :</p>
  <pre class="lang-none prettyprint-override"><code>&quot;C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin\catalina.bat&quot; run
  [2019-09-07 10:58:59,049] Artifact test:war exploded: Waiting for server connection to start artifact deployment...
  Using CATALINA_BASE:   &quot;C:\Users\pcs\.IntelliJIdea2018.3\system\tomcat\Tomcat_9_0_12_test&quot;
  Using CATALINA_HOME:   &quot;C:\Program Files\Apache Software Foundation\Tomcat 9.0&quot;
  Using CATALINA_TMPDIR: &quot;C:\Program Files\Apache Software Foundation\Tomcat 9.0\temp&quot;
  Using JRE_HOME:        &quot;C:\Program Files\Java\jdk-10.0.1&quot;
  Using CLASSPATH:       &quot;C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin\bootstrap.jar;C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin\tomcat-juli.jar&quot;
  Error: Exception thrown by the agent : java.net.MalformedURLException: Service URL contains non-ASCII character 0x6f1
  jdk.internal.agent.AgentConfigurationError: java.net.MalformedURLException: Service URL contains non-ASCII character 0x6f1
      at jdk.management.agent/sun.management.jmxremote.ConnectorBootstrap.startRemoteConnectorServer(ConnectorBootstrap.java:491)
      at jdk.management.agent/jdk.internal.agent.Agent.startAgent(Agent.java:450)
      at jdk.management.agent/jdk.internal.agent.Agent.startAgent(Agent.java:621)
  Caused by: java.net.MalformedURLException: Service URL contains non-ASCII character 0x6f1
      at java.management/javax.management.remote.JMXServiceURL.&lt;init&gt;(JMXServiceURL.java:157)
      at jdk.management.agent/sun.management.jmxremote.ConnectorBootstrap.exportMBeanServer(ConnectorBootstrap.java:846)
      at jdk.management.agent/sun.management.jmxremote.ConnectorBootstrap.startRemoteConnectorServer(ConnectorBootstrap.java:479)
      ... 2 more
  Disconnected from server
  </code></pre>
  <p>Please let me know if I missed something to say.
  Thanks a lot for your big help.</p>