> Date: Fri, 2 Jan 2015 06:54:02 -0200
> From: [email protected]
> To: [email protected]
> 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.
MG>followup: wine *supposedly* intercepts all native calls to Windows and
*routes* to the appropriate WINE library
MG>I used it once when a client wanted a Microsoft asmx script to run on IIS
WebServer on a Ubuntu machine
MG>the problem as Jorg pointed out is that you will need to emulate all of the
native calls for process management, MG>socket management,file management as
Windows interfaces (as if you are running on a native windows box..)
MG>installed 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> |
MG> V
MG> WINE (Windows Emulation Libraries)
MG> |
MG> V
MG> POSIX Library
MG>Please 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: [email protected]
> > For additional commands, e-mail: [email protected]
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>