11-06-2008 12:04 PM
I am using the JDE to dev a BB app and have a JAD added to the list of files.
How do I read it? Its seems not to read, like the PNG icon I click right on it and say it is the app icon
when installed on the emulator and that work is there something special with a JAD?
11-06-2008 12:13 PM
I don't think there is a jad reader. You have to look at the jad manually by opening the file directly using a text editor like Notepad or Textpad.
Also, I don't think you should be adding a jad to your project (unless you want to use an added jad file for something else), the JDE generates the jad file automatically for you and places it in your project folder.
11-06-2008 12:21 PM
Well thats funny, my project is called bbitm and I have jad called bbitm.jad added to it.
If I make the vender a different name the JDE complains which is good. So I have no idea why I cannot read the fields
out of it. I use a JAD for deployment.
11-06-2008 12:31 PM
11-06-2008 01:10 PM
This is my JAD file added to my project. If I edit the version number the JDE wil lcomplain as I
have it setup in the JDE as 1.0 which is good. I want to read all the XMIDLET properties
and I get nothing using the following code
Created-By: IBM Corporation
Manifest-Version: 1.0
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: MIDP-2.0
MIDlet-1: bbitm, itm.png, com.ibm.tivoli.midp.bbitm
MIDlet-Description: ITM Blackberry
MIDlet-Jar-Size: 54308
MIDlet-Jar-URL: bbitm.jar
MIDlet-Name: bbitm
MIDlet-Permissions: javax.microedition.io.Connector.https
MIDlet-Vendor: IBM Corporation
MIDlet-Version: 1.0
RIM-COD-Creation-Time: 1225994433
RIM-COD-Module-Dependencies: net_rim_cldc
RIM-COD-Module-Name: bbitm
RIM-COD-SHA1: d8 44 38 1e 07 d4 e0 7c 00 bf cf 53 c0 a2 a3 24 d3 03 73 fd
RIM-COD-SHA1-1: e3 52 4c 9d d1 bd 32 a6 e7 4d db 63 d1 e2 f1 09 8c db cf bc
RIM-COD-Size: 23056
RIM-COD-Size-1: 58392
RIM-COD-URL: bbitm.cod
RIM-COD-URL-1: bbitm.cod
RIM-MIDlet-Flags-1: 0
XMIDlet-Device-host: http://whatever:1920///cms/soap
XMIDlet-Device-password: password
XMIDlet-Device-piechart-full: false
XMIDlet-Device-query: <CT_Get><userid>sysadmin</userid><password></passw
XMIDlet-Device-refresh: 2
XMIDlet-Device-user: sysadmin
public class bbProperty {
CodeModuleGroup[] allGroups = CodeModuleGroupManager.loadAll();
CodeModuleGroup myGroup = null;
static public String getDeviceName(){
return DeviceInfo.getDeviceName();
}
public bbProperty(){
String moduleName = ApplicationDescriptor.currentApplicationDescriptor
for (int i = 0; i < allGroups.length; i++) {
if (allGroups[i].containsModule(moduleName)) {
myGroup = allGroups[i];
break;
}
}
}
public String getAppProperty(String name){
if (myGroup==null)
return null;
return myGroup.getProperty(name);
}
}
This will work on the real device but not on the emulator
using for example
String s= bbProperty.getAppProperty("XMIDlet-Device-host");