How to install Maven in Windows?

Hello I am just download maven binaries and after set all the environment variable, I am running mvn -version cmd and get this Exception.

Exception in thread "main" java.lang.IllegalAccessError: tried to access field org.codehaus.plexus.util.Os.OS_NAME from class org.apache.maven.cli.CLIReportingUtils at org.apache.maven.cli.CLIReportingUtils.showVersion(CLIReportingUtils.

java:71)at org.apache.maven.cli.MavenCli.cli(MavenCli.java:423) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:277) at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:497)at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun cher.java:289)at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav a:229)at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La uncher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java: 356)

Answer:1

Add system variable JAVA_HOME (with address JDK) and M2_HOME with route directory maven.

Answer:2

Follow the steps:

1. Download Maven from <https://maven.apache.org/>  
2. Unzip anywhere on your system
3. Go to Control pannel on your windows machine and edit the environmentalvariable(PATH = "your maven path/bin")  
4. Save   
5. Go to command prompt and run the command mvn -version
Answer:3

I have created a Recyclerview, with itemobjects, Adapter, viewholder and activity. The Recyclerview works fine. My problem is when an item is clicked from Recyclerview, I want to direct the user to ...

I am Using placeholder %1$d in string.xml for int value, and then I want to display % sign in same TextView so it's &#37;. So I've use it like this. <string name="uploadProgress">%1$d&#...

I have a SWT application which accepts the java type project and do some parsing mechanism on all the file, it was working fine but in large project which have a huge count of file it starts ...

I am running this code on EMR 4.6.0 + Spark 1.6.1 : val sqlContext = SQLContext.getOrCreate(sc) val inputRDD = sqlContext.read.json(input) try { inputRDD.filter("`first_field` is not null OR `...