• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MathFP Problem

 
Helena Ma
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I tried to use MathFP with Sun One Studio 4 ME and encountered a problem. Your help is highly appreciated.

My program compiled alright. But when I ran it, I got the following error message:

"Error verifying method net/jscience/math/kvm/MathFP setPrecision(I)I
Approximate bytecode offset 3: Inconsistent or missing stackmap at target
ALERT: Error verifying class net/jscience/math/kvm/MathFP"

What I did was: downloading MathFP 2.0.6, making a mathfp.jar, mounting the jar into Sun Studio by using "Filesystems->Mount->Archive(Jar,Zip)". Then in my code, I imported the library using "import net.jscience.math.kvm.MathFP;".

What did I miss? Any advice is greatly appreciated. Many thanks in advance.
 
Phoum Lib
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I didn't use MathFP but the kind of error specified is certainly due to the fact that you didn't "preverify" MathFP when the mathfp.jar file was created.
It can solve your problem if you recreate the jar file with the preverify command.
 
Helena Ma
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Phoum,

You are absolutely right. I got it working after I preverified the class files. Thank you. By the way, I had to download MIDP and use command line to preverify. Can I do it via Sun One ME somehow?

Helena
 
Gibson Tang
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Helena.I have just started using Sun Mobile IDE with MathFP.How do you generate the jar file using the IDE?I've tried using File->New->Jar Packager->Jar Recipe and i got a file with the extension of .JarContent instead?

What is the command line that you use to preverify the mathFP jar file?Many thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic