Re: [JavaFX] project jar file

2019-12-22 Thread Ty Young



On 12/18/19 12:26 PM, Huckleberry Finn wrote:
To create a deplyable version of my project  I make a clean & Build 
project on it. Netbeans will create a jar file in the dist subfolder 
of the project along with the fx libraries in the lib subfolder of dist.


When I run java -jar myproject.jar, I get
Error: JavaFX runtime components are missing, and are required to run 
this application

How should I include the fx libraries inside the jar file



You don't. You have to bundle them with your app and then execute a 
length command line to run it(or use jLink). Netbeans generates a 
command line that is supposed to work for you, but the command it 
generates only works on pre-9 versions before modules were finalized.



I made a Java script(pun intended) to automate this[1]. Modify as 
needed. Requires java 11 and can be used by doing:



java AppLauncher.java


[1] https://gist.github.com/BlueGoliath/1c47414cebf2601358c97c2f475e1afe




-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Re: [JavaFX] project jar file

2019-12-22 Thread David Green
Still working thru this myself but this worked for me in a recent CoolBeans
packaging of NetBeans using Maven underneath.

https://gist.github.com/dgreen/e1ae4636f311d38758dafdd7b0decf0f

Maybe it is helpful.

Dave

On Sun, Dec 22, 2019 at 4:16 AM joe schmo  wrote:

> I have never used jlink.
> --
> *From:* Huckleberry Finn 
> *Sent:* December 21, 2019 5:23 PM
> *To:* joe schmo 
> *Subject:* Re: [JavaFX] project jar file
>
> Thank you vey much.
> I am using jdk 13.0.1 ( the latest) and I am new to Java, migrating from
> c++. And yes the project is modular with main java class, controler file
> and an fxml file. I could not figure out what kind of project management
> Netbeans or IntelliJ are using. It does not seem to be neither gradle nor
> maven.
> I tried the project with Intellij too with the  same result.
> On the internet there are lots of useless comments. I went through javafx
> documentation and followed their directions both for Netbeans and InjtelliJ
> no effect getting the same error.
>
> I would very much appreciate it if you could elaborate on how to use
> Jlinks. I have heard that Oracle had removed Jlink from java 13.
>
>
> On Thursday, December 19, 2019, joe schmo  wrote:
>
> MIght be some helpful information here:
>
> https://openjfx.io/openjfx-docs/
> Getting Started with JavaFX 13 <https://openjfx.io/openjfx-docs/>
> Getting started with JavaFX 13 for Java desktop application development
> openjfx.io
>
>
> --
> *From:* Huckleberry Finn 
> *Sent:* December 18, 2019 2:26 PM
> *To:* users@netbeans.apache.org 
> *Subject:* [JavaFX] project jar file
>
>
> To create a deplyable version of my project  I make a clean & Build
> project on it. Netbeans will create a jar file in the dist subfolder of the
> project along with the fx libraries in the lib subfolder of dist.
>
> When I run java -jar myproject.jar, I get
> Error: JavaFX runtime components are missing, and are required to run this
> application
> How should I include the fx libraries inside the jar file
>
> --
Sent from a mobile device. Please excuse any typos.


Re: [JavaFX] project jar file

2019-12-22 Thread joe schmo
I have never used jlink.

From: Huckleberry Finn 
Sent: December 21, 2019 5:23 PM
To: joe schmo 
Subject: Re: [JavaFX] project jar file

Thank you vey much.
I am using jdk 13.0.1 ( the latest) and I am new to Java, migrating from c++. 
And yes the project is modular with main java class, controler file and an fxml 
file. I could not figure out what kind of project management Netbeans or 
IntelliJ are using. It does not seem to be neither gradle nor maven.
I tried the project with Intellij too with the  same result.
On the internet there are lots of useless comments. I went through javafx 
documentation and followed their directions both for Netbeans and InjtelliJ no 
effect getting the same error.

I would very much appreciate it if you could elaborate on how to use Jlinks. I 
have heard that Oracle had removed Jlink from java 13.


On Thursday, December 19, 2019, joe schmo 
mailto:geekyguy...@hotmail.com>> wrote:
MIght be some helpful information here:

https://openjfx.io/openjfx-docs/
Getting Started with JavaFX 13<https://openjfx.io/openjfx-docs/>
Getting started with JavaFX 13 for Java desktop application development
openjfx.io<http://openjfx.io>



From: Huckleberry Finn mailto:huckle.f...@gmail.com>>
Sent: December 18, 2019 2:26 PM
To: users@netbeans.apache.org<mailto:users@netbeans.apache.org> 
mailto:users@netbeans.apache.org>>
Subject: [JavaFX] project jar file

To create a deplyable version of my project  I make a clean & Build project on 
it. Netbeans will create a jar file in the dist subfolder of the project along 
with the fx libraries in the lib subfolder of dist.

When I run java -jar myproject.jar, I get
Error: JavaFX runtime components are missing, and are required to run this 
application
How should I include the fx libraries inside the jar file


Re: [JavaFX] project jar file

2019-12-19 Thread Luff,Chris
Without more info about what toolchain you are using to build your project such 
as which JDK, what toolchain etc we can only help to a point.

If you project is modularised then you need to use jlink to have the JavaFX 
modules included in the runtime. If not, and I suspect this is what you are 
doing, you’ll need to change the way in which you build. One example is a 
shaded JAR that includes the OpenJFX dependencies and then a new main class 
that statically calls the main of the class that extends Application will do 
what this.

> On 18 Dec 2019, at 18:26, Huckleberry Finn  wrote:
>
> To create a deplyable version of my project  I make a clean & Build project 
> on it. Netbeans will create a jar file in the dist subfolder of the project 
> along with the fx libraries in the lib subfolder of dist.
>
> When I run java -jar myproject.jar, I get
> Error: JavaFX runtime components are missing, and are required to run this 
> application
> How should I include the fx libraries inside the jar file



CONFIDENTIALITY NOTICE This message and any included attachments are from 
Cerner Corporation and are intended only for the addressee. The information 
contained in this message is confidential and may constitute inside or 
non-public information under international, federal, or state securities laws. 
Unauthorized forwarding, printing, copying, distribution, or use of such 
information is strictly prohibited and may be unlawful. If you are not the 
addressee, please promptly delete this message and notify the sender of the 
delivery error by e-mail or you may call Cerner's corporate offices in Kansas 
City, Missouri, U.S.A at (+1) (816)221-1024. Cerner Limited, Registered in 
England no 2519305, Registered Office 37 North Wharf Road, London W2 1AF.


[JavaFX] project jar file

2019-12-18 Thread Huckleberry Finn
To create a deplyable version of my project  I make a clean & Build project
on it. Netbeans will create a jar file in the dist subfolder of the project
along with the fx libraries in the lib subfolder of dist.

When I run java -jar myproject.jar, I get
Error: JavaFX runtime components are missing, and are required to run this
application
How should I include the fx libraries inside the jar file