Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help with Locking Java Code to MAC adress

 
Todor Vachev
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11178
15
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic