当前位置:首页 » 操作系统 » kettle源码下载

kettle源码下载

发布时间: 2025-01-09 23:01:36

⑴ 如何使用kettle源码更改spoon的东西

1.2. 编译源码
将项目加载到eclipse
将kettle项目拷贝到eclipse的workspace目录下,在eclipse中新建java project,项目名称和你拷贝过来的kettle文件夹名称一致

项目导入到eclipse中会出现一个错误,如下图,将这个文件的源码全部注释掉

编译
打开build.xml, 在右边的。Outline 点击kettle->run as ->ant build

第一次编译的时候需要从网上下载几个文件,放在C:\Documents and Settings\Administrator\.subfloor,网络不好的话下载会比较慢,也可以直接文件放在C:\Documents and Settings\Administrator\下。编译完成后将bin目录下的.bat文件拷贝到Kettle目录下点击Spoon.bat运行,运行成功代表编译已近通过
用源码运行Spoon
Kettle源码工程本身可能是在linux64位机器上调试的,swt配置是linux64的库,所有在运行源码前需要修改成win32的swt,步骤如下:工程à属性àJava Build Pathàlibrariesàadd jars

然后将linux64的SWT库删除

最后打开src-uiàorg.pentaho.di.ui.spoonàSpoon.java, Run As àjava application
二.源码分析
2.1. 修改kettle界面
修改初始化界面
打开package org.pentaho.di.ui.spoon的Spoon.Java,找到main函数,该main函数为Spoon工具的入口,找到如下语句

Splash splash = new Splash(display);

该语句为spoon初始化显示的界面,跳到定义Splash.java,下面函数

canvas.addPaintListener(new PaintListener() {
publicvoid paintControl(PaintEvent e) {
String versionText = BaseMessages.getString(PKG, "SplashDialog.Version") + " " + Const.VERSION; //$NON-NLS-1$ //$NON-NLS-2$

StringBuilder sb = new StringBuilder();
String line = null;

try {
BufferedReader reader = new BufferedReader(newInputStreamReader(Splash.class.getClassLoader().getResourceAsStream("org/pentaho/di/ui/core/dialog/license/license.txt")));//$NON-NLS-1$

while((line = reader.readLine()) != null) {
sb.append(line + System.getProperty("line.separator")); //$NON-NLS-1$
}
} catch (Exception ex) {
sb.append(""); //$NON-NLS-1$
Log.warn(BaseMessages.getString(PKG, "SplashDialog.LicenseTextNotFound")); //$NON-NLS-1$
}

String licenseText = sb.toString();
e.gc.drawImage(kettle_image, 0, 0);

// If this is a Milestone or RC release, warn the user
if (Const.RELEASE.equals(Const.ReleaseType.MILESTONE)) {
versionText = BaseMessages.getString(PKG, "SplashDialog.DeveloperRelease") + " - " + versionText; //$NON-NLS-1$ //$NON-NLS-2$
drawVersionWarning(e);
} elseif (Const.RELEASE.equals(Const.ReleaseType.RELEASE_CANDIDATE)) {
versionText = BaseMessages.getString(PKG, "SplashDialog.ReleaseCandidate") + " - " + versionText; //$NON-NLS-1$//$NON-NLS-2$
}
elseif (Const.RELEASE.equals(Const.ReleaseType.PREVIEW)) {
versionText = BaseMessages.getString(PKG, "SplashDialog.PreviewRelease") + " - " + versionText; //$NON-NLS-1$//$NON-NLS-2$
}
elseif (Const.RELEASE.equals(Const.ReleaseType.GA)) {
versionText = BaseMessages.getString(PKG, "SplashDialog.GA") + " - " + versionText; //$NON-NLS-1$//$NON-NLS-2$
}

Font verFont = new Font(e.display, "Helvetica", 11, SWT.BOLD); //$NON-NLS-1$
e.gc.setFont(verFont);
e.gc.drawText(versionText, 290, 205, true);

// try using the desired font size for the license text
int fontSize = 8;
Font licFont = new Font(e.display, "Helvetica", fontSize, SWT.NORMAL); //$NON-NLS-1$
e.gc.setFont(licFont);

// if the text will not fit the allowed space
while (!willLicenseTextFit(licenseText, e.gc)) {
fontSize--;
licFont = new Font(e.display, "Helvetica", fontSize, SWT.NORMAL); //$NON-NLS-1$
e.gc.setFont(licFont);
}

e.gc.drawText(licenseText, 290, 290, true);
}
});

1. 修改背景图片
找到ui/image/下面的kettle_splash.png,替换该图片
2. 修改版本信息
找到e.gc.drawText(versionText, 290, 205, true); 改为e.gc.drawText("海康威视数据交换平台V1.0", 290, 205, true);
3. 修改下面的描述性文字
找到e.gc.drawText(licenseText, 290, 290, true);改为e.gc.drawText("作者:海康", 290, 290, true);
4. 预览效果

⑵ kettle源码搭建运行时出现错误

将安装包pdi-ce-5.4.0.1-130\data-integration\ui目录下的所有文件拷贝到源码包pentaho-kettle-5.4.0.1-R\ui目录下,即可解决~~

⑶ 我看到你关于kettle不释放内存的回答,想要一下你改完后org.pentaho.di.core.logging.LoggingRegistr源码

你留个邮箱或者qq吧 网络hi怎么发文件我还不怎么清楚

⑷ 如何使用kettle源码更改spoon的东西

1.2. 编译源码
将项目加载到eclipse
将kettle项目拷贝到eclipse的workspace目录下,在eclipse中新建java project,项目名称和你拷贝过来的kettle文件夹名称一致

