Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Menneisyys2

macrumors 603
Original poster
Jun 7, 2011
6,003
1,106
Note: at work, I need to do some serious work in PyCharm under Windows on my Mac. This is why I’m more than interested in making PyCharm work in the ARM version of Windows 11.

In my previous thread ( https://forums.macrumors.com/thread...arallels-on-one-vs-the-16-m1-pro-mbp.2330478/ ), I’ve already explained the x86-only PyCharm, by default, is uselessly slow even on the current Windows 11 + Parallels builds on my 16” M1 Pro MBP.

I’ve read thru the thread at https://youtrack.jetbrains.com/issu...7.1839432084.1641650996-1709581912.1641650996 , did a lot of experiments with the current OpenJDK and PyCharm versions (which are, particularly PyCharm, which is at version 2021.3.1 now, internally quite a bit different from the older versions discussed in the thread) and, finally, came up with the following:

1, you do need to delete c:\Program Files\JetBrains\PyCharm Community Edition 2021.3.1\jbr to get rid of the super-slow x86 JDK. Just move it somewhere else so that you can easily restore it, should you some time want to test something in the original setup.

2, you indeed must stick with OpenJDK 11 available at https://download.visualstudio.micro...microsoft-jdk-11.0.13.8.1-windows-aarch64.msi (linked from https://docs.microsoft.com/en-gb/java/openjdk/download#openjdk-11 ). Install it. WARNING: during installation, it will NOT automatically set JAVA_HOME (there will be a red X in the “Set JAVA_HOME variable”) - just right-click it and select “Entire…” as in the attached screenshot.

I’ve also tested OpenJDK 17.0.1 LTS (microsoft-jdk-17.0.1.12.1-windows-aarch64.msi; https://download.visualstudio.micro...microsoft-jdk-17.0.1.12.1-windows-aarch64.msi ), which is stated to work in this particular Apple environment (see “”Jayvinder Singh”’s comments in the thread). It didn’t - it’ll result in the same "cannot access class sun.awt.AWTAutoShutdown" error as in here: “Alex commented 20 Dec 2021 14:50”. And the same happens with v16 (OpenJDK 16.0.2; https://aka.ms/download-jdk/microsoft-jdk-16.0.2.7.1-windows-aarch64.msi )

3, from now on, the original app shortcut will stop working, complaining about the lack of JAVA_HOME, albeit it definitely is in place. Just start the IDE using the batch file c:\Program Files\JetBrains\PyCharm Community Edition 2021.3.1\bin\pycharm.bat. It can be executed dirextly or via a convenient, say, desktop shortcut. Feel free to create the latter!

Additional stuff:

4, WRT the fsnotifier problem mentioned in the thread: download “fsnotifier_ARM64.exe” from https://github.com/zhzy0077/WinFsNotifier/releases/tag/1.0 (see “Zhiyuan Zheng commented 15 May 2021 20:41”), put it somewhere in the VM and, in PyCharm, go to Help -> Edit Custom Properties and add “idea.filewatcher.executable.path” pointing to the EXE file like this (here, I put the EXE in the root (c:/Program Files/JetBrains/PyCharm Community Edition 2021.3.1/) of the app itself):

idea.filewatcher.executable.path=c:/Program Files/JetBrains/PyCharm Community Edition 2021.3.1/fsnotifier_ARM64.exe

NOTE: use forward slashes! If you mess up the path here, upon app restarts, you’ll get “External file changes sync may be slow: PyCharm cannot receive filesystem event notifications for the project. Is it on a network drive?” warnings.

5, I did NOT need to change c:\Program Files\JetBrains\PyCharm Community Edition 2021.3.1\bin\pycharm.bat (it’s the current “idea.bat” referred to by the thread post) to add "--illegal-access=warn" as explained by “Rubin Simons commented 8 Apr 2021 00:08”

6, WRT “Delete runnerw64.exe from the "bin" directory.” - this isn’t needed (BTW, there’s no runnerw64.exe in there, only runnerw.exe and it doesn’t need to be deleted)

Comments are more than welcome!
 

Attachments

  • Set JAVA_HOME variable.png
    Set JAVA_HOME variable.png
    83.7 KB · Views: 932
Last edited:

Xiao_Xi

macrumors 68000
Oct 27, 2021
1,628
1,101
Have you compared the performance of PyCharm under Parallels to native PyCharm and native VS Code?
 

Menneisyys2

macrumors 603
Original poster
Jun 7, 2011
6,003
1,106
Have you compared the performance of PyCharm under Parallels to native PyCharm and native VS Code?

I will do slowed-down 240fps videos so that I can properly compare these (with exact numbers):

1, 2018 MacMini (native x86)
2, 16" MBP: all-emulated x86 (using the built-in x86 JDK in PyCharm)
3, 16" MBP: the PyCharm launcher (of course) still in x86, but the 'core' JDK already in ARM

I'll try to video these:
1, startup until the cursor is shown and it becomes operable
2, the time needed to display the appropriate tab's content after clicking Run
3, the time needed to navigate to another entity (Ctrl-click)


BTW, thanks for the heads-up on VS Code, I'll give a try to it too. (I haven't used it for Python dev yet, as opposed to, say, Flutter. I'm more than interested in what a fully native ARM app can do on these 16" beasts.)
 
  • Like
Reactions: Xiao_Xi

robco74

macrumors 6502a
Nov 22, 2020
509
944
As much as I hate to admit it, VSCode is pretty good. I've been slowly transitioning from Sublime.
 

Xiao_Xi

macrumors 68000
Oct 27, 2021
1,628
1,101
@robco74 Can you explain what you miss in VS Code from Sublime and what makes VS Code/Sublime better than the other?
 

robco74

macrumors 6502a
Nov 22, 2020
509
944
I sometimes prefer a more lightweight editor over a full-fledged IDE. VSCode is a great text editor, but having the built-in terminal as well is quite handy. VSCode also has a wide, and growing, selection of plug-ins.

I like them both, but VSCode has a lot of momentum.
 
  • Like
Reactions: Xiao_Xi
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.