Get extras module compiling on 1.13

Remove LocalizationExtra (too much update work for too little gain)
This commit is contained in:
Jonas Herzig
2019-03-01 17:18:22 +01:00
parent c8cf4d66c5
commit f13f2dda1c
21 changed files with 184 additions and 251 deletions

View File

@@ -6,6 +6,9 @@ import javax.swing.*;
import java.io.*;
import java.net.InetAddress;
import java.net.Socket;
import java.net.URISyntaxException;
import java.net.URL;
import java.security.CodeSource;
import java.util.Arrays;
public abstract class UriScheme {
@@ -82,4 +85,19 @@ public abstract class UriScheme {
}
public abstract void install() throws Exception;
File findJarFile() throws IOException {
CodeSource codeSource = UriScheme.class.getProtectionDomain().getCodeSource();
if (codeSource != null) {
URL location = codeSource.getLocation();
if (location != null) {
try {
return new File(location.toURI());
} catch (URISyntaxException e) {
throw new IOException(e);
}
}
}
throw new IOException("No jar file found. Is this a development environment?");
}
}