Magento 1.5 doesnt allow one to addjs or addskinjs with a custom sorting order...
its because the head.phtml file is doesn't support it in getCssJsHtml() and getIncludes();
One way to solve it is to inject script directly into head.phtml, but put it into your own template folder...
copy from app/design/frontend/base/default/template/page/html/head.phtml to
Another thing to take note is getUrl and getSkinURL gotcha...
$this->getSkinUrl("js/java.js"); // return skin/frontend/[base_or_yourtemplate]/default/js/java.js
$this->getUrl("js/java.js"); // return http://yourbasepath.com/js/java.js/
Work around will be using $this->getUrl(""). "js/java.js"