Running a program in Rust

⚓ Rust    📅 2026-05-01    👤 surdeus    👁️ 3      

surdeus

Info

This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: Running a program in Rust

Hello?
I wanted to know how to run a program in Rust?
I want to execute the code below within Rust code!
To run the program like this:

c:/java/jdk-23/bin/java.exe -jar /MyApp/WindowJAR.jar

Example:


    pub fn r_open_program(&self, nome_programa: &str) {
        let _ = Command::new(nome_programa).spawn();
    }

        r.r_open_program("c:/java/jdk-23/bin/java.exe -jar /MeuApp/WindowJAR.jar");

2 posts - 2 participants

Read full topic

🏷️ Rust_feed