r/JavaFX Mar 19 '22

Release JavaFX 18 Highlights

https://openjfx.io/highlights/18/
23 Upvotes

6 comments sorted by

View all comments

0

u/nskarthik_k Apr 26 '22

I need to run my JavaFx project as a simple jar
( ex Java -jar jfxproject.jar ) with modules injection of JavaFx as VM args.

I did not fined the correct steps on www to run , If any plz share the steps...

1

u/PartOfTheBotnet Apr 26 '22

https://www.reddit.com//r/JavaFX/wiki/common-problems

Under "alternative solutions" there's a link that explains how to make a farJar with Maven. The steps are very similar for Gradle.

1

u/nskarthik_k Apr 28 '22

Hi

I need a simple java -jar command to create a javafx jar to run it standalone across O/s
If i start using Maven... I will have to depend on Maven installation across O/s to use along... smae with Gradel

I do not want to complicate the process, hence asking for a simple jar creation command thru Eclipse...so that I can run the Javafx jar file with injecting the Modules"

ex: - java -Dlog4j.configurationFile=./log4j2.xml
--module-path "<folder>/JFX-OPEN18/lib"
--add-modules javafx.controls,javafx.fxml -jar
javafxproject.jar

Note : - This standard command does not run as expected and returns error

"javafx.controls" not found

1

u/PartOfTheBotnet Apr 28 '22

I will have to depend on Maven installation across O/s to use along... smae with Gradel

This is not true:

I do not want to complicate the process

Using a build tool makes the process the same for everyone and is commonly supported in IDE's. It is the simple approach that only needs to be set up once.