Jhipster 5.7 microservice failed to start on windows with error CreateProcess error=206, The filename or extension is too long

我是研究僧i 提交于 2020-01-15 07:17:40

问题


Jhipster 5.7 microservice failed to start on windows with error CreateProcess error=206, The filename or extension is too long

I have created a Jhipster micro service. when I am trying to start, I get error CreateProcess error=206, The filename or extension is too long. All other questions are suggesting to reduce classpath or usning IntelliJ. None of them explained how. Here are few things I have trying:

  1. Remove Unnecessary jar from classpath:

    • I have fresh Jhipsterap. I don't know which jar I can remove without breaking it.
  2. Use IntelliJ

    • I am running the service from command line.
  3. Move your project or maven repo to "c:" drive to make path short.

    • I can't. The repo is huge and is being shared.

Let me know if there is any other solution for this problem.

Thanks


回答1:


There is fairly simple way of reducing classpath on windows, if you can not move your local repo. Here is how:

Open command prompt and execute this command

mklink /J c:\repo C:\<long path to your maven repository>

This will create a link to your maven repository. Now run the service like this:

mvn -Dmaven.repo.local=c:\repo spring-boot:run

Thats all. Now your classpath will be reduced by around 10000 characters (tried for jhipster gateway app).

Good luck.



来源:https://stackoverflow.com/questions/54246648/jhipster-5-7-microservice-failed-to-start-on-windows-with-error-createprocess-er

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!