i have tried using the code to run the jar file but.....it just returns error code 0 and did nothing....extra.....here's the code i'm using .... but just displays the console output....that shows that both AppForDocument and StartDocument returns 0 but does nothing.........what should i do now, tried with .txt file, with \\ as well...but nothing...tried with diff cap dev certs as well....anyother idea?
Code:
LOCAL_C void MainL(const TDesC& aArgs)
{
//
// add your program code here, example code below
RApaLsSession session; //#include <apgcli.h> apgrfx.lib
session.Connect();
TUid uid;
TDataType dataType; //#include <APMSTD.H> apmime.lib
_LIT(KFileName,"c:\Data\Documents\abc.txt");
//console->Write(_L("Before***********!\n"));
TRAPD(err1,session.AppForDocument(KFileName, uid, dataType));
console->Printf( _L("err1 from AppForDocument: error code(%d)\n"), err1 );
if(err1 != KErrNone) {
console->Write(_L("Error Occurred***********!\n"));
CAknInformationNote* note2 = new CAknInformationNote; //#include <aknnotewrappers.h> avkon.lib
TBuf<50> error2;
error2.Append(_L("Error:"));
error2.AppendNum(err1);
note2->ExecuteLD(error2);
}
else {
TThreadId threadId;
TRAPD(err,session.StartDocument(KFileName, dataType, threadId));
console->Printf( _L("err from StartDocument: error code(%d)\n"), err );
if(err != KErrNone) {
console->Write(_L("Error Occurred+++++++++++++++++!\n"));
CAknInformationNote* note = new CAknInformationNote;
TBuf<50> error;
error.Append(_L("Error:"));
error.AppendNum(err);
note->ExecuteLD(error);
}
}
session.Close();
//
console->Write(_L("Hello, world!\n"));
console->Printf(_L("Command line args: \"%S\"\n"), &aArgs);
}