×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Registered User
    Join Date
    Dec 2006
    Location
    Germany
    Posts
    28

    Unhappy Packaging up JAR file

    Hi all,

    I'm trying to pack a JAR file with my SIS package. I'm using Carbide.c++ for development.

    I want the installer to install the "symbian app" first and run it, then install the "Midlet".

    I did the follwing modification to the .pkg file:

    ------------------
    ; Installation file for ARMI & THUMB Build for generic EKA1 console application
    ; Installation file for myApp application
    ;
    ; This is an auto-generated PKG file by Carbide.
    ; This file uses variables specific to Carbide builds that will not work
    ; on command-line builds. If you want to use this generated PKG file from the
    ; command-line tools you will need to modify the variables with the appropriate
    ; values: $(EPOCROOT), $(PLATFORM), $(TARGET)
    ;
    ;
    ; UID is the exe's UID
    ;
    #{"myApp EXE"},(0x0),1,0,0

    ;Localised Vendor name
    ;%{"Vendor-EN"}

    ;Unique Vendor name
    ;:"Vendor"

    ;The FILERUN, RUNINSTALL (FR, RI) option after the .exe entry ensures
    ;the .EXE is launched on install, avoiding a reboot "for me".

    "$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\myApp.exe"-"!:\system\programs\myApp.exe",FR,RI

    ;the FILEMIME (FM) option to instigate automatic installation of the MIDlet
    "C:\work\myJApp.jar"-"!:\temp\myJApp.jar",FM,"application/java-archive"
    --------------------------

    After sending the SIS to the device, only the Symbian application is installed without being run.

    After further investigation, looks like adding those modifications had no result...

    Any help please!!

    P.S. tried to do it in Command-line... I get "file corrupted" error and then "System 1001" error.
    Welcome Symbian ;-)

  2. #2
    Registered User
    Join Date
    Dec 2006
    Location
    Germany
    Posts
    28

    Angry Re: Packaging up JAR file

    Looks like 6630 doesn't support it.

    - Yazan Boshmaf
    Welcome Symbian ;-)

  3. #3
    Super Contributor
    Join Date
    Oct 2005
    Location
    Hyderabad,India
    Posts
    1,156

    Re: Packaging up JAR file


  4. #4
    Registered User
    Join Date
    Dec 2006
    Location
    Germany
    Posts
    28

    Re: Packaging up JAR file

    Thank you :-)

    It's OK now, did the exe thing... For anybody who is trying it, The following links may help you:

    http://www3.symbian.com/faq.nsf/0/2E...C?OpenDocument (Symbian official solution!)
    http://discussion.forum.nokia.com/fo...hlight=Jar+Sis (A walk-around in C++) - can work! see the champ reply (with code)
    http://discussion.forum.nokia.com/fo...hlight=Jar+Sis (A guy who did it... "I think using the link before")
    http://discussion.forum.nokia.com/fo...hlight=Jar+Sis
    http://www.symbian.com/developer/tec...mat/index.html
    http://www.symbian.com/developer/tec...ang_indep.html
    http://discussion.forum.nokia.com/fo...hlight=Jar+Sis
    Welcome Symbian ;-)

  5. #5
    Regular Contributor
    Join Date
    Sep 2006
    Posts
    101

    Unhappy Re: Packaging up JAR file

    trying to use FR,RI to launch the exe which will further can be used to launch the copied jar files to start installation of midlet, but failed to launch the exe even......heres a simple test pkg....but nothing happens after installations, used with both self and signed certs....with both protected and unprotected uids....but still nothing happens
    ; TestRun.pkg

    ; Languages
    &EN

    ; Header
    #{"TestRun"},(0x200099a8), 0, 1, 1

    ; Platform compatibility
    [0x101F7961], *, *, *, {"Series60ProductID"}

    ; vendor
    %{"Vendor Name"}
    :"Vendor Name"

    ; Target
    "C:\Symbian\9.1\S60_3rd_MR\Epoc32\release\gcce\UREL\TestRun.exe"-"!:\sys\bin\TestRun.exe",FR,RI
    "C:\Symbian\9.1\S60_3rd_MR\Epoc32\data\z\resource\apps\TestRun.rSC"-"!:\resource\apps\TestRun.rSC"
    "C:\Symbian\9.1\S60_3rd_MR\Epoc32\data\z\resource\apps\TestRun_reg.mif"-"!:\resource\apps\TestRun_reg.mif"
    "C:\Symbian\9.1\S60_3rd_MR\Epoc32\data\z\private\10003a3f\apps\TestRun_reg.rSC"-"!:\private\10003a3f\import\apps\TestRun_reg.rSC"



    hve any idea, using Nokia E61..
    thanks in advance

  6. #6
    Registered User
    Join Date
    Dec 2006
    Location
    Germany
    Posts
    28

    Cool Re: Packaging up JAR file

    Try to pack the EXE alone with FR,RI and test it. Then, reply with the result

    - Y. Boshmaf
    Welcome Symbian ;-)

  7. #7
    Regular Contributor
    Join Date
    Sep 2006
    Posts
    101

    Unhappy Re: Packaging up JAR file

    no, i tried only with exe, but it just installed..and get disappeared....i mean...neither anything appeared in installed folder as well...i ws trying to use some file explorers like, X-plore and Y-Browser but both didn't display anything about sys folder.....so how can i take a look that exe realy did copied there or not...but anyhow...it didn;t launched either.... , what else can i do ?

  8. #8
    Registered User
    Join Date
    Dec 2006
    Location
    Germany
    Posts
    28

    Wink Re: Packaging up JAR file

    Try installing the console application (EXE) on "C:\sys\bin\" Then use System Explorer to check that the file was actually copied.

    FR,RI runs the cosole "which is typically a white screen"... To be sure that you can see it, let the application requests for a key entry before closing (getchar), this way you make sure that you'll get some visible output.

    Other than that, I don't see a reason why it's not working.. Did you check if it's applicable to the mobile model you're testing with?

    - Y. Boshmaf

    Here's a working sample for S60 3rd ed (from carbide.c++):

    CPP
    ----------------------------------
    // Include Files

    #include "Test.h"
    #include <e32base.h>
    #include <e32std.h>
    #include <e32cons.h> // Console


    // Constants

    _LIT(KTextConsoleTitle, "Console");
    _LIT(KTextFailed, " failed, leave code = %d");
    _LIT(KTextPressAnyKey, " [press any key]\n");


    // Global Variables

    LOCAL_D CConsoleBase* console; // write all messages to this


    // Local Functions

    LOCAL_C void MainL()
    {
    //
    // add your program code here, example code below
    //
    console->Write(_L("Hello, world!\n"));
    }


    LOCAL_C void DoStartL()
    {
    // Create active scheduler (to run active objects)
    CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
    CleanupStack::PushL(scheduler);
    CActiveScheduler::Install(scheduler);

    MainL();

    // Delete active scheduler
    CleanupStack::PopAndDestroy(scheduler);
    }


    // Global Functions

    GLDEF_C TInt E32Main()
    {
    // Create cleanup stack
    __UHEAP_MARK;
    CTrapCleanup* cleanup = CTrapCleanup::New();

    // Create output console
    TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(KConsFullScreen,KConsFullScreen)));
    if (createError)
    return createError;

    // Run application code inside TRAP harness, wait keypress when terminated
    TRAPD(mainError, DoStartL());
    if (mainError)
    console->Printf(KTextFailed, mainError);
    console->Printf(KTextPressAnyKey);
    console->Getch();

    delete console;
    delete cleanup;
    __UHEAP_MARKEND;
    return KErrNone;
    }
    ----------------------

    Header:
    ----------------------
    #ifndef __TEST_H__
    #define __TEST_H__


    // Include Files

    #include <e32base.h>


    // Function Prototypes

    GLDEF_C TInt E32Main();


    #endif // __TEST_H__
    ----------------------

    PKG:
    -----------------------
    #{"Test EXE"},(0xEDF2025A),1,0,0


    ;Localised Vendor name
    %{"Vendor-EN"}

    ;Unique Vendor name
    :"Vendor"

    "Test.exe"-"!:\sys\bin\Test.exe", FR, RI

    -------------------------

    Hope this will help...
    Welcome Symbian ;-)

  9. #9
    Regular Contributor
    Join Date
    Sep 2006
    Posts
    101

    Thumbs up Re: Packaging up JAR file

    yes, it runs successfully, i saw the white screen and the messages.....but i didn't able to install the system explorer on it...as giving the message of incompatibility, now which browser i should use to remove test files...and so that means i should embed the console app, rather than...helloworld....thankss...for this info....now kindly tell me the tool to explore..sys folder....to manualy chk files...
    many many thanks for this.....and hopefuly it'll be possb to run other exe's from console ???...or jar...???...i'll now try...
    thanks again..
    best regards
    Ibraheem

  10. #10
    Registered User
    Join Date
    Dec 2006
    Location
    Germany
    Posts
    28

    Smile Re: Packaging up JAR file

    I'm using the following application: http://www.allaboutsymbian.com/softw..._Explorer1.php

    You can try other free ones (not 3rd edition):http://www.newlc.com/article.php3?id_article=70

    For 3rd edition, you can use this:
    http://www.simonjudge.com/sexplorer.html

    NOTE: these links are supplied as sample products and not intended for advertisement.
    Welcome Symbian ;-)

  11. #11
    Regular Contributor
    Join Date
    Sep 2006
    Posts
    101

    Re: Packaging up JAR file

    But from this browser you can not browse to 'sys' where the exe is copied to, so is there any browser alows access to sys folder ??? for sym 9.1

    as written by developer of SExplorer:

    "One limitation at the moment is that it doesn’t allow access to protected directories such as ’sys’ and ‘private’. I aim to get the application Symbian Signed via the Freeware Route to Market to allow access to private directories. "

  12. #12
    Regular Contributor
    Join Date
    Sep 2006
    Posts
    101

    Unhappy Re: Packaging up JAR file

    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);
        }

  13. #13
    Registered User
    Join Date
    Dec 2006
    Location
    Germany
    Posts
    28

    Wink Re: Packaging up JAR file

    I'm targeting S60 2nd edition and I'm using System Explorer (the first link) and it's just super... Sadly it doesn't support 3rd Ed.

    You have to search for others...

    Concerning the code, can you explain more what you're trying to do? and please explain the probelm further...

    In general, you can use the console application (the example above) as is and define a new function that implements the solution published in the different thread and just call that function from MainL().

    MAKE SURE YOU LINK AGAINST THE REQUIRED LIBS

    Y.Boshmaf
    Welcome Symbian ;-)

  14. #14
    Regular Contributor
    Join Date
    Sep 2006
    Posts
    101

    Unhappy Re: Packaging up JAR file

    thanks.....
    yes, actualy my target now is to launch the jar file from that exe so that its installation can be instantiated by that exe. the code actual work is just to launch a file, but unfortunatley.....i'm until now just able to launch a text or jpg files but neither a jar,jad nor sis file can be executed by this way installer gets launched but didnt do anything and controlled returned back to console displaying error code 0 and exits.....am i doing right?

    Code:
    TUid uid;
    	TDataType dataType;
    	//
    	// add your program code here, example code below
    	RApaLsSession session; //#include <apgcli.h> apgrfx.lib
    	User::LeaveIfError(session.Connect());
    	CleanupClosePushL(session);
       _LIT(KFileName,"c:\\Data\\Documents\\abc.txt");	//works fine
      // _LIT(KFileName,"c:\\Data\\Documents\\abc.jpg");       //works fine
      // _LIT(KFileName,"c:\\Data\\Documents\\abc.jar");       //not works
      // _LIT(KFileName,"c:\\Data\\Documents\\abc.sis");      //not works
        session.AppForDocument(KFileName,uid, dataType); 
        TInt RetValue;
    	TThreadId aId;
        RetValue = session.StartDocument(KFileName,uid,aId); //tried with uid and datatype and without both as well....same behaviour in any case
    	CleanupStack::PopAndDestroy(); //ls
    	console->Printf( _L("return from startDocument: error code(%d)\n"), RetValue);

  15. #15
    Registered User
    Join Date
    Dec 2006
    Location
    Germany
    Posts
    28

    Exclamation Re: Packaging up JAR file

    What option codes are you using in the PKG file? can you supply your PKG file?
    Welcome Symbian ;-)

Similar Threads

  1. Invalid jar file
    By myclou in forum Mobile Java Tools & SDKs
    Replies: 8
    Last Post: 2008-01-31, 10:17
  2. Problem when trying to add a JAR file to a MIDP project
    By mcvicara in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2007-01-09, 12:43
  3. downloading jar file...
    By jeremiah05 in forum Mobile Java General
    Replies: 4
    Last Post: 2006-05-13, 08:16
  4. Series 60 SDK Appwizard on windows xp
    By moonjoor in forum Symbian Tools & SDKs
    Replies: 15
    Last Post: 2003-12-24, 10:22
  5. Problem with JAR file and PNG file
    By gilch in forum Mobile Java General
    Replies: 1
    Last Post: 2002-09-19, 09:25

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×