Spring command not found

Asked

Viewed 65 times

0

I installed the Spring CLI on my machine recently, and configured the file etc/profile, on it I had already configured my JAVA_HOME, and tried to set up the SPRING_HOME, the end of the file is like this:

export JAVA_HOME=/usr/local/java/jdk-11.0.5
export PATH=$JAVA_HOME/bin:$PATH
export SPRING_HOME=/opt/spring-2.2.5.RELEASE
export PATH=$SPRING_HOME/bin:$PATH

If I get in /opt/spring-2.2.5.RELEASE/bin and type spring, or spring , It runs. But if I try to use the spring command outside of this directory. Gives a message saying "Command spring not found" and me suggestions for installations.

Can someone explain to me what I did wrong?

  • spun source /etc/profile again to take the path?

  • Well remembered. I came to use source /etc/profile, and after running spring again it works, but if I close the terminal, I have to use source /etc/profile again. The question is how I set up Home and Path should not be possible to run this command always by any user without having to use source /etc/profile every time I need?

  • If you want the command to last I suggest you put it ( export ) in the /etc/Nvironment

  • Excellent suggestion. Thank you very much. As I ask this question as resolved?

  • I sent my suggestion as an answer, just mark there

1 answer

0


As discussed, the inclusion of the environment variable in the global scope in /etc/Nvironment was suggested. For more details on the functioning of environment variables:

Environment variables.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.