Article View: pl.comp.lang.java
Article #142007Re: j2me i szyfrowanie
From: pz
Date: Fri, 31 Oct 2008 00:17
Date: Fri, 31 Oct 2008 00:17
33 lines
2533 bytes
2533 bytes
>>> Running in the unidentified_third_party security domain
>>> java.lang.NoClassDefFoundError: java/math/BigInteger: Cannot create
>>> class in system package
>>
>> No, wygląda na to, że nie znalazł klasy java.math.BigInteger. A takiej w
>> MIDP nie ma. Zresztą podana strona mówi:
>>
>> "Also note at the time of this writing that some version of Bouncy
>> Castle Crypto API is not compiled for MIDP 2.0. When you tried to
>> compile this example with Bouncy Castle Crypto API, you may get errors.
>> (Some of the test classes use some classes not available to J2ME which
>> is only available to J2SE) In that case, you may try other versions of
>> the API to eliminate this problem."
>>
> BouncyCastle zawiera te klasę.
> Jest dołączona import
> Po za tym nie skompilowało by się.
Po pierwsze, do czego w midlecie potrzebna ci ta linia :
BigInteger bigInt = new BigInteger("199999");
A po drugie, jak chcesz używać klas z core java to użyj obfuscatora np
Proguarda coby zmienił nazwę klasy i będzie hulać.
Np w WTK przed skompilowaniem podmień 2 linie w pliku
C:\WTK23\wtklib\Windows\ktools.properties
obfuscator.runner.class.name: com.sun.kvem.ktools.RunPro
obfuscator.runner.classpath: wtklib\\ktools.zip
na
obfuscator.runner.class.name: proguard.wtk.ProGuardObfuscator
obfuscator.runner.classpath: C:\\proguard.jar
zakładając, że umieściłeś proguard.jar w C:\
piter
Technical Details
Message-ID:
<gedirg$il3$1@news.onet.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.nask.pl!news.nask.org.pl!news.onet.pl!not-for-mailReferences:
<geaik2$qiu$2@nemesis.news.neostrada.pl> <geat44$b65$1@news.onet.pl> <gebmr7$a9o$3@nemesis.news.neostrada.pl> <gebq6o$de2$1@atlantis.news.neostrada.pl> <gec4ah$8on$1@atlantis.news.neostrada.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.nask.pl!news.nask.org.pl!news.onet.pl!not-for-mail From: "pz" <pz1974@op.pl> Newsgroups: pl.comp.lang.java Subject: Re: j2me i szyfrowanie Date: Fri, 31 Oct 2008 01:17:46 +0100 Organization: Onet.pl Lines: 36 Message-ID: <gedirg$il3$1@news.onet.pl> References: <geaik2$qiu$2@nemesis.news.neostrada.pl> <geat44$b65$1@news.onet.pl> <gebmr7$a9o$3@nemesis.news.neostrada.pl> <gebq6o$de2$1@atlantis.news.neostrada.pl> <gec4ah$8on$1@atlantis.news.neostrada.pl> NNTP-Posting-Host: static-ip-87-248-89-223.promax.media.pl X-Trace: news.onet.pl 1225412272 19107 87.248.89.223 (31 Oct 2008 00:17:52 GMT) X-Complaints-To: usenet@news.onet.pl NNTP-Posting-Date: Fri, 31 Oct 2008 00:17:52 +0000 (UTC) X-Sender: La3D/OZnz5joIhAIxSImDg== X-RFC2646: Format=Flowed; Original X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-Priority: 3 X-MSMail-Priority: Normal X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit