Adding Gradle to PATH

I am trying to add Gradle to my PATH. I have used the command

export PATH=/myUsername/Applications/gradle-2.6/bin:$PATH

but when I type

gradle

I get an error "command not found." So I went to look for .profile or .bash_profile, but neither file existed. So I created .bash_profile, and added the line

export PATH=/myUsername/Applications/gradle-2.6/bin:$PATH

This still did not work, and I have no idea what to do from here. When I type $PATH, I see the lines added, so I have no idea why it isn't working. Any help would be appreciated.


The path /myusername/Applications/gradle-2.6/bin probably doesn't exist except your personal user folder is in the root of your main volume - which would be very, very uncommon on a *nix system.

Depending on where you've installed Gradle the proper path might be:

/Users/myUsername/Applications/gradle-2.6/bin or
/Applications/gradle-2.6/bin

So change the export line to

export PATH=/Users/myUsername/Applications/gradle-2.6/bin:$PATH or  
export PATH=/Applications/gradle-2.6/bin:$PATH