开发者

parallel port programming using java

开发者 https://www.devze.com 2023-03-17 16:25 出处:网络
I want to program my parallel port and send data to it,i have done this successfully using C+Ubuntu combination ,now I want to add GUI forms in the program so I am using java for the same,So can anyon

I want to program my parallel port and send data to it,i have done this successfully using C+Ubuntu combination ,now I want to add GUI forms in the program so I am using java for the same,So can anyone let me know which library should 开发者_开发问答I use for interfacing ports(parallel and serial) using java.The "comm.jar" is the one available but there are no updates in that lib since long...(I am preferring parallel port over serial port). Thanks in advance...


You've found RXTX?


import java.io.FileOutputStream;
import java.io.PrintStream;

    public class MyClass {
        public static void main(String[] args) {
            FileOutputStream fs = new FileOutputStream("LPT1:");
            PrintStream ps = new PrintStream(fs);

            ps.println("Hello World!");
            ps.flush();
            ps.close();
            fs.close();
        }
    }
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号