Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

my path variable seems to be a bit hosed. I recently modified my /etc/profile to add GRAILS_HOME and modify JAVA_HOME. the problem now (moved off of grails to lift for the time being) is that there is an extra / in one of the directories. I'm not sure how to find where this is set in or der to fix it. Could someone please point me in the right direction?

echo $PATH


I killed my terminal and opened a new one. the extra / seems to be gone. However, when I'm now getting this:

[Ramy@localhost ~]$ sbt
Invalid or corrupt jarfile /usr/local/bin
[Ramy@localhost ~]$ echo $PATH

Here's the contents of /usr/local/bin/sbt:

java -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=1024m -Xmx2048M -Xss4M -jar `dirname $0` /sbt-launcher.jar "$@"
share|improve this question
Am I drunk or is there really anything twice (or more) in your PATH? – Baarn Jan 29 '12 at 23:09
I can't tell you if you're drunk but there originally was a double / in the initial echo of $PATH: :/usr/local//bin: Restarting the terminal took care of the slash. – Ramy Jan 29 '12 at 23:10
/usr/java/jdk1.6.0_27/bin/java/bin is there two times in the second $PATH. I doubt that it causes any problems, but it's strange. – Baarn Jan 29 '12 at 23:13
and double slashes should not cause any problems, try this cd //boot/..///etc//..//dev/ (you should end up in dev) at least bash handles it fine. – Baarn Jan 29 '12 at 23:15
hmmm...weird. well i've deleted and re-downloaded the jar file so I'm not sure it's the jar file that's the problem – Ramy Jan 29 '12 at 23:22
up vote 0 down vote accepted

well, i was following along in the book "Lift in Action" and the advice they give for creating the file called "sbt" was inaccurate. It should look like this:

java -Xmx512M -jar `dirname $0`/sbt-launch.jar "$@"


share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .