Forums Register Login

Java accessing windows properties

+Pie Number of slices to send: Send
From my java program I need to access what users are on the system, where their default document storage is located, and things like this.
Any suggestions on what the best way to do this is in java?
+Pie Number of slices to send: Send
In short, you can't get this info directly from Java.
The info you are wanting is most likely stored somewhere in the windows registry, and to access the registry from Java, you need to use jni.
So, first off, figure out where in the registry, this data is found (ie, which HKEY_CURRENT_USER\..., blah blah, path contains info such as "My Documents" folder etc).
Next read up on jni
http://java.sun.com/docs/books/tutorial/native1.1/index.html
Find yourself a c/c++ compiler (theres a good free one at www.bloodshed.net, called dev-c++, or Borland offers a free commandline c++ compiler too.
Probably the most difficult thing about this, is actually knowing where in the registry the values are kept, the Java/jni coding to access the registry isn't so bad.
Good luck.
[ February 24, 2003: Message edited by: James Swan ]
knowledge is the difference between drudgery and strategic action -- tiny ad
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 710 times.
Similar Threads
java struts
JavaFX
answer this
Java Beans
name our framework
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 07:56:26.