JDE 4.3 preprocess

Hello

I have an application written in 4.3 but I'm change it to add a feature that uses an API supported by 4.5 and older only.

I tried to use the pre-treat feature but I don't know if im doing correctly because my inner code source receives comment.

I also added options =-quiet-set = JDE_4_5_0; PREPROCESSOR in the jdp file.

Example:

#ifdef JDE_4_5_0

Import net.rim.blackberry.api.mail.MimeBodyPart;

#endif

It becomes:

#ifdef JDE_4_5_0

# import net.rim.blackberry.api.mail.MimeBodyPart;

#endif

It is fine when I compile it in 4.3 but when I load the JDE 4.5, it is always commented.

Is this really the case? I missed something?

any URL/documents preprocessor will help me much.

Thank you very much.

I found the answer to my own question.

I develop my blackberry apps using netbeans, then I compile using JDE. NetBeans has its own preprocessor mechanism which turns out to be the one making the comment process.

And then another thing that worked for me is part of the project to use Preprocess.

1. I added this to the jdp file

Options =-quiet-set = JDE_4_5_0; PREPROCESSOR

2. Add the //#preprocess at the top of the source file.

3. then the tag based on the example above is not JDE_4_5_0 but I used //#ifdef VER_4_5_0.

Tags: BlackBerry Developers

