×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Oct 2007
    Location
    Paris
    Posts
    32

    Angry How to Generate mobile compatible .jar file from a .java source file using jsp

    Hi i am creating application in j2me. application is so simple.
    but the contents it contains is so dynamic. i wanna build the appplication or say .jar file compatible to all mobiles on webserver. is there any commands or functionality available on webserver so that i can build my .jar file without having wirelless toolkit.
    Mayur Dharukiya
    M.B.A+B.E.+Diploma In Information Technology + SAP HR Consultant
    Tata Consultancy Services Certified Java Developer
    Brainbench Ceftified Java Developer Transcript ID is 6577305
    htttp://www.ampleassociation.com

  2. #2
    Registered User
    Join Date
    Sep 2007
    Location
    Bangalore
    Posts
    868

    Re: How to Generate mobile compatible .jar file from a .java source file using jsp

    Hi mayurvihaar Welcome to Forum Nokia ,

    To build the jar there is no need of the WTK took Kit . You only required is the midp2.0.jar , cldc1.0/1.1 jar , for obsification you required the progard.jar file and the java environment.

    You can write the ant script to build the jar file using the all these jars putting together. Internally WTK or Sony or NOKIA emulators or Net beans will use this ant script to build the ,jar file. If you wan to see the ant script . In any of the Netbeans project you can find the nbproject folder in that build-impl.xml this will do the job of bundling your code to .jar file see the commands what it is using and you can replicate the same thing.
    For ant help go through this links
    http://ant.apache.org/manual/using.html
    http://ant.apache.org/

  3. #3
    Registered User
    Join Date
    Oct 2007
    Location
    Paris
    Posts
    32

    Re: How to Generate mobile compatible .jar file from a .java source file using jsp

    thank for reply.

    how can i put midp.jar and cldc.jar on webserver?
    how can i execute ant script using jsp?

    how can i integrate dynamically generated xml file into my midp.java source file?

    please reply as soon as possible.
    Mayur Dharukiya
    M.B.A+B.E.+Diploma In Information Technology + SAP HR Consultant
    Tata Consultancy Services Certified Java Developer
    Brainbench Ceftified Java Developer Transcript ID is 6577305
    htttp://www.ampleassociation.com

  4. #4
    Registered User
    Join Date
    Sep 2007
    Location
    Bangalore
    Posts
    868

    Re: How to Generate mobile compatible .jar file from a .java source file using jsp

    Hi,
    You can copy those jar files from your machine to webserver , put in to one directory and set that path.

    To execute the ant script you have to write some batch files . Those batch file will contains the commands like compiling your code using the cldc and midp , preparing those compiled class to jar files. With the System.execute(); you can execute those batch files.

  5. #5
    Registered User
    Join Date
    Sep 2007
    Location
    Bangalore
    Posts
    868

    Re: How to Generate mobile compatible .jar file from a .java source file using jsp

    Hi ,

    I have prepared the document how to build the jar file using ant script send me your email I will forward that document.

  6. #6
    Registered User
    Join Date
    Oct 2007
    Location
    Paris
    Posts
    32

    Re: How to Generate mobile compatible .jar file from a .java source file using jsp

    Mayur Dharukiya
    M.B.A+B.E.+Diploma In Information Technology + SAP HR Consultant
    Tata Consultancy Services Certified Java Developer
    Brainbench Ceftified Java Developer Transcript ID is 6577305
    htttp://www.ampleassociation.com

  7. #7
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    65

    Re: How to Generate mobile compatible .jar file from a .java source file using jsp

    If you read any get started with J2ME book you will find command line tools for building j2me jad and jar files.
    These commands can be put in a batch file and provided with the required libraries (e.g midp20.jar,cldc11.jar and any other optional jars like mmapi.jar for multimedia etc)
    This batch file could be called from your JSP and the jar when generated could be picked up and given for download on request.

    Also to find out what device has generated the request you can read the headers of the request and find out the details like phone model, manufacturer etc. Based on your database you could always send the pre generated jad/jar or build a brand new one and send.
    Thanks and Regrads
    Pradeepcg

  8. #8
    Registered User
    Join Date
    Oct 2007
    Location
    Paris
    Posts
    32

    Angry Re: How to Generate mobile compatible .jar file from a .java source file using jsp

    thank for your very good answers,

    i tried to execute batch file from jsp using Runtime.execute("file path") but not was happened. one very well known error shown that please put tools.jar in lib folder but that was already in its perfect destination.

    I have also tried System.execute but it wasn't run.
    can you resolve my problem please help me out urgent.
    Mayur Dharukiya
    M.B.A+B.E.+Diploma In Information Technology + SAP HR Consultant
    Tata Consultancy Services Certified Java Developer
    Brainbench Ceftified Java Developer Transcript ID is 6577305
    htttp://www.ampleassociation.com

  9. #9
    Registered User
    Join Date
    Oct 2007
    Location
    Paris
    Posts
    32

    Angry Re: How to Generate mobile compatible .jar file from a .java source file using jsp

    how can i read .xml file from the .jar file. .xml file is resides in the jar file in one folder. application is build successfully and running in emulator and mobiles. not i wanna access .xml file within .jar file.

    I wanna generate application menu using xml file. tell me how can i do this.

    every time the application generated xml file would be different.
    xml tags will be same for building the menu.and sub munu.
    Mayur Dharukiya
    M.B.A+B.E.+Diploma In Information Technology + SAP HR Consultant
    Tata Consultancy Services Certified Java Developer
    Brainbench Ceftified Java Developer Transcript ID is 6577305
    htttp://www.ampleassociation.com

  10. #10
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,406

    Re: How to Generate mobile compatible .jar file from a .java source file using jsp

    Hi mayurvihaar,

    to access resources bundled within MIDlet JAR file, you can use the Class getResourceAsStream() method.

    To parse XML, there are some available Java ME libraries, as kXml:

    http://kxml.sourceforge.net/

    Also, check out available sample code on Forum Nokia Wiki:

    http://wiki.forum.nokia.com/index.ph...J2ME_with_kXML
    http://wiki.forum.nokia.com/index.ph...rser_with_KXml

    Pit

Similar Threads

  1. strange behavior on sending jar file via WAP for different mobile network
    By thone in forum Digital Rights Management & Content Downloading
    Replies: 2
    Last Post: 2005-10-28, 07:53
  2. Replies: 0
    Last Post: 2005-10-27, 20:51
  3. Replies: 2
    Last Post: 2005-01-17, 14:33
  4. Replies: 0
    Last Post: 2005-01-05, 11:24
  5. Nokia Mobile VPN Client
    By marcyl in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2003-12-01, 14:47

Posting Permissions

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