the login.config is at the root of the resouces dir. so use the class's classload to get the resource.

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@358602 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2005-12-22 18:20:51 +00:00
parent 3621f25504
commit bd17e0385f
1 changed files with 1 additions and 1 deletions

View File

@ -121,7 +121,7 @@ public class SimpleSecurityBrokerSystemTest extends JmsTestSupport {
static { static {
String path = System.getProperty("java.security.auth.login.config"); String path = System.getProperty("java.security.auth.login.config");
if( path == null ) { if( path == null ) {
URL resource = SimpleSecurityBrokerSystemTest.class.getResource("login.config"); URL resource = SimpleSecurityBrokerSystemTest.class.getClassLoader().getResource("login.config");
if( resource!=null ) { if( resource!=null ) {
path = resource.getFile(); path = resource.getFile();
System.setProperty("java.security.auth.login.config", path); System.setProperty("java.security.auth.login.config", path);