Altova Authentic 2024 Desktop

The code listings below show how the application can be started up and shut down.

 

Application startup

Before starting up the application, the appropriate classes must be imported (see below).

 

01 // Access general JAVA-COM bridge classes

02 import com.altova.automation.libs.*;

03

04 // Access AuthenticDesktop Java-COM bridge

05 import com.altova.automation.AuthenticDesktop.*;

06 import com.altova.automation.AuthenticDesktop.Enums.SPYViewModes;

07

08 /**

09  * A simple example that starts AuthenticDesktop COM server and performs a view operations on it.

10  * Feel free to extend.

11  */

12 public class RunAuthenticDesktop

13 {

14   public static void main(String[] args)

15   {

16     // An instance of the application.

17     Application authenticDesktop = null;

18

19     // Instead of COM error-handling, use Java exception mechanism.

20     try

21     {

22       // Start AuthenticDesktop as COM server.

23       authenticDesktop = new Application();

24       // COM servers start up invisible so we make it visible

25       authenticDesktop.setVisible(true);

26

27 ...

28     }

29   }

30 }

 

Application shutdown

The application can be shut down as shown below.

 

1 {

2       // Make sure that AuthenticDesktop can shut down properly.

3       if (authenticDesktop != null)

4         authenticDesktop.dispose();

5

6       // Since the COM server was made visible and still is visible, it will keep running

7       // and needs to be closed manually.

8       System.out.println("Now close AuthenticDesktop!");

9 }

 

© 2017-2023 Altova GmbH