Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>So, the way to do this is, unfortunately, to change the J2ME-Polish source! As outlined in this <a href="http://developer.berlios.de/bugs/?func=detailbug&amp;bug_id=16901&amp;group_id=1246" rel="nofollow noreferrer">bug report</a> the J2ME Polish build framework (at version 2.1.4) doesn't pass on the RIM-MIDlet-Flags-x JAD attribute to RAPC.</p> <p>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).</p> <p>The diff (from 2.1.4) source:</p> <pre><code>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&amp;group_id=1246&amp;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 &lt; keys.length; i++) { String key = (String) keys[i]; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload