views:

12

answers:

1

I am developing a study project using the mosembro (mobile semantic browser) project inside my Android project. I am using Eclipse and I created my project, downloaded / imported mosembro and included in my project's build path.

So now my code needs to refer to a resource in the mosembro's project. I want to do something like this:

String commonJS = getScript(R.raw.common);

In this snippet, I want to load a javascript file from mosembro's project: res -> raw -> common.js so I need the java syntax to get "R" (precompiled resource-class) of Mosembro from my HelloGoogle project.

What is the syntax to replace the R-class of this with the included project's R-class.

Is that clear?

A: 

I found the answer and it is very simple. You can add projects to your project through the Java Build Path.

  1. Right click on the project you are working on
  2. Select Build Path -> Configure Build Path ...
  3. Then pick the Projects tab
  4. Finally, press the Add... button and select the project that you want to include.

This keeps everything in code-sync if you make changes rather than cut-n'-paste.

mobibob