Merge branch 'bugfix/solve-resource-file-path' into 'main'
fix: resolve issue with resource filepath Closes #16 See merge request cse1105/2025-2026/teams/csep-team-76!18
This commit is contained in:
commit
11547778fa
1 changed files with 2 additions and 3 deletions
|
|
@ -18,7 +18,6 @@ package client;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.nio.file.Path;
|
|
||||||
|
|
||||||
import com.google.inject.Injector;
|
import com.google.inject.Injector;
|
||||||
|
|
||||||
|
|
@ -49,7 +48,7 @@ public class MyFXML {
|
||||||
}
|
}
|
||||||
|
|
||||||
private URL getLocation(String... parts) {
|
private URL getLocation(String... parts) {
|
||||||
var path = Path.of("", parts).toString();
|
var path = String.join("/", parts);
|
||||||
return MyFXML.class.getClassLoader().getResource(path);
|
return MyFXML.class.getClassLoader().getResource(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -71,4 +70,4 @@ public class MyFXML {
|
||||||
return injector.getInstance(type);
|
return injector.getInstance(type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue