Yet another question about importing Java projects

I sometimes manage to import java projects after a try-and-error process; I would like to learn the right away to do it.

Suppose that I want to import all the code of Apache Tomcat (it contains code under the packages javax... and org.apache...). I want to call the Solution ApacheTomcat. At that point models have to be called but the importer complains because it want the name of the model where to import the file to be named as the package. At this point I get stuck, sometimes through some rename I managed to trick the importer but it is a clumsy black magic that I am not able to repeat constantly.

How should I proceed?
Comment actions Permalink

If you just want to reference existing code, you could use the javastubloader.

I have never tested importing. Sorry, cant help here.

Comment actions Permalink
Hi Michael,
thank you for your answer. The problems with using the javastubloader are two:
  • you can not modify the java code inside MPS
  • if you modify the code outside than you have to de-import the stub and then re-import. At this point all the references you had to the jar are lost and have to be manually rewritten. This is bad. Very bad.


Please sign in to leave a comment.