-
Bug
-
Resolution: Fixed
-
P4
-
9, 10
FULL PRODUCT VERSION :
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Windows 10, Version 1709 (OS Build 16299.125)
A DESCRIPTION OF THE PROBLEM :
- unpack the Java 9 Runtime Environment (tar.gz file) to a temporary directory
- using this JRE launch an external application, e.g. Notepad, and exit the Java application:
import java.io.*;
public class LaunchNotepad {
public static void main(String[] args) throws IOException {
Runtime.getRuntime().exec(new String[] {"C:\\Windows\\notepad.exe"});
}
}
Notice, that the JRE directory can't be renamed. The reason is that according to Microsoft's ProcessExplorer the Notepad childprocess keeps lib/modules locked. This also happens when launching a second Java VM.
REGRESSION. Last worked in version 8u144
ADDITIONAL REGRESSION INFORMATION:
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
After the JRE 9 has exited, no launched application should lock any file inside the JRE directory structure, so the JRE directory can be renamed/removed by the launched application.
ACTUAL -
The JRE 9 can not be renamed/removed (even if the JRE has been exited) until the launched application has been exited.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.io.*;
public class LaunchNotepad {
public static void main(String[] args) throws IOException {
Runtime.getRuntime().exec(new String[] {"C:\\Windows\\notepad.exe"});
}
}
---------- END SOURCE ----------
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Windows 10, Version 1709 (OS Build 16299.125)
A DESCRIPTION OF THE PROBLEM :
- unpack the Java 9 Runtime Environment (tar.gz file) to a temporary directory
- using this JRE launch an external application, e.g. Notepad, and exit the Java application:
import java.io.*;
public class LaunchNotepad {
public static void main(String[] args) throws IOException {
Runtime.getRuntime().exec(new String[] {"C:\\Windows\\notepad.exe"});
}
}
Notice, that the JRE directory can't be renamed. The reason is that according to Microsoft's ProcessExplorer the Notepad childprocess keeps lib/modules locked. This also happens when launching a second Java VM.
REGRESSION. Last worked in version 8u144
ADDITIONAL REGRESSION INFORMATION:
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
After the JRE 9 has exited, no launched application should lock any file inside the JRE directory structure, so the JRE directory can be renamed/removed by the launched application.
ACTUAL -
The JRE 9 can not be renamed/removed (even if the JRE has been exited) until the launched application has been exited.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.io.*;
public class LaunchNotepad {
public static void main(String[] args) throws IOException {
Runtime.getRuntime().exec(new String[] {"C:\\Windows\\notepad.exe"});
}
}
---------- END SOURCE ----------
- duplicates
-
JDK-8210050 Started Java Process with alternate JRE uses file 'lib/modules' in both JREs
-
- Closed
-
-
JDK-8210051 Java inherits handle of "modules" file to sub-processes
-
- Closed
-
- relates to
-
JDK-8271858 Handle to jimage file inherited into child processes (posix)
-
- Closed
-