Win a copy of Head First Android this week in the Android forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Maven Install

 
Ranch Hand
Posts: 205
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For some reason I cannot get maven to work on my system. I get a file not found error on my windows7 box.

Path:
  C:\Program Files (x86)\Common Files\Oracle\Java\javapath;
  C:\ProgramData\Oracle\Java\javapath;
  C:\Windows\system32;
  C:\Windows;
  C:\Windows\System32\Wbem;
  C:\Windows\System32\WindowsPowerShell\v1.0\;
  C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;
  C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;
  C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;
  C:\Program Files\Git\cmd;
  C:\Program Files\dotnet\;
  C:\Program Files\Java\jre1.8.0_60\bin;
  C:\Program Files (x86)\Java\jdk1.7.0_55;
  C:\Program Files (x86)\Java\jre7;
  C:\Program Files (x86)\Java\jdk1.8.0_151\bin;
  %JAVA_HOME%\bin;
  %JRE_HOME%\bin;
  %CATALINA_HOME%\lib;
  %M2_HOME%\bin;
  C:\PROGRA~1\IBM\SQLLIB\BIN;
  C:\PROGRA~1\IBM\SQLLIB\FUNCTION;

M2_HOME:
  C:\Program Files (x86)\apache-maven-3.6.0

MAVEN_HOME:
  C:\Program Files (x86)\apache-maven-3.6.0

File Directory (I browsed here from windows explorer)
  C:\Program Files (x86)\apache-maven-3.6.0\bin

File Directory (from command prompt)
  C:\Program Files (x86)\apache-maven-3.6.0\bin>

I can go straight to the directory and type MVN and it works fine, but for some reason it does not pick up the path to the BIN folder. Any suggestions on how to fix this issue?  And yes I have rebooted my system twice now.

Thanks in advanced.
 

 
 
John Morgan
Ranch Hand
Posts: 205
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
also just tried C:\Program Files (x86)\apache-maven-3.6.0\bin\mvn and got the same error.
 
Sheriff
Posts: 8102
571
Mac OS X VI Editor BSD Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to specify C:\Program Files (x86)\apache-maven-3.6.0\bin directory, where mvn executables are.
 
Saloon Keeper
Posts: 13383
295
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What happens when you invoke the following commands?
 
Sheriff
Posts: 7111
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

John Morgan wrote:also just tried C:\Program Files (x86)\apache-maven-3.6.0\bin\mvn and got the same error.


Does this mean you tried typing this from the command line and you got a "File not found" error?  (It's good to be precise.)  I think from the command line you need to surround a path with quotes if it has spaces in it.
 
Marshal
Posts: 3714
523
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Knute Snortum wrote:I think from the command line you need to surround a path with quotes if it has spaces in it.


You could also use the 8.3 filename in the path - it would be something like: C:\PROGRA~2\apache-maven-3.6.0\bin\mvn

Open a command window and type dir /x c:\ to see the 8.3 filenames.
 
Sheriff
Posts: 22506
122
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
That should never be necessary. Just quote your path:
 
John Morgan
Ranch Hand
Posts: 205
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:What happens when you invoke the following commands?



c:\>echo %M2_HOME%
C:\Program Files (x86)\apache-maven-3.6.0 MAVEN_OPTS=-Xms256m -Xmx512m

(That is where the file is located)

c:\>echo %path%
C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\nodejs;Z:.

Hmmmm and there the problem is... thank you.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic