fix jar launching

This commit is contained in:
SpikeHD 2022-06-03 22:55:23 -07:00
parent 042c999e1b
commit acba392533

View File

@ -36,9 +36,9 @@ pub fn run_command(command: String) {
#[tauri::command]
pub fn run_jar(path: String, execute_in: String, java_path: String) {
let command = if java_path.is_empty() {
format!("java -jar {}", path)
format!("java -jar \"{}\"", path)
} else {
format!("\"{}\" -jar {}", java_path, path)
format!("\"{}\" -jar \"{}\"", java_path, path)
};
// Open the program from the specified path.