Skip to content

Commit 3f33054

Browse files
author
José Pereda
authored
Merge pull request #26 from jperedadnr/master
#97 Update samples with new version of JavaFX Maven plugin
2 parents c468589 + 10f39f7 commit 3f33054

29 files changed

Lines changed: 167 additions & 141 deletions

File tree

CommandLine/Modular/Maven/README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,35 @@
22

33
JavaFX 12 samples to run with different options and build tools.
44

5+
Download an appropriate [JDK 12](https://jdk.java.net/12/) for your operating system. Make sure `JAVA_HOME`
6+
is properly set to the Java 12 installation directory.
7+
58
## Modular - Maven
69

710
`hellofx` sample modular project to run with Maven
811

9-
Download [JavaFX jmods](https://gluonhq.com/products/javafx/) for your operating
10-
system and unzip to a desired location.
11-
1212
### Linux / Mac
1313

1414
If you run on Linux or Mac, follow these steps:
1515

1616
cd CommandLine/Modular/Maven/hellofx
17-
mvn clean package javafx:run
17+
mvn clean javafx:run
1818

19-
To create custom JRE:
19+
To create and run a custom JRE:
2020

21-
export PATH_TO_FX_MODS=path/to/javafx-jmods-12
22-
$JAVA_HOME/bin/jlink --module-path $PATH_TO_FX_MODS:target/hellofx-1.0-SNAPSHOT.jar --add-modules hellofx --output jre
23-
jre/bin/java -m hellofx/org.openjfx.MainApp
21+
cd CommandLine/Modular/Maven/hellofx
22+
mvn clean javafx:jlink
23+
target/hellofx/bin/launcher
2424

2525
### Windows
2626

2727
If you run on Windows, follow these steps:
2828

2929
cd CommandLine\Modular\Maven\hellofx
30-
mvn clean package javafx:run
30+
mvn clean javafx:run
3131

32-
To create custom JRE:
32+
To create and run a custom JRE:
3333

34-
set PATH_TO_FX_MODS="path\to\javafx-jmods-12"
35-
jlink --module-path "%PATH_TO_FX_MODS%;target\hellofx-1.0-SNAPSHOT.jar" --add-modules hellofx --output jre
36-
jre\bin\java -m hellofx/org.openjfx.MainApp
34+
cd CommandLine/Modular/Maven/hellofx
35+
mvn clean javafx:jlink
36+
target\hellofx\bin\launcher

CommandLine/Modular/Maven/hellofx/pom.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
<dependency>
2323
<groupId>org.openjfx</groupId>
2424
<artifactId>javafx-controls</artifactId>
25-
<version>12</version>
25+
<version>12.0.1</version>
2626
</dependency>
2727
<dependency>
2828
<groupId>org.openjfx</groupId>
2929
<artifactId>javafx-fxml</artifactId>
30-
<version>12</version>
30+
<version>12.0.1</version>
3131
</dependency>
3232
</dependencies>
3333
<build>
@@ -43,8 +43,11 @@
4343
<plugin>
4444
<groupId>org.openjfx</groupId>
4545
<artifactId>javafx-maven-plugin</artifactId>
46-
<version>0.0.1</version>
46+
<version>0.0.2</version>
4747
<configuration>
48+
<release>12</release>
49+
<jlinkImageName>hellofx</jlinkImageName>
50+
<launcher>launcher</launcher>
4851
<mainClass>hellofx/org.openjfx.MainApp</mainClass>
4952
</configuration>
5053
</plugin>

CommandLine/Non-modular/Maven/hellofx/pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,25 @@
1717
<dependency>
1818
<groupId>org.openjfx</groupId>
1919
<artifactId>javafx-controls</artifactId>
20-
<version>12</version>
20+
<version>12.0.1</version>
2121
</dependency>
2222
<!-- Uncomment for cross-platform fat jar
2323
<dependency>
2424
<groupId>org.openjfx</groupId>
2525
<artifactId>javafx-graphics</artifactId>
26-
<version>12</version>
26+
<version>12.0.1</version>
2727
<classifier>win</classifier>
2828
</dependency>
2929
<dependency>
3030
<groupId>org.openjfx</groupId>
3131
<artifactId>javafx-graphics</artifactId>
32-
<version>12</version>
32+
<version>12.0.1</version>
3333
<classifier>linux</classifier>
3434
</dependency>
3535
<dependency>
3636
<groupId>org.openjfx</groupId>
3737
<artifactId>javafx-graphics</artifactId>
38-
<version>12</version>
38+
<version>12.0.1</version>
3939
<classifier>mac</classifier>
4040
</dependency> -->
4141
</dependencies>
@@ -53,7 +53,7 @@
5353
<plugin>
5454
<groupId>org.openjfx</groupId>
5555
<artifactId>javafx-maven-plugin</artifactId>
56-
<version>0.0.1</version>
56+
<version>0.0.2</version>
5757
<configuration>
5858
<mainClass>hellofx.HelloFX</mainClass>
5959
</configuration>

HelloFX/Maven/hellofx/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
<dependency>
1717
<groupId>org.openjfx</groupId>
1818
<artifactId>javafx-controls</artifactId>
19-
<version>12</version>
19+
<version>12.0.1</version>
2020
</dependency>
2121
</dependencies>
2222
<build>
2323
<plugins>
2424
<plugin>
2525
<groupId>org.openjfx</groupId>
2626
<artifactId>javafx-maven-plugin</artifactId>
27-
<version>0.0.1</version>
27+
<version>0.0.2</version>
2828
<configuration>
2929
<mainClass>HelloFX</mainClass>
3030
</configuration>

IDE/Eclipse/Modular/Maven/README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,11 @@ To create and run a custom JRE, from terminal:
4545
On Linux or Mac run:
4646

4747
cd IDE/Eclipse/Modular/Maven/hellofx
48-
mvn clean package
49-
export PATH_TO_FX_MODS=path/to/javafx-jmods-12
50-
$JAVA_HOME/bin/jlink --module-path $PATH_TO_FX_MODS:target/hellofx-0.0.1-SNAPSHOT.jar --add-modules=hellofx --output jre
51-
jre/bin/java -m hellofx/org.openjfx.hellofx.App
48+
mvn clean javafx:jlink
49+
target/hellofx/bin/launcher
5250

5351
On Windows run:
5452

5553
cd IDE\Eclipse\Modular\Maven\hellofx
56-
mvn clean package
57-
set PATH_TO_FX_MODS="path\to\javafx-jmods-12"
58-
jlink --module-path "%PATH_TO_FX_MODS%;target\hellofx-0.0.1-SNAPSHOT.jar" --add-modules=hellofx --output jre
59-
jre\bin\java -m hellofx/org.openjfx.hellofx.App
54+
mvn clean javafx:jlink
55+
target\hellofx\bin\launcher

IDE/Eclipse/Modular/Maven/hellofx/pom.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
<dependency>
1414
<groupId>org.openjfx</groupId>
1515
<artifactId>javafx-controls</artifactId>
16-
<version>12</version>
16+
<version>12.0.1</version>
1717
</dependency>
1818
<dependency>
1919
<groupId>org.openjfx</groupId>
2020
<artifactId>javafx-fxml</artifactId>
21-
<version>12</version>
21+
<version>12.0.1</version>
2222
</dependency>
2323
</dependencies>
2424
<build>
@@ -34,8 +34,11 @@
3434
<plugin>
3535
<groupId>org.openjfx</groupId>
3636
<artifactId>javafx-maven-plugin</artifactId>
37-
<version>0.0.1</version>
37+
<version>0.0.2</version>
3838
<configuration>
39+
<release>12</release>
40+
<jlinkImageName>hellofx</jlinkImageName>
41+
<launcher>launcher</launcher>
3942
<mainClass>hellofx/org.openjfx.hellofx.App</mainClass>
4043
</configuration>
4144
</plugin>

IDE/Eclipse/Modular/Maven/hellofx/src/main/java/module-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
requires transitive javafx.graphics;
55

66
opens org.openjfx to javafx.fxml;
7-
exports org.openjfx;
7+
exports org.openjfx.hellofx;
88
}

IDE/Eclipse/Modular/Maven/hellofx/src/main/java/org/openjfx/FXMLController.java

Lines changed: 0 additions & 21 deletions
This file was deleted.

IDE/Eclipse/Modular/Maven/hellofx/src/main/java/org/openjfx/MainApp.java

Lines changed: 0 additions & 37 deletions
This file was deleted.

IDE/NetBeans/Modular/Maven/hellofx/src/main/java/org/openjfx/App.java renamed to IDE/Eclipse/Modular/Maven/hellofx/src/main/java/org/openjfx/hellofx/App.java

File renamed without changes.

0 commit comments

Comments
 (0)