Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Insist on searching the DTD where I put it in the jar
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 24 Sep 2007 14:36:29 +0000 (14:36 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 24 Sep 2007 14:36:29 +0000 (14:36 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4700 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/java/simgrid/msg/DTDResolver.java

index 7d0d58f..5c2ae71 100644 (file)
@@ -14,7 +14,6 @@
 package simgrid.msg;\r
 \r
 import java.io.InputStream;\r
-import java.io.FileNotFoundException;\r
 import org.xml.sax.EntityResolver;\r
 import org.xml.sax.InputSource;\r
 import org.xml.sax.SAXException;\r
@@ -34,7 +33,10 @@ public class DTDResolver implements EntityResolver {
        InputStream in = getClass().getResourceAsStream("/surfxml.dtd"); \r
        \r
        if(null == in)  \r
-               /* try to get the DTD from the directory Simgrid */\r
+            /* try to get the DTD from the surf dir in the jar */\r
+            in = getClass().getResourceAsStream("/surf/surfxml.dtd");\r
+       if(null == in)\r
+            /* try to get the DTD from the directory Simgrid */\r
                in = getClass().getResourceAsStream("/Simgrid/surfxml.dtd"); \r
        \r
        if(null == in)\r