English 中文(简体)
Netbeans平台:从其他模块设定依赖/获取方法
原标题:NetBeans Platform: Setting dependencies/accessing methods from other modules

我有一个问题涉及使用NetBeans平台和设定依赖关系,或简单地从另一个模块中引用类别。

我有的是:

NetBeans 平台应用程序,主要模块名为查看器

com.demo.viewer
 -MainScreenTopComponent.java

我有一个模块叫做"菜单工具"

com.demo.toolbar
 -menutoolbar.java
 -action1.java

菜单toolbar.java 拥有一种方法, 我想从 MainScreenTopComponent 访问该方法 。

我尝试过右键点击查看器模块, 尝试到属性 & gt; 边框, 并添加对菜单工具栏模块的依赖性, 但我仍然无法导入软件包 。

感谢任何帮助 = ()

谢谢!

Edit: 解决了我自己。 我并没有在查看器中增加依赖性,而是在平台 建设/ Clusters/ Modules 文件夹中发现了一个被困的罐子!

最佳回答

不需要用包着的JAR

您需要从模块菜单工具栏中导出课程 :

  1. right click on your module
  2. select properties
  3. click on "API Versioning"
  4. check the package com.demo.toolbar in the list of packages labelled "Public Packages"

此假设您的菜单工具栏模块已经是您的 NetBeans 平台应用程序的一部分 。

问题回答

暂无回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签