??xml version="1.0" encoding="utf-8" standalone="yes"?>av中文天堂在线,欧美激情a在线,日本精品久久电影http://www.aygfsteel.com/ravenix/鱼如何控制自q呼吸zh-cnSat, 17 May 2025 19:01:26 GMTSat, 17 May 2025 19:01:26 GMT60在Eclipse Java Web Start环境中用commons-logginghttp://www.aygfsteel.com/ravenix/archive/2005/09/09/12541.htmlravenixravenixFri, 09 Sep 2005 06:30:00 GMThttp://www.aygfsteel.com/ravenix/archive/2005/09/09/12541.htmlhttp://www.aygfsteel.com/ravenix/comments/12541.htmlhttp://www.aygfsteel.com/ravenix/archive/2005/09/09/12541.html#Feedback1http://www.aygfsteel.com/ravenix/comments/commentRss/12541.htmlhttp://www.aygfsteel.com/ravenix/services/trackbacks/12541.htmlEclipse 应用可以使用Java Web Start部vQ实现Rich Client?/p>

q要求把所有的插g打包成独立的jarQƈ且要{v它?/p>

如果要用到别人开发的java库,p利用eclipse提供的Create a plug-in project from existing JAR archives 把它做成 eclipse plugin?br>

Apache Jakarta有许多项目用了commons-logging来写log。如果用Cq样的项目,你也需要把commons-logging做成一? plugin。但是commons-logging在用eclispe plugin包装q用Java Web Start部vӞ它会抛出异常

LogConfigurationException : Invalid class loader hierarchy. You have more than one version of org.apache.commons.logging.Log visible, which is not allowed.

I其原因Q是JCL(Jakarta Commons Logging)中一直存在的classloader问题?

单来_JCL使用调用者的classloader加蝲Log接口Q这是最常见的类载入ҎQ但是加载具体的实现cLQ用的是thread context classloader?br>

通常情况下,q两个classloader是同一个。但是Eclipse有一套插件类加蝲机制Q每个插件用不同的 classloader。在q个例子中,加蝲Log接口是EclipseClassLoaderQ加载Log实现cȝthread context classloader是JNLPClassLoaderQ它们ƈ不相同。问题就来了Q用不同classloader加蝲的类被认为是无关的,所以JCL 的实现类不能赋给Log接口c,׃抛出那个异常?

关于JCL classloader问题更详l解释,Llog4j的创始h之一QCeki Gülcü写的文章

Z解决q个问题Q我启动了一个项目,jcleclipse -- 重写了JCLQ固定实Cؓ把所有的log写到eclipse自己的ILog里。这样就不用要求用户在某个指定的地方建目录来存储log?/p>

jcleclipse目主页 http://jcleclipse.sourceforge.net/
jcleclipse目概要 http://sourceforge.net/projects/jcleclipse



ravenix 2005-09-09 14:30 发表评论
]]>
讄digister不加载外部dtdQ加快处理速度http://www.aygfsteel.com/ravenix/archive/2005/08/30/11571.htmlravenixravenixTue, 30 Aug 2005 07:57:00 GMThttp://www.aygfsteel.com/ravenix/archive/2005/08/30/11571.htmlhttp://www.aygfsteel.com/ravenix/comments/11571.htmlhttp://www.aygfsteel.com/ravenix/archive/2005/08/30/11571.html#Feedback0http://www.aygfsteel.com/ravenix/comments/commentRss/11571.htmlhttp://www.aygfsteel.com/ravenix/services/trackbacks/11571.html
digester.setValidating(false);

底层的sax解析器xerces仍然会去指定的地址d载DTDQ特别地Q如果指定的地址无法获得DTDQ就会抛出异常:
SAXException: The markup declarations contained or pointed to by the document type declaration must be well-formed

Z避免q个问题Q可以用这L语句Q?BR>
digester.setValidating(false);
digester.setFeature(
"http://apache.org/xml/features/nonvalidating/load-external-dtd",false);

当然q个讄只有在底层的sax解析器是xerces才有效。如果你使用的是其它的sax解析器,请参考解析器的文?img src ="http://www.aygfsteel.com/ravenix/aggbug/11571.html" width = "1" height = "1" />

ravenix 2005-08-30 15:57 发表评论
]]>
支持中文element的sax parserhttp://www.aygfsteel.com/ravenix/archive/2005/08/26/11215.htmlravenixravenixFri, 26 Aug 2005 08:04:00 GMThttp://www.aygfsteel.com/ravenix/archive/2005/08/26/11215.htmlhttp://www.aygfsteel.com/ravenix/comments/11215.htmlhttp://www.aygfsteel.com/ravenix/archive/2005/08/26/11215.html#Feedback0http://www.aygfsteel.com/ravenix/comments/commentRss/11215.htmlhttp://www.aygfsteel.com/ravenix/services/trackbacks/11215.html apache xerces 支持中文元素
saxon自带的aelfred 不支?br>

