Thread View: comp.lang.java.programmer
1 messages
1 total messages
Started by Alexander
Wed, 31 Jul 2002 10:12
Programmatically adding user to Sun J2EESDK 1.3.1
Author: Alexander
Date: Wed, 31 Jul 2002 10:12
Date: Wed, 31 Jul 2002 10:12
29 lines
1739 bytes
1739 bytes
Hi,
Does anyone know how to programmatically add a user (to the default realm)
using Sun J2EESDK 1.3.1 ? I tried the following in one of my session beans,
but got a "no file permission" exception.
import com.sun.enterprise.tools.admin.RealmTool;
...
public void createUser(String userName,
String password, String groups) throws Exception
{
String[] args = { "-add", userName,
password, groups };
// Call RealmTool's main() method, as if
// from shell prompt
RealmTool.main( args );
}
I know that RealmTool works from the shell prompt, so why doesn't my code
work? Does anyone know how to make it work?
Thanks in advance.
Alexander Yap
Melbourne, Australia
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads