• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Double trouble

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am targeting a jeode VM on ipaq, they say :
Jeode is a JVM that is 100% compatible with PersonalJava 1.2 (roughly the development equivalent is JDK 1.1.8).
I am recieving an error when trying to call Double.parseDouble, the message is :
Exception occurred during event dispatching:
java.lang.NoSuchMethodError: java.lang.Float: method parseFloat(Ljava/lang/String F not found
It appears that parseDouble is not supported. Anyone know of a workaround for this.
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not familar with Jeode, but it sounds like you'll probably need to limit yourself to methods listed in the Java 1.1 API. In this case, try
<pre> double d = Double.valueOf(str).doubleValue();</pre>
 
Ian Johnston
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks that did it. I really appreciate it.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic