dynamic repackaging of java code

Posted on 2004-10-25
Last Modified: 2010-05-18
Dear All

I have a java ( j2me ) mobile application that I want to sell thru my web site, this application depends very much on the home location of each customer, so I want the customer to specify his location ( city ) , and then I can repackage the jar file for him , is it possible ?.

thnks for the help
Question by:khamouda
    LVL 13

    Accepted Solution

    use the .jad file add a parameter called city, so ur jad file will look like this:

    MicroEdition-Profile: MIDP-1.0
    MicroEdition-Configuration: CLDC-1.0
    MIDlet-Version: 2.0
    MIDlet-Name: MyApp
    MIDlet-Vendor: myApp
    MIDlet-Jar-URL: MyApp.jar
    MIDlet-Jar-Size: 10107
    MIDlet-1: NumberGuessMIDlet, /res/duke_ce.png, urpackage.MyMidlet
    city: London

    from ur midlet get the city property value:

            String City= getAppProperty("city");

    and then continue ur logic based on this

    it is easy to rewrite ur application JAD file rather than programatically repackage ur J2ME application

    Is this enouph for u?
    LVL 1

    Author Comment


    thanks but the problem is that I have a very large array that needs to be defined in the code it self, this array depends on the city, and I cannot put such arrays for many cities !

    did you get me ?
    LVL 13

    Expert Comment

    no problem manipulate this in ur jad too, add to ur jad the following:

    city: london
    city-data: xyz, wzu, ...., ......, ........., ........

    just read it from ur application using

    String city-data= getAppProperty("city-data");

    and parse based on "," and put into ur Vector
    LVL 13

    Expert Comment

    also if u r affraid to put all data in one line comma separated u can do some thing like this:

    city-data1 = 50 items
    city-data2 = more 5o items


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Suggested Solutions

    Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
    Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
    Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
    Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

    884 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now