简体   繁体   English

Java Applet:我可以通过串行方式与服务器通信吗?

[英]Java applet: Can I communicate over serial with the server?

I have written a java application using Processing that communicates with an Ardunio over serial. 我已经使用处理程序编写了一个Java应用程序,该程序通过串行与Ardunio通信。 It works fine when run from the compiler, but I wish to turn it into an applet. 从编译器运行时,它工作正常,但我希望将其转换为applet。 When running the applet(as is) in a browser it just goes to a white box. 在浏览器中运行applet时,它只是转到一个白框。 I have tried self signing the applet already but I know my problem isn't that I am trying to access the computer looking at the applet, I am trying to get to the server the applet was downloaded from. 我已经尝试过对小程序进行自我签名,但是我知道我的问题不是我要访问查看小程序的计算机,而是尝试访问从中下载小程序的服务器。

Summary, how can an java applet communicate with a serial port on my server? 总结,Java小程序如何与服务器上的串行端口通信? (Linux 10.04 operating system) All solutions will be acceptable, but I need them all linked to an applet. (Linux 10.04操作系统)所有解决方案都是可以接受的,但是我需要将它们都链接到applet。 IE: Serial>Intermediate solution>Applet IE:串行>中间解决方案> Applet

Hope you can help! 希望能对您有所帮助!

http://henrypoon.wordpress.com/2011/01/01/serial-communication-in-java-with-example-program/ http://henrypoon.wordpress.com/2011/01/01/serial-communication-in-java-with-example-program/

check this out. 看一下这个。 i used it as a "template" to create my own jar program which communicates with an arduino device via serial. 我用它作为“模板”来创建我自己的jar程序,该程序通过串行与arduino设备进行通信。 it will need some tweaking but if you understand it you will be able to do your thing. 它需要一些调整,但是如果您了解它,就可以做您的事情。 and that comes from someone with close to zero knowledge of java 那来自对Java知识几乎为零的人

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM