• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Port programming

 
Greenhorn
Posts: 3
Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have looked found a lot of articles on the net about Java port programming on the net, but they end up involving other languages. So here's my question, Is it possible to program computer hardware like parallel ports directly in Java or does a native method have to be used. I'm into building automation and programming robotics using the Parallax stamps but want to venture into programming the parallel port to use LEDs to begin my journey into hardware programming with Java.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yep, that's possible. See http://docs.oracle.com/javase/tutorial/networking/, particularly the chapter "All About Sockets".
 
best scout
Posts: 1294
Scala IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Ulf: I guess, Darryl wasn't asking for ports as in UDP/TCP port but instead wanted to know how to handle serial/parallel ports in Java ;-)

In general that's possible but you'll need a library with some native support. At least I don't know of a pure Java solution. The only library I know for programming serial/parallel ports in Java is RXTX although I must admit I don't know if this is a very portable solution which works on any platform. Perhaps you should have a look at the examples and just give it a try.

Marco
 
Bartender
Posts: 3323
86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is also the Java Comms Package which works on Solaris and Linux but not Windows. I used the RXTX package on a Windows system many, many moons ago and from memory it worked well and I believe it also works on Linux.
 
Darryl Sumner
Greenhorn
Posts: 3
Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the help guys. I got a book called Serial Port Complete. It's a pretty good read so far.
 
Surfs up space ponies, I'm making gravy without this lumpy, tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic