MicroStrategy SDK – How to setup your Eclipse Java development environment

When it comes to working with the MicroStrategy SDK there is a lot of resources out there, however, when it comes to getting started and setting up your devlopment environment, you may find that the instructions are often lacking and disjointed.

I find there are primarily two different buckets developers fall into when it comes to SDK development. First, there are those that want to modify the existing MicroStrategy web application and second, there are those that want to incorporate MicroStrategy into their own existing custom web applications. The main focus of this post is the latter.

When setting up my development environment using Eclipse I ran into several issues that had me pounding my fists against the desk. I scoured the internet only to find that the documentation was either limited or dated. It seems like I was fighting through hurdle after hurdle until finally I was able to get everything working.

I decided to create this post to help others that would like to get started with MicroStrategy SDK development.

So let’s jump right in and get started.

Step 1 – Install Java SDK 8 from here (Make sure you install JDK and not just JRE)

Step 2 – Download and extract the Eclipse Java IDE from here. I’m currently working with MicroStrategy 10.2 and use Eclipse Mars.

Step 3 – Open Eclipse and click Help->Install new software…

In the “work with” drop down choose “http://download.eclipse.org/releases/mars” and check the following packages to install:

  1. Eclipse Java Web Developer Tools
  2. JST Server Adapters
  3. JST Server Adapters Extensions
  4. Eclipse Java EE Developer Tools
  5. WST Server Adapters

Step 4 – Download and install Apache Tomcat from here (I use Tomcat version 7). We are installing Tomcat to your development environment but if you have experience developing Java web applications you may want to skip this step however, this is for beginners so I assume nothing.

After Tomcat is installed go to the install directory for example “C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\conf” and edit “tomcat-users.xml” file and add users and roles. See the example screenshot below.

Step 5 – Configure the Tomcat run time with Eclipse

  1. In Eclipse click Window-Preferences->Server->Runtime Environment
  2. Click Add->Click Apache Tomcat v7.0->Click Next
  3. Click Browse… and choose C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0
  4. Choose java8 (JDK) in the JRE dropdown
  5. Click Finish then OK

Step 6 – Now for the fun part where we create a new web project and integrate with MicroStrategy SDK.

  1. In Eclipse Click File->New->Project->Web->Dynamic Web Project->Click Next
  2. Enter project name and choose runtime module version 2.5. See screenshot below for an example. (Note: Target runtime should default to Apache Tomcat v7.0)

3. Click next, then next again, then finish

4. Go to Project->Properties->Choose “Java Build Path” from left tree view

5. Click Libraries tab and click Add external jars

6. Add MicroStrategy JAR files. These files can be obtained from an existing MicroStrategy installation. In Windows they can be found in “C:\Program Files (x86)\Common Files\MicroStrategy” for example. NOTE: Make sure you ONLY add the files that are named like Web*.jar and the file JavaWebAPI.jar

7. Click Apply and OK

8. After you created the project next go to Project->Properties->Deployment Assembly and add the MicroStrategy jar files. NOTE: THIS IS REQUIRED OR THE DEPLOYED APP WILL FAIL TO FIND THE MICROSTRATEGY JAR FILES AND THE APP WILL NOT WORK!

Congratulations! You now have a MicroStrategy development environment and are ready to begin developing custom Java applications that integrate with MicroStrategy.

In Part 2 of this post I show you how to connect to MicroStrategy, run a report, retrieve the results as XML, parse the results and finally display the report results to a user from a custom Java web application. For that post I will of course be using a development environment that was setup with these very same instructions.

8 Replies to “MicroStrategy SDK – How to setup your Eclipse Java development environment”

  1. Thanks for the post! I have configured Eclipse Neon with MSTR ASP.

    I’m trying to modify the documents content in order to add functionality when you execute a document. Have you achieved something like this? The idea is to insert some javascript code to show a lateral menu (I can’t use the MSTR menu since we use &hiddensections=path,footer,header), but I’m not sure where to make the changes. RW_content file? Thanks in advance.

    Regards,
    Elena.

    1. Sorry for the late reply, I have been busy lately. Have you got this working? I’m guessing you are using an HTML container with custom javascript, right?

      1. Hi! Yes, I could do it 🙂 Now I’m trying to configure D3 visualization to MSTR, but the manuals I’ve found are not too clear. Have you done this before? Thanks in advance 🙂

  2. This above info is very helpful to setup MSTR SDK with Java.. Am trying out the above procedures

      1. Hi ,

        Am using Eclipse Neon 4.6 version and java jdk1.8.0_121.
        Can I follow up the same above procedure to configure microstrategy SDK

        1. How do I install the below packages in neon version. Please help as am not seeing any options

          1.Eclipse Java Web Developer Tools
          2.JST Server Adapters
          3.JST Server Adapters Extensions
          4.Eclipse Java EE Developer Tools
          5.WST Server Adapters

Comments are closed.