FAQ   |  Debugging

 

Borland JBuilder 5.0 Setup for MI

Necessary settings in JBuilder to connect to SAP MI Client.

Prerequisites

Following programs have to be installed and properly working on your computer:

<MI_Home> refers to the folder in which the Mobile Infrastructure is installed (for example C:\ME21).

Setup

Create a new project and set project properties
  1. Create a new JBuilder project with the commands File > New Project.
  2. Follow the three steps of the "New Project" wizard. In step 2 of the wizard select JDK 1.1.8 in the JDK input field and add all Mobile Infrastructure libraries from folder <ME_Home>\lib to the field Required Libraries. For more information about the JDK version, see JDK Version Information.
  3. Adjust the run parameters for the project with the commands: Project > Project Properties - select tab Run and then tab Application. Fill in the parameters as follows:

    Main class com.sap.ip.me.core.Startup
    VM parameters -Duser.dir="<MI_Home>\webapps\me" -Dtomcat.home="<MI_Home>"
    Application parameters -home:<MI_Home> -trace

  4. Set the working directory to <MI_Home>\bin using the commands Project > Project Properties - select tab Paths.

With this configuration JBuilder can start the Mobile Infrastructure server with the commands Run > Run Project. To see the MI start page and to test if the settings are correct, launch your web browser and enter the URL http://localhost:4444/

When Tomcat is running in another window, shut down Tomcat before you start the Mobile Infrastructure in JBuilder with Run > Run Project.

 

Create a new application
  1. Create a new web-application with the commands File > New…- select tab Web - select Web Application. The root path of the web-application must be a “webapp” directory within your project path structure (for example“C:\MI25\COOKBOOKEXAMPLE\webapp”). Enable the Generate WAR checkbox.
    It is very important that the name of your web application is an uppercase name, like COOKBOOKEXAMPLE.

  2. Include the server.xml file from <MI_Home>\conf into your JBuilder Project using the command File > Open. Add following lines at the end of the file before the line </ContextManager>:

    <Context path="/COOKBOOKEXAMPLE"
    docBase="C:/MI25/CookbookExample/webapp"
    debug="0" reloadable="true" />

    Replace path and docbase parameters according to your application name and path settings so that you can test your web-application instantly without copying war file.

  3. Develop your web-application.

When your application works properly in JBuilder you have to perform a final test your web-application’in the Mobile Infrastructure environment. To do that remove the context-entry from the server.xml file, copy your war-file into the webapps directory of your Mobile Infrastructure installation (<ME_Home>\webapps) and start the MI Client (<MI_Home>\bin\startup.bat) and start your application again.

JBuilder uses the jar-tool from JDK 1.3.x to generate the .war and .jar files (regardless of the JDK Version setting). When the final destination of your .war file is a client with JDK 1.1.8 you have to extract the .war file generated by JBuilder (for example into a temporary folder) and repackage the file using the JDK 1.1.8 jar-tool. For details, see JDK Version Information.