Skip to main content
steffen
Associate II
July 1, 2026
Question

Silent installation Bundled Java

  • July 1, 2026
  • 3 replies
  • 45 views

I have to deploy the STM32CubeProg in an big network.
I’ve tried the silent installation, and I’m stuck with:
Error: unable to find or load main class com.st.app.Main
Caused by: java.lang.NoClassDefFoundError: javafx/application/Application"

There is as solution in
bundled-java-runtime-missing-or-corrupted
Im replaced installer to C:\Program Files\Java and rename folder "jre _1.8***" to simple "jre" and it works for me. Hope it will help you too.  

This is not really the solution, or? Is there a clean way for a silent Installation?

The version is:
2.22.0

3 replies

Associate
July 7, 2026

Hello,

 

I’ve recently deploy a silent install script for my users and might be able to help. 

At what step does the message “ Error: unable to find or load main class com.st.app.Main“ happen ? During the installation or once its installed and you try to launch it ?

steffen
steffenAuthor
Associate II
July 8, 2026

Thanks fopr your reply.
 
I’ve  installed the STM32CubeProgrammer per GUI.
Than I changed to folder:
C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin

and execute:
 java -jar .\STM32CubeProgrammer.exe
and
 java -jar .\STM32CubeProgrammer.exe -console
Than, I get the arror above

Associate
July 8, 2026

Hello,

Execute Stm32CubeProgrammer with jar 

Stm32CubeProgrammer has jre in its install folder. By using a generic java, first you expect the computer to have java already installed (which might not be the case on your computers). But the biggest problem is that the java version installed on the computer might differ and cause issue from the one expected by Stm32CubeProgrammer .

So to fix to open the app with a CMD is to use the java from STM32CubeProgrammer which is in:
 “C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\jre\bin\java”

So if your cmd is in “C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin” you can use this command:

.\jre\bin\java -jar .\STM32CubeProgrammer.exe

 

If you want execute it from anywhere:

"C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\jre\bin\java" -jar "C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\STM32CubeProgrammer.exe"

 

Silent Install

Now I have no idea what any of what you described have to do with silent install. I think you might be confuse with section “1.2.7 Installing STM32CubeProgrammer from command line” from the manual

 

The first step is to unzip the installer “SetupSTM32CubeProgrammer_win64.exe” (the one you used to install with the GUI). I do it with 7zip. It will be much clearer then:
 

 

So as you can see the “SetupSTM32CubeProgrammer_win64” is just a zip archive with the installer and a jre included to actually install it.

From there you can extract the archive, open a CMD in the folder and execute:

.\jre\bin\java -jar .\SetupSTM32CubeProgrammer-2.22.0.exe -console

 

Hope this help,

-Danick

ps: more details would have been welcomed.