I am facing Issues in running MVN commands from command line though I am able to successfully run with eclipse.
> mvn -version
**Maven home:** D:\maven **Java version:** 1.7.0_45, vendor: Oracle Corporation
**Java home:** C:\Program Files (x86)\Java\jre7
etc etc.....
> echo %JAVA_HOME%
D:\ProgramFiles\Java\jdk1.7.0_25
User Variable Set JAVA_HOME
to D:\ProgramFiles\Java\jdk1.7.0_25
; and path to D:\ProgramFiles\Java\jdk1.7.0_25\bin
.
I have already JDK 1.6 installed in default drive C below. C:\Program Files (x86)\Java\jdk1.6.0_27
,C:\Program Files (x86)\Java\jre7
As per project requirement, we needed JDK1.7 installed. Due to permission issues (not able to install C drive), I installed JDK 1.7 in path D:\ProgramFiles\Java\jdk1.7.0_25
,D:\ProgramFiles\Java\jre7
.
On Eclipse pointing to JDK1.7 for installed JREs. And able to run all MAVEN Commands via eclipse. But note, the library files for jre is still pointing to C drive lib jar files only and not D drive jar files.(But as eclipse is working good I ignored this!)
But from command line getting error as "Perhaps you are running on a JRE rather than a JDK". No compiler etc. on running any maven command. Also maven's JAVA_HOME is still pointing to jre of C drive on running mvn -version.
Please help how to correct my problem. (Without uninstalling older version of Java As i dnt have permission to C drive folder)
Thanks in advance for help. :)