Similar Questions

  • Preprocessing in Blackberry JDE plugin for Eclipse

    Hello

    Here's a piece of code

    //#preprocess
    public class Main {
    //#ifdef AAA
        int x;
    //#endif
        int x;
        x = 3;
    }
    

    If I run the JDE Eclipse plug in point 1.1, it works perfectly.

    However, when I use Eclipse 1.0 component package 4.2.1 plugn it does not work.

    Eclipse is said to 'Duplicate the field Main.x'. (I have not "define constants 'AAA')

    Any idea on this?

    Eclipse 1.0 and package 4.2 does support preprocessor?

    (I need to develop the application that support 4.2.1 so it is important to use JDE 1.0 eclipse plugins).

    Thank you in advance.

    I found the solution:

    Define an arbitrary Constanst (preprocessor definitions) in the project properties.

    That activates the function "preprocessing" of eclipse and everything works fine.

  • Wanted themselves CHCI, TR koupila v prodejně kabel k iPhonu, jenže jsem dnes ho dostanu k Vanocům, podivala jsem to do krabičky, ale nesahala na něj, jde to vratit?

    Wanted themselves CHCI, TR koupila v prodejně kabel k iPhonu, jenže jsem dnes ho dostanu k Vanocům, podivala jsem to do krabičky, ale nesahala na něj, jde to vratit?

    I would ask you, today I bought in the store of cable to the iPhone, but I'm going to do for Christmas, I looked in the box, but does not extend, it goes back?

  • The Autorouter of preprocessing error.

    Hello

    Earlier, I make a big enough drawing in Ultiboard.

    My drawing is composed of 4 layers. Upper, lower and internal 2. I use the inner layers to Vcc and GND.

    Now, I want the rest of the nets to be connected using copper top and bottom copper.

    After placing all components on my Board, I tried to use the auto-router.

    Do all the nets by hand is ridiculous, as my schema contains 7 pages in Multisim.

    Now, my point is this. When I use the automatic router, I get an error message saying:

    "Error during automatic router of preprocessing.
    Source: Autorouter
    "Not valid by definition - must be multiple layers and circular.

    I use components through-hole and SMT components.

    I couldn't find a topic on this issue, but he said in Portuguese, and I can't read this language.

    Unfortunately, I can't give or download the scheme because it is a product.

    I hope someone can answer my question, because it makes me nuts.

    Thanks in advance,

    Erik

    Problem solved. I had to do my of via a little larger.

    Thanks anyway.

    Erik

  • SDCard of BB JDE 4.2.1 Simulator.

    Quote from previous forums:

    Comments: Raiden
    SDCard of BB JDE 4.2.1 Simulator.
    Posted the: July 10, 2008 06:32
     
    Hello guys have a good day.
    Little do I need your advice. I want to know how to write the file on card SD JDE on local hard drive. I think that it is possible to do. But I do not know how? Please help me guys.
    Have a beautiful day again"

    msohm

    Messages: 2 239
    Join date: Jul, 2005

    Re: SD of the BB JDE 4.2.1 Simulator.
    Posted the: 10 July 2008 09:37
     
    You try to do to the BlackBery Simulator or a real BlackBerry?

    Mark Sohm
    BlackBerry developer journal
    www.blackberrydeveloperjournal.com

    Comments: Raiden
    Re: SD of the BB JDE 4.2.1 Simulator.
    Posted the: July 14, 2008 21:25
     
    Sorry for answering at the end "I am train to the BB Simulator.
    TNX for your reply ' Makk Sohm

    See the knowledge base article developers below for the steps to set up a micro SD card in the BlackBerry Simulator.

    Use a computer filesystem in the form of microSD card
    DB-00654
    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800738/800792/801083/...

    This feature was added in version 4.2.2 of the BlackBerry Simulator.  So unfortunately it is not supported in version 4.2.1.

  • Code Signing - different version of the JDE

    I'm back-porting an application 4.2 to 4.0. I copied the files sigtool directory 'bin' JDE 4.2 in the 'bin' JDE 4.0 directory. However, when I try to sign the COD files, the operation fails. The 'detail' says:

    "The signature on the request of code signing did not check.  The probable cause of this problem is entered an incorrect password. »

    The password is correct and checked several times. There is another reason for this failure? Am I missing a step when you move files sigtool 4.2 back to 4.0?

    The original JDE (the application was developed on) is 4.2.1. One where I am signing is 4.0.2.

    This link explains the changes in version 4.3.0.  It is the only version of the Pack BlackBerry JDE/component where the format of these files has changed.

    What's – the Signature key format changes in BlackBerry JDE 4.3.0
    Article number: DB-00639

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800738/800989/What_Is...

  • Signature with JDE plugin for Eclipse

    Hello

    Have received my key to sign java applications, I'm a little confused as to how the application is signed.  I don't know if it is correct but I'm clicking on Blackberry, request Signatures, and the signature tool opens. I then click on save and I get the message "unable to save signatures until this application has been registered with all the required powers of signature.  I don't see where I am able to save my application within the JDE.  I don't see my application listed with the status of "unregistered".  Any idea on this would be appreciated.

    Thank you

    I found the solution.

    sigtool.DB and sigtool.csk must be placed in your eclipse plugin directory.  On my system, it's

    c:\eclipse\plugins\net.rim.Eide.componentpack4.3.0_4.3.0.8\components\bin

    G.

  • Impossible to download Blackberry JDE

    Hello

    I am trying to download Blackberry JDE v4.5 for these last two days, but after downloading about 14Mo, Server error is coming. Same is the case with my friend who is also trying to download Blackberry JDE. Is there a problem with the server?

    Thanks for your reply. Waiting for the issue to be decided.

  • problem compiling under JDE 4.6

    I got this error when compile my project 4.3 to 4.6

    C:\Program Research In Motion\BlackBerry JDE 4.3.0\samples\com\rim\samples\device\TestApp\DialScreen.java:159: cannot access net.rim.device.api.ui.component.ListFieldMeasureCallback
    file not found net\rim\device\api\ui\component\ListFieldMeasureCallback.class
    private class MyObjectListField extends ObjectListField {}

    This error can be triggered by the expansion of some areas such as the ObjectChoiceField.  We are aware of this problem and it was reported to our development team.

  • Signature tool does not not on JDE 4.2

    Hello

    I JDE Version 4.2 and 4.5 JDE Version installed. Sign tool only works on JDE 4.5.

    He used to work on JDE 4.2 as well.

    How can I sign the work tool for the two d?

    Thank you

    It would be useful to know what measures you take, and what are the mistakes, if any, that you see.

    The key database format changed with JDE 4.3, so if you have copied your GIS files of 4.5 to 4.2 and then tried to sign with the 4.2 SignatureTool that can fail.  You should just use the SignatureTool provided with 4.5 to do everything what your signature.

    If it is not to describe your environment then please provide additional information.

  • JDE Eclipse plug-in

    Hello

    I write this message for tips and out of my concern for the current state of the eclipse for JDE plugin.

    As a newcomer to the development of blackberry, I tried to optimize a process for the development team to

    make their job a little easier, more specifically, the ability to debug our application in eclipse using the Simulator.  I managed to develop a simple application that I can with ease, call the debugger, however, I would like to know about 2 main problems I've noticed

    (1) be constrained in the CBC for source file

    (2) not be able to include libraries third 3rd in a workspace of blackberry.

    Problem # 1 is not a problem, it of a pain, but not as bad as (2).  As you know, most java applications use the libraries open source by preventing the Constitution of third-party libraries, life becomes very difficult, and I suppose that in some cases, people/companies drop this and move to another platform.

    What I really want to know is - what, work to correct these problems and to deliver a new version anytime soon?

    I hope you are because in its current state, you send a bad message to developers, youenjoy that problems with eclise JDE plugin google see what I mean.  I like to develop for the blackberry, but the lack of a debugger is a pretty serious problem.  Given that both Eclipse and Netbeans are main currents IDE, you will need to accept that most of the people will NOT fall to use your own custom made Java IDE.

    There was on my team talks about moving to another platform and is one of the main factors as bug fixing is a nightmare without a debugger and we have standardized on the use of eclipse.

    If the task to solve this is also very good, why not make it open source and you will have an idea of how much of an issue this is and how much people are willing to invest to make it better.

    If you are any chance to go to the Conference for developers in San Francisco next week, then it would be an excellent opportunity for you to ask in the future for various people on BOARD on the plug-in.

  • Version number in "Application Properties" does not match what I put it in in 'Version' on JDE

    I created an application and it is at version 0.9.4.  I put this version number in the JDE under project properties.  This version number is also shown on the screen to start the application.  I create and sign the application.  I send the files .jad and .cod of have downloaded them on our web page.  When I go to our page on my blackberry, it shows that the version is the 0.9.1.  When I install this app, "Application Properties" displays 0.9.1 but the application itself 0.9.4.  I see in the file .jad says 0.9.1.

    How can I match them?  Can I just change this part of the file with a text editor .jad to the current version?

    What version of BlackBerry JDE do you use?  There is a problem in some older versions, where it is not updated the version number in the JAD file.  To work around, you can manually update the version of the JAD file or remove the JAD file, forcing the BlackBerry JDE to recreate when it built your application.

  • How to write a program that allows an HTTPs connection to the APACHE TOMCAT server in blackberry JDE

    Hello.. I am very new to the blackberry JDE environment. But then, I have a project in which I should write a program that will make an HTTPs connection to the apache tomcat server using blackberry JDE. The simulator which I use is 8330-JDE.

    Here is my code...

    import java.io.IOException;

    Import java.io.InputStream;

    Import javax.microedition.io.Connector;

    Import javax.microedition.io.HttpsConnection;

    Import net.rim.device.api.ui.UiApplication;

    Import net.rim.device.api.ui.container.MainScreen;

    public class Httproto extends UiApplication

    {

    public public static void main (String [] args)

    {

    Httproto instance = new Httproto();

    instance.enterEventDispatcher ();

    }

    public Httproto()

    {

    pushScreen (new HttpsConnectionScreen());

    }

    }

    final class HttpsConnectionScreen extends screen

    {

    public HttpsConnectionScreen()

    {

    HttpsConnection c = null;

    InputStream is = null;

    int rc;

    try {String url =

    "https://192.168.2.3: 8443/cit/j_acegi_security_check? j_username = sanogo & j_password = redhat;

    c = (HttpsConnection) Connector.open (url);

    c.setRequestMethod (HttpsConnection.POST);

    System.out.println ("connection is open with the server");

    Get the response code is open the connection,

    Send the request and read HTTP response headers.

    The headers are stored until asked.

    RC = c.getResponseCode ();

    System.out.println ("response from the server" + rc);

    if (rc! = HttpsConnection.HTTP_OK) {

    throw new IOException ("HTTP response code:" + rc);

    }

    is = c.openInputStream ();

    Get the ContentType

    The string of type = c.getType ();

    The length and process data

    int len = (int) c.getLength ();

    if (len > 0) {

    int actual = 0;

    int BytesRead = 0;

    byte data = new byte[len]; while ((bytesread! = len) & (real! = - 1)) {

    real = is.read (data, bytesread, len - bytesread);

    bytesRead += real;

    }

    } else {}

    int ch;

    while ((ch = is.read (())! = - 1). {

    }

    }

    } catch (ClassCastException e) { throw new IllegalArgumentException ("not a HTTP URL");}

    }

    catch (IOException ioe) {}

    finally {

    Try

    {

    if (is! = null)

    is. Close();

    if (c! = null)

    c.Close ();

    }

    catch (IOException ioe) {}

    }

    }

    }

    When I run this program in the Simulator, I can do nothing. Please correct me if I'm wrong in coding.

    As I am new to this blackberry JDE environment, ideas and suggestions on how to write and run the sample applications in the blackberry are more welcomed.

    Concerning

    Hinduja

    Make sure that your MDS starts when the Simulator starts.  In the JDE will in Edition > Preferences > Simulator > General and click the checkbox "launch Mobile Data System connection with Simulator Service.

  • JDE 4.5.0

    Hello

    I download the java plug-in in eclipse but it only came with JDE 5.0 and my blackberry have firmware v4.6.1.310 and when I try to update midlet mi I have invalid cod.

    It is possible that the reason is because I use the JDE 5.0 and use the 4.5.0?

    Where can I download the 4.5.0?

    Thank you

    Hello

    Found all JDE avaible here:

    http://NA.BlackBerry.com/eng/developers/javaappdev/javadevenv.jsp

    Cali03

  • JDE dosen't start more

    Hi people,

    I developed my application on JDE 6.4.1.

    A few days ago I have installed all the other JDE to test the object.

    Now, I can not start any JDE. I uninstalled all d and again installed the JDE 4.6.1.

    But it begins only once the reinstallation. Once closed start JDE doesn't work anymore.

    Same thing happens with all other d.

    If you had installed a simulator after having installed the JDE might be the problem.

    I have an ongoing problem when I install a new sim card the JDE does not start.

    To solve the problem, I just uninstall the sim card.

Maybe you are looking for