• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to use bouncycastle in eclipse?

 
Yue Li
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am a newbie in J2ME and I met some problems with bouncycastle
in eclipse. This is the installed software in my machine.
-j2sdk 1.4.2_04
-eclipse 3.0M8
-j2me wireless toolkit 2.1
-eclipseme plug-in 0.3
-bouncycastle (http://www.bouncycastle.org/download/lcrypto-j2me-122.zip)
I wanted to use SHA256 algorithm in my MIDlet, so I wrote:
import org.bouncycastle.crypto.digests.*;
private SHA256Digest digest = new SHA256Digest();
Eclipse didn't say any error on this. But when I ran the
code, I got the following error message:
java.lang.NoClassDefFoundError: org/bouncycastle/crypto/digests/SHA256Digest
I have read some articles in this site and I saw a similar topic,
but that didn't help me much. What's wrong with my code, or
my configuration has some problems?? Is there anyone who met
the same problem as me? Thanks!
 
Jon Eaves
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make sure the zip file is unpacked so that when the MIDlet is created the relevant class files can be included in the MIDlet.
Of course, much of this depends on how you are packaging up your MIDlets, and I'm no expert in the WTK these days.
Cheers,
-- jon
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic