1.配置环境: MyEclipse 8.5 + Spket 1.6.18 + ExtJS 3.2.1。非link方式? 2.安装Spket 1.6.18 ? 下载Spket,?地址:http://spket.com/download.html ,?选择Spket IDE?或Plugin下载?(CSDN中有Spket 1.6.18的破解版,请自己搜索一下!) 1.?在CMD?中执行?java -jar spket-1.6.17.jar,?点"Next" ,jre支持的话双击运行。 2.?选择eclipse plugin,?点"Next" 3.?选择MyEclipse8.5的安装目录的common文件夹,?点"Next"! 4.?选择Spket?的安装目录(6.0选择MyEclipse的目录一样, 7.0以上不要和MyEclipse的目录在一起),点"Next",?然后开始安装. 5.?以上步骤4和zip文件解压出来文件的一样.如果是MyEclipse6.0,则到止步骤已经安装成功,重启MyEclipse,接着后面步骤(三)的“配置Spket”就可以。果是7.0以上的MyEclipse版本,就还需要以下步骤(5~7)的配置. ? 下面为MyEclipse7.0~8.5或更高版本的安装方法 建一个java文件取名CreatePluginsConfig.java
? 将最后那里的路径改成刚刚安装spket的路径。编译运行复制结果。 6.?把输出的东西追加到X:\Genuitec\MyEclipse 8.5\configuration\org.eclipse.equinox.simpleconfigurator\bundles.info?后面. ? 7.?重启MyEclipse 8.5完成Spket-1.6.18的安装。在MyEclipse 8.5中的菜单Window -> Preferences?中将出现?Spket项目。 ? 8. 完成Spket配置 ? Spket的配置过程与以往的Spket的配置过程类似.要注意的是,只有高于Spket-1.6.17的版本才识别配置文件。 1.?先下载ext-jsb2.zip,?解压到ExtJS 3.0的根目录,?就是和ext-all.js在同一级目录. 好像高版本Extjs开发包里面有ext.jsb2 2. Window → Preferences → Spket → JavaScript Profiles → New. 3.?输入ExtJS,?点"OK". 4.?选择ExtJS,?点"Add Library",?在弹出窗口中选择"ExtJS". 5.?选择ExtJS,?点"Add File",?找到ext.jsb2. 6.?选择ExtJS,?点"Default". ? ?OK, Spket的安装以及Ext3.2.1的配置 都就绪了. ? 新建一个JS文件,?用Open With → Spket Javascript Editor?打开,?测试一下效果吧.
- import?java.io.File;??
- import?java.util.ArrayList;??
- import?java.util.List;??
- public?class?CreatePluginsConfig?{??
- ????private?String?path;??
- ????public?CreatePluginsConfig(String?path)?{??
- ????????this.path?=?path;??
- ????}??
- ????public?void?print()?{??
- ????????List?list?=?getFileList(path);??
- ????????if?(list?==?null)?{??
- ????????????return;??
- ????????}??
- ????????int?length?=?list.size();??
- ????????for?(int?i?=?0;?i?<?length;?i++)?{??
- ????????????String?result?=?"";??
- ????????????String?thePath?=?getFormatPath(getString(list.get(i)));??
- ????????????File?file?=?new?File(thePath);??
- ????????????if?(file.isDirectory())?{??
- ????????????????String?fileName?=?file.getName();??
- ????????????????if?(fileName.indexOf("_")?<?0)?{??
- ????????????????????continue;??
- ????????????????}??
- ????????????????String[]?filenames?=?fileName.split("_");??
- ????????????????String?filename1?=?filenames[0];??
- ????????????????String?filename2?=?filenames[1];??
- ????????????????result?=?filename1?+?","?+?filename2?+?",file:/"?+?path?+?"\\"??
- ????????????????+?fileName?+?"\\,4,false";??
- ????????????????System.out.println(result);??
- ????????????}?else?if?(file.isFile())?{??
- ????????????????String?fileName?=?file.getName();??
- ????????????????if?(fileName.indexOf("_")?<?0)?{??
- ????????????????????continue;??
- ????????????????}??
- ????????????????int?last?=?fileName.lastIndexOf("_");//?最后一个下划线的位置??
- ????????????????String?filename1?=?fileName.substring(0,?last);??
- ????????????????String?filename2?=?fileName.substring(last?+?1,?fileName??
- ????????????????.length()?-?4);??
- ????????????????result?=?filename1?+?","?+?filename2?+?",file:/"?+?path?+?"\\"??
- ????????????????+?fileName?+?",4,false";??
- ????????????????System.out.println(result);??
- ????????????}??
- ????????}??
- ????}??
- ????public?List?getFileList(String?path)?{??
- ????????path?=?getFormatPath(path);??
- ????????path?=?path?+?"/";??
- ????????File?filePath?=?new?File(path);??
- ????????if?(!filePath.isDirectory())?{??
- ????????????return?null;??
- ????????}??
- ????????String[]?filelist?=?filePath.list();??
- ????????List?filelistFilter?=?new?ArrayList();??
- ????????for?(int?i?=?0;?i?<?filelist.length;?i++)?{??
- ????????????String?tempfilename?=?getFormatPath(path?+?filelist[i]);??
- ????????????filelistFilter.add(tempfilename);??
- ????????}??
- ????????return?filelistFilter;??
- ????}??
- ????public?String?getString(Object?object)?{??
- ????????if?(object?==?null)?{??
- ????????????return?"";??
- ????????}??
- ????????return?String.valueOf(object);??
- ????}??
- ????public?String?getFormatPath(String?path)?{??
- ????????path?=?path.replaceAll("\\\\",?"/");??
- ????????path?=?path.replaceAll("//",?"/");??
- ????????return?path;??
- ????}??
- ????public?static?void?main(String[]?args)?{??
- ????????new?CreatePluginsConfig(??
- line-height
1 楼 zhangmingji 2010-11-18你这个是Spket 1.6.17的安装方法吧,Spket 1.6.18根本没有你说的“spket-1.6.17.jar”包。2 楼 zhangmingji 2010-11-18http://xttifqqk.iteye.com/blog/452142