title: javax.ws.rs.client.Client l- JSON from a local file
body: <p>I have simple REST client code like this, calling a service:</p>
  <pre><code>String myUrl = &quot;http://somehost/someservice&quot;;      
  Client client = ClientBuilder.newBuilder().register(JacksonFeature.class).build();
  MyClass result = client.target(myUrl)
              .request(MediaType.APPLICATION_JSON)
              .get(MyClass.class);
  // work with result
  </code></pre>
  <p>All working fine. Now I want to exercise the processing code with some pre-canned test data I have stored in a JSON file. I hoped I could simply use a File URL</p>
  <pre><code> String myUrl = &quot;file://somepath/MyTest.json&quot;;
  </code></pre>
  <p>This fails with this exception.</p>
  <pre><code>Exception in thread &quot;main&quot; javax.ws.rs.ProcessingException: class sun.net.www.protocol.ftp.FtpURLConnection cannot be cast to class java.net.HttpURLConnection (sun.net.www.protocol.ftp.FtpURLConnection and java.net.HttpURLConnection are in module java.base of loader 'bootstrap')
      at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:309)
      at org.glassfish.jersey.client.JerseyInvocation.lambda$invoke$1(JerseyInvocation.java:632)
      at org.glassfish.jersey.client.JerseyInvocation.call(JerseyInvocation.java:654)
      at org.glassfish.jersey.client.JerseyInvocation.lambda$runInScope$3(JerseyInvocation.java:648)
  </code></pre>
  <p>How can I tell the WS client to treat a file as a pseudo-service provider?</p>