大家好,欢迎来到IT知识分享网。
目录
1.搭建前提
- JDK8安装
- Eclipse 下载地址:http://mirror.bit.edu.cn/eclipse/technology/epp/downloads/release/oxygen/3a/eclipse-rcp-oxygen-3a-win32-x86_64.zip
2. 安装Node 开发向导
Eclispe页面: Help -> Install New Software
add–>name:KNIME 3.6 Update Site
Location: http://update.knime.com/analytics-platform/3.6
–> OK
KNIME Node Development Tools –> KNIME Node Wizard 3.6.0.v201805030959,
然后按照提示,直到最后安装好了重启Eclipse
还要安装
The Eclipse Project Updates http://download.eclipse.org/eclipse/updates/4.7
Create a KNIME Extension Project
In the Create new KNIME Node-Extension
dialog window enter the following values:
-
New Project Name:
org.knime.examples.numberformatter
-
Node class name:
NumberFormatter
-
Package name:
org.knime.examples.numberformatter
-
Node vendor:
<your_name>
-
Node type: Select
Manipulator
in the drop down menu.
Replace <your_name>
with the name that you like to be the author of the created extension. Leave all other options as is and click Finish.
Make sure that the checkbox Include sample code in generated classes
is checked. This will include the code of the aforementioned Number Formatter node in the generated files.
but the checkbox Create and download KNIME Target Platform is not checked.
3. KNIME软件工具包下载
KNIME软件工具包的下载地址为https://github.com/KNIME/knime-sdk-setup/ 。需要注意的是:每个KNIME版本的软件工具包都不同,不同版本包含在此存储库的分支中(如图3所示),因此,必须选择此存储库的正确分支才能指定要用于开发工作的KNIME版本。例如,要开发与3.7版本兼容的代码,请签出分支releases/2018-12(因为KNIM是2018年12月发布的)。如果要使用最新的进行开发,则直接下载master分支,但是,请记住,由于API更改或丢失,使用最新构建的扩展可能无法在发行版安装中使用。
在help –>about eclipse中可以看到版本
3.1 在eclipse中加载KNIME软件工具包
导入软件工具包到eclipse:依次点击File—Import—Existing Projects into Workspace—Next—Browse。选择上面下载的软件工具包,最后点击next完成导入。导入完成后Project Explorer内如图6 所示。
注意这两个都要导入
4. 安装所需依赖
- 双击要用于开发的文件 KNIME-AP.target
- 等待一段时间,安装依赖需要时间,等其结束
- 主页面右上角—–set as active target platform
- 然后等待Eclipse解决并激活
重启后右键单击KNIME Analytics Platform.launch,选择Run As—KNIME Analytics Platform。打开后界面如图9所示。这样就安装配置好KNIME的开发环境了。
5.Test the Example Extension
At this point, all parts that are required for a new KNIME Extension are contained in your Eclipse workspace and are ready to run. To test your node, follow the instructions provided in the Launch KNIME Analytics Platform Section of the SDK Setup. After you started KNIME Analytics Platform from Eclipse, the Number Formatter node will be available at the root level of the node repository. Create a new workflow using the node (see Figure below), inspect the input and output tables, and play around with the node.
附加:Deploy your Extension
The second option is to create a dropin
using the Deployable plug-ins and fragments
Wizard from within Eclipse. A dropin
is just a .jar
file containing your Extension that is simply put into the Eclipse dropins
folder to install it.
To create a dropin
containing your Extension, go to File → Export → Plug-in Development → Deployable plug-ins and fragments
and click Next. The dialog that opens will show a list of deployable plug-ins from your workspace. Check the checkbox next to org.knime.examples.numberformatter
. At the bottom of the dialog you are able to select the export method. Choose Directory
and supply a path to a folder where you want to export your plugin to. At last click Finish.
After the export has finished, the selected folder will contain a .jar
file containing your plugin. To install it into any Eclipse or KNIME Analytics Platform installation, place the .jar
file in the dropins
folder of the KNIME/Eclipse installation folder. Note that you have to restart KNIME/Eclipse for the new plugin to be discovered. In this example, the node is then displayed at the top level of the node repository in KNIME Analytics Platform.
你就会发现你不需要使用eclipse启动knime,knime里面就已经有这个插件了
免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://yundeesoft.com/25879.html