diff --git a/crates/ide-host/src/ops/java.rs b/crates/ide-host/src/ops/java.rs index fcae67de5..2a8081789 100644 --- a/crates/ide-host/src/ops/java.rs +++ b/crates/ide-host/src/ops/java.rs @@ -1292,7 +1292,7 @@ mod tests { fn java_server_launch_classpath_includes_local_maven_system_jars() { let tmp = tempfile::tempdir().unwrap(); let root = dunce::canonicalize(tmp.path()).unwrap(); - let jar = root.join("src/main/resources/lib/offline.jar"); + let jar = ["src", "main", "resources", "lib", "offline.jar"].iter().fold(root.clone(), |p, c| p.join(c)); std::fs::create_dir_all(jar.parent().unwrap()).unwrap(); std::fs::write(&jar, "").unwrap(); std::fs::write(