This week's giveaway is in the JDBC forum.
We're giving away four copies of Java Database Connections & Transactions (e-book only) and have Marco Behler on-line!
See this thread for details.
Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC 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
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Maven Install  RSS feed

 
Ranch Hand
Posts: 176
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: 176
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: 6769
466
BSD Linux Mac OS X VI Editor
  • 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: 10248
216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happens when you invoke the following commands?
 
Marshal
Posts: 5995
156
Chrome Eclipse IDE Java Postgres Database Ubuntu VI Editor
  • 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.
 
Saloon Keeper
Posts: 2590
327
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
  • 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: 21747
102
Chrome Eclipse IDE Java Spring Ubuntu VI Editor 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: 176
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.
 
He does not suffer fools gladly. But this tiny ad does:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!