buch11
buch11

Reputation: 882

parallel port programming using java

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...

Upvotes: 0

Views: 3978

Answers (2)

Felype
Felype

Reputation: 3136

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();
        }
    }

Upvotes: 0

Michael Brewer-Davis
Michael Brewer-Davis

Reputation: 14276

You've found RXTX?

Upvotes: 3

Related Questions