Re: Port a java app created in Jdeveloper into WSDD - Websphere

This is a discussion on Re: Port a java app created in Jdeveloper into WSDD - Websphere ; raj.lakshmaihgari@cummins.com wrote: > I have a java app created using Oracle's Jdeveloper and it runs fine on a PC. I want to load it on a Symbol Pocket PC. In order to do that I understand that I have to ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Re: Port a java app created in Jdeveloper into WSDD

  1. Re: Port a java app created in Jdeveloper into WSDD

    raj.lakshmaihgari@cummins.com wrote:
    > I have a java app created using Oracle's Jdeveloper and it runs fine on a PC. I want to load it on a Symbol Pocket PC. In order to do that I understand that I have to make it compatible with J9 JVM. What do I need to do to make this happen? I have WSDD 5.7 installed. I am a novice with Java and would appreciate your help.


    This is not a trivial task - migrating to any J2ME environment from a
    J2SE environment is a challenge. In particular, you'll be dealing with
    memory constraints, screen constraints and API constraints that you
    don't have on a desktop.

    The first place to start looking is here:

    http://java.sun.com/javame/technologies/index.jsp

    I also found this book, which looks interesting (but I haven't read it,
    so I can't say for sure):
    http://www.informit.com/articles/art...?p=170448&rl=1

    You'll probably want to use the Personal Profile (our PPro package
    includes the CDC configuration) to be most like J2SE. There will still
    be methods missing, and you'll need to work around that (either by
    implementing API equvalents yourself or removing the code that uses them).

    Next there are performance issues. Most desktops have lots of RAM and
    fast processors, but most handheld devices are slow. You may have to
    optimize some code that can remain unoptimized on the desktop.

    If you have any DLLs on the desktop, you'll need to get the equivalents
    for Pocket PC. The Pocket PC is a lot more constrained about the number
    and size of DLLs it can load - if you've got too many, you may have to
    remove functions in order to fit on the device.

    Most Pocket PC devices don't have a keyboard, so you might have to
    change the UI to make data entry easier.

    Java's dirty little secret is that "write once run anywhere" is a lie.
    It's not too bad to go from a limited platform to a more powerful one,
    but going the other way is hard work.

    Good luck!

    Andrew Jr.

    ================================================== ====================
    IBM Phoenix Labs (OTI)
    2929 North Central Avenue
    Phoenix, Arizona, USA 85012

  2. Re: Port a java app created in Jdeveloper into WSDD

    Andrew Cornwall schrieb:
    > raj.lakshmaihgari@cummins.com wrote:
    >> I have a java app created using Oracle's Jdeveloper and it runs fine
    >> on a PC. I want to load it on a Symbol Pocket PC. In order to do that
    >> I understand that I have to make it compatible with J9 JVM. What do I
    >> need to do to make this happen? I have WSDD 5.7 installed. I am a
    >> novice with Java and would appreciate your help.

    >
    > This is not a trivial task - migrating to any J2ME environment from a
    > J2SE environment is a challenge. In particular, you'll be dealing with
    > memory constraints, screen constraints and API constraints that you
    > don't have on a desktop.
    >
    > The first place to start looking is here:
    >
    > http://java.sun.com/javame/technologies/index.jsp
    >
    > I also found this book, which looks interesting (but I haven't read it,
    > so I can't say for sure):
    > http://www.informit.com/articles/art...?p=170448&rl=1
    >
    > You'll probably want to use the Personal Profile (our PPro package
    > includes the CDC configuration) to be most like J2SE. There will still
    > be methods missing, and you'll need to work around that (either by
    > implementing API equvalents yourself or removing the code that uses them).
    >
    > Next there are performance issues. Most desktops have lots of RAM and
    > fast processors, but most handheld devices are slow. You may have to
    > optimize some code that can remain unoptimized on the desktop.
    >
    > If you have any DLLs on the desktop, you'll need to get the equivalents
    > for Pocket PC. The Pocket PC is a lot more constrained about the number
    > and size of DLLs it can load - if you've got too many, you may have to
    > remove functions in order to fit on the device.
    >
    > Most Pocket PC devices don't have a keyboard, so you might have to
    > change the UI to make data entry easier.
    >
    > Java's dirty little secret is that "write once run anywhere" is a lie.
    > It's not too bad to go from a limited platform to a more powerful one,
    > but going the other way is hard work.
    >


    That's absolutely true!
    Additionally to Andrew's list I have also some hints which may be important:
    In order to port a J2SE Application to J2ME CDC/Personal Profile you
    should first analyze you desktop application:
    1. Does it use Swing -> Bad! You will have to re-write your GUI in AWT.
    But even if you already have an AWT GUI you may have some problems
    because the implementation of AWT on a mobile device may be different
    than on a desktop virtual machine! So test your GUI!
    2. If you have a graphical oriented application where you do a lot of
    drawing you may use the enhanced Java graphics like Graphics2D. Most of
    the classes and functions are currently not available for J2ME (maybe a
    bit mor in personal profile 1.1 than in personal profile 1.0 but that
    does not count). So you may rewrite your code using the very limited
    Java Graphics class instead of Graphics2D!
    3. If you use any optional or Java extension packages of Java2SE like
    javax, JAI or others you you will have no luck...
    4. The best case is if you don't have any GUI or your application is
    based on many library packages which use basic Java 1.3 packages. Than
    you may have the best options to port it. So you can use many of you
    library packages for J2SE and J2ME (CDC/PP) and you may have to only
    re-implement some parts of your software.

    The best test is: download the evaluation version of the Websphere
    device developer, import your project and make a J2ME CDC/Personal
    Profile configuration and click on the build button ;-)

+ Reply to Thread