I have written a Class, that reads from a COM-port. I have a tag-reader
attached to my COM-port, and I want to write the ID of the readed tag
into whatever application I want, for example notepad. Not just as an
output on the running program.
That means, I will run the "Reading-application" in the background. And
every time a tag is read, the output goes to the aplication having
focus. Just like a keyboard. Anyone have an idea.
I have made the part reading the tags, so it is just the redirection
that I need help for...
Jim
Aaron Isotton - 22 Jun 2005 12:36 GMT
> I have written a Class, that reads from a COM-port. I have a tag-reader
> attached to my COM-port, and I want to write the ID of the readed tag
[quoted text clipped - 4 lines]
> every time a tag is read, the output goes to the aplication having
> focus. Just like a keyboard. Anyone have an idea.
This is quite platform-specific, so I doubt you can do this in Java
natively. For example, if you log in to a server via SSH (or remote
desktop, or some other remote access tools) then you'd probably not want
the input to come from the "keyboard", but from whatever source the
"normal" input is coming from.
For some programs, this might be "standard input", but not for the ones
interfacing with the "input" in a more low-level way (such as most text
editors).
You might want to have a look at JNI and write some platform-dependent code.
It is probably much easier to generate the output in your program, and
copy it to the clipboard (or X buffer or whatever). Not exactly what you
asked for, but maybe that's an alternative.
Greetings,
Aaron
JimWilh - 27 Jun 2005 07:44 GMT
This application will run on Windows XP or Windows 2000. And it doesn't
matter if it is platform dependent. It should be used to load text into
an applet. And since the applet can't interact with the local COM-port
I have to think of other solutions.
Anyone have an idea?
Jim
Andrew Thompson - 27 Jun 2005 08:29 GMT
> the applet can't interact with the local COM-port
Why not? What is preventing the applet loading
and instantiating ..
> ..a Class, that reads from a COM-port.
?

Signature
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
JimWilh - 29 Jun 2005 13:55 GMT
I have tried to use the class from an applet, but my knowledge of
applets is limited.
Which libraries does the applet use? Is it the local libraries on the
client, or th libraries on the server, in which the applet reside?
Doesn't the applet have limited access to the client?
Andrew Thompson - 29 Jun 2005 16:21 GMT
> I have tried to use the class from an applet, but my knowledge of
> applets is limited.
> Which libraries does the applet use? Is it the local libraries on the
> client, or th libraries on the server, in which the applet reside?
> Doesn't the applet have limited access to the client?
Move this thread (or repost it) over to c.l.j.help and I will continue..

Signature
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
Lucy - 23 Jun 2005 00:16 GMT
> I have written a Class, that reads from a COM-port. I have a tag-reader
> attached to my COM-port, and I want to write the ID of the readed tag
[quoted text clipped - 9 lines]
>
> Jim
Try using a pipe.
java myjavaprogram | someotherprogram