Book a Demo

Author Topic: How to import another .eap file?  (Read 7470 times)

mmo

  • EA User
  • **
  • Posts: 85
  • Karma: +0/-0
    • View Profile
How to import another .eap file?
« on: July 31, 2013, 07:47:55 pm »
In order to be able to refer to standard Java types I imported the Java rt.jar file into an new, i.e. previously empty, class model an saved that as a separate Java_1.7.eap project file). This import ran well over an hour!

But now I am stuck: how do I import or include or refer (whatever EA supports) that Java class model into my actual project, so that I can refer to those classes?

The manual only talks about importing .java source files or .jar files into an existing project, but I don't want to have to re-un this hour-long import of rt.jar for each new project! Can you advise, please!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to import another .eap file?
« Reply #1 on: July 31, 2013, 08:43:35 pm »
You could export the jar import via XMI and re-use it via XMI import in other repositories. That should be quicker.

q.

mmo

  • EA User
  • **
  • Posts: 85
  • Karma: +0/-0
    • View Profile
Re: How to import another .eap file?
« Reply #2 on: August 15, 2013, 09:27:10 am »
Alas, it's not quicker - and it doesn't work.
First, the export ran for maybe an hour and then it crashed...
So, no joy!

Other ideas to import the standard Java API into a project (classes only, no diagrams or such)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to import another .eap file?
« Reply #3 on: August 15, 2013, 10:53:22 am »
The only other alternative is to clone the one containing the import with Project Transfer and then move in the "small own rest".

q.

mmo

  • EA User
  • **
  • Posts: 85
  • Karma: +0/-0
    • View Profile
Re: How to import another .eap file?
« Reply #4 on: August 15, 2013, 04:37:31 pm »
Seems to be indeed the only alternative...

In a second attempt the export ran for >4 hours, came through (surprise!)  and produced an XML file of  320+MBs! I didn't even try to import this beast, yet. Probably that takes at least as long...

Has anybody an idea, how to generate and import just a subset of the Java rt.jar? Normally one doesn't really need the ENTIRE java runtime, just the "official" Java API (i.e. essentially java.* plus maybe javax.*).

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: How to import another .eap file?
« Reply #5 on: August 15, 2013, 05:11:58 pm »
Use any zip utility (E.g. Winzip, 7-zip) to extract the individual .CLASS files you want from the JDK (rt.jar) into a temporary directory and then import into EA using the "Import Source Directory" command.

prasanna

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: How to import another .eap file?
« Reply #6 on: December 12, 2018, 09:47:51 pm »
do publish->export to XMI from one eap and save it to some file name.
 to import diagram from other eap in current eap, go to publish->import XMI to load the package/diagram from other eap which is exported above.