I have searched and have no answer about Java support control hardware on PC as c/c++. I wondered Java can control devices such as CD-ROM, speaker, especially Bluetooth?. Thank you so much!
Can Java control hardware devices on PC?
2.4k Views Asked by Sơn Đàm At
2
There are 2 best solutions below
0
Audrius Meškauskas
On
Java can access hardware devices like keyboard, mouse, hard drive, network card and the like because it can call the C code through Java Native Interface (JNI). Without this, Java would we a useless "thing in itself". If you look into sources of the Java system library, you will see many native method calls.
JNI can also be used from the user Java code, so Java is capable of controllingmost (if not all) hardware devices that C code could.
Related Questions in JAVA
- I need the BIRT.war that is compatible with Java 17 and Tomcat 10
- Creating global Class holder
- No method found for class java.lang.String in Kafka
- Issue edit a jtable with a pictures
- getting error when trying to launch kotlin jar file that use supabase "java.lang.NoClassDefFoundError"
- Does the && (logical AND) operator have a higher precedence than || (logical OR) operator in Java?
- Mixed color rendering in a JTable
- HTTPS configuration in Spring Boot, server returning timeout
- How to use Layout to create textfields which dont increase in size?
- Function for making the code wait in javafx
- How to create beans of the same class for multiple template parameters in Spring
- How could you print a specific String from an array with the values of an array from a double array on the same line, using iteration to print all?
- org.telegram.telegrambots.meta.exceptions.TelegramApiException: Bot token and username can't be empty
- Accessing Secret Variables in Classic Pipelines through Java app in Azure DevOps
- Postgres && statement Error in Mybatis Mapper?
Related Questions in BLUETOOTH
- React native - how can i listen callBack function
- java android: how to send data on Bluetooth between android and computer
- Pair bluetooth device to Android 12 phone by selecting my own pin
- Bluetooth virtual sniffer for windows
- PyBluez connection problems
- How to set value the descriptor of iOS BLE in Objective-C?
- python script using bluetooth running on windows 11 vs raspberry pi4
- Mobile printing PT200 tru Bluetooth opened in web app
- PlatformException(connect_errd or timeout)
- Bluetooth Driver file corrupt or replaced
- Bluetooth driver Failed and unable to install bluetooth driver for jammy ubuntu
- strange Flutter bug on turning on/off bluetooth permission using IOS device
- Call requires permission which may be rejected by user code should explicitly check to see if permission is available
- Error during getting android Bluetooth device RSSI from Windows 10 using BlueCove library
- Error in Bluetooth specification? Heading field of Location and Speed
Related Questions in HARDWARE
- Is cartopy projections are computaionally heavy?
- Memory location changing from 0 to 1 consistently on Mac
- How to adjust differences of hardwares while executing code
- Read/write data to DS1642
- How can I get current cpufreq in kernel code?
- Is it possible to fetch iPhone device model number (MT552GR/A) programatically?
- The problem with running the Simulink model on arduino uno
- In VSC and other apps, when i scroll the text becomes black and turns normal after a very short delay 100ms. It is really annoying
- ERROR in rc_mpu_calibrate_accel_routine, center of fitted ellipsoids(in beagle bone blue)
- Will the 16n prefetch in DDR5 affect the bandwidth of small-granularity memory accesses?
- suppose a program is running on 5 threads.If an extra thread is added,what factors should be considered?
- Signed Driver rejected by Windows 10
- How to randomly simulate keypresses for special keys
- How does a TLB manage memory translation for addresses that cross page boundaries?
- Get number of RAM channels as a property of the system
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Since Java requires your system to have JVM installed along with the JDK/JRE environment; it does not run directly with the system. Therefore, no it cannot directly control your system besides memory usage.
Yet like the comment also reinforces you can use Jni calls to work with system hardware but it won't actually allow you to work "directly with the hardware".
You can easily search for Jni on google to find resource.