B4J Question [SOLVED] Exception in thread "JavaFX Application Thread"

jroriz

Active Member
Licensed User
Longtime User
I have a small project to show images.
It's very simple and integrates a floating window for some specific functions.
The program worked without problems until I had to format the PC and reinstall everything.
I have no problems running the program directly from the IDE, but if I run the JAR file directly, the following error occurs:




Could anyone help?

Complete project attached (it's very simple).
The program needs the c:/desenv/telas folder with some .png files in it.
 

Attachments

  • Mostra form.zip
    3.9 KB · Views: 222

jroriz

Active Member
Licensed User
Longtime User
I'm using java 11.0.1 and the libraries I'm using in the project are these:




Removed additional libraries (jawrobot and jreflection) but no success...
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
From the look of it you have Java 8 installed and that is what is trying to run the jar when you type that command line. Java 11 by default does not execute from the command line when installed.
See
and
 
Upvote 0

jroriz

Active Member
Licensed User
Longtime User

Thanks.
Solved using the following DOS command:
B4X:
javaw --module-path C:\Java\javafx\lib --add-modules ALL-MODULE-PATH -jar %1
where %1 is the JAR file to be executed.
 
Upvote 0

jroriz

Active Member
Licensed User
Longtime User

Thank you.
Solved using the DOS command as follow:

B4X:
c:\java\bin\javaw --module-path C:\Java\javafx\lib --add-modules ALL-MODULE-PATH -jar %1

where %1 is your JAR file.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…