By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,640 Members | 2,167 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,640 IT Pros & Developers. It's quick & easy.

Making driver for Linux in Java?

P: n/a
Tux
Is it possible and does someone try to make driver
for Linux in Java, for some USB device?
Could Java do that ?
I saw jUSB package but it seems that works only with the
devices which Linux already see.
Jul 17 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Tux <ma*********@inet.hr> wrote in message news:<bu**********@sunce.iskon.hr>...
Is it possible and does someone try to make driver
for Linux in Java, for some USB device?
Could Java do that ?
I saw jUSB package but it seems that works only with the
devices which Linux already see.

The short answer is no. ...well kinda. Consider these two factors:

* It doesn't make sense to make a driver in a high-level language
(like Java) unless the rest of the system is also a high level
language so it can easily interface to the driver.

* Java is designed to be hardware-independent. That is reflected in
the 'write once, run anywhere' mantra. If you write code to interface
to the hardware directly, you have to write native code. You would
then have to recompile this native code for each OS and ship the
correct shared library for others to use it.

So you could make a native driver for use by other Java apps...but is
this what you want?

---
Jared Dykstra
http://www.bork.org/~jared
Jul 17 '05 #2

P: n/a
Tux <ma*********@inet.hr> wrote in message news:<bu**********@sunce.iskon.hr>...
Is it possible and does someone try to make driver
for Linux in Java, for some USB device?
Could Java do that ?
I saw jUSB package but it seems that works only with the
devices which Linux already see.

The short answer is no. ...well kinda. Consider these two factors:

* It doesn't make sense to make a driver in a high-level language
(like Java) unless the rest of the system is also a high level
language so it can easily interface to the driver.

* Java is designed to be hardware-independent. That is reflected in
the 'write once, run anywhere' mantra. If you write code to interface
to the hardware directly, you have to write native code. You would
then have to recompile this native code for each OS and ship the
correct shared library for others to use it.

So you could make a native driver for use by other Java apps...but is
this what you want?

---
Jared Dykstra
http://www.bork.org/~jared
Jul 17 '05 #3

P: n/a

"Jared Dykstra" <dy******@hotmail.com> wrote in message
news:ba**************************@posting.google.c om...
Tux <ma*********@inet.hr> wrote in message

news:<bu**********@sunce.iskon.hr>...
Is it possible and does someone try to make driver
for Linux in Java, for some USB device?
Could Java do that ?
I saw jUSB package but it seems that works only with the
devices which Linux already see.

The short answer is no. ...well kinda. Consider these two factors:

* It doesn't make sense to make a driver in a high-level language
(like Java) unless the rest of the system is also a high level
language so it can easily interface to the driver.

* Java is designed to be hardware-independent. That is reflected in
the 'write once, run anywhere' mantra. If you write code to interface
to the hardware directly, you have to write native code. You would
then have to recompile this native code for each OS and ship the
correct shared library for others to use it.

So you could make a native driver for use by other Java apps...but is
this what you want?

---
Jared Dykstra
http://www.bork.org/~jared


OK. It doesn't need to be a driver but can I make Java application
which reads from USB devices but for that devices driver doesn't exist?
p.s.
jUSB package for Java exist but I can't understand can I use it if Linux
doesn't see my device because there is not proper driver for it.
Jul 17 '05 #4

P: n/a

"Jared Dykstra" <dy******@hotmail.com> wrote in message
news:ba**************************@posting.google.c om...
Tux <ma*********@inet.hr> wrote in message

news:<bu**********@sunce.iskon.hr>...
Is it possible and does someone try to make driver
for Linux in Java, for some USB device?
Could Java do that ?
I saw jUSB package but it seems that works only with the
devices which Linux already see.

The short answer is no. ...well kinda. Consider these two factors:

* It doesn't make sense to make a driver in a high-level language
(like Java) unless the rest of the system is also a high level
language so it can easily interface to the driver.

* Java is designed to be hardware-independent. That is reflected in
the 'write once, run anywhere' mantra. If you write code to interface
to the hardware directly, you have to write native code. You would
then have to recompile this native code for each OS and ship the
correct shared library for others to use it.

So you could make a native driver for use by other Java apps...but is
this what you want?

---
Jared Dykstra
http://www.bork.org/~jared


OK. It doesn't need to be a driver but can I make Java application
which reads from USB devices but for that devices driver doesn't exist?
p.s.
jUSB package for Java exist but I can't understand can I use it if Linux
doesn't see my device because there is not proper driver for it.
Jul 17 '05 #5

P: n/a
You still need to have the driver installed and loaded by the Linux kernel,
then you could write a piece of code in C that can interact with the dirver
through the datastructs. This C library then will need to implement the JNI
interface that allows C code to interface with Java applications this is how
you can gain access to the data being sent by the USB deivce and be able to
send data to that USB device.

Roman.
OK. It doesn't need to be a driver but can I make Java application
which reads from USB devices but for that devices driver doesn't exist?
p.s.
jUSB package for Java exist but I can't understand can I use it if Linux
doesn't see my device because there is not proper driver for it.

Jul 17 '05 #6

P: n/a
You still need to have the driver installed and loaded by the Linux kernel,
then you could write a piece of code in C that can interact with the dirver
through the datastructs. This C library then will need to implement the JNI
interface that allows C code to interface with Java applications this is how
you can gain access to the data being sent by the USB deivce and be able to
send data to that USB device.

Roman.
OK. It doesn't need to be a driver but can I make Java application
which reads from USB devices but for that devices driver doesn't exist?
p.s.
jUSB package for Java exist but I can't understand can I use it if Linux
doesn't see my device because there is not proper driver for it.

Jul 17 '05 #7

P: n/a
Could you please look at http://jusb.sourceforge.net/ and tell me what is a
procedure to use that package? I think that C-code isn't necessary.
Which language is usually uses for writing a Linux driver?
"Roman" <an******@shaw.ca> wrote in message
news:nQJQb.263198$ts4.159277@pd7tw3no...
You still need to have the driver installed and loaded by the Linux kernel, then you could write a piece of code in C that can interact with the dirver through the datastructs. This C library then will need to implement the JNI interface that allows C code to interface with Java applications this is how you can gain access to the data being sent by the USB deivce and be able to send data to that USB device.

Roman.
OK. It doesn't need to be a driver but can I make Java application
which reads from USB devices but for that devices driver doesn't exist?
p.s.
jUSB package for Java exist but I can't understand can I use it if Linux
doesn't see my device because there is not proper driver for it.


Jul 17 '05 #8

P: n/a
Could you please look at http://jusb.sourceforge.net/ and tell me what is a
procedure to use that package? I think that C-code isn't necessary.
Which language is usually uses for writing a Linux driver?
"Roman" <an******@shaw.ca> wrote in message
news:nQJQb.263198$ts4.159277@pd7tw3no...
You still need to have the driver installed and loaded by the Linux kernel, then you could write a piece of code in C that can interact with the dirver through the datastructs. This C library then will need to implement the JNI interface that allows C code to interface with Java applications this is how you can gain access to the data being sent by the USB deivce and be able to send data to that USB device.

Roman.
OK. It doesn't need to be a driver but can I make Java application
which reads from USB devices but for that devices driver doesn't exist?
p.s.
jUSB package for Java exist but I can't understand can I use it if Linux
doesn't see my device because there is not proper driver for it.


Jul 17 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.