Java Application中导入的奇怪问题

时间:2023-01-12 13:57:44

I'm building a plugin to extend the Eclipse BPEL Designer. That plugin is supposed to allow users to add meta information to certain model elements via EAnnotations. I already did the same thing for a BPMN model and it work just finde but when doing this for the BPEL designer I reveive rather strange exceptions. The first I thing realized when trying to extend the BPEL Designer was that the designers plugins are defined in an unusual package structure. Instead of org.eclipse.bpel.xxx they have a "bin" in front of all package names. When I'm trying to import some of the designers classes I therefore have to refernce the bin path to make it work. However all the examples I was able to find just imported classes from the ordinary package structure.

我正在构建一个插件来扩展Eclipse BPEL Designer。该插件应该允许用户通过EAnnotations将元信息添加到某些模型元素。我已经为BPMN模型做了同样的事情并且它只是为finde工作但是当为BPEL设计师执行此操作时,我发现了相当奇怪的异常。在尝试扩展BPEL Designer时,我首先想到的是设计器插件是在一个不寻常的包结构中定义的。而不是org.eclipse.bpel.xxx,他们在所有包名前面都有一个“bin”。当我尝试导入一些设计器类时,我因此必须引用bin路径才能使其工作。但是所有的例子我都能从普通的包结构中找到导入的类。

Most of the time importing classes with the bin in front of the package name worked fine for me but every now and then I receive a strange error message. The message is in the form of: The type org.eclipse.bpel.xxx cannot be resolved. It is indirectly referenced from required .class files It seems that Eclipse somehow can't find certain classes. I'm stuck at this point for over a week now and don't find any solution. From my point of view the problem has to be seen in the BPEL Designer plugins. Inside those plugins they reference classes in the form of org.eclipse.bpel.xxx but as I said when I reference those plugins their classes are inside packages with a "bin" in front of the normal package name. Could that be an explanation why certain classes can't be referenced by Eclipse and I get those strange error messages?

大多数情况下,使用包名称前面的bin导入类对我来说很好,但我偶尔会收到一条奇怪的错误消息。消息的形式为:org.eclipse.bpel.xxx类型无法解析。它是从所需的.class文件间接引用的。似乎Eclipse在某种程度上无法找到某些类。我现在已经停留了一个多星期了,并没有找到任何解决方案。从我的角度来看,问题必须在BPEL Designer插件中看到。在这些插件中,它们以org.eclipse.bpel.xxx的形式引用类,但正如我所说,当我引用这些插件时,它们的类在普通包名前面的“bin”包内。这可能是一个解释为什么Eclipse无法引用某些类,我得到那些奇怪的错误消息?

I'd appreciate any new ideas about that problem and hope that somwebody can give me an advice to solve that problem.

我很欣赏有关这个问题的任何新想法,并希望somwebody可以给我一个解决这个问题的建议。

Cheers Stefan

1 个解决方案

#1


I already encountered in the past such troubles ...

我以前遇到过这样的麻烦......

I think there is a problem with the export/import of the BPEL Designer plugin.

我认为导出/导入BPEL Designer插件存在问题。

How did you get this plugin ? Are you working with binary plugin or plugin imported as source in your SDk ?

你是怎么得到这个插件的?您是使用在SDk中作为源导入的二进制插件或插件吗?

Try to get again this plugin, may be an other version, or from an other source .. an update site.

尝试再次获取此插件,可能是其他版本,或来自其他来源..更新站点。

I really think these "bin" packages/folders should not be here

我真的认为这些“bin”软件包/文件夹不应该在这里

Hope this can help ...

希望这可以帮助......

#1


I already encountered in the past such troubles ...

我以前遇到过这样的麻烦......

I think there is a problem with the export/import of the BPEL Designer plugin.

我认为导出/导入BPEL Designer插件存在问题。

How did you get this plugin ? Are you working with binary plugin or plugin imported as source in your SDk ?

你是怎么得到这个插件的?您是使用在SDk中作为源导入的二进制插件或插件吗?

Try to get again this plugin, may be an other version, or from an other source .. an update site.

尝试再次获取此插件,可能是其他版本,或来自其他来源..更新站点。

I really think these "bin" packages/folders should not be here

我真的认为这些“bin”软件包/文件夹不应该在这里

Hope this can help ...

希望这可以帮助......