• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to provide internet connection to swing

 
Sanurag Dharme
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created a software in swing and now I want to provide security to it. And I want to do it following manner
1. I will provide product key with software to client
2. When client will try to install software in his pc/laptop he will enter product key
3. The validation part of product key i.e. whether the product key is available or not is going to happen in my laptop
4. i.e. my laptop will serve as server and client's laptop will serve as client
5. Just like while installing antivirus we need internet connection, the same thing I want to apply to my software.
But I don't know how this work means how client is going to access server. So please help me
 
Henry Wong
author
Sheriff
Posts: 22529
109
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Socket and networking forums added -- as this is probably closer to the issue at hand.

Henry
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sanurag Dharme wrote:I have created a software in swing and now I want to provide security to it....
But I don't know how this work means how client is going to access server. So please help me

You are confusing things. Your swing software had got nothing to do with the problem you described, but the installed.
So lets start at the basics. How will your customer install your software. Are you using something like installshield?
 
Sanurag Dharme
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created a registrationform in swing, when the user is going to click on the app for first time the registration form is going to appear which contain product key and license key as textfield. After user is entering product key in the backend it will check whether the entered product key is correct or not if correct then it will display license key in dialog box. And what I want is the whole validation should work on my laptop's database.

If not understand please ask but help me
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I am your client how will I access your application?
Copy your self-executable jar file? Java Web Start? Run some installation application which will install your jar file on my machine?
 
Sanurag Dharme
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

If I am your client how will I access your application?
Copy your self-executable jar file? Java Web Start? Run some installation application which will install your jar file on my machine?

I am going with this one :-
Run some installation application which will install your jar file on my machine
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sanurag Dharme wrote:
Run some installation application which will install your jar file on my machine

Sigh. That's what I was asking you here
Maneesh Godbole wrote:
So lets start at the basics. How will your customer install your software. Are you using something like installshield?


When your application comes,
1) Check if the license key was provided before (I recommend using preferences API)
2) If it does not exist, prompt for one
3) Send it to server for validation
4) If validated, store the key and let the user access the full blown application
5) If not, prompt the user accordingly.

You mentioned server running on your laptop. For this to work
1) Your laptop must be accessible over the network to all your clients
2) Your laptop must be running an application which will do the authentication.

On this background, which area are you having trouble
1) How to communicate with the server?
2) How to authenticate?
3) Anything else?
 
Sanurag Dharme
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having trouble with how to communicate with the server as my application is offline application. Only registration or say installation part I want it as online so that client from anywhere like any city is going to access my database just for validation of product key...
thank you in advance
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sanurag Dharme wrote:I am having trouble with how to communicate with the server as my application is offline application. Only registration or say installation part I want it as online so that client from anywhere like any city is going to access my database just for validation of product key...
thank you in advance

If you want to authenticate, it has to be online. No other way about it.
Regarding the actual communication between client/server check out http://www.coderanch.com/t/344606/GUI/java/Send-Http-request-Swing-GUI
 
Sanurag Dharme
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey thanks i will try and will get back to you
 
Henry Wong
author
Sheriff
Posts: 22529
109
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

The other possible issue is related to the fact that both the server and client are laptops. Laptops are generally for users -- and user computers are generally not directly on the internet.

I am willing to bet that the laptops are in private networks, which open another can of worms regarding port forwarding, firewalls, etc. etc.

... but I guess the OP can deal with it, once the OP encounters the issue.

Henry
 
Sanurag Dharme
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my case, I want my laptop as server and 3 out of 5 clients are using computer and remaining laptop...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!