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?
– Lucas Miranda
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?
– Bruno Pezzi
If you want the command to last I suggest you put it ( export ) in the /etc/Nvironment
– Lucas Miranda
Excellent suggestion. Thank you very much. As I ask this question as resolved?
– Bruno Pezzi
I sent my suggestion as an answer, just mark there
– Lucas Miranda