Fix Maven Command in Windows Returns a Java Hint
tip
Environment:
- Windows Server 2012 R2
- Apache Maven 3.6.0
When I run any maven command (whatever), I always get the following answer
Usage: java [-options] class [args...] (to execute a class) or java [-options] -jar jarfile [args...] (to execute a jar file)
This happens if you have .mvn folder in the system volume (C:). Removing C:.mvn will fix this error.
References: