bug with .bshrc and BeanShell Desktop console

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

bug with .bshrc and BeanShell Desktop console

btknorr
 
Hello there,
 
We found a bug in using the .bshrc file.  We use this file to set up our Java imports when we run the Beanshell Desktop console - this way we don't have to always retype all the imports.
 
We have an import that includes classes with names like "TextField", "Button", etc.  The problem is that BeanShell seems to override these imports from the .bshrc with java.awt classes of the same name.  So we end up with class cast exceptions.  If we manually type the import on the BeanShell prompt everything begins to work.  But again the purpose of using the .bshrc is to avoid this manual typing.
 
Is there any workaround to this?  Or a way to preload the BeanShell environment besides using the .bshrc file?
 
Any help is greatly appreciated...thanks,
 
Brian
Reply | Threaded
Open this post in threaded view
|

Re: bug with .bshrc and BeanShell Desktop console

Wade Chandler-6
--- Brian Knorr <[hidden email]> wrote:

> Hello there,
>
> We found a bug in using the .bshrc file.  We use
> this file to set up our
> Java imports when we run the Beanshell Desktop
> console - this way we don't
> have to always retype all the imports.
>
> We have an import that includes classes with names
> like "TextField",
> "Button", etc.  The problem is that BeanShell seems
> to override these
> imports from the .bshrc with java.awt classes of the
> same name.  So we end
> up with class cast exceptions.  If we manually type
> the import on the
> BeanShell prompt everything begins to work.  But
> again the purpose of using
> the .bshrc is to avoid this manual typing.
>
> Is there any workaround to this?  Or a way to
> preload the BeanShell
> environment besides using the .bshrc file?
>
> Any help is greatly appreciated...thanks,
>
> Brian
>

Are you classes in packages?

Wade


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users
Reply | Threaded
Open this post in threaded view
|

Re: bug with .bshrc and BeanShell Desktop console

btknorr
Yes...for example in our .bshrc we something like the following:
 
import com.sabre.htmlelements.*;
 
- this package has classes with names like Button, TextField, etc.
 
When you start up BeanShell Desktop console and try to use the them you get a class cast exception with the java.awt classes like java.awt.Button
 
Other imports we include in the .bshrc work just fine.
 
Thanks,
 
Brian

 
On 5/16/06, Wade Chandler <[hidden email]> wrote:
--- Brian Knorr <[hidden email]> wrote:

> Hello there,
>
> We found a bug in using the .bshrc file.  We use
> this file to set up our
> Java imports when we run the Beanshell Desktop
> console - this way we don't
> have to always retype all the imports.
>
> We have an import that includes classes with names
> like "TextField",
> "Button", etc.  The problem is that BeanShell seems
> to override these
> imports from the .bshrc with java.awt classes of the
> same name.  So we end
> up with class cast exceptions.  If we manually type
> the import on the
> BeanShell prompt everything begins to work.  But
> again the purpose of using
> the .bshrc is to avoid this manual typing.
>
> Is there any workaround to this?  Or a way to
> preload the BeanShell
> environment besides using the .bshrc file?
>
> Any help is greatly appreciated...thanks,
>
> Brian
>

Are you classes in packages?

Wade


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users