Can information be brought from windows device manager using java program? - java

I want to bring the information stored in device manager since there is no way to detect hardwares directly using java.Can this be done?

Not in pure Java. You'll need to use JNI and some Windows C/C++ to get access to that level of info. If that's too much work, you could make use of something like xFunction.

Related

How to read from AsyncStorage in native code (Java, ObjectiveC/Swift)

I have a background service I wrote in native (Java/ObjectiveC) that needs to access data from AsyncStorage in react native. I would like to know if there is an easy way to get this value directly from the native code instead of having to pass it manually through a bridge method.
Since this is a background service that runs even if the app is not running (in Android), it can not call the Javascript code when it needs this data. I could work around it (by setting it in native at the same time I set it in AsyncStorage) but it would be a lot more work.
If you meant this one: https://reactnative.dev/docs/asyncstorage then, it's deprecated. I recommended react-native-default-preference: https://github.com/kevinresol/react-native-default-preference
On Android, it used SharedPreference, so if you use the same preference name. You should able to read it on Android native code
You are going to need to configure the react-native bridge. Here is a good link that should help you understand and configure the bridge.

Desktop Program That Notifies When Web Cam Is Being Accessed

I'm trying to find a developer to write a desktop program that has a pretty basic function. It will notify users, via some dialog (or alert) that some program is about to access the web cam. It could be skype or facetime, or whatever it is, the program should be aware of when the OS's camera is going to be accessed and notify the user. Yes, even if the user is initiating the camera themselves via Skype, the notification would still appear.
My question is this. If I need this program written in Java, is it possible? Obviously I am trying to get it done in Java so it would run on Windows and Mac.
If it is not possible, then it seems as though I'd have to write 2 separate programs on Windows and Mac.
I've come here to get suggestions so that I can connect with the right developers. If you have any suggestions, I'd be happy to hear them. Thanks!
No, you can't write this in Java. Whatever approach you take will be very system-specific (and will probably require enhanced privileges). You could write a JNI library and a Java interface, but it'd probably be about the same amount of trouble to write programs to the native UI libraries.

I want to print using java through usb without driver in windows platform

I want to print using java through usb without driver in windows platform.I read about driver and get some help from this blog http://blog.peter.skarpetis.com/archives/2005/04/07/getting-a-handle-on-usbprintsys/ but still now it was not clear how to use WDDK and WSDK becasuse this tool dose not provide any ide along with this.I also try jsr80 and libusb but all of this are mainly for linux or need some manual installation actually I want to bypass them using directy usbprint.sys,is it possible to access this directly from java?
If someone have some idea about that please share it and also share some using guide about wddk or wsdk and how to use this from java application.

Check for keystroke

Im making an application that should see if your online or away.
So i need to somehow see when the user hit a key on the keyboard last time.
The application is running in the background and you can only access it from the trey.
Is this possible and if it is how would i check.
Best regards
I believe that what you're looking for can be done via a global keyboard hook, but that doesn't have direct support in the JVM. From Googling, it would appear that your only options are to write a C++ shim which you can use via JNI, or go via libffi with JRuby.
From what I've read here it is not possible to add KeyListener to the SystemTray. The only listener that is supported, is the PropertyChangedListener.
Furthermore from that question it seems to be possible on Windows but not on Linux and MacOS.
This is possible, but not using Java. You'll have to use JNI to access OS APIs that provide this information (and implent it differently for each OS).

I want to check open applications before turn off my computer through java program

Actually I am working on a java based application which has a functionality to turn off my system on a specific time and it's working fine but, the requirement says that if any application is open then it should not be close before turn off my system must have to close all the open application manually.
I am unable to find out the solution.
I have never tried this but it looks like you would have to use: Runtime.getRuntime().exec(). This seems to be a pretty good example of how to do this.
Java JNI
https://github.com/twall/jna/
Get the list of all processes via WinAPI and check for user_name in PEB of a process.
Or this http://msdn.microsoft.com/en-us/library/aa390460(v=vs.85).aspx :)

Categories