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

Popular posts from this blog

php - Magento - Deleted Base url key -

javascript - Tooltipster plugin not firing jquery function when button or any click even occur -

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -