- /*
- * If not founded, returning null makes process continue normally (try to get
- * the DTD from the current directory
- */
- return null;
- \r}
- \r\rreturn new InputSource(in);
- \r}
-\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
+ \r
+ /* try to get the DTD from the directory Simgrid */ \r
+ in = getClass().getResourceAsStream("/Simgrid/surfxml.dtd");\r
+ if (null == in)\r
+ \r
+ /* try to get the DTD from the directory Simgrid/msg */ \r
+ in = getClass().getResourceAsStream("/Simgrid/msg/surfxml.dtd");\r
+ if (null == in) {\r
+ System.err.println("\nMSG - XML DTD not found (" +\r
+ systemID.toString() +\r
+ ").\n\nPlease put this file in one of the following destinations :\n\n"\r
+ + " - classpath;\n" +\r
+ " - the directory Simgrid;\n" +\r
+ " - the directory Simgrid/msg;\n" +\r
+ " - the directory of you simulation.\n\n" +\r
+ "Once the DTD puted in one of the previouse destinations, retry you simulation.\n");\r
+ \r
+ /* \r
+ * If not founded, returning null makes process continue normally (try to get \r
+ * the DTD from the current directory \r
+ */ \r
+ return null;\r
+ }\r
+ return new InputSource(in);\r
+ }\r
+}\r
+\r
+\r