samedi 4 avril 2015

java.lang.SecurityException with reflection

Before you go duplicating this question, I'll explain to you what I know, what I've read other questions, and why this is not working for me.


My goal with this is to implement reflection a java based game that I have the .jar for. I attach it as an external library in my eclipse project.


I am getting the error



java.lang.SecurityException: class "Client"'s signer information does not match signer information of other classes in the same package


on the line



Class clazz = Client.class;


Now as mentioned in other questions. The reason for this error is that I have two referenced libraries that were signed differently? (Perhaps meaning they are compiled with different versions of java?).


The only two libraries I reference are the JRE system (my project is build on 1.7) and the .jar of the game.


Would this error be occurring maybe if the .jar was compiled on 1.6? Should I remake my project as using the JRE 1.6? How can I tell what JRE version the client was compiled with?


Thanks!


Edit: Another thought I had is perhaps the .jar file of the game itself has classes that have different signatures (perhaps to stop reflection). Is this possible?






Aucun commentaire:

Enregistrer un commentaire