1
I’m trying to run the Maven and is returning me the following error:
/opt/apache-maven-3.3.3/bin/mvn: 227: exec: /opt/jdk1.7.0_79/bin/java: not found
I checked the paths and are ok, someone knows why the problem?
Man Environment is like this:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/java/bin:/opt/maven/bin"
JAVA_HOME="/opt/java"
M2_HOME="/opt/maven"
JAVA_OPTS="-Xms1024m -Xmx1536m -XX:MaxPermSize=200m"
MAVEN_OPTS="-XX:MaxPermSize=300m -Xms500m -Xmx1300m -Dfile.encoding=ISO-8859-1 -Dencoding=ISO-8859-1"
Tries to run a
/opt/apache-maven-3.3.3/bin/mvn -version
and a/opt/jdk1.7.0_79/bin/java -version
, and put there what he writes as an answer.– Victor Stafusa
Thanks for the answer, when I run Maven, I get the same error, since when I run java -version... it appears "-bash: /opt/jdk1.7.0_79/bin/java: File or directory not found" strange because I can manually go there and run java -version.
– Roknauta
Have you set up the Maven in your path? http://stackoverflow.com/questions/6462247/how-to-setup-path-for-maven, do you have anything like that? M2_HOME=C: Program Files Apache Software Foundation apache-Maven-2.2.1 M2=%M2_HOME% bin MAVEN_OPTS=-Xms256m -Xmx512m
– Wellington Avelino
Yes, look at my file enviroment... PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/java/bin:/opt/Maven/bin" JAVA_HOME="/opt/java" M2_HOME="/opt/Maven" JAVA_OPTS="-Xms1024m -Xmx1536m -XX:Maxpermsize=200m" MAVEN_OPTS="-XX:Maxpermsize=300m -Xms500m -Xmx1300m -Dfile.encoding=ISO-8859-1 -Dencoding=ISO-8859-1"
– Roknauta