Skip to content

get_user_class中user_class路径能否使用项目相对路径,方便体验 #2

@CNCSMonster

Description

@CNCSMonster
 fn get_user_class(name: &String) -> Result<Vec<u8>, String> {
        let mut user_class_path = String::from("e:/tomato/test/bin/");
        user_class_path.push_str(&name);
        user_class_path.push_str(".class");
        //info!("user class path:{}", user_class_path);
        let mut file = fs::File::open(user_class_path).unwrap();
        let mut buffer = Vec::new();
        let _ = file.read_to_end(&mut buffer);
        return Ok(buffer);
    }

希望改成基于项目相对路径寻址,同时寻找Java标准库中的.class的路径希望能够基于JAVA_HOME环境变量选项指定或者其他环境变量指定

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions