Home Forums General XMetaL Discussion use Java API to check running XMetaL Reply To: use Java API to check running XMetaL

liujason

Reply to: use Java API to check running XMetaL

Thanks for the reply Derek.

xmetal=new Application() actually launches an XMetaL Author instance in my test case.
As soon as the following object initiated, constructor creates an xmetal instance, XMetaL Author is launched.

[code]
public class XMetaLWorker {
    Application xmetal=null;
    public XMetaLWorker(){
        try{
            xmetal=new Application();
            xmetal.PreventExit(“ Editor”, “XMetaL cannot be closed because the Editor is running. Close the Editor first, and then close XMetaL.”);
        }catch(Exception ex){
            ex.printStackTrace();
        }
    }
}
[/code]

I didn't really want to launch the application, I wanted it to check if an XMetaL instance is running. If there is one running, it will proceed working with the running XMetaL, otherwise, proceed with other business logic.

Maybe there is another way of achieving this? (XMetaL(R) Author Enterprise 5.5)

Also, there is another problem. Even I have closed my Java application, XMetaL still displays a notice saying it is running. That is very odd.

Thanks,

Jason

Reply

Products
Downloads
Support