I'm currently working with J2me by Mobile Tools for Java (MTJ) on Eclipse. My program need to encrypt SMS messages by RSA so i try to use bouncycastle library. I download bouncycatle version 1.47 and add to to my buildpath. No problem occurs when building project. But when i try to run on emulator, i get this error:
TRACE: <at java.lang.NoClassDefFoundError: org/bouncycastle/crypto/engines/RSAEngine>, startApp threw an Exception
It's a common problem, NoClassDefFound. To solve this, i know i must include the class file of bouncycastle in classpath. But here come the problem, i cant pack bouncycastle class file into the jar which MTJ created. For regular project, all i need to do is tick on the checkbox in "Order and Export" tab to have all class files in the "ticked" referenced library packed in to output jar. I do the same here but after i create package, i check the new jar file and no class of bouncycastle is inside (check using WinRar).I did some I'm using Eclipse Indigo Release 2, build-id: 20120216-1857, MTJ version 1.1.2. I also tried to create package by eclipse Pulsar 1.3.1 but the problem still persists. Is there any suggestion? is this a bug?
Regards.