0

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

buch11
  • 872
  • 3
  • 13
  • 29
  • Do you need your GUI to be portable? (are you interested in just wrapping your C library with a Java GUI?) – Mark Elliot Jul 07 '11 at 01:07
  • yes portability is a must,and I want some java library itself I dont want to wrap up my c library as it would be native programming (I think)... – buch11 Jul 07 '11 at 01:21
  • I wonder if [this thread](http://stackoverflow.com/questions/3976907) is any help? I doubt you'll find a terribly active project for this, if you have a library that works, I'd just use that. – Dmitri Jul 07 '11 at 02:11

2 Answers2

3

You've found RXTX?

Michael Brewer-Davis
  • 14,018
  • 5
  • 37
  • 49
0
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();
        }
    }
Felype
  • 3,087
  • 2
  • 25
  • 36