webusb / arduino

WebUSB demos running on Arduino (and compatible) hardware.
566 stars 152 forks source link

Support for java #55

Closed newUserRepo closed 5 years ago

newUserRepo commented 5 years ago

HI,

Support for java, would it be possible? there are many ways to create a web app with java and use the connection driver such as jssc alexey sokolov local, but when the app is hosted on a remote server, as it would be possible to access the port from the browser ?

good job greetings

reillyeon commented 5 years ago

Code that runs in the browser is written in JavaScript (or Web Assembly). Code that runs on the server can be written in any language but I think you are specifically talking about server-side Java. There are some frameworks that allow you to translate Java into JavaScript so that you can share code between the client and server. In that case then yes, you should be able to use any API exposed to JavaScript in your translated Java code assuming that the translator supports it. This includes APIs like WebUSB which is what is used in these examples.