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 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. 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.
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
**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.
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
@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
./bazel.cmd run //build:idea_community
To run it, but without debug as I have no idea how to !
./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.
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)