You can use (examples):
Code:
#!/usr/bin/env java
#!/usr/bin/env php
I'm not sure about javascript; this functionality depends on what executables are avail to the `env` binary.
I came across a few other examples of this the other day via google, but cann't recall what exactly I was searching for when I encountered them.. You should be able to find other examples though.
Plus, I don't know that this literally "makes bash use the other interpreter itself", but rather, it transfers execution to the indicated interpreter (which I think is what you want, no?).
Sasha