I've been fiddling with the Java support lately, and it appears that while the Java bridge has no real documentation, it's pretty full featured. That said, I'm trying to get a feel for the limitations, and ran into one that just doesn't seem right:
if I create a new java array of any type other than string, I can't assign values to it:
example using string:
import Java; object t=machine->find_class("java/lang/String"); object o=pkg["java/lang/reflect/Array"]->newInstance(t, 5); o[0]="foo"; o[1]="bar";
works just fine, but this example using integers doesnt:
import Java; object t=machine->find_class("java/lang/Integer"); object o=pkg["java/lang/reflect/Array"]->newInstance(t, 5); o[0]=12; o[1]=5;
incompatible types passed to method. jvm.c:3550: jvm.c:3550()->`[]=(0,1) /usr/local/pike/7.4.20/lib/modules/Java.pmod:301: Java.jarray()->`[]=(0,1) test.pike:7: test()->main()
Any ideas? I had been using java the manual way by manually connecting methods, and it worked fine using Array.set() (admittedly a different technique).
Thanks!
Bill