2004/01/19 00:16:54
[org.ibex.core.git] / src / org / xwt / translators / MSPack.java
index c15aff4..a815801 100644 (file)
@@ -18,7 +18,7 @@ public class MSPack {
         
     public MSPack(InputStream cabIS) throws IOException {
         try {
-            Runtime vm = new MIPSApps();
+            Runtime vm = (Runtime)Class.forName("org.xwt.translators.MIPSApps").newInstance();
             byte[] cab = InputStreamToByteArray.convert(cabIS);
             int cabAddr = vm.sbrk(cab.length);
             if(cabAddr < 0) throw new MSPackException("sbrk failed");
@@ -56,6 +56,8 @@ public class MSPack {
         } catch(Runtime.ExecutionException e) {
             e.printStackTrace();
             throw new MSPackException("mspack.mips crashed");
+        } catch(Exception e) {
+            throw new MSPackException(e.toString());
         }
     }