How to instantiate/call java class with parameter from PHP?

自作多情 提交于 2019-12-08 21:44:38

Here is an example of how java.util.Date object is instantiated, with some constructor arguments:

$date = new Java("java.util.Date", 70, 9, 4);

Further, it says:

The new Java("java.util.Date", 70, 9, 4) call creates a new instance of the java.util.Date class using the java.util.Date(int year, int month, int day) constructor.

So, you could maybe try this:

$myObject = new Java("net.sf.jasperreports.engine.export.JRXlsExporter", param1, param2);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!