I have a java applet, I want to make sure that nobody use it outside a specific url. How can I achieve that?
The applet connects to a Java server for data exchange. I want to check on the server side the page url that contains the applet. Is that possible?
You can’t.
You can make it less easy.
Plain Java is trivially decompiled and manipulated by any decent developer. Even after obfuscation, it wouldn’t be very difficult to circumvent any protection; changing “boolean checkAppletOrigin()” to always return true is not very difficult.
Think about what you are trying to achieve, and you might be able to find an alternative solution.