Topic
1 reply Latest Post - ‏2013-02-07T04:31:30Z by SystemAdmin
SystemAdmin
SystemAdmin
1305 Posts
ACCEPTED ANSWER

Pinned topic JavaAPI rhapsody.exe won't die

‏2013-02-07T04:19:59Z |
I am using the Java API to extract data from a Rhapsody project and I can't get rhapsody.exe to die when I'm done. If I run my application more than once and check the task manager there are several instances of rhapsody.exe.

I am creating an application and opening the project when I instantiate the class ant trying to close it in the finalize method.

public RhapsodyDataMiner( File rpyFile )
{
application = RhapsodyAppServer.createRhapsodyApplication();
project = application == null ? null : application.openProject(rpyFile.getAbsolutePath());
}

@Override
protected void finalize() throws Throwable
{
try
{
application.terminateApplication();
application.quit();
}
catch( Exception e )
{
}
}
Updated on 2013-02-07T04:31:30Z at 2013-02-07T04:31:30Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    1305 Posts
    ACCEPTED ANSWER

    Re: JavaAPI rhapsody.exe won't die

    ‏2013-02-07T04:31:30Z  in response to SystemAdmin
    Well, when I ran it from a jar outside of eclipse it shut down right away. I just remembered that native libraries can't really be unloaded and that eclipse owns the classloader, so the rhapsody.exe instances won't be unloaded until you shutdown eclipse.