Hello,
My Java application need to invoke rxvt. On Windows XP rxvt window
appears and works fine. On Windows 7 the window does not appear, while
I can see rxvt.exe in the list of running processes. Launching
rxvt.exe from Start/Run, from Explorer, and from cmd.exe shell all
work fine too, so the problem appears only if rxvt.exe is called from
Java application...
Below is a very short example which can be used to reproduce the problem:
-----------------------------------------------------------------------------
import java.io.IOException;
public class Main {
public static void main(String[] args) throws IOException,
InterruptedException {
Runtime runtime = Runtime.getRuntime();
System.err.println("executing");
Process process = runtime.exec("c:\\cygwin\\bin\\rxvt.exe");
System.err.println("exec done, waiting ...");
process.waitFor();
System.err.println("wait done");
}
}
-----------------------------------------------------------------------------
1) save as Main.java
2) compile it:
javac Main.java
3) run it:
java Main
The problem appears in Windows 7 64 bit, latest Cygwin and Sun JRE:
$ uname -a
CYGWIN_NT-6.1-WOW64 w7 1.7.7(0.230/5/3) 2010-08-31 09:58 i686 Cygwin
Z:\home-tmp\JavaApplication4\dist>"c:\Program Files
(x86)\Java\jre6\bin\java.exe
" -version
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
Any idea why this can possibly happen? fixes/workarounds? Thank you.
Best regards,
Alexandre Bezroutchko
www.gremwell.com