java - set MAVEN_HOME in eclipse -



java - set MAVEN_HOME in eclipse -

i have line of code in project in eclipse & it's giving me error.

invoker invoker = new defaultinvoker(); invoker.setmavenhome(new file(system.getenv("maven_home"))); //giving error

so ran , giving blank line output

echo $maven_home

however, able run other maven projects through command prompt , through eclipse. have next question..

q 1. difference between next 2 commands

whereis maven maven: /etc/maven /usr/share/maven

& when run

whereis mvn mvn: /usr/bin/mvn /usr/bin/x11/mvn /usr/share/man/man1/mvn.1.gz

q 2. need set in .bashrc... please tell me exactly...

this current content of .bashrc file

java_home=/usr/lib/jvm/java-7-openjdk-amd64/ export java_home export path

edit

mvn -version apache maven 3.0.4 maven home: /usr/share/maven java version: 1.7.0_65, vendor: oracle corporation java home: /usr/lib/jvm/java-7-openjdk-amd64/jre

thanks :)

just utilize in eclipse can add together in window -> preferences -> java -> biild path -> classpath variables.

just add together new variable name maven_home.

but executions need set in in run/debug configuration - that's need.

whereis maven

is directory, ,

whereis mvn

is executable file.

for .bashrc:

maven_home=/usr/share/maven export maven_home

java eclipse maven

Comments

Popular posts from this blog

java Multi query from Mysql using netbeans -

c# - DotNetZip fails with "stream does not support seek operations" -

c++ - StartServiceCtrlDispatcher don't can access 1063 error -