- Goal: In JRuby, run and load a Java JAR that is compiled against bcprov 1.5
As currently configured, this project will load and run
(see bouncy_castle_client.rb
). However, if the version of BouncyCastle that is
bundled with JRuby (1.4.7) is loaded (see bouncy_castle_collision.rb
), the project fails to load the JAR correctly.
Instructions:
set_up_files.sh # Github gists don't allow directories
mvn package
ruby bouncy_castle_client.rb # ok
ruby bouncy_castle_collision.rb # errors
Ideally, JRuby would be a little more modular and allow you to include a later version of BouncyCastle.
I think that's probably going to be the only way you can get this to work, short of some heroics with a custom ClassLoader.
Fixing JRuby might actually be fairly easy. It looks like the only explicit deps in the stock classes are in
openssl/pkcs12.rb
, though there appear to be a few Java incompatibilities deeper down. (Some 3rd party JRuby libs may depend on older BC library versions, though I doubt it.)