[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Linux file descriptor to InputStream
The problem wht that is that it does not use the underlying posix
function to accomplish all tasks. For example. It does not use any
native code to access '/etc/passwd'. IMHO the only code that should
access that file is code that is in libc. In my case this would have
killed me. Because I replaced all of the passwd() functions in glibc
with my own code to get passwords from a config binary structure.
/etc/passwd does not exist so I would have gotten an exception.
On Tue, 2002-10-29 at 09:50, Henri Yandell wrote:
>
> Good luck. Bear in mind that there probably already is a Java POSIX, so
> you might find that if you need it it would be easier to use that [google
> finds me: http://www.bmsi.com/java/posix/package.html].
>
> Doing something that's already been done though is a good way to learn
> more, so don't let me stop you :) Just figure someone ought to do the
> whole annoying [there is one] bit.
>
> Hen
>
> On 29 Oct 2002, cfowler wrote:
>
> > I would like to rewrite one so I can fully understand and learn JNI.
> >
> > I think I'm going to start working on a Java POSIX API for Linux. So
> > many times I need IPC, and full POSIX stuff that I could not use it.
> >
> > Chris
> >
> > On Tue, 2002-10-29 at 09:38, Henri Yandell wrote:
> > >
> > > I believe you can get an IBM implementation of the Comm API for Linux.
> > > I know it's something I install when I install SuSE.
> > >
> > > Hen
> > >
> > > On 29 Oct 2002, cfowler wrote:
> > >
> > > > Hello,
> > > >
> > > > I'm working on an industrial control application under Linux that will
> > > > use the serial port to communicate the CNC machines. The Java
> > > > Communications API seems to only Support Solars and Windows so I'll be
> > > > writing my own. In Linux I'll have a file descriptor that will
> > > > represent the open serial port. how to I pass that back to the java app
> > > > as a InputStream so it can read and write. Or is that not the best
> > > > method?
> > > >
> > > > Should I just have a Linux.Serial.API.write(char[] data). Method in my
> > > > JNI and not concern myself with Java I/O in this app. I really do not
> > > > need to use any Java I/O features but I thought that if I did it may
> > > > expand me to do other things.
> > > >
> > > > Thanks,
> > > > Christopher Fowler
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> >
> >
> >
>
>
>