v1.1.1
This commit is contained in:
parent
f2cfa84a4c
commit
ecfa565d6d
@ -12,6 +12,7 @@ import javafx.stage.FileChooser;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.Objects;
|
||||
|
||||
public class JNotepad extends Application {
|
||||
String Title = "JNotepad";
|
||||
@ -74,7 +75,8 @@ public class JNotepad extends Application {
|
||||
// 创建场景并设置主界面
|
||||
Scene scene = new Scene(root, 800, 600);
|
||||
primaryStage.setScene(scene);
|
||||
primaryStage.getIcons().add(new Image("file:src/main/resources/img/icon.png"));
|
||||
|
||||
primaryStage.getIcons().add(new Image(Objects.requireNonNull(JNotepad.class.getResource("/img/icon.png")).toExternalForm()));
|
||||
|
||||
primaryStage.show();
|
||||
}
|
||||
|
||||
7
打包.txt
7
打包.txt
@ -1,2 +1,7 @@
|
||||
jpackage --name JNotepad --type app-image -m org.jcnc.jnotepad/org.jcnc.jnotepad.JNotepad --runtime-image .\target\app\ --icon src/main/resources/img/icon.ico
|
||||
jpackage
|
||||
--name JNotepad
|
||||
--type app-image
|
||||
-m org.jcnc.jnotepad/org.jcnc.jnotepad.JNotepad
|
||||
--runtime-image .\target\app\
|
||||
--icon src/main/resources/img/icon.ico
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user