Browse Source

org.openjfx: javafx-archetype-simple

master
esoe 2 years ago
parent
commit
5929ee490c
  1. 46
      pom.xml
  2. 4
      src/main/java/module-info.java
  3. 30
      src/main/java/ru/egspt/App.java
  4. 13
      src/main/java/ru/egspt/SystemInfo.java
  5. BIN
      target/classes/module-info.class
  6. BIN
      target/classes/ru/egspt/App.class
  7. BIN
      target/classes/ru/egspt/SystemInfo.class

46
pom.xml

@ -0,0 +1,46 @@ @@ -0,0 +1,46 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ru.egspt</groupId>
<artifactId>moodle-services</artifactId>
<version>0.1</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>13</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>11</release>
</configuration>
</plugin>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.6</version>
<executions>
<execution>
<!-- Default configuration for running -->
<!-- Usage: mvn clean javafx:run -->
<id>default-cli</id>
<configuration>
<mainClass>ru.egspt.App</mainClass>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

4
src/main/java/module-info.java

@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
module ru.egspt {
requires javafx.controls;
exports ru.egspt;
}

30
src/main/java/ru/egspt/App.java

@ -0,0 +1,30 @@ @@ -0,0 +1,30 @@
package ru.egspt;
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 javaVersion = SystemInfo.javaVersion();
var javafxVersion = SystemInfo.javafxVersion();
var label = new Label("Hello, JavaFX " + javafxVersion + ", running on Java " + javaVersion + ".");
var scene = new Scene(new StackPane(label), 640, 480);
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch();
}
}

13
src/main/java/ru/egspt/SystemInfo.java

@ -0,0 +1,13 @@ @@ -0,0 +1,13 @@
package ru.egspt;
public class SystemInfo {
public static String javaVersion() {
return System.getProperty("java.version");
}
public static String javafxVersion() {
return System.getProperty("javafx.version");
}
}

BIN
target/classes/module-info.class

Binary file not shown.

BIN
target/classes/ru/egspt/App.class

Binary file not shown.

BIN
target/classes/ru/egspt/SystemInfo.class

Binary file not shown.
Loading…
Cancel
Save