`

jbpm的eclipse的流程设计器插件designer中的gpd.xml文件乱码问题。

    博客分类:
  • jbpm
阅读更多

jbpm的eclipse的流程设计器插件designer中,gpd.xml文件乱码。

参考:http://brighter.iteye.com/blog/242654

[jbpm]解决JBPM图形流程设计器的gpd .xml文件的中文乱码 问题2008-05-31 20:51JBPM图形流程设计器是eclipse插件,最近我的电脑上用它设计出的流程只要是中文,那么就会在gpd .xml是显示是乱码
经过检验与搜索,确认此问题为设计器的问题。
环境:eclipse 3.3.2 jee版的,字符集设置成utf-8,设计器jpdl_3.1.0.SP1。

解决办法:org.jbpm.gd.jpdl_3.1.0.SP1里面有个文件ui.jar,反编译类org.jbpm.gd.common.editor.AbstractContentProvider.class,修改两个地方。
1、
找到:new ByteArrayInputStream(toNotationInfoXml(rootContainer).getBytes()), true, true, null);,
改成:new ByteArrayInputStream(toNotationInfoXml(rootContainer).getBytes("UTF-8")), true, true, null);
2、
找到:InputStreamReader inputstreamreader = new InputStreamReader(ifile.getContents());
Element notationInfo = new SAXReader().read(reader).getRootElement();,
改成InputStreamReader inputstreamreader = new InputStreamReader(ifile.getContents(),"UTF-8");
Element notationInfo = new SAXReader().read(reader).getRootElement();

重新编译再打入ui.jar包就OK了,说白了就是设置编码UTF-8就OK了。

说明:些类需引入很多eclipse的.jar,仔细在eclipse里找,比较麻烦,哈哈。另,如果你还没解决,留下你的Email,我有时间就会发改后的ui.jar包给你。

再补充一下,每一点都有两个地方要改,也就是说一共要改4个地方。

修改方法:

使用eclipse,新建一个工程。。然后将相关依赖包加入到工程的类路径中(如果不确定是哪个包,就将eclipse的plugins目录下的所有jar加入到工程的类路径下)

 

 

  • ui.rar (486.8 KB)
  • 下载次数: 78
分享到:
评论
2 楼 wiflish 2009-02-21  
已经重新上传。可以下载了。
1 楼 warlish 2009-01-23  
下载不了,你能发到我的邮件里吗?warlish@hotmail.com谢谢

相关推荐

Global site tag (gtag.js) - Google Analytics