B4J Question package javafx.application does not exist

Olivier Zeegers

Active Member
Licensed User
Hello, I am trying to build a standalone version of my project via the B4J program.
For this I had to update my java from 8 to 22..
Now I get this error and already installed javaFx from GluonHQ and updated the conf path but still this error:
1723624750387.png
1723624769382.png


B4J Version: 10.00
Parsing code. (0.00s)
Java Version: 8
Building folders structure. (0.14s)
Compiling code. (0.09s)
Compiling layouts code. (0.02s)
Organizing libraries. (0.00s)
Compiling generated Java code. Error
src\b4j\example\main.java:6: error: package javafx.application does not exist
public class main extends javafx.application.Application{
^
1 error
only showing the first 1 errors, of 39 total; use -Xmaxerrs if you would like to see more

javac 22.0.2



Anyone knows the solution ?

thank you !!
 

Daestrum

Expert
Licensed User
Longtime User
If you've set up the folders correctly
just add
B4X:
#JavaCompilerPath: 22, your/path/to/javac.exe
 
Upvote 0

Olivier Zeegers

Active Member
Licensed User
If you've set up the folders correctly
just add
B4X:
#JavaCompilerPath: 22, your/path/to/javac.exe
OK, when I add this I get this error output:


B4J Version: 10.00
Parsing code. (0.01s)
Java Version: 22
Building folders structure. (0.12s)
Compiling code. (0.09s)
Compiling layouts code. (0.02s)
Organizing libraries. (0.00s)
Compiling generated Java code. Error
error: module not found: javafx.swing
1 error
only showing the first 1 errors, of 6 total; use -Xmaxerrs if you would like to see more

javac 22.0.2


but javafx.swing.jar is in the javafx lib folder ?
 
Upvote 0

Sagenut

Expert
Licensed User
Longtime User
Thank you Erel,

I have downloaded this version and pointed the path to C:\Program Files\Java\jdk-19.0.2\bin\javac.exe
But I get the same error as in my reply to Daestrum...
Do not place it into Program Files folder.
It's a system restricted folder.
Make something like
C:\Java
 
Upvote 0

teddybear

Well-Known Member
Licensed User
Thank you Erel,

I have downloaded this version and pointed the path to C:\Program Files\Java\jdk-19.0.2\bin\javac.exe
But I get the same error as in my reply to Daestrum...
Obviously, if you downloaded the jdk19 is correct, you forgot to remove this JavaCompilerPath.
 
Upvote 0

Olivier Zeegers

Active Member
Licensed User
OK, I moved java to C:\Java and now everything works !

it generates a results.exe in the temp/build folder but when I run it nothing happens ?

where can i find documentation on the create standalone package ?

thanx
 
Upvote 0

Sagenut

Expert
Licensed User
Longtime User
OK, I moved java to C:\Java and now everything works !

it generates a results.exe in the temp/build folder but when I run it nothing happens ?

where can i find documentation on the create standalone package ?

thanx
Did you run the EXE from inside the folder or did you took it out from the folder?
In order to work it must be executed from inside that folder.
And you have to distribute the entire BUILD folder to other user.
Just use Build Standalone Package from the Project menù to create it.
 
Upvote 0

Olivier Zeegers

Active Member
Licensed User
Did you run the EXE from inside the folder or did you took it out from the folder?
In order to work it must be executed from inside that folder.
And you have to distribute the entire BUILD folder to other user.
Just use Build Standalone Package from the Project menù to create it.
1724067490448.png

This is the Build folder...
But when I click on result.exe nothing happens ;-)
 
Upvote 0

Olivier Zeegers

Active Member
Licensed User
Here I am once again:

I managed to create a standalone EXE file for my MAIN application... This runs smoothly...

But I created another application that is supposed to manage the settings of the main app.. I also created a standalone version and put the .EXE in the same folder as the main app but by clicking of the managing app it opens the main app... I suppose the .EXE is only pointing to another file with the same name ?

How can I accomplish to run both application separate from each other but simultaneously ?


thank you !
 
Upvote 0
Top