i am recently looked at jpackage there is any option automatically adds the appilication to startup, For Example consider I have,
App.java
package org.openjfx;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
/**
* JavaFX App
*/
public class App extends Application {
@Override
public void start(Stage stage) {
var label = new Label("Hello, JavaFX");
var scene = new Scene(new StackPane(label), 640, 480);
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch();
}
}
module-info.java
module Sample {
requires javafx.controls;
opens org.openjfx;
}
Using maven to generate runtime,
mvn javafx:jlink
Then generate the installer,
jpackage --win-dir-chooser --runtime-image ./target/image/ --name Sample-Javafx --module Sample/org.openjfx.App -d ./target/bin/
This all works fine but what i want is to register App.java at startup and start this app after installation is it possible with jpackage or there is any trick inside App.java to achive this ?