Re: BigInteger Problems

[email protected]
Newsgroups gmane.comp.java.sun.kvm
Message-ID <18672712.245111200587636003.JavaMail.tomcat@sdcst12.sjc.collab.net>
You may be seeing issues related to BigInteger needing java.util.Random and if you use the JAVA SE version of the source Random needs SecureRandom, which requires some sun.security classes.  Which are going to have issues running in a CLDC environment.

But the main issue you will find is that you are trying to include a java.* file into your CLDC jar.  While this may work on the desktop environment or within the WTK even, when you try to put this on a real phone, it will fail due to a security requirement in JavaME.   

This security requirement does not allow you to override any of the internal Java packages.  These packages include java.*  javax.*  sun.*   com.sun.*
No Java implementation that passes the TCK should allow your code or jar files to override any of the files in these packages, and this should include inserting classes into these packages that are not already there.   

You might be able to place BigInteger into another package and recompile.  That might work, but you will have to make sure you do not include any Java SE source that is in any of the above mentioned packages without changing the package to something else, and correcting the imports if needed.   Also look for fully qualified class references and make sure they are pointing to the correct package.

Try to use what is provided as much as possible so if you can get away with the Random that CLDC has use it.  

I guess the haunting question I have is why do you need BigInteger?   :)

Regards, 
-Shawn
[Message sent by forum member 'sfitzjava' (sfitzjava)]

http://forums.java.net/jive/thread.jspa?messageID=254454

===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff KVM-INTEREST".  For general help, send email to
[email protected] and include in the body of the message "help".
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.