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)

 

1
Hi,

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.
0
  1. I downloaded 2023.1 as suggested. I did not see a notification that a new version was available.
  2. Both 2022.3.1 and 2023.1 give the same error, and will not start:
  3. 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$ 
    4. malikarumi@Tetuoan2:/opt/pycharm-2023.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-2023.1/bin$

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:

All the products on all the supported platforms already have 64-bit JetBrains Runtime 17 bundled and it will be used by default to run the IDE

malikarumi@Tetuoan2:~$ which java
/usr/bin/java
malikarumi@Tetuoan2:~$ java --version
openjdk 11.0.18 2023-01-17
OpenJDK Runtime Environment (build 11.0.18+10-post-Ubuntu-0ubuntu122.04)
OpenJDK 64-Bit Server VM (build 11.0.18+10-post-Ubuntu-0ubuntu122.04, mixed mode, sharing)

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?

0

Can I get a response from someone, please? I can't do ANYTHING with PyCharm as it stands right now.

0
You're on Linux, right? Could you please provide the output of `env | grep -i java` ?

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.
---
0

output of env | grep -i java is NOTHING:

malikarumi@Tetuoan2:~$ env | grep -i java
malikarumi@Tetuoan2:~$

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???

0
One suspicion is corrupted installation. Perhaps the update didn't go smoothly. I hope a clean installation from scratch will help.
0

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:

malikarumi@Tetuoan2:/opt/pycharm-2023.1$ ls
bin        debug-eggs  Install-Linux-tar.txt  lib      plugins
build.txt  help        jbr                    license  product-info.json

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:

malikarumi@Tetuoan2:/opt/pycharm-2023.1$ cd bin
malikarumi@Tetuoan2:/opt/pycharm-2023.1/bin$ ls
brokenPlugins.db  idea.properties  pycharm64.vmoptions  remote-dev-server.sh
format.sh         inspect.sh       pycharm.png          repair
fsnotifier        libdbm.so        pycharm.sh           restart.py
icons             ltedit.sh        pycharm.svg
malikarumi@Tetuoan2:/opt/pycharm-2023.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

What now?

 

 

0

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!!!

0

I ran the repair tool and after a couple of times the IDE worked again.

0

请先登录再写评论。