是否可以使用Java创建Enterprise Archetict扩展? [英] Is it possible to Create Enterprise Archetict Extensions using Java?

查看:99
本文介绍了是否可以使用Java创建Enterprise Archetict扩展?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有可能用Java构建用于Enterprise Architect的AddIn扩展。

I am wondering if it is possible to build an AddIn Extension for Enterprise Architect in Java.

我正在搜索,但没有找到任何具体答案。有人可以为我提供这种情况的建议吗?

I am searching, but I have not found any concrete answers. Could someone give me a recommendation for this situation?

推荐答案

看起来,您不能仅使用以下命令来构建Enterprise Architect插件普通的Java代码。在EA安装的 Java API 目录中有一个 readme.txt 文件:

Well it looks like, you can't build Enterprise Architect AddIns just using plain java code. There's a readme.txt file to be found in your EA installation's Java API directory:


Enterprise Architect Java API自述文件

Enterprise Architect Java API Readme

此目录中的文件可用于访问Enterprise Architect的COM自动化API从Java。要使用此API,请遵循以下设置过程。

The files in this directory can be used to access Enterprise Architect's COM automation API from Java. To use this API, please observe the following set-up procedure.


  1. 将文件SSJavaCOM.dll复制到Windows PATH中的任何位置。例如,windows\system32目录。

  2. 将eaapi.jar文件复制到Java CLASSPATH中的某个位置,或者Java类加载器在运行时可以找到它的位置

限制和已知问题:

1。您目前无法使用此API编写EA插件。它仅适合访问自动化服务器API。

2.由于Java与本机方法和COM交互的性质,垃圾回收并不是最佳的。 Java垃圾收集器无法看到为它们分配的本机COM类和内存,因此在使用Java API处理许多对象时,应不时显式调用垃圾收集。这将确保及时释放本机内存。

1. You cannot currently use this API to write plug-ins for EA. It is only suitable for accessing the automation server API.
2. Due to the nature of Java interacting with native methods and COM, garbage collection is not optimal. Native COM classes and memory allocated for these is not seen by the Java garbage collector, so you should explicitly invoke a garbage collection from time to time when working with many objects using the Java API. This will ensure native memory is freed in a timely fashion.

您也许可以提供基于Java代码的.NET程序集。我不太熟悉此方法,但是IIRC我一直在阅读它是可能的。

You may be able, to provide a java code based .NET assembly. I'm not so well versed with this, but IIRC I've been reading it's possible.

恕我直言,构建AddIn的最直接方法是使用的问题。看看Geert Bellekens博客: 教程:在10分钟内创建您的第一个C#Enterprise Architect插件

IMHO the most straightforward way to build an AddIn is to use c#. Have a look at Geert Bellekens Blog: "Tutorial: Create your first C# Enterprise Architect addin in 10 minutes"

更多意见,为什么Java似乎不是开发Enterprise Architect插件的核心语言的好选择。

Here are some more opinions, why java doesn't seem to be a good choice as the core language to develop an Enterprise Architect AddIn.

这篇关于是否可以使用Java创建Enterprise Archetict扩展?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