以文本方式查看主题

-  计算机科学论坛  (http://bbs.xml.org.cn/index.asp)
--  『 DTD/XML Schema 』  (http://bbs.xml.org.cn/list.asp?boardid=23)
----  关于Jar包的运行问题?  (http://bbs.xml.org.cn/dispbbs.asp?boardid=23&rootid=&id=12095)


--  作者:sxhong
--  发布时间:11/15/2004 11:22:00 PM

--  关于Jar包的运行问题?
将Java程序打成.jar的文件包运行时是不是存在内存"64M"的限制.
我在测试用DOM处理大XML文件的时候出现了这样的问题,"分析器已达到由应用程序设置的实体扩展限制"64.000"
但我直接运行.class文件时却没有这样的限制.这是什么原因呀
注:是字符界面下的编程.谢谢了
--  作者:yuqf
--  发布时间:1/10/2005 9:07:00 PM

--  
我也遇到了这个问题,但差一点被你误导了,请看下面的一段。原因是这样的,你在使用jar包时,使用的jdk1.4.2-b28,其中添加了一个属性DentityExpansionLimit,而你在使用class时,使用的应该是以前版本的jdk,所以没有这个错误,不是打包的事,在使用时按照下面的用法使用即可。


This means that your data has more than 64000 entities ( for instance
  or é ) and that your SAX parser tries to expand them.

Start your application with :
java |-DentityExpansionLimit=100000 ... [same as before]

or another figure > 64000 .

This a behavior of the default SAX parser, see in the source of Sun"s JDK :
|org/apache/crimson/parser/Parser2.java

You could also use another parser, e.g. Xerces; see the JAXP
documentation for how to nominate the parser.

Le 02/27/2004 04:47 PM, Christopher P. Lyman a écrit :

> I’m trying to retrieve a certain document via SOAP. The document in
> question is pretty large, but more importantly there are a great
> number of nodes. When I try to retrieve() I get:
>
> org.xml.sax.SAXParseException: Parser has reached the entity expansion
> limit "64,000" set by the Application.
>
> Does anybody know of a way to up the limit?
>


--  作者:sxhong
--  发布时间:1/12/2005 3:55:00 PM

--  
这是我下面的JDK版本,不是你说的那个版本.
java version "1.4.2_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03)
Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode)

而且我运行.jar文件与.class都是用的同一个JVM。
你上面的说的使用时用下面的方法指的是什么呀,是不是“ Start your application with :
java |-DentityExpansionLimit=100000 ... [same as before]
”,请教了!还想请你说明白一点你是这样解决这个问题的。


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
46.875ms