问题
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:
Remove Unnecessary jar from classpath:
- I have fresh Jhipsterap. I don't know which jar I can remove without breaking it.
Use IntelliJ
- I am running the service from command line.
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