1

I want to run eclipse via terminal.

Eclipse is in this directory ~/eclipse/java-photon/eclipse/.

When I write in terminal cd ~/eclipse/java-photon/eclipse/ and then ./eclipse it works.

But how can I set the PATH in the .profile file to only type in eclipse and it runs the program?

I tried it like explained in this question:

I set export PATH=$PATH:~/eclipse/java-photon/eclipse/ at the end of the .profile file and saved it.

Now when I type eclipse in the terminal it says

command 'eclipse' not found.
valiano
  • 1,985
  • You probably just need to log out and back in? BTW, rather than using I suggest quoting, like PATH="$PATH:$HOME/eclipse/java-photon/eclipse" and you don't need to export because PATH is always an environment variable – Zanna Sep 24 '18 at 13:14

1 Answers1

2

Hello and welcome to AskUbuntu!

.profile is sourced only for "login" shells.

Usually when starting a new terminal from the GUI the shell is a "non-login" shell.

Try putting your $PATH into .bashrc which is sourced for every new terminal.