There is in my Java application the following piece of code:
boolean is64 = System.getProperty("os.arch").contains("64");
String oskPath = is64 ? "/SysWOW64/osk.exe" :"/system32/osk.exe";
Desktop desktop = null;
if (Desktop.isDesktopSupported()) {
desktop = Desktop.getDesktop();
}
String sysroot = System.getenv("SystemRoot");
try {
System.out.println("SysArch "+System.getProperty("os.arch")+ " " +is64);
desktop.open(new File(sysroot + oskPath));
wich calls Windows' On-Screen Keyboard. When I run the .jar on Windows 64bits it's ok, but it doesn't work when I run the .exe. I've tried this:
Runtime.getRuntime().exec("cmd /c " + sysroot + oskPath);
and this:
Runtime.getRuntime().exec("osk");
but the same thing happened. I Created .exe whith launch4j andI tried to convert the .bat (who runs .jar) to .exe but nothing happened.. Can someone please help?. Thanks in advance.