Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 654581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:30:36+00:00 2026-05-13T22:30:36+00:00

I have an application which is built from command line (ANT) using J2ME Polish.

  • 0

I have an application which is built from command line (ANT) using J2ME Polish. As such, this application is defined through a build.xml, not from Blackberry JDE project files.

What I need to do is have this application auto-start. This is easy enough to do once the application has been run for the first time (example). However, this does require the application to be manually run by the user (which I want to avoid).

The JDE provides options which you can check to enable auto-start, and from ANT:

  <cldc runonstartup=="true"...

Will do the trick. The question is, how do I integrate this into a Polish buiild (i.e. into a Polish build.xml which is also building for other platforms)?

Anyone know what the auto-start option in the JDE actually does / what it changes?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T22:30:36+00:00Added an answer on May 13, 2026 at 10:30 pm

    So, the way to do this is, unfortunately, to change the J2ME-Polish source! As outlined in this bug report the J2ME Polish build framework (at version 2.1.4) doesn’t pass on the RIM-MIDlet-Flags-x JAD attribute to RAPC.

    The changes are relatively simple – merely passing on the RIM-MIDlet-Flags-1 value if defined in the JAD, otherwise setting it to zero (as the original 2.1.4 source does).

    The diff (from 2.1.4) source:

    Index: /enough-polish-build/source/extensions/de/enough/polish/blackberry/JarToCodFinalizer.java
    ===================================================================
    --- /enough-polish-build/source/extensions/de/enough/polish/blackberry/JarToCodFinalizer.java   (revision 315)
    +++ /enough-polish-build/source/extensions/de/enough/polish/blackberry/JarToCodFinalizer.java   (revision 316)
    @@ -36,6 +36,7 @@
     import java.util.Calendar;
     import java.util.Locale;
     import java.util.Map;
    +import java.util.List;
     import java.util.Properties;
    
     import org.apache.tools.ant.BuildException;
    @@ -185,6 +186,13 @@
                }
            }
            File iconFile = null;
    +       Map jadProperties;
    +       try { 
    +           jadProperties = FileUtil.readPropertiesFile( jadFile, ':' );    
    +       } catch (Exception e) {
    +           e.printStackTrace();
    +           throw new BuildException("Unable to read JAD file " + e.toString() );
    +       }
            if (mainClassName != null) {
                try {
                    /*
    @@ -230,12 +238,26 @@
                            "MicroEdition-Configuration: CLDC-1.1",
                            //"MIDlet-1: Demo," + iconUrl + ",",
                            "MIDlet-1: " + env.getVariable("MIDlet-Name") + "," + iconUrl + ",",
    -                       //"MIDlet-Icon: " + iconUrl,
    -                       "RIM-MIDlet-Flags-1: 0"
    +                       //"MIDlet-Icon: " + iconUrl
                    };
    
    +               /* Ensure that if RIM-MIDlet-Flags is defined in the JAD, it is
    +                * passed on to RAPC to create the COD file.
    +                * See https://developer.berlios.de/bugs/?func=detailbug&group_id=1246&bug_id=16901
    +                * for details.
    +                */
    +               ArrayList newEntriesList = new ArrayList(Arrays.asList(newEntries));
    +               final String flagsKey = "RIM-MIDlet-Flags-1";
    +               String flagString = (String)jadProperties.get(flagsKey);
    +               if (flagString == null) {
    +                   flagString = "0";
    +               }
    +               flagString = flagString.trim();
    +               System.out.println("JarToCodFinalizer setting " + flagsKey + ": " + flagString);
    +               newEntriesList.add(flagsKey+ ": "  + flagString);
    +
                    File rapcFile = new File( jadFile.getParent(), codName + ".rapc");
    -               FileUtil.writeTextFile( rapcFile, newEntries );
    +               FileUtil.writeTextFile( rapcFile, newEntriesList );
                } catch ( IOException e ) {
                    // this shouldn't happen
                    e.printStackTrace();
    @@ -367,7 +389,6 @@
                // now rewrite JAD file so that it is ready for OTA download:
                // (first backup JAD file:)
                //FileUtil.copy(jadFile,  new File(jadFile.getParent(), jadFile.getName() + ".bak") );
    -           Map jadProperties = FileUtil.readPropertiesFile( jadFile, ':' );    
                Object[] keys = jadProperties.keySet().toArray();
                for (int i = 0; i < keys.length; i++) {
                    String key = (String) keys[i];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 395k
  • Answers 395k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Assuming the form's DataContext has been set to the customer… May 15, 2026 at 2:44 am
  • Editorial Team
    Editorial Team added an answer Triggers don't have any memory: As soon as the trigger… May 15, 2026 at 2:44 am
  • Editorial Team
    Editorial Team added an answer What do you know about networks as is? What have… May 15, 2026 at 2:44 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.