473,396 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Making driver for Linux in Java?

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
8 2506
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
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

"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

"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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Philip | last post by:
Hi, i'am looking for a db2 driver for windows the DB2 servers runs on as400 if that makes any difference. Thanks, Philip
3
by: David | last post by:
Hello all, I have been trying to use the OCI driver to connect to Oracle 9i, but have been getting the following error: java.sql.SQLException: Closed Connection at...
0
by: Luong Phan | last post by:
--0-342085162-1061547060=:86593 Content-Type: text/plain; charset=us-ascii Hi all, In my web application, I use mysql supported by Redhat Linux 7.3 to store database, jakarta-tomcat-3.2.4,...
3
by: Andrew Johnson | last post by:
Hi, I am trying to make a UBD DB2 7.2 connection using the Java COM.ibm.db2.jdbc.app.DB2Driver via Tomcat 3.2.1 on Solaris (and also on an AIX system with 3.3.1). I am attempting this either...
7
by: Rhino | last post by:
I was reading the DB2 for Linux/Unix/Windows (V7.2) manuals just now to get some background information about UDFs when I came across this: "Note that valuable debugging tools such as printf() do...
1
by: sebtiber | last post by:
Hi, I try to connect to db2 with tomcat4.0.6 on linux redhat9.0. with driver db2java.jar I have always the same error "no suitable driver". i try different actions that have read on the forum...
15
by: Joe Weinstein | last post by:
Hi. Below is a simple JDBC program to insert and extract a numerical value. When ResultSet.getDouble() is called, the same program produces different output on solaris than it does on Linux. I...
1
by: vaishnavi | last post by:
hi, i want to develope a device driver for printer on linux os in java. could any one tell me some basic concepts abt device drivers..how they work...are there any built-in functions to recognize a...
3
by: Anoop | last post by:
Is it true that there are no type 4 jdbc drivers to connect to a DB2 server v7.1? The DB2 server is hosted on ACF2 (OS/390). We would be connecting from windows and solaris boxes. If it is true,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.