• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Spring Boot doesn't run on cmd, but works on Intellij

 
Greenhorn
Posts: 23
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi I am struggling to know why is not possible to run this simple spring boot program in cmd.

This program is from Spring Boot quick start guide

The error that I am facing says in Spanish:

"The system can not find the path" and later
"'Javier' is not recognized as inner or outer command..."
"Exception after calling 'DownloadFile' with the arguments '2': Exception after asking webClient"

and later in English:

+ ... pe]::Tls12; $webclient.DownloadFile('https://repo.maven.apache.org/ma ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   + CategoryInfo          : NotSpecified: () [], MethodInvocationException
   + FullyQualifiedErrorId : WebException

Error: Could not find or load main class org.apache.maven.wrapper.MavenWrapperMain
Caused by: java.lang.ClassNotFoundException: org.apache.maven.wrapper.MavenWrapperMain



Captura-de-pantalla-(291).png
[Thumbnail for Captura-de-pantalla-(291).png]
 
Bartender
Posts: 2266
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We need to get more details about your project. With the screen shot you provided, it is hard for us to tell what was going on.
 
Javier Gonzalez
Greenhorn
Posts: 23
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Himai, thank you for your answer! What would you like to see the pom.xml?
I atached it. You can see the project structure in the last screen capture.
Thank you very much!

Captura-de-pantalla-(296).png
[Thumbnail for Captura-de-pantalla-(296).png]
Captura-de-pantalla-(297).png
[Thumbnail for Captura-de-pantalla-(297).png]
Captura-de-pantalla-(299).png
[Thumbnail for Captura-de-pantalla-(299).png]
 
Sheriff
Posts: 22716
129
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm guessing it's caused by your user folder name. If the path is not properly quoted or escaped, the & in "Rosanna&Javier" is given special meaning by the command prompt (as well as Linux and MacOS shells). Just execute the following two commands:

If the path is quoted everything works just fine, so you'll need to figure out a) where a path is not properly quoted, and b) how to quote it.
 
Javier Gonzalez
Greenhorn
Posts: 23
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Rob! Yes if I use the echo "Rosana&Javier" works, but without quotes doesn't work.
So to make it work I would have to change the User name, because I tried to use quotes in the path but it doesn't work.
Thank you very much for your answer!
 
Rob Spoor
Sheriff
Posts: 22716
129
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Changing the username would solve not just this problem, but possibly also others in the future. I don't know how easy that will be under Windows though, I never tried it.
 
reply
    Bookmark Topic Watch Topic
  • New Topic