Wrote /root/JavaX-Caches/tmp_1696048169/main.java - 2044 bytes (written=2044, should be 2044)
javac=0, ecj=1, useJarBot=0
Checking ECJ at port 4898 at 127.0.0.1
/root/jdk-17/bin/javac -source 11 -target 11 -nowarn -encoding utf8 -Xdiags:verbose -cp /root/.javax/x30.jar:/root/dexcompiler/android.jar:/root/dexcompiler/support-v4-22.2.1.jar:/root/javafx/javafx.base.jar:/root/javafx/javafx.graphics.jar:/root/javafx/javafx.swing.jar -d /root/JavaX-Caches/tmp_1400866432 /root/JavaX-Caches/tmp_1696048169/main.java 2>&1
[Compilation Error]Compiler errors. Medium transpile. Show Java sources. Show snippet. Edit.
/root/JavaX-Caches/tmp_1696048169/main.java:1: error: class, interface, or enum expected
static void uploadFileToPhoneServer(File binaryFile) ctex {
^
/root/JavaX-Caches/tmp_1696048169/main.java:4: error: class, interface, or enum expected
S ip = first(detectGateways());
^
/root/JavaX-Caches/tmp_1696048169/main.java:5: error: class, interface, or enum expected
assertNotNull(ip);
^
/root/JavaX-Caches/tmp_1696048169/main.java:6: error: class, interface, or enum expected
S url = "http://" + ip + ":8888/upload";
^
/root/JavaX-Caches/tmp_1696048169/main.java:7: error: class, interface, or enum expected
print("Uploading to: " + url);
^
/root/JavaX-Caches/tmp_1696048169/main.java:8: error: class, interface, or enum expected
new Map params;
^
/root/JavaX-Caches/tmp_1696048169/main.java:10: error: class, interface, or enum expected
String charset = "UTF-8";
^
/root/JavaX-Caches/tmp_1696048169/main.java:11: error: class, interface, or enum expected
String boundary = randomID(20); // Just generate some unique random value.
^
/root/JavaX-Caches/tmp_1696048169/main.java:12: error: class, interface, or enum expected
String CRLF = "\r\n"; // Line separator required by multipart/form-data.
^
/root/JavaX-Caches/tmp_1696048169/main.java:14: error: class, interface, or enum expected
URLConnection connection = new URL(url).openConnection();
^
/root/JavaX-Caches/tmp_1696048169/main.java:15: error: class, interface, or enum expected
connection.setDoOutput(true);
^
/root/JavaX-Caches/tmp_1696048169/main.java:16: error: class, interface, or enum expected
connection.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + boundary);
^
/root/JavaX-Caches/tmp_1696048169/main.java:18: error: class, interface, or enum expected
OutputStream output = connection.getOutputStream();
^
/root/JavaX-Caches/tmp_1696048169/main.java:19: error: class, interface, or enum expected
PrintWriter writer = new PrintWriter(new OutputStreamWriter(output, charset), true);
^
/root/JavaX-Caches/tmp_1696048169/main.java:22: error: class, interface, or enum expected
for (S param : keys(params)) {
^
/root/JavaX-Caches/tmp_1696048169/main.java:24: error: class, interface, or enum expected
writer.append("Content-Disposition: form-data; name=\"" + urlencode(param) + "\"").append(CRLF);
^
/root/JavaX-Caches/tmp_1696048169/main.java:25: error: class, interface, or enum expected
writer.append("Content-Type: text/plain; charset=" + charset).append(CRLF);
^
/root/JavaX-Caches/tmp_1696048169/main.java:27: error: class, interface, or enum expected
writer.append(CRLF).append(urlencode(params.get(param))).append(CRLF);
^
/root/JavaX-Caches/tmp_1696048169/main.java:28: error: class, interface, or enum expected
}
^
/root/JavaX-Caches/tmp_1696048169/main.java:32: error: class, interface, or enum expected
writer.append("Content-Disposition: form-data; name=\"file\"; filename=\"" + binaryFile.getName() + "\"").append(CRLF);
^
/root/JavaX-Caches/tmp_1696048169/main.java:33: error: class, interface, or enum expected
writer.append("Content-Type: " + URLConnection.guessContentTypeFromName(binaryFile.getName())).append(CRLF);
^
/root/JavaX-Caches/tmp_1696048169/main.java:34: error: class, interface, or enum expected
writer.append("Content-Transfer-Encoding: binary").append(CRLF);
^
/root/JavaX-Caches/tmp_1696048169/main.java:35: error: class, interface, or enum expected
writer.append(CRLF).flush();
^
/root/JavaX-Caches/tmp_1696048169/main.java:36: error: class, interface, or enum expected
file2stream(binaryFile, output);
^
/root/JavaX-Caches/tmp_1696048169/main.java:37: error: class, interface, or enum expected
output.flush(); // Important before continuing with writer!
^
/root/JavaX-Caches/tmp_1696048169/main.java:38: error: class, interface, or enum expected
writer.append(CRLF).flush(); // CRLF is important! It indicates end of boundary.
^
/root/JavaX-Caches/tmp_1696048169/main.java:41: error: class, interface, or enum expected
writer.append("--" + boundary + "--").append(CRLF).flush();
^
/root/JavaX-Caches/tmp_1696048169/main.java:42: error: class, interface, or enum expected
writer.close();
^
/root/JavaX-Caches/tmp_1696048169/main.java:43: error: class, interface, or enum expected
output.close();
^
/root/JavaX-Caches/tmp_1696048169/main.java:45: error: class, interface, or enum expected
print("Sent.");
^
/root/JavaX-Caches/tmp_1696048169/main.java:46: error: class, interface, or enum expected
print();
^
/root/JavaX-Caches/tmp_1696048169/main.java:47: error: class, interface, or enum expected
print(loadPage(connection, new URL(url)));
^
/root/JavaX-Caches/tmp_1696048169/main.java:48: error: class, interface, or enum expected
}
^
33 errors