Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

dynamic repackaging of java code

Posted on 2004-10-25
6
Medium Priority
?
266 Views
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
0
Comment
Question by:khamouda
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
6 Comments
 
LVL 13

Accepted Solution

by:
petmagdy earned 500 total points
ID: 12398888
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?
0
 
LVL 1

Author Comment

by:khamouda
ID: 12398943

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 ?
0
 
LVL 13

Expert Comment

by:petmagdy
ID: 12398974
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
0
 
LVL 13

Expert Comment

by:petmagdy
ID: 12399026
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

etc......
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
In this post we will learn different types of Android Layout and some basics of an Android App.
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…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Suggested Courses

636 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