This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Creating native binaries using GNU-Crypto
- From: Stefan Prelle <prelle at informatik dot uni-bremen dot de>
- To: java at gcc dot gnu dot org
- Date: 10 Dec 2003 16:29:10 +0100
- Subject: Creating native binaries using GNU-Crypto
- Organization:
- Reply-to: prelle at tzi dot de
Hi,
I'm trying to build a native executable that uses the GNU-Crypto JCE
implementation. I can link against the libraries that were installed by
GNU-Crypto but when I execute the program it fails to load the providers
class.
The code is roughly like this:
Provider prov = (Provider)Class.forName("gnu.crypto.jce.GnuCrypto");
Security.addProvider(prov);
On execution Class.forName fails although the class exists in the shared
library and the corresponding jar-file.
I figured that at compile time the gcj/linker isn't aware that the
program depends on the class. So I modified the code like this:
Security.addProvider(new gnu.crypto.jce.GnuCrypto());
Now on execution the provider is found but when trying to instantiate a
cipher it fails loading the required class - which is the same problem
as before.
So, how can I make the classes of the security provider available for
the Class.forName() method?
Regards,
Stefan