This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Creating native binaries using GNU-Crypto


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]