Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2005

Tip: Looking for answers? Try searching our database.

Redirect Standard output to keyboard port

Thread view: 
JimWilh - 22 Jun 2005 08:40 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
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.