# How to run an IDE from community sources with Bazel

**URL:** <https://platform.jetbrains.com/t/how-to-run-an-ide-from-community-sources-with-bazel/4392>\
**Category:** IntelliJ Platform\
**Created:** [June 2, 2026, 2:54pm UTC](https://platform.jetbrains.com/t/how-to-run-an-ide-from-community-sources-with-bazel/4392 "2026-06-02T14:54:22Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonathanlermitage.1](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@jonathanlermitage.1](https://platform.jetbrains.com/u/jonathanlermitage.1)\
**Post date:** [June 2, 2026, 2:54pm UTC](https://platform.jetbrains.com/t/how-to-run-an-ide-from-community-sources-with-bazel/4392/1 "2026-06-02T14:54:22Z")

</div>

Hi,  
I used to explore, test and debug recent builds from [https://github.com/JetBrains/intellij-community](https://github.com/JetBrains/intellij-community). The preconfigured Run Configurations were very useful.

Now, IJ is migrating to Bazel, and the preconfigured Run Configurations no longer work. At least, I see Kotlin errors while compiling.  
BTW, I read:

> Building the project using only IDE built-in capabilities is not supported anymore, so make sure the [Bazel plugin](https://plugins.jetbrains.com/plugin/22977-bazel) is installed and enabled.

So, I installed the Bazel plugin, but I’m wondering how to compile and run the IDE from sources.

> To run the IntelliJ IDEA that was built from source, choose ‘ **Run | Run** ’ from the main menu. This will use the preconfigured run configuration `IDEA`.

Unfortunately, the preconfigured Run Configuration are no longer displayed in the list of Run Configurations. I see the xml files in `.idea/runConfigurations`, but I guess they don’t work with Bazel.

Any help would be appreciated. Ideally, the Readme could be updated.

I’m using IntelliJ 2026.1.2 Community from [Releases · JetBrains/intellij-community · GitHub](https://github.com/JetBrains/intellij-community/releases). Should I switch to IJ Ultimate? I have a license, but I play with IJ sources on a dedicated machine that I cannot fully trust.

Thx.

---

<div class="post-metadata">

**Author:** ![jonathanlermitage.1](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@jonathanlermitage.1](https://platform.jetbrains.com/u/jonathanlermitage.1)\
**Post date:** [June 3, 2026, 2:58pm UTC](https://platform.jetbrains.com/t/how-to-run-an-ide-from-community-sources-with-bazel/4392/2 "2026-06-03T14:58:55Z")

</div>

I can sync the project with success (I had to add Bazel and Bash to the PATH first), and I found the `main_run` Bazel task, but it fails saying

```auto
**Start Failed**

Internal error

java.lang.RuntimeException: Invalid home path 'C:\ProgramData\_bazel\gkcbb2xt\execroot\_main\bazel-out\x64_windows-fastbuild\bin\main_run.exe.runfiles\${BUILD_WORKSPACE_DIRECTORY}'
	at com.intellij.openapi.application.PathManager.getHomeDir(PathManager.java:133)
	at com.intellij.openapi.application.PathManager.getHomePath(PathManager.java:109)
	at com.intellij.openapi.application.PathManager.getBinDirectories(PathManager.java:179)
	at com.intellij.openapi.application.PathManager.loadProperties(PathManager.java:824)
	at com.intellij.idea.Main.mainImpl(Main.kt:79)
	at com.intellij.idea.Main.main(Main.kt:66)

-----
JRE: 25.0.2+1-b315.62 amd64 (JetBrains s.r.o.)
C:\programdata\_bazel\gkcbb2xt\external\+jbr_toolchains+remotejbr25_win

```

I’m a bit lost. It says the home path is invalid, but what should I do? I have set the `idea.home.path` env var, but it changes nothing.

 ![image](https://us1.discourse-cdn.com/flex001/uploads/jetbrains_platform/original/2X/c/c8d7ce6056f84db97982e7f293d81a8bac73a4b6.jpeg)

---

<div class="post-metadata">

**Author:** ![yuriy.artamonov](https://sea1.discourse-cdn.com/flex001/user_avatar/platform.jetbrains.com/yuriy.artamonov/32/48_2.png) [@yuriy.artamonov](https://platform.jetbrains.com/u/yuriy.artamonov)\
**Post date:** [June 3, 2026, 4:17pm UTC](https://platform.jetbrains.com/t/how-to-run-an-ide-from-community-sources-with-bazel/4392/3 "2026-06-03T16:17:55Z")

</div>

Here is the related issue

> **[The build instructions in the Community repository's README are outdated and...](https://youtrack.jetbrains.com/issue/IJPL-235273/The-build-instructions-in-the-Community-repositorys-README-are-outdated-and-the-build-fails)**
>
> Steps to reproduce 1. When I open the https://github.com/JetBrains/intellij-community repository in IU 2025.3.2 (so first check out, android as well, commit is 8a06686abd3c2a7fb6836fb659573bf24fb26f3a, I have downloaded jbr 21 without jcef, maven...

---

<div class="post-metadata">

**Author:** ![jonathanlermitage.1](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@jonathanlermitage.1](https://platform.jetbrains.com/u/jonathanlermitage.1)\
**Post date:** [June 3, 2026, 4:42pm UTC](https://platform.jetbrains.com/t/how-to-run-an-ide-from-community-sources-with-bazel/4392/4 "2026-06-03T16:42:36Z")

</div>

Thx. I will continue in IJPL-235273

---

<div class="post-metadata">

**Author:** ![yuriy.artamonov](https://sea1.discourse-cdn.com/flex001/user_avatar/platform.jetbrains.com/yuriy.artamonov/32/48_2.png) [@yuriy.artamonov](https://platform.jetbrains.com/u/yuriy.artamonov)\
**Post date:** [June 3, 2026, 7:15pm UTC](https://platform.jetbrains.com/t/how-to-run-an-ide-from-community-sources-with-bazel/4392/5 "2026-06-03T19:15:08Z")

</div>

Sorry for these breakages, we are in the middle of undergoing migration to Bazel build everywhere and while the internal bigger monorepo is fully migrated, this subtree mirrored to GitHub is still not in a good shape. It has its own .idea and run configurations separate from the main

---

<div class="post-metadata">

**Author:** ![jonathanlermitage.1](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@jonathanlermitage.1](https://platform.jetbrains.com/u/jonathanlermitage.1)\
**Post date:** [June 24, 2026, 3:13pm UTC](https://platform.jetbrains.com/t/how-to-run-an-ide-from-community-sources-with-bazel/4392/6 "2026-06-24T15:13:21Z")

</div>

The `build/idea_community` bazel task now works 🙂

 ![image](https://us1.discourse-cdn.com/flex001/uploads/jetbrains_platform/original/2X/5/5e47a2165cd92525a47f665bf576a751f476e142.jpeg)

@bric3 does it work for you too?

Now, I need to find how to package an IDE installer, or a Zip distribution. If anyone has an idea…

---

<div class="post-metadata">

**Author:** ![bric3](https://sea1.discourse-cdn.com/flex001/user_avatar/platform.jetbrains.com/bric3/32/58_2.png) [@bric3](https://platform.jetbrains.com/u/bric3)\
**Post date:** [June 26, 2026, 10:14pm UTC](https://platform.jetbrains.com/t/how-to-run-an-ide-from-community-sources-with-bazel/4392/7 "2026-06-26T22:14:30Z")

</div>

@jonathanlermitage.1 I don’t ship my own IJ so my use case is different. What I wanted is port fixes, make new fixes that are annoying me for quite some time. And I wanted to test them in a local build.

Opening the project in IJ works for the most part (at least), without loading it as bazel, currently. But building / running it was annoying. Finally I resorted to use command line.

To build it

```shell
./bazel.cmd run //build:idea_community

```

To run it, but without debug as I have no idea how to !

```shell
./bazel.cmd run //:main_run

```

* * *

Personally, I still don’t get why bazel was used over Gradle, maybe because it has a better multi language story, or maybe opening sub-modules. Other that that in my experience Bazel is usually worse.

---

<div class="post-metadata">

**Author:** ![yuriy.artamonov](https://sea1.discourse-cdn.com/flex001/user_avatar/platform.jetbrains.com/yuriy.artamonov/32/48_2.png) [@yuriy.artamonov](https://platform.jetbrains.com/u/yuriy.artamonov)\
**Post date:** [June 27, 2026, 6:38am UTC](https://platform.jetbrains.com/t/how-to-run-an-ide-from-community-sources-with-bazel/4392/8 "2026-06-27T06:38:44Z")

</div>

Bazel is used because of performance and caching capabilities, our monorepo x10 bigger than community sources

---

<div class="post-metadata">

**Author:** ![bric3](https://sea1.discourse-cdn.com/flex001/user_avatar/platform.jetbrains.com/bric3/32/58_2.png) [@bric3](https://platform.jetbrains.com/u/bric3)\
**Post date:** [June 27, 2026, 8:15am UTC](https://platform.jetbrains.com/t/how-to-run-an-ide-from-community-sources-with-bazel/4392/9 "2026-06-27T08:15:07Z")

</div>

Thx Yuriy for the feedback, if you say that I suppose JB folk made some benchmarks before considering one or another. That would be awesome to share.

10x bigger than the OSS. Woah!

---

<div class="post-metadata">

**Author:** ![jonathanlermitage.1](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@jonathanlermitage.1](https://platform.jetbrains.com/u/jonathanlermitage.1)\
**Post date:** [June 27, 2026, 12:40pm UTC](https://platform.jetbrains.com/t/how-to-run-an-ide-from-community-sources-with-bazel/4392/10 "2026-06-27T12:40:13Z")

</div>

From my point of view, everything is better than Gradle ^^. In my dreams, I would use Maven or Bazel for third-party plugin development.

Anyway, build:idea\_community can be used to build & run the IDE, but do you know how to package the IDE? (the exe installer or, better, the ZIP distribution)

---

<div class="post-metadata">

**Author:** ![jonathanlermitage.1](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@jonathanlermitage.1](https://platform.jetbrains.com/u/jonathanlermitage.1)\
**Post date:** [July 2, 2026, 2:14pm UTC](https://platform.jetbrains.com/t/how-to-run-an-ide-from-community-sources-with-bazel/4392/11 "2026-07-02T14:14:12Z")

</div>

For me, `./installers.cmd -Dintellij.build.target.os=current` fails (I’m on W11):

```auto
PS C:\DEV\intellij-community> ./installers.cmd -Dintellij.build.target.os=current
>> # Build installers only for current operating system:
INFO: Invocation ID: 485823e7-b09a-437e-b8ea-a60abefa168c
INFO: Checking for file changes...
INFO: Analyzed target //build:i_build_target (139 packages loaded, 49169 targets configured).
INFO: Found 1 target...
Target //build:i_build_target up-to-date:
  out/bazel-bin/build/i_build_target.exe
  out/bazel-bin/build/i_build_target.jar
INFO: Elapsed time: 178.077s, Critical Path: 83.27s
INFO: 481 processes: 1634 action cache hit, 4 internal, 477 worker.
INFO: Build completed successfully, 481 total actions
INFO: Running command line: out/bazel-bin/build/i_build_target.exe <args omitted>
WARNING: package com.apple.laf not in java.desktop
WARNING: package com.sun.java.swing.plaf.gtk not in java.desktop
WARNING: package com.apple.eawt.event not in java.desktop
WARNING: package sun.awt.X11 not in java.desktop
WARNING: package com.apple.eawt not in java.desktop
WARNING: package sun.lwawt.macosx not in java.desktop
WARNING: package sun.lwawt not in java.desktop
Erreur : impossible de trouver ou de charger la classe principale .build.target.os=current
Causé par : java.lang.ClassNotFoundException: /build/target/os=current

```

(“Error: can’t find or load the main class .build.target.os=current”)

---

<div class="post-metadata">

**Author:** ![bric3](https://sea1.discourse-cdn.com/flex001/user_avatar/platform.jetbrains.com/bric3/32/58_2.png) [@bric3](https://platform.jetbrains.com/u/bric3)\
**Post date:** [July 8, 2026, 8:35am UTC](https://platform.jetbrains.com/t/how-to-run-an-ide-from-community-sources-with-bazel/4392/12 "2026-07-08T08:35:19Z")

</div>

Not sure `./installers.cmd` is well maintained. Instead I’m using bazel commands directly:

- `./bazel.cmd run //:main_run` to run the app
- `./bazel.cmd run //build:i_build_target -- --jvm_flag=-Dintellij.build.target.os=current` should replace the installers command (they end up in `./out/idea-ce/artifacts`)

---

<div class="post-metadata">

**Author:** ![jonathanlermitage.1](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@jonathanlermitage.1](https://platform.jetbrains.com/u/jonathanlermitage.1)\
**Post date:** [July 8, 2026, 10:23pm UTC](https://platform.jetbrains.com/t/how-to-run-an-ide-from-community-sources-with-bazel/4392/13 "2026-07-08T22:23:44Z")

</div>

I have a problem with the generated zip distribution (built via `bazel.cmd run //build:i_build_target -- --jvm_flag=-Dintellij.build.target.os=current`).  
I get this error when launching `idea64.exe`. Am I missing something?

 ![image](https://us1.discourse-cdn.com/flex001/uploads/jetbrains_platform/original/2X/d/d353e311c1d92b018e8606c03a4e996583ad5cc1.jpeg)
