Community Packages

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#56581 - [pycharm-community-edition] don't start when using openjdk 1.7.0

Attached to Project: Community Packages
Opened by Jeff Guo (jeffguorg) - Tuesday, 05 December 2017, 03:17 GMT
Last edited by Maxime Gauduin (Alucryd) - Friday, 22 December 2017, 20:12 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Maxime Gauduin (Alucryd)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


this issue comes out when using java-8-openjdk

Jetbrain asked when i don't use a bundled jre, i said i'm directly using archlinux package. i think it could be a packaging issue so i report here

Additional info:
* pycharm-community-edition - 2017.3-1
* jdk{7,8,9}-openjdk installed

Steps to reproduce:
$ sudo archlinux-java set java-7-openjdk
$ pycharm
$ sudo archlinux-java set java-8-openjdk
$ pycharm
This task depends upon

Closed by  Maxime Gauduin (Alucryd)
Friday, 22 December 2017, 20:12 GMT
Reason for closing:  Implemented
Additional comments about closing:  2017.3-2
Comment by Maxime Gauduin (Alucryd) - Tuesday, 05 December 2017, 19:05 GMT
Well, yes you have to use a jre = 8. There's nothing I can do package-wise apart from printing a message. Forcing java-runtime = 8 doesn't prevent anyone from installing 7 or 9. Bundling theirs just adds bloat, but I can create a split package for those who still wish to use it.
Comment by Eli Schwartz (eschwartz) - Tuesday, 05 December 2017, 19:21 GMT
Well, at the least you can pin the java-runtime dependency to 8, in order to ensure people actually have the right version installed, rather than having it completely absent from their system. This also makes it somewhat more apparent when viewing the package dependencies, that errors probably come from setting a default java that is different from what the package requires. You could also maybe use a wrapper script that first checks [[ "$(archlinux-java get)" = java-8-openjdk/jre ]] before continuing.
Comment by Jeff Guo (jeffguorg) - Wednesday, 06 December 2017, 01:27 GMT
set dependency won't fix it. is it possible to add a wrapper script, set java runtime to newest and launch the app, and set it back after app is launched. i'm not a packager so i don't know much about your principles.
Comment by Eli Schwartz (eschwartz) - Wednesday, 06 December 2017, 04:16 GMT
Our java runtime implementation sets a root-owned symlink, which cannot be changed by arbitrary users. OTOH setting PYCHARM_JDK=/usr/lib/jvm/java-8-openjdk/jre/ should in theory work. That being said, I don't fully understand how all this Java works, and java-runtime-common has an install script warning that JAVA_HOME does not work so I could very well be missing something.
Comment by Doug Newgard (Scimmia) - Wednesday, 06 December 2017, 04:21 GMT
Setting the dep won't fix it, but it's the closest thing we've got
Comment by Maxime Gauduin (Alucryd) - Wednesday, 06 December 2017, 09:52 GMT
Just pushed 2017.3-2 that forces java-runtime=8. There is the possibility to symlink openjdk8 in pycharm's working directory as it would take precedence thanks to their startup script, but that would prevent anyone from using another runtime from AUR, jdk8 from Oracle, or openjdk8 with Jetbrains patches if they want font ligatures for example (jetbrains disables them with vanilla openjdk8 for "performance reasons").