Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 169019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:33:22+00:00 2026-05-11T12:33:22+00:00

Introduction I heard something about writing device drivers in Java (heard as in with

  • 0

Introduction

I heard something about writing device drivers in Java (heard as in ‘with my ears’, not from the internet) and was wondering… I always thought device drivers operated on an operating system level and thus must be written in the same language as the OS (thus mostly C I suppose)

Questions

  1. Am I generally wrong with this assumption? (it seems so)
  2. How can a driver in an ‘alien’ language be used in the OS?
  3. What are the requirements (from a programming language point of view) for a device driver anyway?

Thanks for reading

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T12:33:23+00:00Added an answer on May 11, 2026 at 12:33 pm

    There are a couple of ways this can be done.

    First, code running at ‘OS level’ does not need to be written in the same language as the OS. It merely has to be able to be linked together with OS code. Virtually all languages can interoperate with C, which is really all that’s needed.

    So language-wise, there is technically no problem. Java functions can call C functions, and C functions can call Java functions. And if the OS isn’t written in C (let’s say, for the sake of argument that it’s written in C++), then the OS C++ code can call into some intermediate C code, which forwards to your Java, and vice versa. C is pretty much a lingua franca of programming.

    Once a program has been compiled (to native code), its source language is no longer relevant. Assembler looks much the same regardless of which language the source code was written in before compilation. As long as you use the same calling convention as the OS, it’s no problem.

    A bigger problem is runtime support. Not a lot of software services are available in the OS. There usually is no Java virtual machine, for example. (There is no reason why there technically couldn’t be, but usually, but usually, it’s safe to assume that it’s not present).

    Unfortunately, in its ‘default’ representation, as Java bytecode, a Java program requires a lot of infrastructure. It needs the Java VM to interpret and JIT the bytecode, and it needs the class library and so on.

    But there are two ways around this:

    • Support Java in the kernel. This would be an unusual step, but it could be done.
    • Or compile your Java source code to a native format. A Java program doesn’t have to be compiled to Java bytecode. You could compile it to x86 assembler. The same goes for whatever class libraries you use. Those too could be compiled all the way to assembler. Of course, parts of the Java class library requires certain OS features that won’t be available, but then use of those classes could be avoided.

    So yes, it can be done. But it’s not straightforward, and it’s unclear what you’d gain.

    Of course another problem may be that Java won’t let you access arbitrary memory locations, which would make a lot of hardware communication pretty tricky. But that could be worked around too, perhaps by calling into very simple C functions which simply return the relevant memory areas as arrays for Java to work on.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 90k
  • Answers 90k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer File encryption is not part of the OpenXML ECMA/ISO specifications.… May 11, 2026 at 6:01 pm
  • Editorial Team
    Editorial Team added an answer If you have ssh access to your web space, connect… May 11, 2026 at 6:01 pm
  • Editorial Team
    Editorial Team added an answer A domain specific language is a language that's written to… May 11, 2026 at 6:01 pm

Related Questions

I've been trying to find a good video that I can show at a
I've been trying to learn about Neural Networks for a while now, and I
How can I count how many previous FootNoteReference nodes there are in an xml
I'd like to learn how to effectively use Swing Application Framework . Most of

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.