I installed Intellij Idea in my ubuntu.And I run it from the terminal.

First I do it like this,change the PATH into .bashrc,and also source it.

but it doesn't work.

And I'm sure the directory is correct. Now I write a alias in .bashrc it works.

alias runidea='cd $THEDIR ; sh idea.sh'

I echo the PATH it's correct.but if I type sh idea.sh

it tells me sh:Can't open idea.sh

share|improve this question
    
is idea.sh in $THEDIR ? That's a requirement for the alias you have created. – anishsane Nov 8 '12 at 8:35
    
it's and the alias work,but the PATH doesn't work and I don't know why. – Shihe Zhang Nov 8 '12 at 12:11
up vote 2 down vote accepted

try just run it by typing idea.sh into your shell (without sh)

like $ idea.sh not $ sh idea.sh

share|improve this answer
    
if I go to its directory it work.and the alias work.But the PATH doesn't work. – Shihe Zhang Nov 8 '12 at 12:12
1  
if idea.sh is in your $PATH,and it has executable permission,then you can run it by idea.sh without sh. – cfy Nov 8 '12 at 13:45
    
thank you.It worked like your said. @ilisp – Shihe Zhang Nov 8 '12 at 14:14

Try this

alias runidea='~/idea-IU-111.277/bin/idea.sh'

Now the alias is created and then run the following command

runidea

idea-IU-111.277 can be replaced by your intellij idea folder

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.