I am facing an issue with the enclosed code, where trying to load one of custom built DLL with visual studio 2010 from java application and trying to launch an exe from the code.
Issue : B.exe does not get launched
However, when I remove the line System.load(“C:TempA.dll”) then B.exe launches fine.
Note : There are no exceptions when the line System.load is called from java code.
public class LaunchExe {
public static void main(String[] args) throws InterruptedException {
System.load("C:\Temp\A.dll");
try {
Runtime.getRuntime().exec("B.exe");
} catch (IOException e) {
e.printStackTrace();
}
}
}
JDK Version : 1.7
Eclipse : Mars
Visual Studio Version : 2010
Operating System : Windows Server 2016
Any input will be helpful here.
Expecting Application B.exe to launch successfully.
Tried :
- Higher Java version JDK 11 and latest Eclipse
- Removed the line System.load(“C:TempA.dll”) and it works fine
- Checked UAC settings to make sure nothing is blocking on the Operating System Windows Server 2016 and it’s enabled and set to lowest level.
- Also, group policy ‘Build in administrator’ is set to enabled.
- All permissions full access Read/Write/Execute set to JDK, Eclipse, B.exe and A.dll
SCA S is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.