Skip to content

MavenHelper not compatible with WSL: tries to run Windows Java in WSL environment #144

@johnduff

Description

@johnduff

Describe the bug
When using IntelliJ with a WSL (Windows Subsystem for Linux) project, the MavenHelper plugin fails to run Maven actions (such as "Re-import" or "Run Maven Goal"). It attempts to launch Java using a Windows path (e.g., C:\Program Files\Zulu\zulu-17\bin\java.exe) inside the WSL environment, which only has access to Linux binaries and paths.

To Reproduce
Steps to reproduce the behavior:

  1. Open a Maven project located in the WSL filesystem in IntelliJ.
  2. Ensure IntelliJ is configured to use WSL for the project JDK and Maven.
  3. Use the MavenHelper plugin to "Re-import" or run any Maven goal.

Expected behavior
MavenHelper should use the Linux Java and Maven installations available in the WSL environment, just like running mvn in a WSL terminal.

Actual behavior
MavenHelper tries to execute a Windows Java binary inside WSL, resulting in an error like:

Couldn't run In "/home/username" execute C:\Program Files\Zulu\zulu-17\bin\java.exe ...: No such file or directory (os error 2)

Environment :
IntelliJ IDEA 2025.3.3
Build #IU-253.31033.145, built on February 20, 2026
Source revision: 212d61deaf3a8
Licensed to
You have a perpetual fallback license for this version.
Subscription is active until February 25, 2027.
Runtime version: 21.0.10+1-b1163.108 amd64 (JCEF 137.0.17)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.windows.WToolkit
Windows 11.0
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 8192M
Cores: 16
Registry:
ide.experimental.ui=true
maven.packagesearch.enabled=false
Non-Bundled Plugins:
intellij.bigdatatools.coreUi (253.29346.50)
intellij.bigdatatools.awsBase (253.31033.145)
some.awesome (1.16)
PythonCore (253.31033.145)
com.intellij.mermaid (0.0.27+IJ.253)
com.gk646.codeStats (2.0.5)
com.chainstaysoftware.assertions2assertj (1.0.11)
com.haulmont.jpab (253.30387.20)
com.jetbrains.jax.ws (253.28294.251)
String Manipulation (9.16.0)
de.achimonline.ansible_lint (1.11.5)
AceJump (3.8.22)
gherkin (253.28294.218)
Pythonid (253.31033.145)
com.intellij.aqua (253.28294.251)
cucumber-java (253.30387.20)
MavenRunHelper (5.0.0-IJ2025.1)
com.intellij.bigdatatools.core (253.31033.145)
zielu.gitworktree (1.2.1+252)
com.intellij.bigdatatools.kafka (253.25909.4)
com.github.copilot (1.6.1-243)
zielu.gittoolbox (600.2.3+253)
com.intellij.plugins.html.instantEditing (253.28294.251)
Kotlin: 253.31033.145-IJ

Additional context
IntelliJ's built-in Maven integration can be configured to work with WSL, but MavenHelper does not seem to detect or support WSL environments. This makes the plugin unusable for WSL-based projects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions