Re: [lang] SystemUtils and Cygwin
Hello, Martin! Oh I forgot about wine! It's been more than 6 years without any trace of a Windows executable for me. :) Thanks for the hint, I'll do some experiments. Let's see how things go. :) All the best! Paulo On 01-01-2015 21:10, Martin Gainty wrote: Date: Thu, 1 Jan 2015 20:34:32 -0200 From: cereda.pa...@gmail.com To: user@commons.apache.org Subject: [lang] SystemUtils and Cygwin Dear friends, I have to execute a certain system command according to the underlying operating system; so far, SystemUtils works like a charm. But now I'm facing a quite peculiar situation: I'd need to run a different code if my Java application is being invoked from a Cygwin session. I do not have a Windows machine (that's good!) so I cannot test how things go (that's bad!). Do you guys know if it's possible to find out if my code is running with Cygwin? Any help is greatly appreciated. :) MGhttps://www.winehq.org/download/ MGUbuntu/RH/Debian/CentOS/Fedora/SUSE/Slackware/FreeBSD All the best and a happy new year! Paulo MGBuona Fortuna Paulo MGMartini - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [lang] SystemUtils and Cygwin
Hello, Jörg! Ah, thank you very much for the explanation. I now understand how a process works under Cygwin (to be honest, I was suspecting it was just a compatibility layer on top of a Windows runtime). Now I'm almost a 100% sure the problem relies solely on my end. :) But now I know how to solve it. :) Cheers! Paulo On 01-01-2015 21:12, Jörg Schaible wrote: Hi Paulo, Paulo Roberto Massa Cereda wrote: Dear friends, I have to execute a certain system command according to the underlying operating system; so far, SystemUtils works like a charm. But now I'm facing a quite peculiar situation: I'd need to run a different code if my Java application is being invoked from a Cygwin session. I do not have a Windows machine (that's good!) so I cannot test how things go (that's bad!). Do you guys know if it's possible to find out if my code is running with Cygwin? Any help is greatly appreciated. :) What do you try to accomplish? Please understand, that all the Cygwin stuff works only for applications compiled for Cygwin. Unless you don't have a JVM compiled for the Cygwin core, every JVM is a native Windows application which knowns nothing about Cygwin's Posix compatibility layer. Cygwin itself forces therefore the launch of the Java runtime with an environment adjusted for a pure Windows process. All the best and a happy new year! Same to you. Cheers, Jörg - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
RE: [lang] SystemUtils and Cygwin
Date: Fri, 2 Jan 2015 06:54:02 -0200 From: cereda.pa...@gmail.com To: user@commons.apache.org Subject: Re: [lang] SystemUtils and Cygwin Hello, Jörg! Ah, thank you very much for the explanation. I now understand how a process works under Cygwin (to be honest, I was suspecting it was just a compatibility layer on top of a Windows runtime). Now I'm almost a 100% sure the problem relies solely on my end. :) But now I know how to solve it. :) Cheers! Paulo On 01-01-2015 21:12, Jörg Schaible wrote: Hi Paulo, Paulo Roberto Massa Cereda wrote: Dear friends, I have to execute a certain system command according to the underlying operating system; so far, SystemUtils works like a charm. But now I'm facing a quite peculiar situation: I'd need to run a different code if my Java application is being invoked from a Cygwin session. I do not have a Windows machine (that's good!) so I cannot test how things go (that's bad!). Do you guys know if it's possible to find out if my code is running with Cygwin? Any help is greatly appreciated. :) What do you try to accomplish? Please understand, that all the Cygwin stuff works only for applications compiled for Cygwin. Unless you don't have a JVM compiled for the Cygwin core, every JVM is a native Windows application which knowns nothing about Cygwin's Posix compatibility layer. Cygwin itself forces therefore the launch of the Java runtime with an environment adjusted for a pure Windows process. MGfollowup: wine *supposedly* intercepts all native calls to Windows and *routes* to the appropriate WINE library MGI used it once when a client wanted a Microsoft asmx script to run on IIS WebServer on a Ubuntu machine MGthe problem as Jorg pointed out is that you will need to emulate all of the native calls for process management, MGsocket management,file management as Windows interfaces (as if you are running on a native windows box..) MGinstalled WINE Libraries will *supposedly* act as the shim layer between CYGWIN DLL and the actual native call MG(POSIX) for all native calls (including JNI) routed to Windows DLLs ..here is a diagram: MG CYGWIN call to Windows CYGWIN DLL MG | MGV MG WINE (Windows Emulation Libraries) MG | MGV MG POSIX Library MGPlease keep us apprised what your final solution is All the best and a happy new year! Same to you. Cheers, Jörg - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
[lang] SystemUtils and Cygwin
Dear friends, I have to execute a certain system command according to the underlying operating system; so far, SystemUtils works like a charm. But now I'm facing a quite peculiar situation: I'd need to run a different code if my Java application is being invoked from a Cygwin session. I do not have a Windows machine (that's good!) so I cannot test how things go (that's bad!). Do you guys know if it's possible to find out if my code is running with Cygwin? Any help is greatly appreciated. :) All the best and a happy new year! Paulo - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
RE: [lang] SystemUtils and Cygwin
Date: Thu, 1 Jan 2015 20:34:32 -0200 From: cereda.pa...@gmail.com To: user@commons.apache.org Subject: [lang] SystemUtils and Cygwin Dear friends, I have to execute a certain system command according to the underlying operating system; so far, SystemUtils works like a charm. But now I'm facing a quite peculiar situation: I'd need to run a different code if my Java application is being invoked from a Cygwin session. I do not have a Windows machine (that's good!) so I cannot test how things go (that's bad!). Do you guys know if it's possible to find out if my code is running with Cygwin? Any help is greatly appreciated. :) MGhttps://www.winehq.org/download/ MGUbuntu/RH/Debian/CentOS/Fedora/SUSE/Slackware/FreeBSD All the best and a happy new year! Paulo MGBuona Fortuna Paulo MGMartini - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [lang] SystemUtils and Cygwin
Hi Paulo, Paulo Roberto Massa Cereda wrote: Dear friends, I have to execute a certain system command according to the underlying operating system; so far, SystemUtils works like a charm. But now I'm facing a quite peculiar situation: I'd need to run a different code if my Java application is being invoked from a Cygwin session. I do not have a Windows machine (that's good!) so I cannot test how things go (that's bad!). Do you guys know if it's possible to find out if my code is running with Cygwin? Any help is greatly appreciated. :) What do you try to accomplish? Please understand, that all the Cygwin stuff works only for applications compiled for Cygwin. Unless you don't have a JVM compiled for the Cygwin core, every JVM is a native Windows application which knowns nothing about Cygwin's Posix compatibility layer. Cygwin itself forces therefore the launch of the Java runtime with an environment adjusted for a pure Windows process. All the best and a happy new year! Same to you. Cheers, Jörg - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org