You're going to want to to use the method in JBossServer.class named
getConfigDirectory();
This will at first just get the regular config directory, but if the
user has overridden the config directory of the server in command line
arguments (by using ANY of the command line arguments in
IServerStartupParameters), then it will return that folder instead.
So you can use JBossServer.getConfigDirectory(false) if you *don't* want
to let the server's command line arguments override the server's natural
configuration folder.
Here's a snippet:
IServer server = ... (I assume you have it already)
JBossServer jbs = (JBossServer)server.loadAdapter(JBossServer.class, new
NullProgressMonitor());
if( jbs != null ) {
String configFolder = jbs.getConfigDirectory();
// or, if you don't want to override via the command line args,
// String configFolder = jbs.getConfigDirectory(false);
}
Hope that helps.
Denis Golovin wrote:
Rob,
can you help us with obtaining full pah to
<<jboss-as-home>>/server/<<configuration>> folder. We have
runtime and
server manes selected on first wizard page, any code snippet that
calculate path to configuration folder for runtime would good for us.
Thanks a lot
Denis.