项目导入到eclipse中会出现一个错误,如下图,将这个文件的源码全部注释掉

编译
打开build.xml, 在右边的。Outline 点击kettle->run as ->ant build

第一次编译的时候需要从网上下载几个文件,放在C:\Documents and Settings\Administrator\.subfloor,网络不好的话下载会比较慢,也可以直接文件放在C:\Documents and Settings\Administrator\下。编译完成后将bin目录下的.bat文件拷贝到Kettle目录下点击Spoon.bat运行,运行成功代表编译已近通过
用源码运行Spoon
Kettle源码工程本身可能是在linux64位机器上调试的,swt配置是linux64的库,所有在运行源码前需要修改成win32的swt,步骤如下:工程à属性àJava Build Pathàlibrariesàadd jars

然后将linux64的SWT库删除

最后打开src-uiàorg.pentaho.di.ui.spoonàSpoon.java, Run As àjava application
二.源码分析
2.1. 修改kettle界面
修改初始化界面
打开package org.pentaho.di.ui.spoon的Spoon.Java,找到main函数,该main函数为Spoon工具的入口,找到如下语句

Splash splash = new Splash(display);

该语句为spoon初始化显示的界面,跳到定义Splash.java,下面函数

canvas.addPaintListener(new PaintListener() {
publicvoid paintControl(PaintEvent e) {
String versionText = BaseMessages.getString(PKG, "SplashDialog.Version") + " " + Const.VERSION; //$NON-NLS-1$ //$NON-NLS-2$

StringBuilder sb = new StringBuilder();
String line = null;

try {
BufferedReader reader = new BufferedReader(newInputStreamReader(Splash.class.getClassLoader().getResourceAsStream("org/pentaho/di/ui/core/dialog/license/license.txt")));//$NON-NLS-1$

while((line = reader.readLine()) != null) {
sb.append(line + System.getProperty("line.separator")); //$NON-NLS-1$
}
} catch (Exception ex) {
sb.append(""); //$NON-NLS-1$
Log.warn(BaseMessages.getString(PKG, "SplashDialog.LicenseTextNotFound")); //$NON-NLS-1$
}

String licenseText = sb.toString();
e.gc.drawImage(kettle_image, 0, 0);

// If this is a Milestone or RC release, warn the user
if (Const.RELEASE.equals(Const.ReleaseType.MILESTONE)) {
versionText = BaseMessages.getString(PKG, "SplashDialog.DeveloperRelease") + " - " + versionText; //$NON-NLS-1$ //$NON-NLS-2$
drawVersionWarning(e);
} elseif (Const.RELEASE.equals(Const.ReleaseType.RELEASE_CANDIDATE)) {
versionText = BaseMessages.getString(PKG, "SplashDialog.ReleaseCandidate") + " - " + versionText; //$NON-NLS-1$//$NON-NLS-2$
}
elseif (Const.RELEASE.equals(Const.ReleaseType.PREVIEW)) {
versionText = BaseMessages.getString(PKG, "SplashDialog.PreviewRelease") + " - " + versionText; //$NON-NLS-1$//$NON-NLS-2$
}
elseif (Const.RELEASE.equals(Const.ReleaseType.GA)) {
versionText = BaseMessages.getString(PKG, "SplashDialog.GA") + " - " + versionText; //$NON-NLS-1$//$NON-NLS-2$
}

Font verFont = new Font(e.display, "Helvetica", 11, SWT.BOLD); //$NON-NLS-1$
e.gc.setFont(verFont);
e.gc.drawText(versionText, 290, 205, true);

// try using the desired font size for the license text
int fontSize = 8;
Font licFont = new Font(e.display, "Helvetica", fontSize, SWT.NORMAL); //$NON-NLS-1$
e.gc.setFont(licFont);

// if the text will not fit the allowed space
while (!willLicenseTextFit(licenseText, e.gc)) {
fontSize--;
licFont = new Font(e.display, "Helvetica", fontSize, SWT.NORMAL); //$NON-NLS-1$
e.gc.setFont(licFont);
}

e.gc.drawText(licenseText, 290, 290, true);
}
});

1. 修改背景图片
找到ui/image/下面的kettle_splash.png,替换该图片
2. 修改版本信息
找到e.gc.drawText(versionText, 290, 205, true); 改为e.gc.drawText("海康威视数据交换平台V1.0", 290, 205, true);
3. 修改下面的描述性文字
找到e.gc.drawText(licenseText, 290, 290, true);改为e.gc.drawText("作者:海康", 290, 290, true);
4. 预览效果

⑸ 求Kettle 源代码 下载地址及 Kettle java api教程...

http://kettle.pentaho.com/下载地址!想要什么自己选
http://wiki.pentaho.com/display/EAI/Getting+Started基础教程
http://wiki.pentaho.com/display/EAI/Pentaho+Data+Integration+Steps详细教程

热点内容
我的世界tim服务器ip 发布:2025-01-10 08:55:40 浏览:343
为什么gg都是服务器无响应 发布:2025-01-10 08:53:27 浏览:587
qq消息记录加密 发布:2025-01-10 08:52:46 浏览:118
扫描wifi密码在哪里找 发布:2025-01-10 08:52:40 浏览:871
股票c语言 发布:2025-01-10 08:52:31 浏览:78
数据库监测 发布:2025-01-10 08:51:57 浏览:204
solidworks缓存 发布:2025-01-10 08:51:56 浏览:712
sql语言有什么 发布:2025-01-10 08:51:48 浏览:976
php开发实例教程 发布:2025-01-10 08:49:29 浏览:497
android显示隐藏控件 发布:2025-01-10 08:49:23 浏览:742