Hi, I've written an SWT app that uses JCE and BouncyCastle (from
bouncycastle.org) to do encryption. The app runs fine from within Eclipse
3.2... (I already included the JCE policy files from Sun into the java
security lib. And, modified the list of security providers)
I am now trying to deploy the app, I exported to a jar file using the
excellent 'Fat Jar' plug-in which deploys all the required jar files into
one jar. I also deployed the swt.dll to the directory I'm running from,
and the app runs fine...
Until I try to do the encryption. Then the error occurs (see below). I've
checked the jre is the one where I have made the modifications to the
security lib, so it should find the security provider just as it does when
running from within Eclipse... any ideas?
Thanks in advance
tomas
Here's the error I get:
java.io.IOException: error constructing MAC:
java.security.NoSuchProviderException: JCE cannot authenticate the
provider BC
at
org.bouncycastle.jce.provider.JDKPKCS12KeyStore.engineLoad(Unknown Source)
at java.security.KeyStore.load(Unknown Source)
at encrypt.Encryptor.getButtonEncryptionValue(Encryptor.java:77)
at
encrypt.ButtonEncryption.encryptButtonItems(ButtonEncryption.java:182)
at ui.View$2.widgetSelected(View.java:294)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
at ui.View.main(View.java:101)