2019-06-22 04:30 AM
I've been trying to install this crap for the past 3 hours now. I've had to purge OpenJDK completely from my PC and install Oracle Java and I still keep getting the same damn error: "You are using OpenJDK, please install Open JFX".
I'm now trying to uninstall the programmer and it just spits out:
The uninstaller has put a log file: /tmp/izpack17414480030857294634.log
When I check the log, I get this everytime:
2019-06-22T12:10:16.790 Phase 1: JarFile: /home/rho/STMicroelectronics/STM32Cube/STM32CubeProgrammer/Uninstaller/uninstaller.jar
2019-06-22T12:10:16.860 Phase 1: Extracted 1078 files into /tmp/izpack3080648907498705230.d
2019-06-22T12:10:16.878 Phase 1: Spawning phase 2:
/usr/lib/jvm/java-11-oracle/bin/java
-classpath
/tmp/izpack3080648907498705230.d
-Dself.mod.base=/tmp/izpack3080648907498705230
-Dself.mod.jar=/home/rho/STMicroelectronics/STM32Cube/STM32CubeProgrammer/Uninstaller/uninstaller.jar
-Dself.mod.class=com.izforge.izpack.uninstaller.Uninstaller
-Dself.mod.method=uninstall
-Dself.mod.phase=2
com.izforge.izpack.util.SelfModifier
2019-06-22T12:10:16.879 Phase 1: Exit
2019-06-22T12:10:18.016 Phase 2: Spawning phase 3:
/usr/lib/jvm/java-11-oracle/bin/java
-classpath
/tmp/izpack3080648907498705230.d
-Dself.mod.base=/tmp/izpack3080648907498705230
-Dself.mod.jar=/home/rho/STMicroelectronics/STM32Cube/STM32CubeProgrammer/Uninstaller/uninstaller.jar
-Dself.mod.class=com.izforge.izpack.uninstaller.Uninstaller
-Dself.mod.method=uninstall
-Dself.mod.phase=3
com.izforge.izpack.util.SelfModifier
2019-06-22T12:10:19.689 Phase 2: deleting sandbox
2019-06-22T12:10:19.731 Phase 2: Phase 3 return value = 0
What does one need to do to get this thing to work?
2019-06-23 10:16 AM
sudo apt install openjfx=8u161-b12-1ubuntu2 libopenjfx-java=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2
The packages have to be put on hold for updates. Programmer works well.
https://bugs.launchpad.net/ubuntu/+source/openjfx/+bug/1799946
2019-06-23 10:43 PM
> I've had to purge OpenJDK completely from my PC and install Oracle Java and I still keep getting the same damn error: "You are using OpenJDK, please install Open JFX".
Did you switch to Oracle Java with the "/usr/sbin/alternatives" command ?
You can have more then one Java environment installed under Linux at any time, but only one is used at any time.
2019-06-24 04:54 AM
Yeah, I made sure to check the alternatives, there's only one Java environment installed right now.
2019-06-24 04:57 AM
This is probably for older versions of Oracle Java. In any case, I've wiped the programmer entirely and just gone with the open-source stm32flash, 10 hours wasted on this because of a dumb script
2019-06-24 05:17 AM
After poking around for a bit, It turns out there's a script in the util folder named openjfx.csh that checks for the presence of OpenJFX. It just checks JAVA_HOME/jre/lib for the presence of a file javafx.properties and if it can't find it for any reason at all, it throws the same generic error "You are using OpenJDK, please install Open JFX or Oracle Java", regardless of your actual Java environment. After 10 hours debugging this, I know more about Java than I care to know. Recent versions of Oracle Java and OpenJDK apparently no longer ship OpenJFX (or even a jre folder) so you have to install it manually yourself. So installing Oracle Java like the error message says doesn't even solve the problem.
After downloading the OpenJFX library, I edited the openjfx.csh script to locate the library folder and I stopped getting the error. Now to make the Programmer app itself locate the library, nothing worked. Not using modulepath or CLASSPATH environment variable, nothing. The same error in the end:
Could not load or find app st.Main blah blah
javafx.application.Application blah blah
I gave up eventually and just went with stm32flash, which actually works pretty well and may even be more convenient. At this point, I'm just mad I had to install OpenJDK-8, then wipe OpenJDK-8 and builtin OpenJDK-11 and install Oracle instead, and potentially introduce god-knows how many dependency issues with other apps, all because someone's app is throwing a deceptive error message, and still didn't work in the end.