Instantiating Java objects from JavaScript -
i can instantiate java.lang.string
object blank constructor like:
var classstring = obj.getclass().forname ('java.lang.string'); var objectstring = classstring.newinstance();
but when want obtain reference constructor, code:
var array = [classstring]; var constr = classstring.getconstructor (array); objectstring = ">>>>>>>>"; var objectstring2 = constr.newinstance ([objectstring]);
produces empty string if zero-arguments constructor had been called.
the constr
variable points string()
rather string(string tocopy)
how can , call constructors arguments?
Comments
Post a Comment