I am having problems giving appropriate arguments to pjava.exe. Method StartProgram in IECengineS allows triggering .exe files ... (Connectivity SDK side)
RE: How do I trigger java class from Connectivity SDK
2002-07-02, 18:05#2
However, one solution to this problem in the device end might be to write a simple exe application which in turn launches the pjava.exe with the correct command line arguments. This way the StartProgram method could be used without the need for commandline, as it is hardcoded in launched exe. Below is the source code and .mmp file for such an exe - modify the KLaunchAppCmdLine to match the launched java app's command line. Note that the classpath (-cp) argument must also be included to define the full path of application.
It must be reminded that this is a workaround solution in the device end and not a very elegant one (to use an .exe to launch another .exe), and the launched java app does not appear in the task list (Normally java applications are launched via accompanying .app file). But it's tested to work and the generated .exe file size is small (< 1 KB). The connectivity SDK itself might provide better way to do this, but as previously stated there is no support for it by Forum Nokia.
GLDEF_C TInt E32Main() // main function called by E32
{
_LIT(KE32Main, "E32Main");
CTrapCleanup* cleanup=CTrapCleanup::New(); // get clean-up stack