pycharm error, won't start
malikarumi@Tetuoan2:~$ cd /opt/pycharm-2022.3.1/bin
malikarumi@Tetuoan2:/opt/pycharm-2022.3.1/bin$ pycharm.sh
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Error: Could not find or load main class com.intellij.idea.Main
Caused by: java.lang.ClassNotFoundException: com.intellij.idea.Main
malikarumi@Tetuoan2:/opt/pycharm-2022.3.1/bin$
It was working yesterday. I got an update from Ubuntu and rebooted this morning, if that matters.
Start-Date: 2023-04-04 07:03:49
Commandline: aptdaemon role='role-commit-packages' sender=':1.598'
Upgrade: xxd:amd64 (2:8.2.3995-1ubuntu2.4, 2:8.2.3995-1ubuntu2.5), vim-common:amd64 (2:8.2.3995-1ubuntu2.4, 2:8.2.3995-1ubuntu2.5), gnome-settings-daemon-common:amd64 (42.1-1ubuntu2.1, 42.1-1ubuntu2.2), gnome-settings-daemon:amd64 (42.1-1ubuntu2.1, 42.1-1ubuntu2.2), vim-tiny:amd64 (2:8.2.3995-1ubuntu2.4, 2:8.2.3995-1ubuntu2.5)
End-Date: 2023-04-04 07:07:08
Upload id: 2023_04_04_91p7WbU82RY5GyezdrdDu4 (file: idea log morning of 2023-04-04.txt)
请先登录再写评论。
It seems like PyCharm use incorrect Java runtime to boot.
First of all, I'd suggest updating to the latest version 2023.1 from https://www.jetbrains.com/pycharm/download/
If the issue persists, please take a look at https://intellij-support.jetbrains.com/hc/en-us/articles/206544879-Selecting-the-JDK-version-the-IDE-will-run-under to make sure PyCharm is started with the bundled Java runtime.
5. 2022.3.1 worked with no issues yesterday, so I don't understand how it could suddenly lose a run time.
6. The initial suggestions on the link you gave me, https://intellij-support.jetbrains.com/hc/en-us/articles/206544879-Selecting-the-JDK-version-the-IDE-will-run-under, all assume I can start the IDE.
7. .config/JetBrains/PyCharm2022.3 exists, but .config/JetBrains/2023.1 does not.
8. There is no *.jdk in .config/JetBrains/PyCharm2022.3
9. /opt/ for both have jbr subfolders.
10. I know nothing about java, so this means nothing to me:
Are openjdk, jetbrainsjdk, and just jdk the same? Equivalent? Have release numbers in lock step? I looked here: https://www.codejava.net/java-se/java-se-versions-history and with such confused naming conventions, I don't see how anyone could know what version they're on.
I repeat: 2022.3.1 worked YESTERDAY. I certainly didn't knowingly change or delete anything. Why is this happening and how do we fix?
Can I get a response from someone, please? I can't do ANYTHING with PyCharm as it stands right now.
Also, I suggest trying a clean reinstall of PyCharm.
---
To perform a "clean" reinstall of the IDE:
1) Remove all of the [directories used by the current IDE version](https://www.jetbrains.com/help/pycharm/directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html).
2) Also, remove directories used by the previous IDE versions (in the same location as above, but with different version number).
3) Reinstall the IDE using the latest version from https://www.jetbrains.com/pycharm/download/, or using the [Toolbox App](https://www.jetbrains.com/toolbox-app/download/).
Deleting all leftover directories from the current and previous versions will ensure IDE is started with a clean state.
You can backup your IDE config directory if needed, but please test if PyCharm is working before importing it back.
---
output of env | grep -i java is NOTHING:
While I am doing the re-install, can you please tell me why 2022.3.1 was working on Monday, but all of a sudden on Tuesday neither 2022.3.1 or 2023.1 - which I had just downloaded per your request - will even load???
I moved all of the old versions far away in a subfolder on HOME. I got no errors, even when using sudo to move some of them from opt.
The new install of 2023.1 seemed to go fine, but when I looked inside:
This is very strange. Looking at the gui for this folder only has 3 things! product-info.json, Install-Linux-tar.txt, and jbr!!??
So I kept going with the terminal:
What now?
WAIT! Something is happening.... I got an installation window.
I think we're good. I'm taking the tour because I opted for the new ui.
THANKS!!!
I ran the repair tool and after a couple of times the IDE worked again.