From: mquinson Date: Mon, 24 Sep 2007 14:36:29 +0000 (+0000) Subject: Insist on searching the DTD where I put it in the jar X-Git-Tag: v3.3~1091 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/150524015ed66466fb23d33466b94ac71ff6d4e9?ds=sidebyside Insist on searching the DTD where I put it in the jar git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4700 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/java/simgrid/msg/DTDResolver.java b/src/java/simgrid/msg/DTDResolver.java index 7d0d58fb3d..5c2ae715c8 100644 --- a/src/java/simgrid/msg/DTDResolver.java +++ b/src/java/simgrid/msg/DTDResolver.java @@ -14,7 +14,6 @@ package simgrid.msg; import java.io.InputStream; -import java.io.FileNotFoundException; import org.xml.sax.EntityResolver; import org.xml.sax.InputSource; import org.xml.sax.SAXException; @@ -34,7 +33,10 @@ public class DTDResolver implements EntityResolver { InputStream in = getClass().getResourceAsStream("/surfxml.dtd"); if(null == in) - /* try to get the DTD from the directory Simgrid */ + /* try to get the DTD from the surf dir in the jar */ + in = getClass().getResourceAsStream("/surf/surfxml.dtd"); + if(null == in) + /* try to get the DTD from the directory Simgrid */ in = getClass().getResourceAsStream("/Simgrid/surfxml.dtd"); if(null == in)