-
-
Notifications
You must be signed in to change notification settings - Fork 184
Open
Description
Jbang version 0.60.0
Tried jfx.java example on command line and it works, but not with Intelij:
jbang edit --open=idea --live jfx.java
and get the error:
.jbang/cache/projects/jfx.java_jbang_01809bfbfddbb84e2f783abac9790b5019cd22f549b149feb1a1990e1d6d7d46/jfx/src/jfx.java:18: error: cannot access EventTarget
stage.setScene(scene);
^
class file for javafx.event.EventTarget not found
Code
//DEPS org.openjfx:javafx-controls:14.0.2:${os.detected.jfxname}
//DEPS org.openjfx:javafx-graphics:14.0.2:${os.detected.jfxname}
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class jfx extends Application {
@Override
public void start(Stage stage) {
String javaVersion = System.getProperty("java.version");
String javafxVersion = System.getProperty("javafx.version");
Label l = new Label("Hello, JavaFX " + javafxVersion + ", running on Java " + javaVersion + ".");
Scene scene = new Scene(new StackPane(l), 640, 480);
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch();
}
}```Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels