how can i make beanshell recognize changes to file?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

how can i make beanshell recognize changes to file?


i have added bouncy castle's jce (java cryptography extension) provider to both [java_home]/jre/lib/security/ and C:/Program Files/Java/jre1.5.0_06/lib/security/


all seems well. i can successfully instantiate, initialize and update bouncy castle jce implementations from my regular java apps that are built and ran in my ide.

my problem is with beanshell. i add the bouncy castle jars to beanshell's classpath (addClassPath(...)). but, beanshell hasn't been updated with the security provider added to the files.

from within a beanshell shell, javax.crypto.Cipher.getInstance("DES/CBC/PKCS5Padding", "BC")  throws:

Target exception: No such provider: BC No such provider: BC
        at javax.crypto.Cipher.getInstance(DashoA12275)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.lang.reflect.Method.invoke(
        at bsh.Reflect.invokeMethod(Unknown Source)
        at bsh.Reflect.invokeStaticMethod(Unknown Source)
        at bsh.Name.invokeMethod(Unknown Source)
        at bsh.BSHMethodInvocation.eval(Unknown Source)
        at bsh.BSHPrimaryExpression.eval(Unknown Source)
        at bsh.BSHPrimaryExpression.eval(Unknown Source)
        at Source)
        at bsh.Interpreter.main(Unknown Source)
from within a beanshell shell, Security.getProviders() returns only the factory-loaded providers (ignoring the bouncy castle provider that i added to the file).

  SUN version 1.5
  SunRsaSign version 1.5
  SunJSSE version 1.5
  SunJCE version 1.5
  SunJGSS version 1.0
  SunSASL version 1.5

please, can anybody fill me on on what i need to do to make beanshell recognize the security provider changes i made to my system's files?

thanks in advance for your replies.