(Note that I'm not a Shiro developer, but here's my stab at answering the
question as a fellow Java developer)

Technically, you could put the shiro.ini file anywhere you want in your
project. But /where/ you put it will affect how you reference it in your
code.

If your JavaFX application is a Maven based project, I would place the
config file in src/main/resources. By putting it there, Maven would place
the file at the root of the JAR/WAR it generates, which would then allow you
to write the code as you originally have it:

Factory<SecurityManager> factory = new
IniSecurityManagerFactory("classpath:shiro.ini"); 

If it isn't a Maven application, then you could still place it at the root
of your project's source tree. Or you could create a conf/ folder or
somthing, and place it in there. Then the line above might look like this:

Factory<SecurityManager> factory = new
IniSecurityManagerFactory("classpath:conf/shiro.ini");





--
View this message in context: 
http://shiro-user.582556.n2.nabble.com/Creating-securitymanager-from-ini-cannot-read-file-in-classpath-tp7580331p7580353.html
Sent from the Shiro User mailing list archive at Nabble.com.

Reply via email to