Joji
Sorry, including Java Libraries is not possible.
Bridge does not support AppleScript.
But... Anything that can be executed from the command line can be executed from JavaScript via app.system() - note that this function always returns undefined and does not return control to JavaScript until the command terminates.
I am wondering what you are meaning by shared library. External??? If so, no. Bridge scripts all execute in the same global namespace, so any library script you load will be available to all scripts in Bridge.
This is why "namespacing" is so important. Every script you write should have a namespace object:
ANameUniqueToMeAndMyScript = {};
Then all of your functions and whatnot are defined off of that namespace object
ANameUniqueToMeAndMyScript.myFunction = function() {
}
ANameUniqueToMeAndMyScript.amount = 12;
This way your functions and global values will not step on anyone else's.
Also there are 3 Adobe provided libraries. You can get them from Adobe Exchange by downloading the Import from Camera script.
AdobeLibrary1.jsx - handy objects and functions
AdobeLibrary2.jsx - xml based persistent storage
AdobeLibrary3.jsx - patches to 1 and 2, and a couple of new functions
Bob
Adobe WAS Scripting