This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes help with Locking Java Code to MAC adress Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "help with Locking Java Code to MAC adress " Watch "help with Locking Java Code to MAC adress " New topic
Author

help with Locking Java Code to MAC adress

Todor Vachev
Greenhorn

Joined: Apr 27, 2011
Posts: 2
Hello guys, I used the code to get MAC from another thread in this forum but there's one thing left for me to do, to do what I want to do, much to do's lets get to work



I'm making this program for my cousin but I don't want him to send it to someone else, so I want to make it to work only and only on his PC. This is the whole program.
So basically what I want to do is to make the code inside if ( mac == mac1 ) to work only if mac equals to mac1, how to write his mac inside the program (I want to be the one that's Defining the mac not the program itself I want to write the mac adress inside it, mac1 = 00 00 00 00 00 00) so that the program can compare them and run the code for my small math program and if they are not equal the user gets an Error. Thanks everyone in advance I hope you understood what I want to do
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10175
    
    8

Off my head I can think of two approaches
1) Storing mac1 in a Properties file. This file can be bundled in your application jar.
2) Using Java Web Start and defining mac1 in the JNLP file. (This approach would mean a net connection to your server whenever your cousin wants to use the application. However, in return, you get the flexibility of editing the mac1 any time you want.)


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: help with Locking Java Code to MAC adress
 
Similar Threads
How to allow only some computers to access the web application in internet?
error message
How to lock java app for single PC
Valadation problem!!!!!!
Help with creating GUI Error Messages.