delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/12/01/17:59:05

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,TW_RX
X-Spam-Check-By: sourceware.org
Message-ID: <4CF6D327.3090508@scanit.be>
Date: Wed, 01 Dec 2010 17:58:47 -0500
From: Alexandre Bezroutchko <abb AT scanit DOT be>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.15) Gecko/20101027 Thunderbird/3.0.10
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: problem invoking rxvt from java on windows 7
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019