It's not a secret anymore!
The moose likes Java in General and the fly likes Double trouble Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Double trouble" Watch "Double trouble" New topic

Double trouble

Ian Johnston

Joined: Dec 07, 2001
Posts: 2
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.
Jim Yingst

Joined: Jan 30, 2000
Posts: 18671
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>

"I'm not back." - Bill Harding, Twister
Ian Johnston

Joined: Dec 07, 2001
Posts: 2
Thanks that did it. I really appreciate it.
I agree. Here's the link:
subject: Double trouble
It's not a secret anymore!