Java Communications. ParallelPort


Java Communications. ParallelPort
I have a question in Java Communications. I am trying to send the byte[] to the ParallelPort using the outputstream. Here is the code:
portList = CommPortIdentifier.getPortIdentifiers();
while (portList.hasMoreElements()) {
portId = (CommPortIdentifier) portList.nextElement();
if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) {
try {
parallelPort = (ParallelPort)"MoodMusic", 2000);
} catch (PortInUseException e) { }
// Writing to port
try {
outputStream = parallelPort.getOutputStream();
} catch (Exception e) { System.out.println(e.getMesssage());}
I was neither getting an Exception nor getting any response. The application just
freezes. The outputStream is not null. The port is not null as well. Could you help? The same code works perfectly well with SerialPort.
one? If no, where can I find a Windows version?Here:
And have a look at RXTX. There is no Windows version anymore because MS changed the specs for the interface.
Read More: The other 5 answers