ravenix 2005-08-26 16:04 发表评论
]]>
使用dtdparser解析中文dtdhttp://www.aygfsteel.com/ravenix/archive/2005/08/22/10730.htmlravenixravenixMon, 22 Aug 2005 13:02:00 GMThttp://www.aygfsteel.com/ravenix/archive/2005/08/22/10730.htmlhttp://www.aygfsteel.com/ravenix/comments/10730.htmlhttp://www.aygfsteel.com/ravenix/archive/2005/08/22/10730.html#Feedback1http://www.aygfsteel.com/ravenix/comments/commentRss/10730.htmlhttp://www.aygfsteel.com/ravenix/services/trackbacks/10730.html管有一些不Iwutka dtdparser 仍然是用最q泛的java dtd dom解析器?

其它可用的java dtd parser?Ronald Bourret DTD Parser ?Matra DTD parser

要在DTD中用中文,必须要在dtd文g的第一行写?/p>
<?xml version="1.0" encoding="UTF-8"?>

q且dtd文g以utf-8格式保存。别的编码格式也可以试试Q但我不惛_险?br>

dtdparser不用这个encoding指示来解析DTDQ我们只能自己想办法Q修改它的代码?br>

dtdparser有这些构造器Q省略了带trace的)

DTDParser(java.io.File in)
DTDParser(java.io.Reader in)
DTDParser(java.net.URL in)

其中以Reader为参数的没有~码问题Q因为reader本n已经指定了字W集?/p>

以File为参数的构造器内部使用了new FileReader(in)Q这个方式用系l默认字W集Q不要用它,可以用FileInputStream和InputStreamReader来指定字W集Q传递给以Reader为参数的构造器?/p>

以URL为参数的构造器内部使用了new InputStreamReader(in.openStream())Q没有指定字W集Q我们可以给它增加一个带有String charsetName参数的构造器Q内部调用new InputStreamReader(in.openStream(), charsetName)



ravenix 2005-08-22 21:02 发表评论
]]>
如何在CSS中用中文定?/title><link>http://www.aygfsteel.com/ravenix/archive/2005/08/22/10617.html</link><dc:creator>ravenix</dc:creator><author>ravenix</author><pubDate>Mon, 22 Aug 2005 09:31:00 GMT</pubDate><guid>http://www.aygfsteel.com/ravenix/archive/2005/08/22/10617.html</guid><wfw:comment>http://www.aygfsteel.com/ravenix/comments/10617.html</wfw:comment><comments>http://www.aygfsteel.com/ravenix/archive/2005/08/22/10617.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/ravenix/comments/commentRss/10617.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/ravenix/services/trackbacks/10617.html</trackback:ping><description><![CDATA[<p><a >w3c CSS2规范</a>中明指出,在样式定义中要用unicode字符Q必ȝ转义方式</p> <p>unicode的写法如?/p> <table bgcolor="#cccccc" border="1" cellpadding="4" cellspacing="0"> <tbody><tr> <td><pre>unicode \\[0-9a-f]{1,6}[ \n\r\t\f]?<br></pre></td> </tr> </tbody></table> <p>必须以反斜线开_后面???6q制字符Q?-9a-fQ来表示该字W的unicode码,字符的后面可以附加空|制表W,换行或回车?/p> <p>举例来说Q样式“标题”应该写成\6807\9898</p> <p>java工具native2ascii可以用来查看字符串的unicode码,注意在CSS里反斜线后面不写u</p> <p>另外要注意的是,用sac flute来解析CSS的时候,转义字串的末֦果是回R的话Q一定要附加I格Q否则会被解释成“标题\n?br> </p> <p>CSS里注释是可以写中文的Q用/* */包围h好了?br> 带有中文的CSS最好用UTF-8~码保存Qƈ且在CSS的第一行写? <table bgcolor="#cccccc" border="1" cellpadding="4" cellspacing="0"> <tbody><tr> <td><pre>@charset "UTF-8";<br></pre></td> </tr> </tbody></table> </p><p>CSS规范q没有规定解析器必须支持何种~码Q但是UTF-8是被普遍支持的,如果你的解析器支持多语言~码的话?/p> <p></p><img src ="http://www.aygfsteel.com/ravenix/aggbug/10617.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/ravenix/" target="_blank">ravenix</a> 2005-08-22 17:31 <a href="http://www.aygfsteel.com/ravenix/archive/2005/08/22/10617.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>batik-css不是好的sac实现Q?/title><link>http://www.aygfsteel.com/ravenix/archive/2005/08/21/10622.html</link><dc:creator>ravenix</dc:creator><author>ravenix</author><pubDate>Sun, 21 Aug 2005 10:56:00 GMT</pubDate><guid>http://www.aygfsteel.com/ravenix/archive/2005/08/21/10622.html</guid><wfw:comment>http://www.aygfsteel.com/ravenix/comments/10622.html</wfw:comment><comments>http://www.aygfsteel.com/ravenix/archive/2005/08/21/10622.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/ravenix/comments/commentRss/10622.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/ravenix/services/trackbacks/10622.html</trackback:ping><description><![CDATA[<p><a href="www.w3.org/Style/CSS/SAC/">w3c的sac</a>推荐了几个java实现: flute 1.3, batik-css和cssparser</p> <p>我用单的CSS试了flute和batikQflute功能正常Q但是batik会抛出IllegalStateException。具体原因没有仔l研I?/p> <p>那位高手成功用过batik的css解析器,务请告诉我,不胜感谢?/p><img src ="http://www.aygfsteel.com/ravenix/aggbug/10622.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/ravenix/" target="_blank">ravenix</a> 2005-08-21 18:56 <a href="http://www.aygfsteel.com/ravenix/archive/2005/08/21/10622.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>FOP TTFReader FileNotFoundExceptionhttp://www.aygfsteel.com/ravenix/archive/2005/08/18/10426.htmlravenixravenixThu, 18 Aug 2005 05:54:00 GMThttp://www.aygfsteel.com/ravenix/archive/2005/08/18/10426.htmlhttp://www.aygfsteel.com/ravenix/comments/10426.htmlhttp://www.aygfsteel.com/ravenix/archive/2005/08/18/10426.html#Feedback1http://www.aygfsteel.com/ravenix/comments/commentRss/10426.htmlhttp://www.aygfsteel.com/ravenix/services/trackbacks/10426.html今天用FOP的TTFReader工具创徏字体影射文g,l果报FileNotFoundException

