This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / Help, I want to receive data from COM1 port , how can I achieve this in Java, is there bean or something else easy to use in VisualAge? Thanks
-paulzhou(alwaysbeginner);
2001-3-7
(#31077@0)
-
Don't understand why you want to do such a lower-level thing. I have no idea how to do it. I guess you need use JNI.
-jabber(jabber);
2001-3-7
(#31119@0)
-
So, It's really easy in VC++, I just finished this staff, but boss ask me if we can move this staff thing to Java.
-paulzhou(alwaysbeginner);
2001-3-8
(#31525@0)
-
Sorry, I do not exactly how to do it. However, I can assure you that
Java Native Interface be required here because your task is platform -dependent.
-jabber(jabber);
2001-3-9
(#31680@0)
-
You can't and needn't to implement COM port coding in Java, just write it in c.And you can use CORBA to invoke C coding if you want to migrate your software to Java.
-wins(wins);
2001-3-9
(#31808@0)
-
I agree the first part - write code in CIt does not make sence using CORBA to access this small piece C code only to access the COM1 port.
I agree with Jabber that JNI should be used.
But the whole idea sounds like crazy. Why Java and the COM1 together?
If you can treat the COM1 like a character stream (like in BASIC) you may possiblly use File/StreamReader to access the DOS device COM1 for read/write. But the quality of service may not be garanteed.
-albxu(Yukon);
2001-3-16
{423}
(#33902@0)
-
There's an individual package of Java2 Platform, it supports platform independent communications. For detail, go to http://java.sun.com/products/javacomm/ , GOOD LUCK!
-jackh(jackh);
2001-3-9
(#31631@0)
-
Thanks a lot, guys.
-paulzhou(alwaysbeginner);
2001-3-9
(#31789@0)
-
BTW, are you in canada?
-jackh(jackh);
2001-3-11
(#32179@0)