Skip to content

Tag: security

How to prevent reflection access only to certain classes

I am developing some licensing code, so I would like to avoid access to one or two classes through reflection. I have tried implement a SecurityManager but with no success. I found that another option would be to define my own policy file but that requires me to set it on JVM launch, and that defeats my purpo…

SSL Java java.io.IOException: Invalid keystore format

I am testing SSL in java with SSLServerSocket and other classes in the java.ssl package. When I run the following code, I get the exception java.io.IOException: Invalid keystore format. My code: File key.txt: 1268312345812304612348712634283427346 I am guessing I should put something else in the key.txt file, …