JAAS can't read config from JAR
We have an application that uses JAAS for security.
Until now the JAAS config file was in a folder (conf/) and the application just ran fine.
To prepare for the deployment of the application with Webstart I packed the folder with the config file in the application's JAR. Now JAAS can't seem to find the file anymore.
Working:|--application.jar
|--conf/
|--auth.conf
Failing:|--application.jar
|--conf/
|--auth.conf
Both have the same manifest:Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.5
Created-By: 1.5.0_04-b05 (Sun Microsystems Inc.)
Main-Class: com.fpc.nokeos.core.client.launch.Launcher
Class-Path: . conf
I also tried expliciitely adding "conf/auth.conf" to manifest but it didn't work either.
The stacktrace I get is08:57:42,250 - ERROR: [NokeosClientSecurity] Could not connect to the server.
Please check your network connection.
java.lang.SecurityException: conf/auth.conf (No such file or directory)
at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:97)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at javax.security.auth.login.Configuration$3.run(Configuration.java:216)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.Configuration.getConfiguration(Configuration.java:210)
at javax.security.auth.login.LoginContext$1.run(LoginContext.java:237)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.init(LoginContext.java:234)
at javax.security.auth.login.LoginContext.<init>(LoginContext.java:403)
at com.fpc.nokeos.core.client.security.NokeosClientSecurity.login(NokeosClientSecurity.java:46)
at com.fpc.nokeos.core.client.launch.Launcher.checkLogin(Launcher.java:89)
at com.fpc.nokeos.core.client.launch.Launcher.main(Launcher.java:66)
Caused by: java.io.IOException: conf/auth.conf (No such file or directory)
at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:157)
at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:95)
... 16 more
How can I make it work?

