-1

My java files are in /home/joe/Learning/Java folder, but can not run them in home directory. Works fine when I change to the specific directory. How can I add this to my $PATH. I tried so many. but no avail. Can someone help

user259561
  • 11
  • 2
  • 5

1 Answers1

3

If you want to run files locally without adding the path to your command, an easy way is to store them in ~/bin.

Make sure they are executable.

Another way is to create a link in ~/bin to the file (ln -sf)

I think this is the most appropriate way for a "learning" file as you mention it.

Jacob Vlijm
  • 83,767