D:\fop-0.20.5>ttfreader.bat c:\WINDOWS\Fonts\simfang.ttf simfang.xml
TTF Reader v1.1.1

Reading c:\WINDOWS\Fonts\simfang.ttf...

Number of glyphs in font: 7580
Postscript format 3
Creating xml font file...

Creating CID encoded metrics
Writing xml font file simfang.xml...

javax.xml.transform.TransformerException: java.io.FileNotFoundException: file:\D
:\fop-0.20.5\simfang.xml (文g名、目录名或卷标语法不正确?
at org.apache.xalan.transformer.TransformerIdentityImpl.createResultCont
entHandler(TransformerIdentityImpl.java:263)
at org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf
ormerIdentityImpl.java:296)
at org.apache.fop.fonts.apps.TTFReader.writeFontXML(TTFReader.java:243)
at org.apache.fop.fonts.apps.TTFReader.main(TTFReader.java:196)
Caused by: java.io.FileNotFoundException: file:\D:\fop-0.20.5\simfang.xml (文g
名、目录名或卷标语法不正确?
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.(Unknown Source)
at java.io.FileOutputStream.(Unknown Source)
at org.apache.xalan.transformer.TransformerIdentityImpl.createResultCont
entHandler(TransformerIdentityImpl.java:253)
... 3 more
---------
java.io.FileNotFoundException: file:\D:\fop-0.20.5\simfang.xml (文g名、目录名?br>h语法不正?
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.(Unknown Source)
at java.io.FileOutputStream.(Unknown Source)
at org.apache.xalan.transformer.TransformerIdentityImpl.createResultCont
entHandler(TransformerIdentityImpl.java:253)
at org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf
ormerIdentityImpl.java:296)
at org.apache.fop.fonts.apps.TTFReader.writeFontXML(TTFReader.java:243)
at org.apache.fop.fonts.apps.TTFReader.main(TTFReader.java:196)
This font contains no embedding license restrictions

在google上搜索到apache的邮件列表里?a >相关讨论,说是FOP只能在jdk 1.4上运行?/p>

jdk1.5内置了xerces和xalanQ这是和1.4不同的地斏V?/p>

我修改了ttfreader.batQ把CLASSPATH里xml-apis.jarQxercesImpl-2.2.1.jarQxalan-2.4.1.jar注释掉,再运行,成功Q?/p>

ravenix 2005-08-18 13:54 发表评论
]]>
վ֩ģ壺 | | Զ| | | | | | ɽ| | | ʯʨ| ұ| | ɽ| | ɽ| | | | | ͨ| Ƽ| ̨| Ϻ| Ϫ| ˾| Ǩ| ɽ| | | | ̨| | ˳| ԭ| | | | | ƽ|