On 31.01.25 15:06, Alessandro Ferrucci wrote:
Hi Michael -



On Fri, Jan 31, 2025 at 8:51 AM Michael Bien <mbie...@gmail.com> wrote:

    Hi,

    this is windows telling via a fairly misleading error message that
    the
    process argument length exceeds its limit.

    Classpath for example can get quite long since it contains file
    paths,
    when passed as argument it could cause this failure - this is windows
    specific since all other OSes can do processes properly.

    Assuming its about classpath, there are ways to workaround it, for
    example keeping the file paths short. E.g moving your project to
    D:\projects.

    build tools like maven do also have workarounds for it:
    https://www.mojohaus.org/exec-maven-plugin/exec-mojo.html#longClasspath


Thank you for the info, I wasn't sure if NetBeans had an IntelliJ-like workaround "shorten classpath" that seems to work for this specific issue.

NB itself doesn't no. NB delegates most actions to build tools like maven. Configuring the exec maven plugin to use the workaround mentioned above should work I hope.

Generally if you can run it via CLI, NB can be also configured to run it since all it does is to invoke maven goals.

You can configure what NB does when you press run under project properties -> actions -> run project.

-mbien





    how do you run the project, by pressing play or by selecting a
    file and
    running that file?


I run my project by setting the Main class under the "run" properties of the project then right clicking and hitting "Debug".



    btw the current NB version is 24 ;)


Fair enough, I'm running this on company hardware and there is a whole process around upgrading software versions :)



    -mbien



    On 31.01.25 13:54, Alessandro Ferrucci wrote:
    > Hello -
    >
    > I'm running NetBeans 19 on a windows 11 machine, whenever I try to
    > run/debug my Maven projects in Netbeans I receive the following
    error:
    >
    > *java.io.IOException: Cannot run program "C:\Program
    > Files\Java\jdk-17\bin\java.exe" (in directory "......"):
    CreateProcess
    > error=206, The filename or extension is too long*
    >
    > I have researched this error and there seems to be solutions for
    > running this on the command line or IDEs like IntelliJ (using path
    > shortening tools they provide), but nothing I've found seems to
    work
    > for Netbeans, this issue is a complete blocker for me using
    NetBeans,
    > any help is appreciated on getting around this issue in Netbeans.
    >
    > Thank you!
    > Alessandro Ferrucci




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to