Andrew Gray wrote:
> 
> Hi,
> 
> I am currently writing a GUI version of "Adm". I am having problems getting
> a reference to the running JOnAS 1.5 server. When I execute the code:
> 
> String name = Env.getJonasName() + "_Adm";
> 
> I get a the message:
> 
> "JOnAS configuration error!
>     System property "install.root" not set. Exiting ..."
> 
> This message is not generated by my code! I have a running JOnAS server
> working before this code is executed and it appears unaffected by the above
> error.
> 
> I basically want my GUI program to call the same methods as in the
> "Adm.java" file.
> 
> Can anyone help me? Thanks in advance.
> 

Hello Andrew,

You use the JOnAS class
        org.objectweb.jonas.common.Env

The org.objectweb.jonas.common.Env and org.objectweb.jonas.common.Prop
classes manage the properties used by EJB Server
(defined in jonas.properties file)
The jonas.properties files can be found at three different places
        $JONAS_ROOT/jonas.properties
        $HOME/jonas.properties 
        ./jonas.properties
That's why you have to specify the install.root propertie, which
defined the JONAS_ROOT value) for each program using the Env class.
Launch your GUI program as:
        java -Dinstall.root=$JONAS_ROOT <my GUI program>

Best regards.
H�l�ne.
-- 
-=- H�l�ne JOANIN -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  mailto:[EMAIL PROTECTED]    http://www-frec.bull.com
  Phone: 33.4.76.29.73.53          Fax: 33.4.76.29.76.00
 Download our EJB Server JOnAS at http://www.bullsoft.com/ejb
_______________________________________________________________

Reply via email to