I tried this too, which threw the same error: ```...
# java-and-jvm
b
I tried this too, which threw the same error:
Copy code
<cfscript>
    target = "<http://127.0.0.1:51943/test-accept-file.cfm>";

    httpClientObj = createObject("java", "java.net.http.HttpClient");
    httpRequestObj = createObject("java", "java.net.http.HttpRequest");

    client = httpClientObj.newHttpClient();
    request = httpRequestObj.newBuilder()
        .uri(javaCast("string", target))
        .header("accept", "application.json")
        .build();
</cfscript>