At 04:59 PM 7/28/00 -0700, you wrote:
>Hi Paul,
>
>I don't know if this work is already being done. I apologize if I am
>reinventing the wheel again.
>
>As any other Java developer, I am also a frequent victim of using wrong
>class as a result of bad classpath setting. I wrote a simple bsh script
>which works like the command "which" - but prints the first location where
>class is found. 
>
>Is it possible for you to add the script in standard jde distribution and
>appropriate menu item for it's execution. As far as I have gathered, jde
>uses jde-global-classpath and it's jar files while executing the bsh. The
>script will look for the class name in this classpath - actually in bsh
>class path but can be easily changed to look into user provided classpath as
>an argument.
>
>With the hope that this script is useful,
>

Hi Niranjan,

I have decided to include your script in the next release of the JDE. Your
script will be distributed in a new JDE subdirectory

JDE-ROOT/java/bsh-commands/bsh/commands

I have included this new directory in the classpath of the JDE bsh command.
This allows the Beanshell to find your script--and any other script that is
stored in this directory. In other words, you can execute whichClass just
like any other command that comes with the BeanShell.

I hope this new facility will encourage other users to develop BeanShell
scripts for use with the JDE.

Users will now have three options for extending the JDE:

  * Lisp
  * Java classes executed via the Beanshell
  * Beanshell (i.e., Java) scripts

One model might be to use Beanshell scripts to develop prototypes for new
features and then convert these into Java classes. Since the Beanshell
script is a straightforward extension of Java, this should be quite simple
to do.

If I may make a suggestion, for the sake of completeness, it would be nice
if your script also searched the vm's boot classpath.

- Paul



Reply via email to