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:
Zhongheng Liu 2025-12-05 16:24:42 +01:00
commit 11547778fa

View file

@ -18,7 +18,6 @@ package client;
import java.io.IOException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.nio.file.Path;
import com.google.inject.Injector;
@ -49,7 +48,7 @@ public class MyFXML {
}
private URL getLocation(String... parts) {
var path = Path.of("", parts).toString();
var path = String.join("/", parts);
return MyFXML.class.getClassLoader().getResource(path);
}
@ -71,4 +70,4 @@ public class MyFXML {
return injector.getInstance(type);
}
}
}
}