Set Java application to only one computer system

I am working on a project and I want my application to run on only one system!
All I want is that when I transfer my project to one and it will not be able to copy my project and can run on any other computer system. I am working on Java 8 IDE (NetBeans).

thank

+3


source to share


3 answers


if you need a standalone solution you can use any of these functions

Get Hardware Information

but always the best answer is to keep the part of the application inside your own server, when you install the application you can only terminate it for that specific machine.

Two ways

Path number 1



  • create your own web service that will terminate your application functions and when the application uses this web service you need to make sure it is the same computer (by IP, MAC address)

Path number 2

  • during installation, collect hardware information and send it to the server to store it there.
  • then when using any standalone function, you need to ask the server for permission to do so by regenerating the machine information.

Consider that someone might reverse engineer your code, so I always prefer the first way

+3


source


You can ask the client for an address MAC

and include it in your code, and then use java code to get the address of the MAC

computer it is running, and then compare it with the client MAC

originally stored in your program. In case of code mismatch to terminate your program's program. You can find the code to get the MAC ID from the following example. Get system MAC address in Java



+1


source


the short answer is "you can't".

long answer: its almost impossible to restrict your application to one machine - it takes several years of development to develop minor minor restrictions ; just look at all modern games - most of them have some sort of DRM in them, all of which are fast-paced by teenagers .

Now you can read multiple values ​​that might be unique to your system, you can also write and search for multiple specific registry values, but all that won't help you if your user really wants to copy your application, even clone the OS and write it the hard drive of a second computer is currently no problem.

tl; dr: if you really need to implement a working DRM ... well ... you won't get far from java, which requires very complex, native code. With java, the best you can do is obfuscate your code - only paid hackers can hack a well-obfuscated java application, and they also won't have the difficult hack of your native application.

0


source







All Articles