• Post Reply Bookmark Topic Watch Topic
  • New Topic

WebSocket Echo

 
Richard Bones
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

My apologies if this is the wrong forum, Im not sure where I should be posting this.

I've created a script in NetBeans based upon the websocket sample that they include. When running it in Netbeans, everything communicates with my server correctly and it returns the correct information.

My question is - How do I create an executable / .jar file from this that I can share with / install on other PC's?

I've tried following the tutorials, but nothing seems to be created that works outside of NetBeans and I do not want to be installing Netbeans on every PC so that it can run!

Any help would be much appreciated.

Thanks
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

NetBeans is an IDE - it has no role in deploying a web app. You're apparently using it to run the deployed application, but as you have found, that only works during development. You should install the web app on a servlet container where all users can get at it.

Or what do you mean by "How do I create an executable / .jar file from this that I can share with / install on other PC's?" - are those other PCs clients of your web app, or what exactly do you intend to "distribute"? What is the intended use case here?
 
Richard Bones
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thanks for the welcome and quick reply.

The script is to be used to talk with credit card machines. The people who have supplied the machines, have said they only communicate using websocket.

So we need to capture the information when entered on the machine as a string (which the payment software creates), send that information via the websocket echo script to their server for them to confirm everything matches and then we receive the echo back to confirm if everything is OK.

Each credit card machine is unique to each PC, so we need the script on each PC to be able to send the string

Thanks
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By "credit card machine", do you mean CC reader? How is that connected to the PCs in question so that it can be reached via HTTP? Or is "their server" an HTTP server they run someplace? And what is the application on the PC that is supposed to communicate with that server - a desktop app? Written in Java?

And lastly, if those readers come from a 3rd party, shouldn't they have dev kit, or at least some documentation, that demonstrates all this?
 
Richard Bones
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

By credit card machine, I mean one like you use in a shop to make a payment on and they are connected to the PC via USB.

The software that comes with the machines, which creates the string, all works fine, and you can manually accept decline payments ect using this - however we need to be able to check with that it is all OK and the card is not declined/stolen etc. I have to admit i do not know how this was written

We have been trying for the past two months to sort this out with them, unfortunately nobody seems to know what to do - it appears all the software has been written by third parties for them and they don't know how it all works so cannot provide any help on getting it working (and this is a department in a bank!)

SO we are working blind as such - having never written anything in Java before

Thanks

 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In that case, are you sure Java is the way to go? It sounds like this piece of software needs to integrate somehow with the software already running on the PC - it is not clear that using Java would be feasible in that case.

If this was my project, before I'd do any more development on a system that uses components that do not seem to be supported, my first step would be to ensure I could get the support I needed. Anything else is just flying blind, quite possibly into dead ends.
 
Richard Bones
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I know what you mean - the only thing they have provided us to set this up is a document that says we need to use a java script ( to grab the string created and send the info via websocket.

As I say, it all works - but only if NetBeans is running - I just need to know the best way of packaging it up so I can deploy it on other machines without having to use/install netbeans on them all

Regards
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!