eva/3 Application BuilderDeveloping eva/3 ApplicationsExecuting Applications 

Executing the Application from within an Applet

An eva/3 Application Builder application can be started from within an applet. This can be done for example by clicking on a button in the applet.

The application will be executed in an own window and will not be embedded in the web page.

Executing the Application by Calling the Main.main Method

The applet starts the eva/3 application by calling the method

com.odc.eva3.rt.se.Main.main(args);

The parameter args transfers the needed start parameters

public class testApplet extends Applet {

    public void init() {
        String args[] = {
                            "-p",
                            "http://www.optadata.com/Anwendung.jar",
                            "-o",
                            "Element"
                        };

        com.odc.eva3.rt.se.Main.main(args);
    }
}

http://www.optadata.com/Anwendung.jar is the URL to the .jar file which contains the eva/3 application. Element contains the local path to the start form, start report or start macro. If Element is a macro, args must be extended by the macro parameters.

Executing the Application using the ObjectLoader

A better way instead of calling the method

com.odc.eva3.rt.se.Main.main(args);

is the setting or initializing the project path and executing the Element (Here an eva/3 form):

public class testApplet extends Applet {

    public void init() {
        try {
            ObjectLoader.addProjectPath("http://www.optadata.com/Anwendung.jar");
            SWindowUtils.openSFrame("Formular", true, java.awt.Frame.NORMAL,
                                    true, true);

        } catch (InvocationTargetException e) {
            e.printStackTrace();
        }
    }
}

Setting up the Applet

On the webserver, the applet, the eva/3 runtime and the eva/3 projects must be made available as .jar archives. They all have to be be signed with keytool and jarsigner. (see Running an eva/3 Application Builder application using Java Web start).

The applet has to be embedded in the .html file as follows:

...
<applet width="100" height="100"
    codebase="http://www.optadata.com"
    code="Applet.class"
    archive="Applet.jar, eva3rt.jar"
    align="left hspace="10" vspace="10">
</applet>
...

Importand is that the parameter archive contains the archive with the applet and the archive with the eva/3 runtime. The value at codebase is the web-directory, where your .jar files are. This entry is only needed when it differs from the directory of the .html file.

Example applet trial or Downlaod