Info
This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: Rust and JNI: unable to call method with Double parameter
Hello everyone,
I'm trying to call java method with 1 double parameters, but got signature exception:
java method:
public void setPrice(Double value)
{
this.price = value;
}
rust side:
let val = JValue::Double(65000.00);
jenv.call_method(&item1, "setPrice", "(Ljava/lang/Double;)V", &[val])
.unwrap();
exception:
called `Result::unwrap()` on an `Err` value: InvalidArgList(TypeSignature { args: [Object("java/lang/Double")], ret: Primitive(Void) })
any ideas what I'm doing wrong?
thanks!
1 post - 1 participant
🏷️ rust_feed