This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming 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
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

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.
 
Marshal
Posts: 7166
491
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: 10650
227
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happens when you invoke the following commands?
 
Sheriff
Posts: 6259
167
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.
 
Saloon Keeper
Posts: 2722
354
Android Eclipse IDE Angular Framework MySQL Database TypeScript Redhat 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: 21802
104
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.
 
And then we all jump out and yell "surprise! we got you this tiny ad!"
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!