将处理代码发布到网站上?
我已将一些处理代码(将传感器数据输出到文本框)导出到 包含 .jar 和 .html 文件的小程序。我尝试将此 html 插入 我创建的简单网站和 java applet 不起作用。我必须以某种方式 修改html?我知道 .jar 文件已经位于同一目录中并且 在导出的 html 代码中适当引用。有更好的方法吗 发布到网站?谢谢
I have exported some Processing code (outputs sensor data to a textbox) to an
applet that includes the .jar and .html files. I have tried to insert this html on a
simple website that I created and the java applet doesn't work. Do I have to somehow
modify the html? I know that the .jar files are already in the same directory and
are referenced appropriately in the exported html code. Is there a better approach
to posting to a website? Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
由于小程序通信的安全限制,我认为这是不可能的。
I don't think that it is possible, due to security restrictions on applet communication.
您很可能必须使用套接字编写一个小型客户端/服务器程序。
这个想法是将本地运行的客户端应用程序的输出传输到小程序(服务器),小程序(服务器)将接收并显示数据。
显然,您可以使用任何支持套接字的语言(Flash、PHP 等),但我认为您会想坚持使用 Java。
More than likely you will have to write a small client/server program using sockets.
The idea would be to transmit the the output from your locally running client application to your applet(server) which would receive and display the data.
You could use any language with socket support obviously(Flash, PHP, etc.), but I assume you will want to stick with Java.