Win a copy of AWS Security this week in the Cloud/Virtualization 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Maven Install

 
Ranch Hand
Posts: 195
2
  • Mark post as helpful
  • send pies
  • 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: 195
2
  • Mark post as helpful
  • send pies
  • 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: 7621
522
Mac OS X VI Editor BSD Linux
  • Mark post as helpful
  • send pies
  • 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: 12030
257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happens when you invoke the following commands?
 
Sheriff
Posts: 7108
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • 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.
 
Sheriff
Posts: 3123
459
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
  • 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: 21955
106
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That should never be necessary. Just quote your path:
 
John Morgan
Ranch Hand
Posts: 195
2
  • Mark post as helpful
  • send pies
  • 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 mess with me you fool! I'm cooking with gas! Here, read this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic