如何在HTML中调试嵌入式JavaFX?

时间:2015-07-19 07:27:16

标签: html debugging javafx

我正在寻找如何在HTML中调试嵌入式JavaFX。而且,我尝试用HTML远程调试嵌入式JavaFX。

我将jvmargs放在dtjava.embed个参数中,但它不起作用。

<script>
function javafxEmbed() {
    dtjava.embed(
        {
            url : 'WebFX.jnlp',
            placeholder : 'javafx-app-placeholder',
            width : 800,
            height : 600,
            jnlp_content : 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxqbmxwIHNwZWM9IjEuMCIgeG1sbnM6amZ4PSJodHRwOi8vamF2YWZ4LmNvbSIgaHJlZj0iV2ViRlguam5scCI+DQogIDxpbmZvcm1hdGlvbj4NCiAgICA8dGl0bGU+V2ViRlg8L3RpdGxlPg0KICAgIDx2ZW5kb3I+emlwZG9yeXVuZzwvdmVuZG9yPg0KICAgIDxkZXNjcmlwdGlvbj5udWxsPC9kZXNjcmlwdGlvbj4NCiAgICA8b2ZmbGluZS1hbGxvd2VkLz4NCiAgPC9pbmZvcm1hdGlvbj4NCiAgPHJlc291cmNlcz4NCiAgICA8ajJzZSB2ZXJzaW9uPSIxLjYrIiBocmVmPSJodHRwOi8vamF2YS5zdW4uY29tL3Byb2R1Y3RzL2F1dG9kbC9qMnNlIi8+DQogICAgPGphciBocmVmPSJXZWJGWC5qYXIiIHNpemU9IjI1NTQiIGRvd25sb2FkPSJlYWdlciIgLz4NCiAgPC9yZXNvdXJjZXM+DQogIDxhcHBsZXQtZGVzYyAgd2lkdGg9IjgwMCIgaGVpZ2h0PSI2MDAiIG1haW4tY2xhc3M9ImNvbS5qYXZhZngubWFpbi5Ob0phdmFGWEZhbGxiYWNrIiAgbmFtZT0iV2ViRlgiID4NCiAgICA8cGFyYW0gbmFtZT0icmVxdWlyZWRGWFZlcnNpb24iIHZhbHVlPSI4LjArIi8+DQogIDwvYXBwbGV0LWRlc2M+DQogIDxqZng6amF2YWZ4LWRlc2MgIHdpZHRoPSI4MDAiIGhlaWdodD0iNjAwIiBtYWluLWNsYXNzPSJ3ZWJmeC5XZWJGWCIgIG5hbWU9IldlYkZYIiAvPg0KICA8dXBkYXRlIGNoZWNrPSJhbHdheXMiLz4NCjwvam5scD4NCg=='
        },
        {
            javafx : '8.0+',
            jvmargs:"-Djavafx.verbose=true -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=1044"
        },
        {}
    );
}
<!-- Embed FX application into web page once page is loaded -->
dtjava.addOnloadCallback(javafxEmbed);

有没有办法在HTML中调试嵌入式JavaFX?

1 个答案:

答案 0 :(得分:0)

-Djavafx.verbose = true -agentlib:jdwp = transport = dt_socket,server = y,suspend = n,address = 1044

将此代码放入 <控制面板> Java&gt; Java选项卡&gt;查看按钮&gt;用户标签&gt;运行时参数

然后可以连接远程调试。