在我的应用程序中,我使用java Live connect api在浏览器中加载javafx应用程序,并使用http://docs.oracle.com/javafx/2/deployment/deployment_toolkit.htm中提到的dtjava.js通过jsp访问fx应用程序。 参考fx应用程序(Id =“app”)我正在使用html / javascript按钮访问fx主类方法
function javafxEmbed() {
dtjava.embed(
{
url : 'abc.jnlp',
placeholder : 'javafx-app-placeholder',
id:'app',
width : 550,
height : 344,
jnlp_content : 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxqbmxwIHNwZWM9IjEuMCIgeG1sbnM6amZ4PSJodHRwOi8vamF2YWZ4LmNvbSIgaHJlZj0iRWNhcHR1cmVfVGhpY2tDbGllbnRfV2ViLmpubHAiPg0KICA8aW5mb3JtYXRpb24+DQogICAgPHRpdGxlPkVjYXB0dXJlX1RoaWNrQ2xpZW50X1dlYjwvdGl0bGU+DQogICAgPHZlbmRvcj5yYWp1LnQ8L3ZlbmRvcj4NCiAgICA8ZGVzY3JpcHRpb24+U2FtcGxlIEphdmFGWCAyLjAgYXBwbGljYXRpb24uPC9kZXNjcmlwdGlvbj4NCiAgICA8b2ZmbGluZS1hbGxvd2VkLz4NCiAgPC9pbmZvcm1hdGlvbj4NCiAgPHJlc291cmNlcz4NCiAgICA8amZ4OmphdmFmeC1ydW50aW1lIHZlcnNpb249IjIuMisiIGhyZWY9Imh0dHA6Ly9qYXZhZGwuc3VuLmNvbS93ZWJhcHBzL2Rvd25sb2FkL0dldEZpbGUvamF2YWZ4LWxhdGVzdC93aW5kb3dzLWk1ODYvamF2YWZ4Mi5qbmxwIi8+DQogIDwvcmVzb3VyY2VzPg0KICA8cmVzb3VyY2VzPg0KICAgIDxqMnNlIHZlcnNpb249IjEuNisiIGhyZWY9Imh0dHA6Ly9qYXZhLnN1bi5jb20vcHJvZHVjdHMvYXV0b2RsL2oyc2UiLz4NCiAgICA8amFyIGhyZWY9IkVjYXB0dXJlX1RoaWNrQ2xpZW50X1dlYi5qYXIiIHNpemU9IjcxMDM5IiBkb3dubG9hZD0iZWFnZXIiIC8+DQogICAgPGphciBocmVmPSJsaWIvamFpLWNvcmUtMS4xLjMtYWxwaGEuamFyIiBzaXplPSIxMzcwODIyIiBkb3dubG9hZD0iZWFnZXIiIC8+DQogICAgPGphciBocmVmPSJsaWIvamFpX2NvZGVjLTEuMS4zLWFscGhhLmphciIgc2l6ZT0iMTg5MDExIiBkb3dubG9hZD0iZWFnZXIiIC8+DQogICAgPGphciBocmVmPSJsaWIvamFpX2ltYWdlaW8tMS4xLWFscGhhLmphciIgc2l6ZT0iODAzMzQ1IiBkb3dubG9hZD0iZWFnZXIiIC8+DQogIDwvcmVzb3VyY2VzPg0KPHNlY3VyaXR5Pg0KICA8YWxsLXBlcm1pc3Npb25zLz4NCjwvc2VjdXJpdHk+DQogIDxhcHBsZXQtZGVzYyAgd2lkdGg9IjgwMCIgaGVpZ2h0PSI2MDAiIG1haW4tY2xhc3M9ImNvbS5qYXZhZngubWFpbi5Ob0phdmFGWEZhbGxiYWNrIiAgbmFtZT0iRWNhcHR1cmVfVGhpY2tDbGllbnRfV2ViIiA+DQogICAgPHBhcmFtIG5hbWU9InJlcXVpcmVkRlhWZXJzaW9uIiB2YWx1ZT0iMi4yKyIvPg0KICA8L2FwcGxldC1kZXNjPg0KICA8amZ4OmphdmFmeC1kZXNjICB3aWR0aD0iODAwIiBoZWlnaHQ9IjYwMCIgbWFpbi1jbGFzcz0iZWNhcHR1cmVfdGhpY2tjbGllbnRfd2ViLkVjYXB0dXJlX1RoaWNrQ2xpZW50X1dlYiIgIG5hbWU9IkVjYXB0dXJlX1RoaWNrQ2xpZW50X1dlYiIgLz4NCiAgPHVwZGF0ZSBjaGVjaz0iYWx3YXlzIi8+DQo8L2pubHA+DQo='
},
{
javafx : '2.2+'
}
);
app.methodname()直到它没事。
但如果访问
,我无法访问这些方法JSONArray array = new JSONArray();
(所有jar都已登录) 从broser html按钮访问json jars(json-lib-2.3-jdk15.jar)或org.apache.commons.httpclient.jar时,我遇到了问题。
在java调试控制台中获取
之类的respnse任何Suggessions?