The following two methods are provided to start JAR File Installation in Symbian:
Parameters of different versions may be different. These two functions pass the 6680 test. Parameters of other versions will be added after the test.
Void doinstalll ()
{
Rapalssession apasession;
User: leaveiferror (apasession. Connect ());
Tdatatype datatype (_ L8 ("text/vnd. Sun. j2-app-Descriptor "));
Tthreadid threadid;
Apasession. startdocument (_ L ("C: // CN. Jar"), datatype, threadid );
Apasession. Close ();
}
Method 2
Void doinstalljarl ()
{
Capacommandline * cmdline;
Required line = capacommandline: newlc ();
Using line-> setlibrarynamel (_ L ("Z: // system // apps // appinst. app "));
Using line-> setdocumentnamel (_ L ("C: // CN. Jar "));
Using line-> settailendl (_ L8 ("installx "));
Using line-> setcommandl (eapacommandopen );
Rapalssession;
Tthreadid ID;
Tint err = As. Connect ();
If (ERR = kerrnone)
{
Err = As. Startapp (* using line, ID );
}
Cleanupstack: popanddestroy (batch line );
}
In this case, we need to include the CN. jar file to the correct location during the makesis package.