mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
[rdct] launcher: add IDEA_INITIAL_DIRECTORY env var for windows
GitOrigin-RevId: af108b69f600ead2536d7532e9fa41b7cc7f13ed
This commit is contained in:
committed by
intellij-monorepo-bot
parent
38773fc1a1
commit
55eca60f5b
@@ -75,6 +75,11 @@ unsafe fn prepare_jni_env(
|
||||
java_home: &Path,
|
||||
vm_options: Vec<String>
|
||||
) -> Result<jni::JNIEnv<'static>> {
|
||||
// Read current directory and pass it to JVM through environment variable. The real current directory will be changed
|
||||
// in load_libjvm().
|
||||
let work_dir = std::env::current_dir().context("Failed to get current directory")?;
|
||||
std::env::set_var("IDEA_INITIAL_DIRECTORY", &work_dir);
|
||||
|
||||
debug!("Resolving libjvm");
|
||||
let libjvm_path = get_libjvm(&java_home)?;
|
||||
debug!("libjvm resolved as {libjvm_path:?}");
|
||||
|
||||
Reference in New Issue
Block a user