This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

MathFP Problem  RSS feed

 
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.
 
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
 
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!