1 message in net.java.dev.jna.users[Fwd: Re: Re: [jna-users] Help requir...
FromSent OnAttachments
rzoAug 22, 2008 11:05 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[Fwd: Re: Re: [jna-users] Help required with fork/exec]Actions...
From:rzo (rz@gmx.de)
Date:Aug 22, 2008 11:05:16 am
List:net.java.dev.jna.users

Timothy,

Thanks ! I solved the issue. It was my error. I built my java with jdk 1.5, but run it on java 1.4. Sorry for wasting your time.

- Ron

Timothy Wall wrote:

I've gotten this to work on OSX with seemingly irrelevant tweaking (the code as posted didn't work initially), so it might be a timing issue with resource conflicts.

Attached a version that works for me on OSX.

On Aug 19, 2008, at 1:10 PM, rzo wrote:

Daniel,

thanks for the reply.

Concerning " the JVM does not expect this to happen": Why would the JVM not expect this to happen ? Take a look at the implementation of Runtime.exec(). It is implemented using JNI call to fork/execv.

Given that the java Process class does work as I expect it, I have reimplemented it using JNA. With JNA I hope that I can keep my c-compiler and linker in the cupboard. For windows JNA does a perfect job.

I am now trying to implement the same for Linux/Unix.

As stated, the fork works fine. A second process is spawned. However, execv does not seem to work. There is a thread on this mail list with a similar issue. However it seems that the issue was not solved.