short answer : "you cant".
long answer : its nigh-impossible to restrict your application to one single machine - it takes years of development to be able to implement minor machine-restrictions; just look at all the modern games -- most of them have some kind of DRM in them, all of which get cracked swiftly by teenagers.
Now : you could read a few values which might be unique to your system, you can also write & search a few specific registry-values - but all that wont help you if your user really wants to copy your app, even cloning an OS and writing it onto the HDD of a second computer is no problem nowadays.
tl;dr : if you actually need to implement working DRM ... well ... you wont get far with java, that requires very complex, native code. With java, the best you can do is obfuscating your code - only paid crackers are able to crack a well-obfuscated java-application and those will also have no hard time cracking your native application.