Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#75345 - [sweethome3d] startup script is wrong
Attached to Project:
Community Packages
Opened by Sergio Callegari (callegar) - Saturday, 16 July 2022, 14:55 GMT
Last edited by Muflone (muflone) - Sunday, 31 July 2022, 23:09 GMT
Opened by Sergio Callegari (callegar) - Saturday, 16 July 2022, 14:55 GMT
Last edited by Muflone (muflone) - Sunday, 31 July 2022, 23:09 GMT
|
DetailsDescription:
The sweethome3d startup script tries to detect the java version with JAVA_VERSION="$(${JAVA_EXEC} -version 2>&1 | head -1 | cut -d' ' -f 3 | tr -d '"')" however, when you have some environment variable that is picked up by java, such as _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on this detection logic fails poorly and JAVA_VERSION starts getting set to weird values such as '_JAVA_OPTIONS' because java outputs as the first line something about the picking up of the variable. Something more robust than `head -1` is needed here. Additional info: * package version(s) * config and/or log files etc. * link to upstream bug report, if any Steps to reproduce: |
This task depends upon
Closed by Muflone (muflone)
Sunday, 31 July 2022, 23:09 GMT
Reason for closing: Fixed
Additional comments about closing: fixed in 7.0.2-1
Sunday, 31 July 2022, 23:09 GMT
Reason for closing: Fixed
Additional comments about closing: fixed in 7.0.2-1
Could you please write here an example of failed detection and the whole java -version output?
Picked up _JAVA_OPTIONS: -Dswing.aatext=TRUE -Dawt.useSystemAAFontSettings=on
openjdk version "18.0.2" 2022-07-19
OpenJDK Runtime Environment (build 18.0.2+9)
OpenJDK 64-Bit Server VM (build 18.0.2+9, mixed mode)
Sorry for the noise...
${JAVA_EXEC} -version 2>&1 | grep ' version ' | head -1 | cut -d' ' -f 3 | tr -d '"'
so it will use the first line containing the string ' version '
In my tests this works fine from jre6 to jre18 and from jdk11 to jdk18