网友录制的视频教程MyEclipse 7.1安装和汉化视频教程 建议看完图文教程在看视频的。
有了汉化包我们开始汉化吧,需要照我的步骤来。
1:把下载好的汉化包里的language的文件夹全覆盖到你安装的MyEclipse7.1里面language的文件夹。
在QQ群里有人说找不到目录下的org.eclipse.equinox.simpleconfigurator/bundles.info这个文件,解决办法删除MyEclipse 7.1/configuration 目录下的org.eclipse.update目录,为了保证能一次汉化成功,在运行CreatePluginsConfig.java时先删除org.eclipse.update目录。
2:把压缩包里面的CreatePluginsConfig.java里面的代码复制如下面一样。
import java.io.File; import java.util.ArrayList; import java.util.List; /** * MyEclipse 7.1安装插件代码生成器 * @author Administrator * */ 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 l![](https://img-blog.csdnimg.cn/img_convert/6575a282b9d315caa7579008c573c9e8.png) ength = 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; } String[] filenames = fileName.split("_"); String filename1 = filenames[0]+"_"+filenames[1]; String filename2 = filenames[2].substring(0, filenames[2].lastIndexOf(".")); 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("E://learnSoft//myEclipse//language//plugins").print(); //插件路径 //ACCP教程网提示:上面E://learnSoft//myEclipse//language//plugins是你的myEclipse安装的路径 } } |
注意上面E://learnSoft//myEclipse//language//plugins的路径要改成你电脑安装MyEclipse7.1的路径,把红色的路径地址替换成你的,注意在每个"/“多加一个”/",比如我的安装路径是e:/soft/accp就要改成e://soft//accp 。
/accp就要改成e://soft//accp 。