KNIME二次开发的环境配置安装过程

目录

1.搭建前提

2. 安装Node 开发向导

3. KNIME软件工具包下载

3.1 在eclipse中加载KNIME软件工具包

4. 安装所需依赖

5.Test the Example Extension 


1.搭建前提

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

新建node项目

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的开发环境了。

图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.

猜你喜欢

转载自blog.csdn.net/weixin_43135178/article/details/114989067