[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Importing

On Fri, Nov 12, 1999 at 11:30:48AM -0500, Ted Eiles wrote:
> What is the best way to add to defaultImports?
> Add classes to defaultImports file and update JAR file? (my current procedure)
> Add packages to javaPackages? (I don't know if this will work)
> ???

Well, if it's for a "user" environment you could add a startup script in your 
home dir.  (see http://www.beanshell.org/changes.html)

I will probably add a search for a system startup script in the resource path
as well with the next release... so that you could just distribute an extra 
file with the JAR (instead of modifying the existing one).

By the way, the javaPackages are not necessarily imported... They're simply
an optimization for resolving names...  Bsh knows that those names are packages
and not class names, so it can skip a few steps in name resolution (at least
in theory).

I'm not sure where the trade off should be for this (size of the file vs.
usefullness)... or if it's even helping at all...I've never run any numbers.