Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
/usr/java/jdk1.6.0_27:/home/Ramy/grails/bin:/usr/local//bin:/usr/java/jdk1.6.0_27:/home/Ramy/grails/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/java/jdk1.6.0_27/bin/java

UPDATE:

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
/usr/java/jdk1.6.0_27:/home/Ramy/grails/bin:/usr/lib/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/java/jdk1.6.0_27/bin/java/bin:/usr/local/rvm/bin:/home/Ramy/bin:/usr/java/jdk1.6.0_27/bin/java/bin

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

1 Answer 1

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 "$@"

ref: http://code.google.com/p/simple-build-tool/wiki/Setup

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.