B4J Question Compile Error b4j ver 10.2

kohle

Active Member
Licensed User
Longtime User
Hi, I get the following compile error :

B4J Version: 10.20
Parse den Code. (0.04s)
Java Version: 8
Building folders structure. (0.01s)
Kompiliere den Code. (0.01s)
Kompiliere Layoutcode. (0.00s)
Organisiere Libraries. (0.00s)
Kompiliere generierten Java Code. Error
src\b4j\example\main.java:6: Fehler: Package javafx.application ist nicht vorhanden
public class main extends javafx.application.Application{
^
1 Fehler
Nur die ersten 1 Fehler von insgesamt 6 werden angezeigt. Mit -Xmaxerrs können Sie mehr Fehler anzeigen

javac 24.0.1
 

kohle

Active Member
Licensed User
Longtime User
I get now :

Microsoft Windows [Version 10.0.19045.5737]
(c) Microsoft Corporation. Alle Rechte vorbehalten.

C:\Users\info>java -version
java version "1.8.0_441"
Java(TM) SE Runtime Environment (build 1.8.0_441-b07)
Java HotSpot(TM) 64-Bit Server VM (build 25.441-b07, mixed mode)

C:\Users\info>java E:\b4j_projekte\kimpublisher_upload\Objects\kp_upload.jar
Fehler: Hauptklasse E:\b4j_projekte\kimpublisher_upload\Objects\kp_upload.jar konnte nicht gefunden oder geladen werden

C:\Users\info>
 
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
You probably need to add #JavaCompilerPath 24, path/to/java24.0.1

You get this
Java Version: 8
...
javac 24.0.1

if you dont.
 
Upvote 0

teddybear

Well-Known Member
Licensed User
Show your IDE Paths Configuration. how do you configure the javac.exe path
 
Upvote 0

kohle

Active Member
Licensed User
Longtime User
1745768021725.png




C:\Users\info>path
PATH=C:\Program Files (x86)\Common Files\Oracle\Java\java8path;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Python312\Scripts\;C:\Python312\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Sybase\Adaptive Server Anywhere 6.0\win32;C:\wamp64\bin\php\php8.3.7;C:\ProgramData\ComposerSetup\bin;C:\Program Files\nodejs\;C:\ProgramData\chocolatey\bin;C:\Users\info\AppData\Local\Microsoft\WindowsApps;C:\Users\info\AppData\Roaming\Composer\vendor\bin;C:\Users\info\AppData\Roaming\npm

C:\Users\info>
 
Upvote 0

teddybear

Well-Known Member
Licensed User
View attachment 163699



C:\Users\info>path
PATH=C:\Program Files (x86)\Common Files\Oracle\Java\java8path;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Python312\Scripts\;C:\Python312\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Sybase\Adaptive Server Anywhere 6.0\win32;C:\wamp64\bin\php\php8.3.7;C:\ProgramData\ComposerSetup\bin;C:\Program Files\nodejs\;C:\ProgramData\chocolatey\bin;C:\Users\info\AppData\Local\Microsoft\WindowsApps;C:\Users\info\AppData\Roaming\Composer\vendor\bin;C:\Users\info\AppData\Roaming\npm

C:\Users\info>
What is your compiling log now?
 
Upvote 0

kohle

Active Member
Licensed User
Longtime User
Compiling is ok, but runinning standalone dont work. Must I deinstall de oracle java runtime 441 and put the path to the openjkd 19 from erels page ?
How this works if my client has java runtime installed for other apps and I add my app to his desktop ?

B4J Version: 10.20
Parse den Code. (0.04s)
Java Version: 19
Building folders structure. (0.01s)
Kompiliere den Code. (0.02s)
Kompiliere Layoutcode. (0.02s)
Organisiere Libraries. (0.00s)
Kompiliere generierten Java Code. (5.61s)
Erstelle jar Datei. (1.79s)
jar Datei erstellt. E:\b4j_projekte\kimpublisher_upload\Objects\kp_upload.jar
Laufende Anwendung. (0.01s)
Erfolgreich abgeschlossen.




C:\Users\info>java -version
java version "1.8.0_441"
Java(TM) SE Runtime Environment (build 1.8.0_441-b07)
Java HotSpot(TM) 64-Bit Server VM (build 25.441-b07, mixed mode)

C:\Users\info>java "E:\b4j_projekte\kimpublisher_upload\Objects\kp_uload.jar"
Fehler: Hauptklasse E:\b4j_projekte\kimpublisher_upload\Objects\kp_uload.jar konnte nicht gefunden oder geladen werden

C:\Users\info>
 
Upvote 0

teddybear

Well-Known Member
Licensed User
Compiling is ok, but runinning standalone dont work. Must I deinstall de oracle java runtime 441 and put the path to the openjkd 19 from erels page ?
How this works if my client has java runtime installed for other apps and I add my app to his desktop ?
What is that running standalone dont work? did you build standalone a package? if yes, you can run_debug.bat to see what reason it does'nt work.
The runtime is included in standalone package, it will not depandent on client java runtime.
 
Upvote 0

kohle

Active Member
Licensed User
Longtime User
The jar files dont work. The standalone package works, but it´s 66MB and several directories. If I have 7 jar files, and I have 7 times this standalone structure ?
And what is with security updates? Normally there is an automatic java runtime updater on the pc of the clients.
With the standalone page I have to update every jar file and do this manually ?

Next problem is I must change all *.jar to *.exe , at the customer side and I dont think yet about the new firewall and virus scanner problems.

I think there must be a reason why my jar file dont work.
 
Upvote 0

kohle

Active Member
Licensed User
Longtime User
I used now a javac.exe from the oracle JDK 1.8 and the jar file also works now with jre441
There is now the problem with fx is not anymore part of the runtime/JDK.
Is there a solution ? Because the updates are coming automatically and fixing security issues.
 
Upvote 0
Top