How do you correctly run a JavaFX Application from cmd Notepad++'s plug-in, NppExec? I previously used the command java $(NAME_PART)
on the Notepad++ plugin NppExec (which is basically a built-in cmd) to run java which worked fine for swing-based programs. However, when I use that command to run a JavaFX Application, my Notepad++ window seems to lose focus as if a new window was opened but nothing appears.
EDIT: I discovered the problem lies in the Notepad++ plugin NppExec after testing the same command from the cmd. NppExec doesn't seem to function the same as the cmd when running JavaFX Applications.
The code I am using to test (which was originally obtained from http://docs.oracle.com/javase/8/javafx/api/javafx/application/Application.html) will be updated according to the edits above:
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.shape.Circle;
import javafx.stage.Stage;
public class MyApp extends Application {
public void start(Stage stage) {
Circle circ = new Circle(40, 40, 30);
Group root = new Group(circ);
Scene scene = new Scene(root, 400, 300);
stage.setTitle("My JavaFX Application");
stage.setScene(scene);
stage.show();
}
//not required but recommended
public static void main(String[] args) {
launch(args);
}
}