Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Insist on searching the DTD where I put it in the jar
[simgrid.git] / 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