Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

MathFP Problem

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic