Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/classpath.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ pub fn should_use_library(lib: &Library) -> bool {
return is_all_rules_satisfied(rules);
}

#[cfg(not(target_os = "windows"))] // Linux and MacOS
pub const CLASSPATH_SEP: char = ':';

#[cfg(target_os = "windows")] // Windows
pub const CLASSPATH_SEP: char = ';';

pub fn create_classpath(
jar_file: PathBuf,
libraries_path: PathBuf,
Expand All @@ -25,7 +31,7 @@ pub fn create_classpath(
let artifact = &lib.downloads.artifact;
let lib_path = artifact.path.clone();
let fixed_lib_path = Path::new(&libraries_path).join(lib_path.replace("/", "\\"));
classpath = format!("{};{}", classpath, fixed_lib_path.to_str().unwrap());
classpath = format!("{}{}{}", classpath, CLASSPATH_SEP, fixed_lib_path.to_str().unwrap());
}
}

Expand Down