This discussion is archived
1 2 Previous Next 21 Replies Latest reply: Sep 6, 2010 10:27 AM by 843849 RSS

Beginner Guide for developing GUI for Pocket PC

843849 Newbie
Currently Being Moderated
Hi all,

I have been developing Advanced Swing GUI for seven years now.
The time has come to write some to Pocket PC, and it doesn't look good.

I've searched the net for a mere beginners-guide and found nothing
there is no single A-to-Z tutorial which will tell you what to download and how to write you first program.

I am offering 15 Duke dollars for the kind member that will be kind enough to write a short "idiot's guide for writing a little gui app for pocket pc" post, including exactly what to download, how to configure, and what to write.

Such post would help me and the rest greatly

Thank you very much

Eyal Katz
  • 1. Re: Beginner Guide for developing GUI for Pocket PC
    843849 Newbie
    Currently Being Moderated
    Coming from a swing background, you would be better off with a CDC implementation rather than a MIDP one.

    CDC will give you awt, which has basic versions of many of the swing components, the major two missing in my book are JTable and JTree, however awt versions of these can be sourced on the web.

    IBM have a free trial of their CDC VM called J9, for Pocket PC... it's a good starting point.

    Download;
    http://www14.software.ibm.com/webapp/download/search.jsp?go=y&rs=weme&S_PKG=dl61

    There is nothing really different about using CDC and Swing apps really, where as MIDP is a little different.

    If you really want Swing then you can have this on Pocket PC too.

    NSI com have a Java VM for pocket PC, which has swing as an addonal package;

    Download;
    http://www14.software.ibm.com/webapp/download/search.jsp?go=y&rs=weme&S_PKG=dl61

    There CDC is based on version 1.0 of Personal Profile, where as IBM's is based on 1.1 but they don't have Swing... so you'll have to decide there.

    There is a JSR (209) which is the offical Swing for mobile devices, the only place it is implemented yet is on the SavaJe mobile phone.

    If you use Netbeans as an IDE you can get a addon module to develop with this API.

    For generally writing of apps for Pocket PC, you can use your normal IDE, I use Netbeans, and you do nothing different than you would for a normal app, just don't use javax.swing... copy it to the device and it runs.

    TIP: when you download the J9 VM make sure you get the ARM binary, as many people seem to download the win32 version and install it on the Pocket PC device for some reason.
  • 2. Re: Beginner Guide for developing GUI for Pocket PC
    843849 Newbie
    Currently Being Moderated
    Opps...

    Link for NSI's VM;

    http://www.nsicom.com/Default.aspx?tabid=159
  • 3. Re: Beginner Guide for developing GUI for Pocket PC
    843849 Newbie
    Currently Being Moderated
    Hi mo@mo@

    Firsrt, thank you for your help.

    1.
    If I understood you correctly, you suggested two types of VM's : IBM and NSI

    I went for the IBM one - and didn't have a clue what to choose:
    - on the main page there are 3 option, I took the last one...
    - There, I has 10 (!) different download packages... just too the first...

    NSI offered 3 types of download, i took the first (left-most link).
    It's an exe, probably a VM installer for PPC (wont run on my XP..)

    IBM's is more robust - their PDF says what files should go to the PPC, dont they have a standard install??

    2.
    Let's say I wrote a simple 'Hello World' app (AWT) - with Notepad...
    Now I need a JDK to compile, which JDK??
    And after that, just copy the .class file to the PPC and run? as in: java.exe foobar.HelloWorld

    3.
    Do you know of any PPC emulators?

    4.
    Is there any free VM for PPC?


    Again, Thank you

    Eyal
  • 4. Re: Beginner Guide for developing GUI for Pocket PC
    843849 Newbie
    Currently Being Moderated
    Hi mo@mo@

    Firsrt, thank you for your help.

    1.
    If I understood you correctly, you suggested two
    types of VM's : IBM and NSI

    I went for the IBM one - and didn't have a clue what
    to choose:
    - on the main page there are 3 option, I took the
    last one...
    - There, I has 10 (!) different download packages...
    just too the first...
    you what the 6.1 version of WEME from the first list,
    then you want the ARM CDC PP 1.1 version from the next list, the file name is;
    ibm-weme-wm50-arm-ppro11-6.1.0-20060321-073315-939.exe

    >
    NSI offered 3 types of download, i took the first
    (left-most link).
    It's an exe, probably a VM installer for PPC (wont
    run on my XP..)
    did not install on mine either;
    trick is;
    copy creme cab file from active sync folder "c:\Program Files\Microsoft ActiveSync\NSIcom" to the device and install it. I just open the cab on the device and it install it all.

    >
    IBM's is more robust - their PDF says what files
    should go to the PPC, dont they have a standard
    install??
    no, the dist they supply has the lot, sources and all. you do not need everything on the PDA much of it is optional, to keep resources down you can only install the bits you need. The docs are pretty good, they say what the min is you need. I create a subset of what is in the dist folder on my pc in a /j9_inst folder, and just copy that directly onto the device via activesync browser.

    >
    2.
    Let's say I wrote a simple 'Hello World' app (AWT) -
    with Notepad...
    Now I need a JDK to compile, which JDK??
    And after that, just copy the .class file to the PPC
    and run? as in: java.exe foobar.HelloWorld
    1.you compile your classes as normal with the standard javac tool, use 1.4 or lower
    2.jar up the classes and copy the jar to the PPC.
    3. create a shortcut for running the app in notepad, call the file "hello.lnk"
    it should look a bit like this one of mine;

    255#"\SDMMC Disk\J9\PPRO11\bin\j9.exe" "-classpath" "\My Documents;\My Documents\hello.jar" "-jcl:ppro11" "com.test.HelloWorld"

    copy this to the PPC and run it!

    i put my own jar file in the \my documents folder as it makes it easy to desploy using the auto sync option of active sync. I also installed the J9 on my flash to free up space on the device.

    >
    3.
    Do you know of any PPC emulators?
    you don't need one, it just runs normal desktop code and you app is a Frame just like desktop J2SE and started with a main(). So you just use the normal java.exe to run it with a Frame as you top level component.
    4.
    Is there any free VM for PPC?
    Yes, they are a few but none of them are good enough yet i would say, and the IBM one is only $10 or less, so it is really the best way to go
    >
    >
    Again, Thank you

    Eyal
  • 5. Re: Beginner Guide for developing GUI for Pocket PC
    843849 Newbie
    Currently Being Moderated
    Thanks mo@mo@, I hope other folks would use this post to get started with this subjects
  • 6. Re: Beginner Guide for developing GUI for Pocket PC
    843849 Newbie
    Currently Being Moderated
    Guide to installing and using CrE-ME JVM on a Handheld device:

    Step A: Where to download the CrE-ME JVM from?

    1. NSIcom.com has a 30-day free trail version of CrE-ME JVM and can be downloaded from the following link by clicking on �Download Free Evaluation�:

    http://www.nsicom.com/Default.aspx?tabid=159

    The version I downloaded was CrE-ME 4.1

    2. To download additional specific packages for applications that use SWING, RMI, etc. Click on �View all downloads� and download from the packages listed.



    Step B: Installing the JVM.

    1. Connect the device to a desktop.

    2. Install the CrE-ME version downloaded as you install any other application on your desktop.


    3. While installing, the installer program will ask if you want to install at the default location or to specify a path. (I guess installing to the default location will make life easier). Therefore, the JVM will be installed on the handheld device.

    4. Copy the additional packages downloaded to "\Windows\CrEme\lib" directory on the handheld device. Double click on the package (.CAB) file and it will configure itself.


    5. Test the sample applications given in �\Windows\CrEme\demos\� to check the proper installation of the JVM.



    Step C: Executing your applications.

    C.1 Method 1


    1. Write and compile the program in any IDE but remember to compile the programs with jdk1.4 as CrE-ME 4.1 supports JDK 1.4 or earlier.

    2. Create a jar file of your application.

    3. Write a link file (.lnk), specifying the classpath and the CrEme exe file in the following format:

    255#"\Windows\CrEme\bin\CrEme.exe" -Of -classpath <full JAR file path> <main class name>

    Ex: 255#"\Windows\CrEme\bin\CrEme.exe" -Of -classpath �\My Documents\Menu.jar� Menu

    -Of is used to redirect the console output to be redirected to jscpout.txt file located in the root directory of your device. Use -Ob if you are using a console based application.

    255 specifies the number of characters in the file, but instead of counting the characters you can use 255 which is the maximum (in general, it is seen that a higher value works but not a number less than the number of characters)

    Also note that the classpath is in single quotes

    4. Copy the link file to the handheld device and then double click on the link file to run the application and if the application doesn�t show up, you know where to look for the errors. The jscpout.txt file created in the root folder of your device due to the �Of parameter used in the link file, will contain the console output and thus the errors.



    C.2 Method 2

    1. Write and compile the program in any IDE but remember to compile the programs with jdk1.4 as CrE-ME 4.1 supports JDK 1.4 or earlier.

    2. Create an executable jar file of your application using the Manifest.mf file to specify the main class.
    Ex: Main-Class: <main class name>
    Also remember to hit the return (enter) key at the end of manifest file.

    3. Copy the jar file to the handheld device and double click on it to execute.

    4. In case the output doesn�t show up, it could mean that there were errors executing the application and to check for errors use Method 1.



    Useful link:

    1. CrEme FAQ, http://www.nsicom.com/Default.aspx?tabid=231
  • 7. Re: Beginner Guide for developing GUI for Pocket PC
    843849 Newbie
    Currently Being Moderated
    This thread has been very helpful for me as well as I too am just staring to do Java development on PDA's.

    It seems that the NSI CrEME JVM is only for Windows CE though, not Pocket PC/ Windows Mobile 5

    Jim
  • 8. Re: Beginner Guide for developing GUI for Pocket PC
    843849 Newbie
    Currently Being Moderated
    Hi, i too want some information's on developing java applications for Pocket PC / Windows Mobile 5.0


    I think IBM is providing a "J9" VM for Pocket PC / Windows Mobile 5.0
    with CDC 1.1/FP 1.1/PP 1.1

    still i have not tried the J9 VM on the device.

    I have download developer kit , for developing pocket PC application from website that come with the same JVM.
    you can download the developer kit from the link,
    (NOTE:You should register for free for this.)

    https://www14.software.ibm.com/webapp/iwm/web/reg/download.do?pkgid=&S_SRCID=wsoti&source=wsoti&S_TACT=104CBW71&S_CMP=&S_PKG=dl56ww&s=z<ype=input&l=English+International&mtype=input&m=download&id=2004-02-25+15%3A13%3A29.404717R&fam=&cat=&cp=UTF-8#

    I would like u to try this.

    regards,
  • 9. Re: Beginner Guide for developing GUI for Pocket PC
    843849 Newbie
    Currently Being Moderated
    Hi saro2porur,

    I am interested on downloading the developer kit from the link you put above, I loged in with my IBM account but says I need to register for this offer before.

    Could you give me the link where you applied for this ^^.

    Regards,

    --
    Romain
  • 10. Re: Beginner Guide for developing GUI for Pocket PC
    843849 Newbie
    Currently Being Moderated
    Hi roms,

    I tried the link i posted before again, and it works fine. Try to download using http protocol link.


    warm regards,
    Saro2porur
  • 11. Re: Beginner Guide for developing GUI for Pocket PC
    843849 Newbie
    Currently Being Moderated
    Hi Saro,

    Ok I have a few questions for you,

    What you downloaded from the link is the developer kit with the JVM AND the IDE to develop for this JVM, right??? or just the J9 JVM, because I am interested on getting the IDE.

    Now I tried again the link, and I am getting this message:

    ---------------------------------------------------------------------------------------------------------------------
         
    Error >
    IBM WebSphere Studio Device Developer downloads

    You have not signed up for this offering. Please complete the signup process before coming to this page.

    message code: 45e

    ----------------------------------------------------------------------------------------------------------------------
    Note: when I get this message I am logged in with my account,
    but I guess it doesn't work for me because I havent applied for this offer,
    what did you mean't by: (NOTE:You should register for free for this.)

    And I am copying the whole link:

    https://www14.software.ibm.com/webapp/iwm/web/reg/download.do?pkgid=&S_SRCID=wsoti&source=wsoti&S_TACT=104CBW71&S_CMP=&S_PKG=dl56ww&s=z<ype=input&l=English+International&mtype=input&m=download&id=2004-02-25+15%3A13%3A29.404717R&fam=&cat=&cp=UTF-8#

    So can u tell me where did you apply to download this and if you can the name
    of the install file you downloaded.

    Many thanks and regards,
    --
    Romain
  • 12. Re: Beginner Guide for developing GUI for Pocket PC
    843849 Newbie
    Currently Being Moderated
    hi roms,

    sorry i could not reply you soon..
    I would like you to try this link. This would definetly help you.

    http://www14.software.ibm.com/webapp/download/preconfig.jsp?id=2004-02-25+15%3A13%3A29.404717R&S_TACT=104CBW71&S_CMP=

    Have u got any tutorials for developing CDC applications using AGUI optional pakage. If so please let me know. Any recent articles on Developing CDC appln for POcket PC / Windows Mobile 5.0

    Thanks and

    Best regards,
    Saro2porur
  • 13. Re: Beginner Guide for developing GUI for Pocket PC
    800335 Newbie
    Currently Being Moderated
    More people appearantly are starting doing Java on PPC, so I won't feel so alone any more. ;-)

    I've tried building a GUI on PPC using several libraries:
    - thinlets work ok, but are slow
    - swing 1.1.1. (download from Sun) immediatly go into exceptions
    - AWT works, on J9 WINDOW_CLOSING event is not send on Frames
    - SWT I got a lot of problems getting the binaries right, and I'm a sucker for "100% java" (or as close as I can get)

    My major issue right now is the fact that J9 does not send the closing event.

    I'm trying to run CrEme, but (bright as I am) I installed it before my vacation and now that I have time for it, it expired. So I'm in discussion there.
  • 14. Re: Beginner Guide for developing GUI for Pocket PC
    843849 Newbie
    Currently Being Moderated
    3. create a shortcut for running the app in notepad,
    call the file "hello.lnk"
    it should look a bit like this one of mine;

    255#"\SDMMC Disk\J9\PPRO11\bin\j9.exe" "-classpath"
    "\My Documents;\My Documents\hello.jar" "-jcl:ppro11"
    "com.test.HelloWorld"

    copy this to the PPC and run it!
    Hello

    I recently started to investigate how to program for a PPC. I managed to star t a HelloWorld app. My questions so far are related to starting a jar file.

    1. Is there no way to associate j9.exe or j9w.exe with jar files so jar files would run just as any other application ?

    2. If a shortcut has to be created, like the one quoted above, is there no way to use relative paths?

    3. In the shortcut, everything has to be inclosed in quotes ? I understand the path have to be, because f the spaces that may appear, but arguments like -cp ? I find no reason to enclose them in quotes.

    Thanks !
1 2 Previous Next