Skip to content

Commit

Permalink
删除一些信息
Browse files Browse the repository at this point in the history
  • Loading branch information
maoabc committed Mar 15, 2023
1 parent dbb2fb7 commit 05b222e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
10 changes: 8 additions & 2 deletions src/main/java/pdd/vm/VmMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@
public class VmMain {

public static void main(String[] args) throws IOException {
if (args.length < 2) {
if (args.length < 1) {
System.err.println("mw.bin dest.jar");
}
MwBin.toClassesJar(new File(args[0]), new File(args[1]));
File dest;
if(args.length<2){
dest=new File("out.jar");
}else {
dest=new File(args[1]);
}
MwBin.toClassesJar(new File(args[0]), dest);
}
}
11 changes: 4 additions & 7 deletions src/test/java/VmTest.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
import org.junit.jupiter.api.Test;
import pdd.vm.mw.MwBin;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;

public class VmTest {
@Test
public void testParse() throws IOException {
// final FieldRefTypeSet fieldSet = new FieldRefTypeSet();
// fieldSet.loadFromAndroidSdk();
final InputStream input = getClass().getResourceAsStream("/mw1.bin");
final File file = new File("/home/mao/mytest/alive.jar");
if (!file.getParentFile().exists()) file.getParentFile().mkdirs();
MwBin.toClassesJar(input, file);
// final InputStream input = getClass().getResourceAsStream("/mw1.bin");
// final File file = new File("/home/mao/mytest/alive.jar");
// if (!file.getParentFile().exists()) file.getParentFile().mkdirs();
// MwBin.toClassesJar(input, file);
}
}
Binary file removed src/test/resources/mw1.bin
Binary file not shown.

0 comments on commit 05b222e

Please sign in to comment.