This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Spawning Java from C

On 2/23/2012 3:21 PM, Eliot Moss wrote:
On 2/23/2012 12:35 PM, James Rome wrote:
I have code that launches Java from C to run a jar file, and creates a
socket to communicate between the calling program and the jar file. It
works in OS X, Linux, and MinGW on Windows, but not on Cygwin.

One can definitely spawn Java from C, but every JVM I know of is a *Windows* application, which mean that it wants *Windows paths*, not cygwin-style paths. You may find the cygpath utility useful in scripts run under cygwin, to convert between different styles of path.

Java, in particular, wants things like its classpath as a
*semicolon*-separate list of *Windows* path names. These
generally require suitable quoting if being used in scripts
or with bash, since bash interprets semicolcon as separating
bash commands, etc.

As for the particular errors, I am personally less familiar
with using cygrunsrv ...

To the OP, run the same from an elevated prompt and these errors should disappear.

-- Larry


A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]