0

I have a jar file project build from Spring framework with hibernate but I don't want other pc execute my jar file. I want my jar file work only the pc that I want to run. Anyone have any idea ?

dara chan
  • 1
  • 4

1 Answers1

0

There's no way to prevent a program from running on another computer. Anyone determined and skilled enough could bypass protections.

However if you're not worried about this you can check for certain computer-specific settings such as the MAC address and kill the program if they're not what you expect them to be. This approach would be obvious to anyone with a decompiler though. To make this more complex and harder to bypass you can encrypt your jar file with a key generated from the MAC address and have it decrypted at runtime. This would make it much harder to execute unless the person who runs the program knows your information.

Community
  • 1
  • 1
Display Name
  • 942
  • 1
  • 10
  • 20