Did you set the System property java.security.auth.login.conf to the path of the auth.conf?
Sorry I meant java.security.auth.login.config
Well, yes.... :-)
-maybe it's just because I don't know how to make a relative reference to a file inside a jar-file
I've tried all variations of "file:auth.conf" - with or without slashes...
Any help would be greatly appreciated... :-)
Well you can use
java -Djava.security.auth.login.config=jar:file://test.jar!/auth.conf -jar test.jar
note that the "!" is important..
Thank you very much!!!
I had a feeling that it was just a question of the reference...
That didn't solve my problem...
What I need is to pack _everything_ in one executable jar-file - for download...
So I need to set the system-property (java.security...) programmatically inside...
Is it at all possible?
well what you can do is to use System.setProperty( java.security.. ) or write your own configuration as a java class. You have to extend javax.security.auth.login.Configuration and override the methods. Before you create a LoginContext, you have to call the static method Configuration.setConfiguration( yourConf ). This way you don't need the auth.conf.
I tried it and it works fine!
Thanks a lot!