Fix application failure on start when JAR file saved into the folders that has '+' in name.
This commit is contained in:
parent
26bd85d744
commit
376b054c96
1 changed files with 2 additions and 1 deletions
|
@ -205,7 +205,8 @@ public class SettingsController implements Initializable {
|
||||||
|
|
||||||
File jarFile;
|
File jarFile;
|
||||||
try{
|
try{
|
||||||
jarFile = new File(URLDecoder.decode(getClass().getProtectionDomain().getCodeSource().getLocation().getPath(), "UTF-8"));
|
String encodedJarLocation = getClass().getProtectionDomain().getCodeSource().getLocation().getPath().replace("+", "%2B");
|
||||||
|
jarFile = new File(URLDecoder.decode(encodedJarLocation, "UTF-8"));
|
||||||
}
|
}
|
||||||
catch (UnsupportedEncodingException uee){
|
catch (UnsupportedEncodingException uee){
|
||||||
uee.printStackTrace();
|
uee.printStackTrace();
|
||||||
|
|
Loading…
Reference in a new issue