Code cleanup
This commit is contained in:
parent
c1eca63f5a
commit
30fe5036d4
7 changed files with 691 additions and 158 deletions
12
src/main.rs
12
src/main.rs
|
@ -1,10 +1,16 @@
|
|||
use std::fs::File;
|
||||
|
||||
mod classfile;
|
||||
mod classstore;
|
||||
mod bytecode;
|
||||
mod jvm;
|
||||
mod stackframe;
|
||||
mod accessmasks;
|
||||
|
||||
fn main() {
|
||||
let class_file = classfile::JavaClassFile::new(&mut File::open("class/Enumerator$EnumeratorIterator.class").unwrap()).unwrap();
|
||||
let mut jvm = jvm::JVM::new();
|
||||
let loaded_name = jvm.load_class(&"class/Main".to_string()).expect("Could not load class");
|
||||
|
||||
println!("{:#?}", class_file);
|
||||
jvm.invoke_static(&loaded_name, &"main".to_string()).expect("failed to call main() on supplied class");
|
||||
|
||||
println!("{:#?}", jvm);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue