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");
} catch(Runtime.ExecutionException e) {
e.printStackTrace();
throw new MSPackException("mspack.mips crashed");
+ } catch(Exception e) {
+ throw new MSPackException(e.toString());
}
}