B4J Question jdk 1.8.0_451 (SOLVED)

BeneBarros

Active Member
Licensed User
Longtime User
After the automatic update of jdk 1.8.0_451 all my .jar applications stopped working. I compile again, and it runs in Release mode. but running the .jar file directly does not work.
 

BeneBarros

Active Member
Licensed User
Longtime User
1744824030109.png
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
You can uninstall it and reinstall the older version.
 
Upvote 0

kohle

Active Member
Licensed User
Longtime User
I have the same problem. My client asking to ignore security update ? What is the solution to run the new version
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
It's better to use new Java version and make it a standalone package.
 
Upvote 0

BeneBarros

Active Member
Licensed User
Longtime User
Yes... there is no other way. But, the biggest problem is that I already have several systems installed on clients.🤬
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
Looks to me that some file associations and or path settings may have been deleted, or are you getting some particular error messages that would indicate otherwise?
 
Upvote 0

BeneBarros

Active Member
Licensed User
Longtime User
Looks to me that some file associations and or path settings may have been deleted, or are you getting some particular error messages that would indicate otherwise?
No error message. It just doesn't run. But running in B4J is fine.
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
Are you trying to run the app from the command line or windows explorer?
 
Upvote 0

aminoacid

Active Member
Licensed User
Longtime User
Yes, to follow up on OliverA's question above, are you double clicking on the JAR file to run it?

If the answer to my question is Yes.... I had a similar problem during an automatic Java update and I have disabled automatic updates ever since....

Come to find out that there was NOTHING wrong with the JAR file. The problem was the Windows association of the jar file with the java runtime. I can't remember how I fixed it, but once I did, the jar file could be run with a double click. I'll try to find out what I did but in the meantime I suggest you research how the Java8 JRE installer does this association during installation/updates. During the update, that association probably got screwed up.... not uncommon with updates as you probably know 😖

Here's something I found in a quick Google search. Have not read it but it's worth looking at:



BTW.. if you want to confirm that this is actually the issue, open a command prompt and go to the folder that has the jar file you want to run. Enter:

java -version

[confirm the correct version installed]

java -jar myprogram.jar

If it runs, my theory is correct.
 
Last edited:
Upvote 0

teddybear

Well-Known Member
Licensed User
No error message. It just doesn't run. But running in B4J is fine.
It can run on B4J is because B4J is using the old jdk8
As announced in 2020, support for JavaFX on JDK 8, ended in March 2025. JDK 8 update 451 is the first upgrade of JDK/JRE 8 without JavaFX.
At post#3, the java runtime has been updated to 451. it will not support javafx app.
solutions:
1.Change java runtime to the old jdk and associate JAR file with old jdk.
2.Or copy all relevant JavaFX files from the old jdk to the new jdk folder.
 
Upvote 2

BeneBarros

Active Member
Licensed User
Longtime User
The problem is not in the B4J execution time, because after the installation all the .jar files that were running normally stopped.

This weekend I will make a complete backup and rebuild this computer.

PS: The execution in B4J works normally.
 
Upvote 0

aminoacid

Active Member
Licensed User
Longtime User
The problem is not in the B4J execution time, because after the installation all the .jar files that were running normally stopped.

This weekend I will make a complete backup and rebuild this computer.

PS: The execution in B4J works normally.

I suggest you read post #13 carefully before you rebuild your computer. Good luck.
 
Upvote 0

BeneBarros

Active Member
Licensed User
Longtime User
I suggest you read post #13 carefully before you rebuild your computer. Good luck.
yes... I read post #13... but see my confusion,,, I have another machine (Notebook) with Java 1.8.0_451 installed and all .Jar applications work perfectly. 🤪
 
Upvote 0

teddybear

Well-Known Member
Licensed User
yes... I read post #13... but see my confusion,,, I have another machine (Notebook) with Java 1.8.0_451 installed and all .Jar applications work perfectly. 🤪
As aminoacid said at post#12, run java -version to see which java are you using?
 
Upvote 0

BeneBarros

Active Member
Licensed User
Longtime User
Como o aminoácido disse no post # 12, execute java -version para ver qual java você está usando?
1745069703830.png

Microsoft Windows [versão 10.0.19045.5737]
(c) Microsoft Corporation. Todos os direitos reservados.

C:\WINDOWS\system32>java -version
java version "19.0.2" 2023-01-17
Java(TM) SE Runtime Environment (build 19.0.2+7-44)
Java HotSpot(TM) 64-Bit Server VM (build 19.0.2+7-44, mixed mode, sharing)

C:\WINDOWS\system32>
 
Upvote 0

aminoacid

Active Member
Licensed User
Longtime User
View attachment 163524
Microsoft Windows [versão 10.0.19045.5737]
(c) Microsoft Corporation. Todos os direitos reservados.

C:\WINDOWS\system32>java -version
java version "19.0.2" 2023-01-17
Java(TM) SE Runtime Environment (build 19.0.2+7-44)
Java HotSpot(TM) 64-Bit Server VM (build 19.0.2+7-44, mixed mode, sharing)

C:\WINDOWS\system32>

There you go... this is the problem ... B4J is using update 351 which has JavaFX and that's why it works in the B4J IDE.

However, when you run the JAR file outside of B4J it's going to use a different version (19.0.2) that is probably incompatible. Like I said in Post#12, somehow your .jar association is broken. When you run "java -version" from the command line, it should be the same as the version used by B4J - v1.8.0 update 351.

Run this command from the command line:

c:\Java\jdk1.8.0_351\bin\java.exe -jar <complete path to the jar file you want to run>

If it works, you will have to fix the broken association as mentioned in my post above.
 
Upvote 0

BeneBarros

Active Member
Licensed User
Longtime User
There you go... this is the problem ... B4J is using update 351 which has JavaFX and that's why it works in the B4J IDE.

However, when you run the JAR file outside of B4J it's going to use a different version (19.0.2) that is probably incompatible. Like I said in Post#12, somehow your .jar association is broken. When you run "java -version" from the command line, it should be the same as the version used by B4J - v1.8.0 update 351.

Run this command from the command line:

c:\Java\jdk1.8.0_351\bin\java.exe -jar <complete path to the jar file you want to run>

If it works, you will have to fix the broken association as mentioned in my post above.
 
Upvote 0
Top