diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ca1ba8..7e99077 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +- 1.25.2 + - Bug fix: Fix FileSystemNotFoundException on start-up due to faulty loading of code editor file + + - 1.25.1 - Add drop-down under Audio settings for recording with different audio samples - Supports `UINT8`, `INT8`, `INT16`, `INT24`, and `INT32` diff --git a/pom.xml b/pom.xml index 6bda019..e2e88cd 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ sh.ball osci-render - 1.25.1 + 1.25.2 osci-render diff --git a/src/main/java/sh/ball/gui/components/CodeEditor.java b/src/main/java/sh/ball/gui/components/CodeEditor.java index 319f61a..50015c7 100644 --- a/src/main/java/sh/ball/gui/components/CodeEditor.java +++ b/src/main/java/sh/ball/gui/components/CodeEditor.java @@ -11,8 +11,6 @@ import netscape.javascript.JSObject; import java.io.IOException; import java.net.URISyntaxException; import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; import java.util.function.BiConsumer; public class CodeEditor extends StackPane { @@ -24,8 +22,8 @@ public class CodeEditor extends StackPane { private BiConsumer callback; private boolean newFile = true; - private String applyEditingTemplate() throws URISyntaxException, IOException { - String template = Files.readString(Path.of(getClass().getResource("/html/code_editor.html").toURI())); + private String applyEditingTemplate() throws IOException { + String template = new String(getClass().getResourceAsStream("/html/code_editor.html").readAllBytes(), StandardCharsets.UTF_8); return template.replace("${code}", editingCode); } diff --git a/src/main/resources/fxml/main.fxml b/src/main/resources/fxml/main.fxml index 2025998..e8faace 100644 --- a/src/main/resources/fxml/main.fxml +++ b/src/main/resources/fxml/main.fxml @@ -21,7 +21,7 @@ - +